diff --git a/conf/db_struct.php b/conf/db_struct.php index de994b0..2c55418 100644 --- a/conf/db_struct.php +++ b/conf/db_struct.php @@ -145,6 +145,7 @@ define('CONTRATS_TABLE_STRUCT', array( "nb_cheque" => array( "type" => "int", "min" => 1, "max" => 99, "default" => 0, "force_default_under_min" => true ), "np_paniers_distrib_avt_saisie" => array( "type" => "int", "min" => 1, "max" => 99, "default" => 0, "force_default_under_min" => true ), "force_eligible" => array( "type" => "bool", "default" => 0 ), + "ignore_warning" => array( "type" => "bool", "default" => 0 ), "archive" => array( "type" => "bool", "default" => 0 ), "force_not_archive" => array( "type" => "bool", "default" => 0 ), "del" => array( "type" => "bool", "default" => 0 ) @@ -189,6 +190,7 @@ function getContratsTableSelectBaseSQL() { .CONTRATS_TABLE.".`nb_cheque`," .CONTRATS_TABLE.".`np_paniers_distrib_avt_saisie`," .CONTRATS_TABLE.".`force_eligible`," + .CONTRATS_TABLE.".`ignore_warning`," .CONTRATS_TABLE.".`archive`," .COMPLEMENTS_CONTRATS_STATUS_VIEW.".`complements`," .COMPLEMENTS_CONTRATS_STATUS_VIEW.".`complements_regles`," diff --git a/functions/functions_contrats.php b/functions/functions_contrats.php index 77de17b..89460b8 100644 --- a/functions/functions_contrats.php +++ b/functions/functions_contrats.php @@ -74,7 +74,7 @@ function getContratsList($order='id', $sens='ASC', $filtres=array(), $search=fal if(!$r['erreur']) { foreach($r['datas'] as $i) { - if(!$i["type_ref"]>0) $i["type_nom"] = "personnalisé (".$i["groupe_nom"]." - ".$i["nb_paniers"]." x ".$i["panier_type_nom"]." - ".CONTRATS_FREQUENCES[$i["frequence"]].")"; + if(!$i["type_ref"]>0) $i["type_nom"] = "personnalisé"; $i["date_print"] = formatDate($i["date"], "mysql_date", "date"); diff --git a/paniers.sql b/paniers.sql index b2c3193..bbf6d19 100644 --- a/paniers.sql +++ b/paniers.sql @@ -122,6 +122,7 @@ CREATE TABLE `contrats` ( `nb_cheque` int(2) UNSIGNED NOT NULL DEFAULT '0', `np_paniers_distrib_avt_saisie` int(2) UNSIGNED NOT NULL DEFAULT '0', `force_eligible` tinyint(1) UNSIGNED NOT NULL DEFAULT '0', + `ignore_warning` tinyint(1) UNSIGNED NOT NULL DEFAULT '0', `force_not_archive` tinyint(1) UNSIGNED NOT NULL DEFAULT '0', `archive` tinyint(1) UNSIGNED NOT NULL DEFAULT '0', `del` tinyint(1) UNSIGNED NOT NULL DEFAULT '0', diff --git a/public_html_admin/js/contrats.js b/public_html_admin/js/contrats.js index 8a8db8a..0711020 100644 --- a/public_html_admin/js/contrats.js +++ b/public_html_admin/js/contrats.js @@ -283,6 +283,7 @@ function modalFormContrat_loadDatas(modal,id) { modal.find("input[name=nb_cheque]").val(datas.nb_cheque); modal.find("input[name=np_paniers_distrib_avt_saisie]").val(datas.np_paniers_distrib_avt_saisie); modal.find("input[type=checkbox][name=force_eligible]").prop("checked",datas.force_eligible>0); + modal.find("input[type=checkbox][name=ignore_warning]").prop("checked",datas.ignore_warning>0); if(modal) modal.modal('show'); }).fail(function() { alert("("+contratsConf.type+" - load datas in modal form)"); }); @@ -321,6 +322,7 @@ function modalFormContrat_clear(modal) { modal.find("input[name=nb_cheque]").val(""); modal.find("input[name=np_paniers_distrib_avt_saisie]").val(""); modal.find("input[type=checkbox][name=force_eligible]").prop("checked",false); + modal.find("input[type=checkbox][name=ignore_warning]").prop("checked",false); } function modalFormContrat_getDatas(modal) { @@ -336,7 +338,8 @@ function modalFormContrat_getDatas(modal) { 'lieu_depot' : parseInt( modal.find("select[name=lieu_depot]").val() ), 'nb_cheque' : parseInt( modal.find("input[name=nb_cheque]").val() ), 'np_paniers_distrib_avt_saisie' : modal.find("input[name=np_paniers_distrib_avt_saisie]").val(), - 'force_eligible' : modal.find("input[type=checkbox][name=force_eligible]").prop("checked") ? 1 : 0 + 'force_eligible' : modal.find("input[type=checkbox][name=force_eligible]").prop("checked") ? 1 : 0, + 'ignore_warning' : modal.find("input[type=checkbox][name=ignore_warning]").prop("checked") ? 1 : 0 }; // CHECK TYPE_EXIST diff --git a/public_html_admin/js/functions.js b/public_html_admin/js/functions.js index 4ddfe1f..54fb832 100644 --- a/public_html_admin/js/functions.js +++ b/public_html_admin/js/functions.js @@ -555,6 +555,7 @@ function initListProgressLoad(list, url, listName) { if(isDefined(list)) { var contentH = list.innerHeight(); + list.listProgressLoad_resize(); $(window).resize( function() { list.listProgressLoad_resize(); } ); list.scroll(function(e) { diff --git a/public_html_admin/templates/contrats/contrat_form.tpl b/public_html_admin/templates/contrats/contrat_form.tpl index 40f0341..5f41d4f 100644 --- a/public_html_admin/templates/contrats/contrat_form.tpl +++ b/public_html_admin/templates/contrats/contrat_form.tpl @@ -78,5 +78,10 @@ forcer le contrat une fois le nombre de paniers livrés dépassé +