Révisions affichage multi-tarifs
Ajout print list légumes & contrat Ajout print feuille de distributions Debugs divers
This commit is contained in:
parent
ade7b3380e
commit
8d76559474
|
|
@ -757,6 +757,9 @@ function formatDate($original='', $originalFormat="mysql_datetime", $destination
|
|||
case 'print_date': // "j mois annee"
|
||||
return $infos['tm_mday']." ".$GLOBALS['PRINT_MOIS_COURT'][intVal($infos['tm_mon'])]." ".$infos['tm_year'];
|
||||
break;
|
||||
case 'print_time': // "%H:%M"
|
||||
return $infos['tm_hour'].":".$infos['tm_min'];
|
||||
break;
|
||||
case 'print_date_with_day': // "jour j mois annee"
|
||||
return $GLOBALS['PRINT_JOUR'][$infos['tm_wday']]." ".$infos['tm_mday']." ".$GLOBALS['PRINT_MOIS_COURT'][intVal($infos['tm_mon'])]." ".$infos['tm_year'];
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -303,6 +303,7 @@ function getClientAbsenceAtDate($client, $date) {
|
|||
." WHERE ".CLIENTS_ABSENCES_TABLE.".`client`=".intval($client)
|
||||
." AND ".CLIENTS_ABSENCES_TABLE.".`debut`<='".$date_checked."'"
|
||||
." AND ".CLIENTS_ABSENCES_TABLE.".`fin`>='".$date_checked."'"
|
||||
." AND ".CLIENTS_ABSENCES_TABLE.".`del`=0"
|
||||
." ORDER BY ".CLIENTS_ABSENCES_TABLE.".`fin` DESC LIMIT 0,1";
|
||||
|
||||
$r = $GLOBALS['db_admin']['man']->select($sql);
|
||||
|
|
|
|||
|
|
@ -280,3 +280,80 @@ function eraseContrat($id) {
|
|||
"du contrat" // ERROR STRING
|
||||
);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// PRINT LIST //////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function printContratsList($list) {
|
||||
$GLOBALS['smarty'] -> assign('logo', PUBLIC_HTML_ADMIN.'img/logo.png');
|
||||
$GLOBALS['smarty'] -> assign('date', formatDate('', '', 'print_date'));
|
||||
$GLOBALS['smarty'] -> assign('time', formatDate('', '', 'print_time'));
|
||||
|
||||
$cssFiles = array(
|
||||
PUBLIC_HTML_ADMIN.'css/bootstrap_print_light.css',
|
||||
PUBLIC_HTML_ADMIN.'css/print.css'
|
||||
);
|
||||
$GLOBALS['smarty'] -> assign('cssFiles',$cssFiles);
|
||||
|
||||
// LIST
|
||||
$pList = array();
|
||||
foreach($list as $i) {
|
||||
// GROUP BY - GROUPE / LIEU / TYPE DE PANNIER
|
||||
$groupe = intval($i['groupe_ref']);
|
||||
$lieu = intval($i['lieu_depot_ref']);
|
||||
$pType = intval($i['panier_type_ref']);
|
||||
|
||||
// CREATION DU GROUPE
|
||||
if(!array_key_exists($groupe, $pList)) {
|
||||
$pList[$groupe] = array(
|
||||
"ref" => $groupe,
|
||||
"nom" => $i['groupe_nom'],
|
||||
"nb_contrats" => 0,
|
||||
"lieux" => array()
|
||||
);
|
||||
}
|
||||
|
||||
// CREATION DU LIEU
|
||||
if(!array_key_exists($lieu, $pList[$groupe]["lieux"])) {
|
||||
$pList[$groupe]["lieux"][$lieu] = array(
|
||||
"ref" => $lieu,
|
||||
"nom" => $i['lieu_depot_nom'],
|
||||
"nb_contrats" => 0,
|
||||
"paniers" => array()
|
||||
);
|
||||
}
|
||||
|
||||
// CREATION DU TYPE DE PANIER
|
||||
if(!array_key_exists($pType, $pList[$groupe]["lieux"][$lieu]["paniers"])) {
|
||||
$pList[$groupe]["lieux"][$lieu]["paniers"][$pType] = array(
|
||||
"type_ref" => $pType,
|
||||
"type_nom" => $i['panier_type_nom'],
|
||||
"nb_contrats" => 0,
|
||||
"contrats" => array()
|
||||
);
|
||||
}
|
||||
|
||||
// AJOUT
|
||||
$pList[$groupe]["lieux"][$lieu]["paniers"][$pType]["contrats"][] = $i;
|
||||
$pList[$groupe]["nb_contrats"]++;
|
||||
$pList[$groupe]["lieux"][$lieu]["nb_contrats"]++;
|
||||
$pList[$groupe]["lieux"][$lieu]["paniers"][$pType]["nb_contrats"]++;
|
||||
}
|
||||
|
||||
$GLOBALS['smarty'] -> assign('list',$pList);
|
||||
$html = $GLOBALS['smarty']->fetch("contrats/contrats_list_print.tpl");
|
||||
// die($html);
|
||||
|
||||
$dompdf = new Dompdf\Dompdf();
|
||||
$dompdf->loadHtml($html);
|
||||
$dompdf->setPaper('A4', "portrait");
|
||||
$options = $dompdf->getOptions();
|
||||
$options->setIsRemoteEnabled(true);
|
||||
$dompdf->setOptions($options);
|
||||
|
||||
$dompdf->render();
|
||||
$dompdf->stream("Liste des contrats (".formatDate('', '', 'strdate').").pdf");
|
||||
|
||||
die();
|
||||
}
|
||||
|
|
@ -212,7 +212,7 @@ function getLegumeTarifsList($legume) {
|
|||
$sql = getLegumesTarifsTableSelectBaseSQL()
|
||||
." WHERE ".LEGUMES_TARIFS_TABLE.".`legume`=".intval($legume)
|
||||
." AND ".LEGUMES_TARIFS_TABLE.".`del`=0"
|
||||
." ORDER BY ".LEGUMES_TARIFS_TABLE.".`date` DESC";
|
||||
." ORDER BY ".LEGUMES_TARIFS_TABLE.".`date` DESC, ".LEGUMES_TARIFS_TABLE.".`ref` DESC";
|
||||
|
||||
$r = $GLOBALS['db_admin']['man']->select($sql);
|
||||
|
||||
|
|
@ -220,6 +220,7 @@ function getLegumeTarifsList($legume) {
|
|||
foreach($r['datas'] as $i) {
|
||||
$i["print"] = $i["prix"]." €/".$i["unite"];
|
||||
$i["date_print"] = formatDate($i["date"], "mysql_date", "print_date");
|
||||
$i["use"] = getLegumeTarifUtilise($i['ref']);
|
||||
$list[] = $i;
|
||||
}
|
||||
}
|
||||
|
|
@ -244,29 +245,15 @@ function getLegumeTarifs($legume, $date=false) {
|
|||
"ref" => 0
|
||||
);
|
||||
|
||||
// TARIF TOUT GROUPE
|
||||
if(is_array($tarifToutGrp)) {
|
||||
$tarif["ref"] = intval($tarifToutGrp["ref"]);
|
||||
$tarif["prix"] = $tarifToutGrp["prix"];
|
||||
$tarif["unite"] = $tarifToutGrp["unite"];
|
||||
$tarif["print"] = $tarifToutGrp["print"];
|
||||
$tarif["date"] = $tarifToutGrp["date"];
|
||||
$tarif["date_print"] = $tarifToutGrp["date_print"];
|
||||
$tarif["tarif_groupe"] = 0;
|
||||
}
|
||||
|
||||
// TARIF SPECIFIQUE
|
||||
$tarifGrp = getLegumeTarif($legume, $g['ref'], $date);
|
||||
$tarifGrp = getLegumeTarif($legume, $g['ref'], $date, false);
|
||||
if(is_array($tarifGrp)) {
|
||||
if(!is_array($tarifToutGrp) || (is_array($tarifToutGrp) && $tarifToutGrp["dateObj"] < $tarifGrp["dateObj"])) {
|
||||
$tarif["ref"] = intval($tarifGrp["ref"]);
|
||||
$tarif["prix"] = $tarifGrp["prix"];
|
||||
$tarif["unite"] = $tarifGrp["unite"];
|
||||
$tarif["print"] = $tarifGrp["print"];
|
||||
$tarif["date"] = $tarifGrp["date"];
|
||||
$tarif["date_print"] = $tarifGrp["date_print"];
|
||||
$tarif["tarif_groupe"] = $g['ref'];
|
||||
}
|
||||
$tarif["ref"] = intval($tarifGrp["ref"]);
|
||||
$tarif["prix"] = $tarifGrp["prix"];
|
||||
$tarif["unite"] = $tarifGrp["unite"];
|
||||
$tarif["print"] = $tarifGrp["print"];
|
||||
$tarif["date"] = $tarifGrp["date"];
|
||||
$tarif["date_print"] = $tarifGrp["date_print"];
|
||||
$tarif["tarif_groupe"] = $g['ref'];
|
||||
}
|
||||
|
||||
$list[$g['ref']] = $tarif;
|
||||
|
|
@ -301,7 +288,7 @@ function getLegumeTarif($legume, $groupe, $date=false, $groupe_exclusif=true) {
|
|||
$sql .= " AND ".LEGUMES_TARIFS_TABLE.".`date`<='".$date."'";
|
||||
}
|
||||
|
||||
$sql .= " ORDER BY ".LEGUMES_TARIFS_TABLE.".`date` DESC";
|
||||
$sql .= " ORDER BY ".LEGUMES_TARIFS_TABLE.".`date` DESC, ".LEGUMES_TARIFS_TABLE.".`ref` DESC";
|
||||
|
||||
$r = $GLOBALS['db_admin']['man']->select($sql);
|
||||
|
||||
|
|
@ -321,6 +308,23 @@ function getLegumeTarif($legume, $groupe, $date=false, $groupe_exclusif=true) {
|
|||
return $i;
|
||||
}
|
||||
|
||||
function getLegumeTarifUtilise($tarif) {
|
||||
$use = false;
|
||||
|
||||
$sql = "SELECT COUNT(*) as 'use' FROM ".LIVRAISONS_LEGUMES_TABLE." WHERE tarif=".intval($tarif);
|
||||
addDebug($sql);
|
||||
|
||||
$r = $GLOBALS['db_admin']['man']->select($sql,1);
|
||||
|
||||
if(!$r['erreur']) $use = (int)$r['datas']["use"]>0;
|
||||
else {
|
||||
$er = "</br>sql: ".$sql."</br>error: ".getReadableVar($r['erreur']);
|
||||
$GLOBALS['errors'][] = "Une erreur est survenue durant l'analyse d'utilisation du tarif de légume dans le base de données !".$er;
|
||||
}
|
||||
|
||||
return $use;
|
||||
}
|
||||
|
||||
function addLegumeTarif($datas) {
|
||||
return addDatasInTable(
|
||||
$GLOBALS['db_admin']['man'], // DB MANAGER
|
||||
|
|
@ -331,6 +335,18 @@ function addLegumeTarif($datas) {
|
|||
);
|
||||
}
|
||||
|
||||
function updateLegumeTarif($id, $datas) {
|
||||
return updateDatasInTable(
|
||||
$GLOBALS['db_admin']['man'], // DB MANAGER
|
||||
LEGUMES_TARIFS_TABLE, // TABLE NAME
|
||||
LEGUMES_TARIFS_TABLE_STRUCT, // TABLE STRUCTURE
|
||||
$id, // ID
|
||||
$datas, // DATAS
|
||||
"du tarif", // NULL STRING
|
||||
"au tarif" // ERROR STRING
|
||||
);
|
||||
}
|
||||
|
||||
function deleteLegumeTarif($id) {
|
||||
return deleteItemInTable(
|
||||
$GLOBALS['db_admin']['man'], // DB MANAGER
|
||||
|
|
@ -349,38 +365,33 @@ function eraseLegumeTarif($id) {
|
|||
);
|
||||
}
|
||||
|
||||
function getLegumeTarifHistorique($id, $current = 0) {
|
||||
$list = array();
|
||||
|
||||
$sql = getLegumesTarifsTableSelectBaseSQL()
|
||||
." WHERE ".LEGUMES_TARIFS_TABLE.".legume=".intval($id)
|
||||
." AND ".LEGUMES_TARIFS_TABLE.".del=0";
|
||||
|
||||
// ORDRE
|
||||
$sql.=" ORDER BY ".LEGUMES_TARIFS_TABLE.".date DESC";
|
||||
|
||||
$r = $GLOBALS['db_admin']['man']->select($sql);
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// PRINT LIST //////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if(!$r['erreur']) {
|
||||
$last_date = "";
|
||||
foreach($r['datas'] as $i) {
|
||||
$i["tarif_print"] = $i["tarif_prix"]." €/".$i["tarif_unite"];
|
||||
$i["tarif_date_print"] = formatDate($i["tarif_date"], "mysql_date", "print_date");
|
||||
$i["tarif_end_date"] = ($last_date!="") ? $last_date : NULL;
|
||||
$i["tarif_end_date_print"] = ($last_date!="") ? formatDate($last_date, "mysql_date", "print_date") : NULL;
|
||||
|
||||
$i["tarif_periode"] = (is_null($i["tarif_end_date"]) ? "depuis le " : "du ").$i["tarif_date_print"];
|
||||
if(!is_null($i["tarif_end_date"])) $id["tarif_periode"] .= " au ".$i["tarif_end_date_print"];
|
||||
|
||||
if($i['ref'] != $current) $list[] = $i;
|
||||
|
||||
$last_date = $i["tarif_date"];
|
||||
}
|
||||
}
|
||||
else {
|
||||
$er = "</br>sql: ".$sql."</br>error: ".getReadableVar($r['erreur']);
|
||||
$GLOBALS['errors'][] = "Une erreur est survenue durant la récupération de l'historique de tarif du légume dans le base de données !".$er;
|
||||
}
|
||||
function printLegumesList() {
|
||||
$GLOBALS['smarty'] -> assign('logo', PUBLIC_HTML_ADMIN.'img/logo.png');
|
||||
$GLOBALS['smarty'] -> assign('date', formatDate('', '', 'print_date'));
|
||||
$GLOBALS['smarty'] -> assign('time', formatDate('', '', 'print_time'));
|
||||
|
||||
$cssFiles = array(
|
||||
PUBLIC_HTML_ADMIN.'css/bootstrap_print_light.css',
|
||||
PUBLIC_HTML_ADMIN.'css/print.css'
|
||||
);
|
||||
$GLOBALS['smarty'] -> assign('cssFiles',$cssFiles);
|
||||
|
||||
$html = $GLOBALS['smarty']->fetch("legumes/legumes_list_print.tpl");
|
||||
// die($html);
|
||||
|
||||
$dompdf = new Dompdf\Dompdf();
|
||||
$dompdf->loadHtml($html);
|
||||
$dompdf->setPaper('A4', "portrait");
|
||||
$options = $dompdf->getOptions();
|
||||
$options->setIsRemoteEnabled(true);
|
||||
$dompdf->setOptions($options);
|
||||
|
||||
$dompdf->render();
|
||||
$dompdf->stream("Liste des légumes (".formatDate('', '', 'strdate').").pdf");
|
||||
|
||||
return $list;
|
||||
die();
|
||||
}
|
||||
|
|
@ -116,11 +116,13 @@ function getLivraisonDatas($id) {
|
|||
|
||||
$i["lieux"] = getLivraisonLieux($id);
|
||||
$i["paniers"] = getLivraisonPaniers($id);
|
||||
$i["paniers_types"] = getLivraisonPaniers($id, 0, true);
|
||||
$i["paniers_contrats"] = getLivraisonPaniersContratsList($id);
|
||||
$i["contrats_list"] = getLivraisonPaniersContratsList($id, $i["paniers_contrats"]);
|
||||
$i["nb_paniers"] = getLivraisonNbPaniers($id);
|
||||
$i["legumes"] = getLivraisonLegumes($id, $i["nb_paniers"]);
|
||||
$i["legumes"] = getLivraisonLegumes($id, "type", $i["nb_paniers"]);
|
||||
$i["total_legumes"] = calcLivraisonTotalLegumes($i["legumes"]);
|
||||
$i["legumes_distrib"] = getLivraisonLegumes($id, "legume", $i["nb_paniers"]);
|
||||
|
||||
$i["paniers_eligibles"] = getLivraisonPaniersEligibles($i["paniers_groupe_ref"], $i["date"], $i["quinz_groupe"], $i['paniers']);
|
||||
$i["emargement_list"] = getLivraisonEmargementList($i["paniers_eligibles"], $i["date"]);
|
||||
|
|
@ -380,7 +382,6 @@ function getLivraisonPaniersEligibles($paniers_groupe, $date, $quinz_groupe, $pa
|
|||
$list[$lieu]["nb_paniers"]++;
|
||||
$list[$lieu]["paniers"][$pType]["nb_paniers"]++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -575,7 +576,7 @@ function updateLivraisonComplement($livraison, $contrat, $datas) {
|
|||
// LIVRAISONS - LEGUMES ////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function getLivraisonLegumes($livraison, $nbPaniers=[]) {
|
||||
function getLivraisonLegumes($livraison, $groupBy=false, $nbPaniers=[]) {
|
||||
$list = array();
|
||||
|
||||
$sql = getLivraisonsLegumesTableSelectBaseSQL();
|
||||
|
|
@ -587,24 +588,40 @@ function getLivraisonLegumes($livraison, $nbPaniers=[]) {
|
|||
if(!$r['erreur']) {
|
||||
foreach($r['datas'] as $i) {
|
||||
$i['tarif_unite_acro'] = LEGUMES_TARIFS_UNITES_ACRONYMES[$i['tarif_unite']];
|
||||
$i['quantite_print'] = floatval($i['quantite'])." ".$i['tarif_unite_acro'];
|
||||
if($i["tarif_unite"]=="kg" && floatval($i["quantite"])*1000<1000) $i['quantite_print'] = (floatval($i["quantite"])*1000)." g";
|
||||
|
||||
// GROUPE PAR TYPE DE PANIER
|
||||
if(!array_key_exists($i["panier_type_ref"], $list)) {
|
||||
$list[$i["panier_type_ref"]] = array(
|
||||
"ref" => $i["panier_type_ref"],
|
||||
"nom" => $i["panier_type_nom"],
|
||||
"nb" => 0,
|
||||
"montant" => 0.0,
|
||||
"legumes" => array()
|
||||
);
|
||||
|
||||
if(array_key_exists($i["panier_type_ref"], $nbPaniers)) $list[$i["panier_type_ref"]]['nb'] = $nbPaniers[$i["panier_type_ref"]]['nb'];
|
||||
if($groupBy == "type") {
|
||||
if(!array_key_exists($i["panier_type_ref"], $list)) {
|
||||
$list[$i["panier_type_ref"]] = array(
|
||||
"ref" => $i["panier_type_ref"],
|
||||
"nom" => $i["panier_type_nom"],
|
||||
"nb" => 0,
|
||||
"montant" => 0.0,
|
||||
"legumes" => array()
|
||||
);
|
||||
|
||||
if(array_key_exists($i["panier_type_ref"], $nbPaniers)) $list[$i["panier_type_ref"]]['nb'] = $nbPaniers[$i["panier_type_ref"]]['nb'];
|
||||
}
|
||||
$list[$i["panier_type_ref"]]["legumes"][] = $i;
|
||||
$list[$i["panier_type_ref"]]["montant"] += floatval($i["quantite"]) * floatval($i["tarif_prix"]);
|
||||
}
|
||||
$list[$i["panier_type_ref"]]["legumes"][] = $i;
|
||||
$list[$i["panier_type_ref"]]["montant"] += floatval($i["quantite"]) * floatval($i["tarif_prix"]);
|
||||
// GROUPE PAR LEGUME
|
||||
else if($groupBy == "legume") {
|
||||
if(!array_key_exists($i["ref"], $list)) {
|
||||
$list[$i["ref"]] = array(
|
||||
"ref" => $i["ref"],
|
||||
"nom" => $i["nom"],
|
||||
"paniers" => array()
|
||||
);
|
||||
}
|
||||
$list[$i["ref"]]["paniers"][$i["panier_type_ref"]] = $i;
|
||||
}
|
||||
else $list[] = $i;
|
||||
}
|
||||
|
||||
$list = orderListByKey($list, "nom", "ASC");
|
||||
if($groupBy == "type") $list = orderListByKey($list, "nom", "ASC");
|
||||
}
|
||||
else {
|
||||
$er = "</br>sql: ".$sql."</br>error: ".getReadableVar($r['erreur']);
|
||||
|
|
@ -674,6 +691,7 @@ function exportLivraisonTemplateToPDF($templateFile, $outputFileName, $orientati
|
|||
|
||||
$cssFiles = array(
|
||||
PUBLIC_HTML_ADMIN.'css/bootstrap_print_light.css',
|
||||
PUBLIC_HTML_ADMIN.'css/print.css',
|
||||
PUBLIC_HTML_ADMIN.'css/livraisons.css'
|
||||
);
|
||||
$GLOBALS['smarty'] -> assign('cssFiles',$cssFiles);
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ DEFAULT CHARSET=utf8;
|
|||
CREATE TABLE `legumes_tarifs` (
|
||||
`ref` smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`legume` smallint(5) UNSIGNED NOT NULL,
|
||||
`groupe` smallint(5) UNSIGNED NULL DEFAULT NULL,
|
||||
`groupe` smallint(5) UNSIGNED NOT NULL DEFAULT '0'
|
||||
`prix` float(5,2) UNSIGNED NOT NULL,
|
||||
`unite` set('kg','pièce','botte') NOT NULL DEFAULT 'kg',
|
||||
`date` date NOT NULL,
|
||||
|
|
|
|||
|
|
@ -127,6 +127,9 @@ switch($action) {
|
|||
case "autocomplete_list": die( json_encode( getClientsAutocompleteList() ) ); break;
|
||||
// DEFAULT - LIST
|
||||
default: {
|
||||
// PRINT
|
||||
$print = isset($_REQUEST["action"]) && $_REQUEST["action"]=="printList";
|
||||
|
||||
// REQUIRED LISTS & FILTRE
|
||||
$groupesList = getPaniersGroupesList();
|
||||
$groupe = getRequestAndSessionSave("groupe", "livraisons_filtre_groupe", "groupe", "int", 0, $groupesList, true);
|
||||
|
|
@ -144,18 +147,22 @@ switch($action) {
|
|||
$search = getSearch("contrats_search");
|
||||
|
||||
// LIMITS
|
||||
$limits = array("start" => 0, "end" => LIST_NB_LIGNES_PAR_PAGE, "nbItemsByPage" => LIST_NB_LIGNES_PAR_PAGE, "max" => getNbContratsInList($filtres, $search));
|
||||
if(isset($_REQUEST['startListAt']) && (int)$_REQUEST['startListAt']>0) {
|
||||
$limits['start'] = intval($_REQUEST['startListAt']);
|
||||
$limits['end'] = $limits['start'] + $limits['nbItemsByPage'];
|
||||
if($limits['end'] > $limits['max']) $limits['end'] = $limits['max'];
|
||||
if($print) $limits = false;
|
||||
else {
|
||||
$limits = array("start" => 0, "end" => LIST_NB_LIGNES_PAR_PAGE, "nbItemsByPage" => LIST_NB_LIGNES_PAR_PAGE, "max" => getNbContratsInList($filtres, $search));
|
||||
if(isset($_REQUEST['startListAt']) && (int)$_REQUEST['startListAt']>0) {
|
||||
$limits['start'] = intval($_REQUEST['startListAt']);
|
||||
$limits['end'] = $limits['start'] + $limits['nbItemsByPage'];
|
||||
if($limits['end'] > $limits['max']) $limits['end'] = $limits['max'];
|
||||
}
|
||||
$limits['rest'] = $limits['max'] - $limits['end'];
|
||||
$GLOBALS['smarty'] -> assign('list_limits',$limits);
|
||||
}
|
||||
$limits['rest'] = $limits['max'] - $limits['end'];
|
||||
$GLOBALS['smarty'] -> assign('list_limits',$limits);
|
||||
|
||||
// LIST
|
||||
$order = getListOrder('contrats_list_order', 'contrats_list_sens', $allowContratsListOrder, 'prenom');
|
||||
$list = getContratsList($order["order"], $order["sens"], $filtres, $search, $limits);
|
||||
if($print) die( printContratsList($list) );
|
||||
$GLOBALS['smarty'] -> assign('list',$list);
|
||||
|
||||
// LIST PART
|
||||
|
|
|
|||
|
|
@ -85,6 +85,8 @@ div.secondbar form.navbar_filtre {
|
|||
margin-left: auto!important;
|
||||
}
|
||||
|
||||
div.secondbar form.navbar-right { padding-right: 0; }
|
||||
|
||||
div.secondbar ul.navbar-nav li > a:hover,
|
||||
div.secondbar ul.navbar-nav li.active > a:hover,
|
||||
div.secondbar ul.navbar-nav li.active > a {
|
||||
|
|
@ -490,9 +492,9 @@ table.modal-body tr:last-child {
|
|||
border-bottom-left-radius: 6px;
|
||||
border-bottom-right-radius: 6px;
|
||||
}
|
||||
table.modal-body tr:last-child td:first-child { border-bottom-left-radius: 6px; }
|
||||
table.modal-body tr:last-child th:first-child { border-bottom-left-radius: 6px; }
|
||||
table.modal-body tr:last-child td:last-child { border-bottom-right-radius: 6px; }
|
||||
table.modal-body tr:last-child td:first-child { border-bottom-left-radius: 6px; !important }
|
||||
table.modal-body tr:last-child th:first-child { border-bottom-left-radius: 6px; !important }
|
||||
table.modal-body tr:last-child td:last-child { border-bottom-right-radius: 6px; !important }
|
||||
|
||||
/* INLINE SELECT MANAGER */
|
||||
|
||||
|
|
@ -543,18 +545,21 @@ div.formTabs table.modal-body tr:first-child td { border-top: none; }
|
|||
|
||||
/* MODAL VIEW LEGUME */
|
||||
|
||||
.has-next-tarif { background-color: azure; }
|
||||
.has-next-tarif { background-color: #e5ffe7; }
|
||||
|
||||
#modalViewLegume tr.tarifs_titre { background-color: #f2f2f2; border-top: 3px solid #ddd; }
|
||||
#modalViewLegume tr.tarifs_titre th.groupe { border-left: 1px solid #999999; border-right: 1px solid #999999; }
|
||||
#modalViewLegume tr.tarif td { border: 1px solid #999999; }
|
||||
#modalViewLegume tr.tarif td { border-top: 1px solid #999999; }
|
||||
#modalViewLegume tr.tarif:not(:last-child) td { border-bottom: 1px solid #999999; }
|
||||
#modalViewLegume tr.tarif td:not(:first-child) { border-left: 1px solid #999999; }
|
||||
#modalViewLegume tr.tarif td:not(:first-last) { border-right: 1px solid #999999; }
|
||||
|
||||
#modalViewLegume td.tarif { text-align: center; }
|
||||
#modalViewLegume tr.tarif.courant td {
|
||||
background-color: rgba(51, 122, 183, .2);
|
||||
border-color: #999999;
|
||||
}
|
||||
#modalViewLegume td.tarif.groupe-null { background-color: #ddd!important; }
|
||||
|
||||
#modalViewLegume td.tarif.next { background-color: #e5ffe7!important; }
|
||||
#modalViewLegume td.tarif.current { background-color: #bfe2ff;!important; }
|
||||
#modalViewLegume td.tarif.old { background-color: #f2f2f2!important; }
|
||||
#modalViewLegume td.tarif.not_apply { background-color: #ccc!important; }
|
||||
|
||||
/* FORM LEGUME */
|
||||
.formLegume div.tarif { margin-bottom: 5px; }
|
||||
|
|
|
|||
|
|
@ -136,25 +136,41 @@
|
|||
.formLivraison div.formTabs > div.tabLegumes table.panier th.total.montant { font-size: 1.5em; }
|
||||
.formLivraison div.formTabs > div.tabLegumes table.panier th.total.unite { font-size: 1.5em; }
|
||||
|
||||
/* PRINT */
|
||||
/* BTN PRINT */
|
||||
|
||||
#modalViewLivraison div.btnPrint { margin-right: 10px; }
|
||||
|
||||
body.printLivraison { font-size: 8pt; }
|
||||
body.printLivraison[orientation=landscape] { margin-top: -20px; }
|
||||
/* PRINT - DISTRIB */
|
||||
|
||||
table.printHeader { width: 100%; margin-bottom: 10px; }
|
||||
table.printHeader th.titre { width: 25%; font-size: 10pt; vertical-align: middle; }
|
||||
table.printHeader th.page { width: 50%; font-size: 16pt; text-align: center; }
|
||||
table.printHeader th.logo { width: 25%; text-align: right; padding: 10pt; }
|
||||
table.printHeader th.logo > img { height: 50pt; }
|
||||
.page_break { page-break-before: always; }
|
||||
table.distrib {
|
||||
width: 100%;
|
||||
border-collapse: true;
|
||||
table-layout: fixed;
|
||||
}
|
||||
table.distrib thead tr { background-color: rgba(51, 122, 183, .1); }
|
||||
|
||||
table.emargement {
|
||||
width: 100%;
|
||||
border-collapse: true;
|
||||
table.distrib th, table.distrib td {
|
||||
padding: 10px;
|
||||
border: 1px dotted #333333;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
table.distrib td.legume {
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
background-color: rgba(51, 122, 183, .1);
|
||||
}
|
||||
|
||||
table.distrib td.quantite {
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
/* PRINT - EMARGEMENT */
|
||||
|
||||
table.emargement { width: 100%; border-collapse: true; }
|
||||
|
||||
table.emargement thead tr { background-color: rgba(51, 122, 183, .1); }
|
||||
|
||||
table.emargement th, table.emargement td {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,75 @@
|
|||
body.print { font-size: 8pt; margin-top: -10px; }
|
||||
|
||||
table.printHeader { width: 100%; margin-top: -25px; margin-bottom: 10px; }
|
||||
table.printHeader th.titre { width: 25%; font-size: 9pt; vertical-align: middle; }
|
||||
table.printHeader th.page { width: 50%; font-size: 13pt; text-align: center; }
|
||||
table.printHeader th.logo { width: 25%; text-align: right; padding: 5px; }
|
||||
table.printHeader th.logo > img { height: 50pt; }
|
||||
.page_break { page-break-before: always; }
|
||||
|
||||
.center { text-align: center!important; }
|
||||
.right { text-align: right!important; }
|
||||
|
||||
/* TABLE LIST PRINT */
|
||||
|
||||
table.listPrint {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
}
|
||||
table.listPrint.no-break { page-break-inside: avoid; break-inside: avoid; }
|
||||
|
||||
table.listPrint th, table.listPrint td { padding: 3px !important; }
|
||||
|
||||
table.listPrint tr.main_title th {
|
||||
background-color: black;
|
||||
color: white;
|
||||
font-size: 1.5em;
|
||||
border: none;
|
||||
}
|
||||
|
||||
table.listPrint thead th {
|
||||
background-color: #3296c8;
|
||||
border: 1px solid white;
|
||||
color: white;
|
||||
}
|
||||
table.listPrint thead th:first-child { border-left: none; }
|
||||
table.listPrint thead th:last-child { border-right: none; }
|
||||
|
||||
table.listPrint tr.second_title th {
|
||||
background-color: #CECECE;
|
||||
border: none!important;
|
||||
}
|
||||
table.listPrint tr.second_title th > small { float: right; }
|
||||
|
||||
/* LIST TARIFS LEGUMES */
|
||||
body.legumes th.tarif, body.legumes td.tarif { width: 100px; }
|
||||
|
||||
/* LIST CONTRATS */
|
||||
body.contrats table.printHeader th.page { line-height: 18px; }
|
||||
body.contrats table.printHeader th.page span.groupe {
|
||||
text-transform : uppercase;
|
||||
color: #3296c8;
|
||||
}
|
||||
|
||||
body.contrats table.printHeader th.page span.nb_contrats {
|
||||
font-size: 10px;
|
||||
font-style: italic;
|
||||
color: grey;
|
||||
line-height: 10px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
body.contrats h1.groupe_contrat {
|
||||
text-align: center;
|
||||
text-transform : uppercase;
|
||||
color: #3296c8;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
body.contrats h3.groupe_nb_contrat {
|
||||
text-align: center;
|
||||
margin-top: 0;
|
||||
font-style: italic;
|
||||
color: grey;
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ var contratsConf = {
|
|||
baseURL : "contrats.php",
|
||||
// LIST
|
||||
list_selector : "#contratsList",
|
||||
btn_list_print_selector : "#btnPrintContratsList",
|
||||
// SEARCH
|
||||
search_selector : "#contratsSearch .searchGrp",
|
||||
filtres_selector : "#contratsSearch select",
|
||||
|
|
@ -33,8 +34,12 @@ var modalArchiveContrat = false;
|
|||
var modalDeleteContrat = false;
|
||||
|
||||
$(document).ready( function() {
|
||||
// LIST LOADER
|
||||
// LIST
|
||||
initListProgressLoad($(contratsConf.list_selector), contratsConf.baseURL, contratsConf.type+" list");
|
||||
$(contratsConf.btn_list_print_selector).click(function(e) {
|
||||
e.preventDefault(); $(this).blur();
|
||||
window.open(contratsConf.baseURL+"?action=printList", '_blank');
|
||||
});
|
||||
|
||||
// SEARCH / FILTRES
|
||||
$(contratsConf.search_selector).initSearchGroup();
|
||||
|
|
|
|||
|
|
@ -555,7 +555,6 @@ 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) {
|
||||
|
|
@ -577,6 +576,8 @@ function initListProgressLoad(list, url, listName) {
|
|||
list.trigger( "loaded" );
|
||||
|
||||
tr.remove();
|
||||
|
||||
list.listProgressLoad_resize();
|
||||
}).fail(function(xhr) {
|
||||
errMsg = "SERVER ERROR ("+(( isDefined( listName ) && listName != "" ) ? listName : "list")+" - load items)";
|
||||
if( xhr['responseText']!="" ) errMsg += " : " + xhr['responseText'];
|
||||
|
|
@ -750,6 +751,22 @@ function initFloatInput(elem) {
|
|||
});
|
||||
}
|
||||
|
||||
function initDateInput(elem) {
|
||||
elem.unbind('keypress').unbind('keyup').keypress( function(event) {
|
||||
if(event.keyCode==13) {
|
||||
event.preventDefault();
|
||||
setTimeout(function() { elem.blur(); },50);
|
||||
}
|
||||
}).blur(function(e) {
|
||||
var date = parseDate($(this).val(), 'yyyy-mm-dd');
|
||||
var minDate = parseDate($(this).attr("min"), 'yyyy-mm-dd');
|
||||
var maxDate = parseDate($(this).attr("max"), 'yyyy-mm-dd');
|
||||
if(!date) $(this).val("")
|
||||
else if(minDate && date<minDate) $(this).val($(this).attr("min"));
|
||||
else if(maxDate && date<maxDate) $(this).val($(this).attr("max"));
|
||||
});
|
||||
}
|
||||
|
||||
function initEdiTable(elem,beforeFct,callbacbFct) {
|
||||
elem.unbind('dblclick').dblclick( function(e) {
|
||||
var cell = $(this);
|
||||
|
|
@ -1063,12 +1080,12 @@ function getTodayDate(format) {
|
|||
|
||||
function parseDate(dateStr, format) {
|
||||
date = false;
|
||||
if(dateStr == "" || dateStr.length<10) return date;
|
||||
if(dateStr == undefined || dateStr == "" || dateStr.length<10) return date;
|
||||
switch(format) {
|
||||
case 'yyyy-mm-dd' : { d=dateStr.split("-"); if(d.length==3) date = new Date(d[0], d[1] - 1, d[2]); } break;
|
||||
case 'yyyy-dd-mm' : { d=dateStr.split("-"); if(d.length==3) date = new Date(d[0], d[2] - 1, d[1]); } break;
|
||||
case 'dd/mm/yyyy' : { d=dateStr.split("/"); if(d.length==3) date = new Date(d[2], d[1] - 1, d[0]); } break;
|
||||
case 'mm/dd/yyyy' : { d=dateStr.split("/"); if(d.length==3) date = new Date(d[2], d[0] - 1, d[1]); } break;
|
||||
case 'yyyy-mm-dd' : { d=dateStr.split("-"); if(d.length==3) date = new Date(parseInt(d[0]), parseInt(d[1]) - 1, parseInt(d[2])); } break;
|
||||
case 'yyyy-dd-mm' : { d=dateStr.split("-"); if(d.length==3) date = new Date(parseInt(d[0]), parseInt(d[2]) - 1, parseInt(d[1])); } break;
|
||||
case 'dd/mm/yyyy' : { d=dateStr.split("/"); if(d.length==3) date = new Date(parseInt(d[2]), parseInt(d[1]) - 1, parseInt(d[0])); } break;
|
||||
case 'mm/dd/yyyy' : { d=dateStr.split("/"); if(d.length==3) date = new Date(parseInt(d[2]), parseInt(d[0]) - 1, parseInt(d[1])); } break;
|
||||
}
|
||||
return date;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ var legumesConf = {
|
|||
baseURL : "legumes.php",
|
||||
// LIST
|
||||
list_selector : "#legumesList",
|
||||
btn_list_print_selector : "#btnPrintLegumesList",
|
||||
// SEARCH
|
||||
search_selector : "#legumesSearch .searchGrp",
|
||||
filtres_selector : "#legumesSearch select",
|
||||
|
|
@ -28,8 +29,12 @@ var modalEditLegume = false;
|
|||
var modalDeleteLegume = false;
|
||||
|
||||
$(document).ready( function() {
|
||||
// LIST LOADER
|
||||
// LIST
|
||||
initListProgressLoad($(legumesConf.list_selector), legumesConf.baseURL, legumesConf.type+" list");
|
||||
$(legumesConf.btn_list_print_selector).click(function(e) {
|
||||
e.preventDefault(); $(this).blur();
|
||||
window.open(legumesConf.baseURL+"?action=printList", '_blank');
|
||||
});
|
||||
|
||||
// SEARCH
|
||||
$(legumesConf.search_selector).initSearchGroup();
|
||||
|
|
@ -87,8 +92,8 @@ function modalViewLegume_loadDatas(modal, id) {
|
|||
if(Object.keys(datas.tarifs_list).length>0) {
|
||||
modal.find("table.modal-body tbody tr.nullchild").addClass("hide");
|
||||
var tarifs_courant = {};
|
||||
$.each(datas.tarifs, function(n,e) { tarifs_courant[e.ref] = e.print });
|
||||
$.each(datas.tarifs_list, function(n,e) { modalViewLegume_addTarif(modal, e, tarifs_courant); });
|
||||
$.each(datas.tarifs, function(n,e) { tarifs_courant[e.ref] = e });
|
||||
$.each(datas.tarifs_list, function(n,e) { modalViewLegume_addTarif(modal, e, datas.tarifs); });
|
||||
}
|
||||
|
||||
modal.modal('show');
|
||||
|
|
@ -101,57 +106,151 @@ function modalViewLegume_clear(modal) {
|
|||
modal.find("td.nom").html("");
|
||||
modal.find("table.modal-body tbody tr.nullchild").removeClass("hide");
|
||||
modal.find("table.modal-body tbody tr.tarif").remove();
|
||||
|
||||
modal.find("table.modal-body tfoot").addClass("hide").find("tr:not(.header)").remove();
|
||||
}
|
||||
|
||||
function modalViewLegume_addTarif(modal, datas, tarifs_courant) {
|
||||
var tr = $("<tr class='tarif'></tr>")
|
||||
.append( $("<td></td>").html(datas.date_print) );
|
||||
|
||||
if(tarifs_courant.hasOwnProperty(datas.ref)) tr.addClass("courant");
|
||||
|
||||
var grps = modal.find("table.modal-body tbody th.titre.groupe");
|
||||
|
||||
if(parseInt(datas.groupe_ref)>0) {
|
||||
grps.each(function(n,e) {
|
||||
if(parseInt($(this).attr('ref')) == parseInt(datas.groupe_ref)) {
|
||||
tr.append( $("<td class='tarif'></td>").html(datas.print) );
|
||||
// ANALYSE DATAS
|
||||
var date = parseDate(datas.date, 'yyyy-mm-dd');
|
||||
var grp_ref = parseInt(datas.groupe_ref);
|
||||
var is_all = !(parseInt(datas.groupe_ref)>0);
|
||||
var is_all_next = true;
|
||||
var is_all_current = true;
|
||||
var is_all_old = true;
|
||||
var grps = [];
|
||||
var grps_by_id = {};
|
||||
modal.find("table.modal-body tbody th.titre.groupe").each(function(n,e) {
|
||||
var g = {
|
||||
ref : parseInt($(this).attr('ref')),
|
||||
apply : false,
|
||||
is_next : false,
|
||||
is_current : false,
|
||||
is_old : false
|
||||
};
|
||||
g.apply = ((!grp_ref>0) || (grp_ref == g.ref));
|
||||
if(g.apply) {
|
||||
var current = tarifs_courant[ g.ref ];
|
||||
if(current.ref == datas.ref) { g.is_current = true; is_all_next = false; is_all_old = false; }
|
||||
else {
|
||||
is_all_current = false;
|
||||
currentDate = parseDate(current.date, 'yyyy-mm-dd');
|
||||
if(date>currentDate) { g.is_next = true; is_all_old = false; }
|
||||
else { g.is_old = true; is_all_next = false; }
|
||||
}
|
||||
else tr.append( $("<td class='tarif groupe-null'>.</td>") );
|
||||
});
|
||||
}
|
||||
else {
|
||||
tr.append( $("<td class='tarif'></td>").attr("colspan", grps.length).html(datas.print) );
|
||||
}
|
||||
modal.find("table.modal-body tbody").append(tr);
|
||||
}
|
||||
|
||||
function modalViewLegume_addTarifLegumeHist(modal, datas) {
|
||||
var tr = $("<tr></tr>").attr("ref", datas.ref);
|
||||
tr.append($("<td></td>").html(datas.tarif_print));
|
||||
tr.append($("<td></td>").html(datas.tarif_periode));
|
||||
btnDel = $('<button class="btn btn-xs btn-link glyphicon glyphicon-trash btnDeleteTarifLegume"></button>').attr('ref', datas.ref).attr('tarif', datas.tarif_print).attr('periode', datas.tarif_periode);
|
||||
tr.append($("<td class='td_btn_action td_btn_delete'></td>").append(btnDel));
|
||||
modal.find("table.modal-body tfoot").append(tr);
|
||||
|
||||
btnDel.click(function(e) {
|
||||
e.preventDefault(); $(this).blur();
|
||||
tr = $(this).parent().parent();
|
||||
id = parseInt( $(this).attr("ref") );
|
||||
if(!id>0) return;
|
||||
msg = "Êtes vous sûr de vouloir supprimer le tarif de "+$(this).attr("tarif")+" en application "+$(this).attr("periode")+" ?";
|
||||
if(confirm(msg)) {
|
||||
datas = { 'action' : 'deleteTarif', 'tarif' : id };
|
||||
$.post( legumesConf.baseURL, datas, function( result ) {
|
||||
if(parseInt(result)>0) {
|
||||
tr.remove();
|
||||
if(modal.find("table.modal-body tfoot tr:not(.header)").length == 0) modal.find("table.modal-body tfoot").addClass("hide");
|
||||
}
|
||||
else { console.error(result); alert(result); }
|
||||
}).fail(function() { alert("("+legumesConf.type+" - delete tarif)"); });
|
||||
}
|
||||
})
|
||||
else { is_all_next = false; is_all_current = false; is_all_old = false; }
|
||||
grps_by_id[g.ref] = g;
|
||||
grps.push(g);
|
||||
});
|
||||
|
||||
// BUILD
|
||||
var tr = $("<tr class='tarif'></tr>")
|
||||
.append( $("<td class='date'></td>").html(datas.date_print).attr("date", datas.date));
|
||||
|
||||
// FIND OLD ROW AT SAME DATE
|
||||
var trOld = [];
|
||||
modal.find("table.modal-body tbody tr.tarif td.date").each(function(n,e) {
|
||||
if($(this).attr('date') == datas.date && trOld.length==0) trOld = $(this).parent();
|
||||
});
|
||||
replace_cell = false;
|
||||
|
||||
// APPLY TO ALL GROUPES
|
||||
if(is_all && (is_all_next || is_all_current || is_all_old)) {
|
||||
// REPLACE CELL IF POSSIBLE
|
||||
if(trOld.length>0) {
|
||||
td = trOld.find('td.tarif.not_apply');
|
||||
if(td.length>0) {
|
||||
td.each(function(n,e) {
|
||||
$(this).removeClass("not_apply").html(datas.print);
|
||||
if(is_all_next) td.addClass('next');
|
||||
else if(is_all_current) td.addClass('current');
|
||||
else td.addClass('old');
|
||||
})
|
||||
replace_cell = true;
|
||||
}
|
||||
}
|
||||
// ADD NEW ROW
|
||||
if(!replace_cell) {
|
||||
td = $("<td class='tarif'></td>").attr("colspan", grps.length).html(datas.print);
|
||||
if(is_all_next) td.addClass('next');
|
||||
else if(is_all_current) td.addClass('current');
|
||||
else td.addClass('old');
|
||||
tr.append( td );
|
||||
modal.find("table.modal-body tbody").append(tr);
|
||||
}
|
||||
}
|
||||
// APPLY BY GROUP
|
||||
else {
|
||||
// REPLACE IF POSSIBLE
|
||||
if(trOld.length>0) {
|
||||
// REPLACE CELL BY CELL IF POSSIBLE
|
||||
if(grp_ref>0) {
|
||||
// REPLACE NOT_APPLY
|
||||
td = trOld.find('td.tarif.not_apply[grp='+grp_ref+']');
|
||||
if(td.length>0) {
|
||||
td.removeClass('not_apply').html( datas.print );
|
||||
g = grps_by_id[grp_ref];
|
||||
if(g.is_next) td.addClass('next');
|
||||
else if(g.is_current) td.addClass('current');
|
||||
else td.addClass('old');
|
||||
replace_cell = true;
|
||||
}
|
||||
// SPLIT ALL
|
||||
else {
|
||||
td = trOld.find('td.tarif[colspan='+grps.length+']');
|
||||
if(td.length>0) {
|
||||
old = {
|
||||
'print' : td.html(),
|
||||
'class' : td.attr("class")
|
||||
}
|
||||
td.remove();
|
||||
for(var i=0; i<grps.length; i++) {
|
||||
g = grps[i];
|
||||
td = $("<td class='tarif'>.</td>").attr('grp', g.ref);
|
||||
if(g.ref == grp_ref) {
|
||||
td.html( datas.print );
|
||||
if(g.is_next) td.addClass('next');
|
||||
else if(g.is_current) td.addClass('current');
|
||||
else td.addClass('old');
|
||||
}
|
||||
else td.html( old.print ).attr('class', old.class);
|
||||
trOld.append( td );
|
||||
}
|
||||
replace_cell = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// APPLY TO NOT ALREADY APPLY IF POSSIBLE
|
||||
else {
|
||||
td = trOld.find('td.tarif.not_apply');
|
||||
if(td.length>0) {
|
||||
td.each(function(n,e) {
|
||||
$(this).removeClass('not_apply').html( datas.print );
|
||||
g = grps_by_id[$(this).attr('grp')];
|
||||
if(g.is_next) $(this).addClass('next');
|
||||
else if(g.is_current) $(this).addClass('current');
|
||||
else $(this).addClass('old');
|
||||
});
|
||||
replace_cell = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ADD CELL BY GROUPE
|
||||
if(!replace_cell) {
|
||||
for(var i=0; i<grps.length; i++) {
|
||||
g = grps[i];
|
||||
td = $("<td class='tarif'>.</td>").attr('grp', g.ref);
|
||||
if(g.apply) {
|
||||
td.html( datas.print );
|
||||
if(g.is_next) td.addClass('next');
|
||||
else if(g.is_current) td.addClass('current');
|
||||
else td.addClass('old');
|
||||
}
|
||||
else td.addClass("not_apply");
|
||||
tr.append( td );
|
||||
}
|
||||
modal.find("table.modal-body tbody").append(tr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***** MODAL FORM ADD/EDIT *****/
|
||||
|
|
@ -174,17 +273,9 @@ function modalFormLegume_loadDatas(modal,id) {
|
|||
var datas = JSON.parse(jsonTxt);
|
||||
|
||||
modal.find("input[name=nom]").val(datas.nom);
|
||||
$.each(datas.tarifs, function(n,e) {
|
||||
if(e.ref>0) {
|
||||
e.is_next = false;
|
||||
modalFormLegume_addTarif(modal, e);
|
||||
}
|
||||
});
|
||||
$.each(datas.next_tarifs, function(n,e) {
|
||||
if(e.ref>0) {
|
||||
e.is_next = true;
|
||||
modalFormLegume_addTarif(modal, e);
|
||||
}
|
||||
|
||||
$.each(datas.tarifs_list, function(n,e) {
|
||||
if(e.ref>0) modalFormLegume_addTarif(modal, e);
|
||||
});
|
||||
|
||||
if(modal) modal.modal('show');
|
||||
|
|
@ -206,21 +297,19 @@ function modalFormLegume_addTarif(modal, datas) {
|
|||
|
||||
if(isDefined(datas) && typeof(datas)==="object") {
|
||||
iptGrp.attr('ref', datas.ref);
|
||||
iptGrp.find("select[name=groupe]").val(datas.tarif_groupe).prop("disabled", true);
|
||||
iptGrp.find("input[name=prix]").val(datas.prix).prop("disabled", true);
|
||||
iptGrp.find("select[name=unite]").val(datas.unite).prop("disabled", true);
|
||||
iptGrp.find("input[name=date]").val(datas.date).prop("disabled", true);
|
||||
if(datas.is_next) iptGrp.find("button.btnDel").prop("disabled", false);
|
||||
}
|
||||
else {
|
||||
iptGrp.find("input[name=date]").val(getTodayDate("yyyy-mm-dd"));
|
||||
iptGrp.find("button.btnDel").prop("disabled", false);
|
||||
iptGrp.find("select[name=groupe]").val(datas.groupe_ref).prop("disabled", datas.use);
|
||||
iptGrp.find("input[name=prix]").val(datas.prix).prop("disabled", datas.use);
|
||||
iptGrp.find("select[name=unite]").val(datas.unite).prop("disabled", datas.use);
|
||||
iptGrp.find("input[name=date]").val(datas.date).prop("disabled", datas.use);
|
||||
iptGrp.find("button.btnDel").prop("disabled", datas.use);
|
||||
}
|
||||
else iptGrp.find("input[name=date]").val(getTodayDate("yyyy-mm-dd")).attr('min', getTodayDate("yyyy-mm-dd"));
|
||||
|
||||
modal.find("div.tarifs").append(iptGrp);
|
||||
|
||||
// INIT
|
||||
initFloatInput( iptGrp.find("input[name=prix]") );
|
||||
initDateInput( iptGrp.find("input[name=date]") );
|
||||
|
||||
iptGrp.find("button.btnDel").click(function(e) {
|
||||
e.preventDefault(); $(this).blur();
|
||||
|
|
@ -263,8 +352,14 @@ function modalFormLegume_getDatas(modal) {
|
|||
return datas;
|
||||
}
|
||||
|
||||
function modalFormLegume_checkDatas(datas) {
|
||||
if(datas.nom=="" || JSON.parse(datas.tarifs).length==0) {
|
||||
function modalFormLegume_checkDatas(datas) {
|
||||
tarifs = JSON.parse(datas.tarifs);
|
||||
var nb_valid_tarifs = 0;
|
||||
$.each(tarifs, function(n,e) {
|
||||
if(e.prix>0 && parseDate(e.date, 'yyyy-mm-dd') && e.del==0) nb_valid_tarifs++;
|
||||
});
|
||||
|
||||
if(datas.nom=="" || nb_valid_tarifs==0) {
|
||||
alert("ERREUR : au minimum, un nom et un tarif doivent être renseigné !");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ function initViewLivraison() {
|
|||
function modalViewLivraison_loadDatas(modal, id) {
|
||||
$.post(livraisonsConf.baseURL, { 'ref' : id, 'action' : 'getDatas' }, function(jsonTxt) {
|
||||
var datas = JSON.parse(jsonTxt);
|
||||
|
||||
modal.find("small.db_ref > span").html(datas.ref);
|
||||
|
||||
// PRINT EMARGEMENT PAR LIEU
|
||||
|
|
@ -165,6 +166,7 @@ function modalViewLivraison_clear(modal) {
|
|||
|
||||
modal.find("small.db_ref > span").html("");
|
||||
|
||||
modal.find("div.btnPrint li").removeClass("hide");
|
||||
modal.find(".print_emargement_par_lieu").remove();
|
||||
|
||||
modal.find("td.groupe").html("");
|
||||
|
|
@ -181,7 +183,7 @@ function modalViewLivraison_loadPaniers() {
|
|||
modalViewLivraison.find("div.tabPaniers").html(result);
|
||||
|
||||
// COMPLEMENT
|
||||
modalViewLivraison.find("div.tabPaniers td.complement").each(function(n,e) {
|
||||
modalViewLivraison.find("div.tabPaniers tr:not(.absent) td.complement").each(function(n,e) {
|
||||
$(this).addClass("editable").dblclick(function(e) {
|
||||
e.preventDefault();
|
||||
val = parseFloat( $(this).html() );
|
||||
|
|
@ -206,7 +208,7 @@ function modalViewLivraison_loadPaniers() {
|
|||
});
|
||||
|
||||
// COMPLEMENT REGLE
|
||||
modalViewLivraison.find("div.tabPaniers td.complement_regle").each(function(n,e) {
|
||||
modalViewLivraison.find("div.tabPaniers tr:not(.absent) td.complement_regle").each(function(n,e) {
|
||||
$(this).addClass("editable").dblclick(function(e) {
|
||||
e.preventDefault();
|
||||
val = parseFloat( $(this).html() );
|
||||
|
|
|
|||
|
|
@ -49,15 +49,22 @@ if(isset($_REQUEST["ref"]) && (int)$_REQUEST["ref"]>0 && $action) {
|
|||
|
||||
// TARIFS
|
||||
foreach($datas["tarifs"] as $t) {
|
||||
// ADD
|
||||
if($t['ref'] == "new") {
|
||||
$t['legume'] = $id;
|
||||
$r = addLegumeTarif($t);
|
||||
if(!(int)$r>0) die("ERREUR : une errreur est survenue durant l'enregistrement du nouveau tarif du légume. ($r)");
|
||||
}
|
||||
// DELETE
|
||||
else if((int)$t['ref']>0 && (int)$t['del']>0) {
|
||||
$r = eraseLegumeTarif(intval($t['ref']));
|
||||
if(!(int)$r>0) die("ERREUR : une errreur est survenue durant la suppression du tarif du légume. ($r)");
|
||||
}
|
||||
// UPDATE
|
||||
else if((int)$t['ref']>0) {
|
||||
$r = updateLegumeTarif(intval($t['ref']), $t);
|
||||
if(!(int)$r>0) die("ERREUR : une errreur est survenue durant la mise à jour du tarif du légume. ($r)");
|
||||
}
|
||||
}
|
||||
|
||||
die( strval( updateLegume($id,$datas) ) );
|
||||
|
|
@ -99,18 +106,24 @@ switch($action) {
|
|||
case "autocomplete_list": die( json_encode( getLegumesAutocompleteList() ) ); break;
|
||||
// DEFAULT - LIST
|
||||
default: {
|
||||
// PRINT
|
||||
$print = isset($_REQUEST["action"]) && $_REQUEST["action"]=="printList";
|
||||
|
||||
// SEARCH
|
||||
$search = getSearch("legumes_search");
|
||||
|
||||
// LIMITS
|
||||
$limits = array("start" => 0, "end" => LIST_NB_LIGNES_PAR_PAGE, "nbItemsByPage" => LIST_NB_LIGNES_PAR_PAGE, "max" => getNbLegumesInList($search));
|
||||
if(isset($_REQUEST['startListAt']) && (int)$_REQUEST['startListAt']>0) {
|
||||
$limits['start'] = intval($_REQUEST['startListAt']);
|
||||
$limits['end'] = $limits['start'] + $limits['nbItemsByPage'];
|
||||
if($limits['end'] > $limits['max']) $limits['end'] = $limits['max'];
|
||||
}
|
||||
$limits['rest'] = $limits['max'] - $limits['end'];
|
||||
$GLOBALS['smarty'] -> assign('list_limits',$limits);
|
||||
if($print) $limits = false;
|
||||
else {
|
||||
$limits = array("start" => 0, "end" => LIST_NB_LIGNES_PAR_PAGE, "nbItemsByPage" => LIST_NB_LIGNES_PAR_PAGE, "max" => getNbLegumesInList($search));
|
||||
if(isset($_REQUEST['startListAt']) && (int)$_REQUEST['startListAt']>0) {
|
||||
$limits['start'] = intval($_REQUEST['startListAt']);
|
||||
$limits['end'] = $limits['start'] + $limits['nbItemsByPage'];
|
||||
if($limits['end'] > $limits['max']) $limits['end'] = $limits['max'];
|
||||
}
|
||||
$limits['rest'] = $limits['max'] - $limits['end'];
|
||||
$GLOBALS['smarty'] -> assign('list_limits',$limits);
|
||||
}
|
||||
|
||||
// LIST
|
||||
$grps = getPaniersGroupesList();
|
||||
|
|
@ -133,6 +146,8 @@ switch($action) {
|
|||
$limits["list"] = $GLOBALS['smarty']->fetch("legumes/legumes_list_builder.tpl");
|
||||
die(json_encode($limits));
|
||||
}
|
||||
// PRINT
|
||||
else if($print) printLegumesList();
|
||||
|
||||
// TEMPLATE
|
||||
$GLOBALS['template'] = 'legumes/legumes_list.tpl';
|
||||
|
|
|
|||
|
|
@ -53,11 +53,12 @@ if(isset($_REQUEST["ref"]) && (int)$_REQUEST["ref"]>0 && $action) {
|
|||
$GLOBALS['smarty'] -> assign('infos', $infos);
|
||||
|
||||
$types = array(
|
||||
"full" => array("tpl" => "livraisons/prints/livraison_print_full.tpl", "fn" => "", "orientation" => "portrait"),
|
||||
"paniers" => array("tpl" => "livraisons/prints/livraison_print_paniers.tpl", "fn" => "-liste_paniers_", "orientation" => "portrait"),
|
||||
"compo" => array("tpl" => "livraisons/prints/livraison_print_compo.tpl", "fn" => "-compo_paniers_", "orientation" => "portrait"),
|
||||
"legumes" => array("tpl" => "livraisons/prints/livraison_print_legumes.tpl", "fn" => "-total_legumes_", "orientation" => "portrait"),
|
||||
"emargement" => array("tpl" => "livraisons/prints/livraison_print_emargement.tpl", "fn" => "-emargement_", "orientation" => "landscape")
|
||||
"full" => array("tpl" => "livraisons/prints/livraison_print_full.tpl", "fn" => "", "orientation" => "portrait"),
|
||||
"paniers" => array("tpl" => "livraisons/prints/livraison_print_paniers.tpl", "fn" => "-liste_paniers_", "orientation" => "portrait"),
|
||||
"compo" => array("tpl" => "livraisons/prints/livraison_print_compo.tpl", "fn" => "-compo_paniers_", "orientation" => "portrait"),
|
||||
"legumes" => array("tpl" => "livraisons/prints/livraison_print_legumes.tpl", "fn" => "-total_legumes_", "orientation" => "portrait"),
|
||||
"legumes_distrib" => array("tpl" => "livraisons/prints/livraison_print_legumes_distrib.tpl", "fn" => "-distribution_", "orientation" => "landscape"),
|
||||
"emargement" => array("tpl" => "livraisons/prints/livraison_print_emargement.tpl", "fn" => "-emargement_", "orientation" => "landscape")
|
||||
);
|
||||
if(isset($_REQUEST['type']) && array_key_exists($_REQUEST['type'], $types)) {
|
||||
$type = $types[$_REQUEST['type']];
|
||||
|
|
@ -80,6 +81,7 @@ if(isset($_REQUEST["ref"]) && (int)$_REQUEST["ref"]>0 && $action) {
|
|||
// EDIT
|
||||
case "edit": {
|
||||
$datas = getLivraisonDatasFromRequest();
|
||||
|
||||
$r = updateLivraison($id,$datas);
|
||||
|
||||
if((int)$r>0) {
|
||||
|
|
@ -89,12 +91,12 @@ if(isset($_REQUEST["ref"]) && (int)$_REQUEST["ref"]>0 && $action) {
|
|||
|
||||
// ADD PANIERS
|
||||
foreach($datas['paniers'] as $i => $contrat) {
|
||||
$datas = array( 'livraison' => $id, 'contrat' => intval($contrat) );
|
||||
$p = array( 'livraison' => $id, 'contrat' => intval($contrat) );
|
||||
if(array_key_exists($contrat, $infos["paniers"])) {
|
||||
$datas["complement"] = $infos["paniers"][$contrat]["complement"];
|
||||
$datas["complement_regle"] = $infos["paniers"][$contrat]["complement_regle"];
|
||||
$p["complement"] = $infos["paniers"][$contrat]["complement"];
|
||||
$p["complement_regle"] = $infos["paniers"][$contrat]["complement_regle"];
|
||||
}
|
||||
$r = addLivraisonPanier($datas);
|
||||
$r = addLivraisonPanier($p);
|
||||
if($r!==true) die("ERREUR : une erreur est survenu durant l'enregistrement du panier de la livraison ($r)");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,58 @@
|
|||
<head>
|
||||
{foreach from=$cssFiles item=file}
|
||||
<link href="{$file}" rel="stylesheet" media="all">
|
||||
{/foreach}
|
||||
</head>
|
||||
|
||||
<body class="print contrats" orientation="portrait">
|
||||
<table class="printHeader">
|
||||
<tr>
|
||||
<th class="titre">{$date}<br/>{$time}</th>
|
||||
<th class="page">
|
||||
LISTE DES CONTRATS
|
||||
{if $list|@count==1}
|
||||
{assign var=first value=$list|@key}
|
||||
<br/><span class="groupe">{$list.$first.nom}</span>
|
||||
{if $list.$first.lieux|@count>1}<br/><span class="nb_contrats">({$list.$first.nb_contrats} contrat{if $list.$first.nb_contrats>1}s{/if})</span>{/if}
|
||||
{/if}
|
||||
</th>
|
||||
<th class="logo"><img src="{$logo}"></th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{foreach from=$list item=groupe name=list}
|
||||
{if $list|@count>1}
|
||||
<h1 class="groupe_contrat{if !$smarty.foreach.list.first} page_break{/if}">{$groupe.nom}</h1>
|
||||
<h3 class="groupe_nb_contrat">({$groupe.nb_contrats} contrat{if $groupe.nb_contrats>1}s{/if})</h3>
|
||||
{/if}
|
||||
{foreach from=$groupe.lieux item=lieu}
|
||||
<table class="table listPrint no-break">
|
||||
<thead>
|
||||
<tr class="main_title">
|
||||
<th colspan="2">{if $list|@count>1}{$groupe.nom|upper} - {/if}{$lieu.nom}</th>
|
||||
<th class="right">{$lieu.nb_contrats} contrat{if $lieu.nb_contrats>1}s{/if}</th>
|
||||
</tr>
|
||||
<tr class="head">
|
||||
<th class="nom">client</th>
|
||||
<th class="frequence center">fréquence</th>
|
||||
<th class="nb_paniers center">nb. de paniers restant</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$lieu.paniers item=pType}
|
||||
<tr class="second_title">
|
||||
<th colspan="3">{$pType.type_nom} <small>(x{$pType.nb_contrats})</small></th>
|
||||
</tr>
|
||||
{foreach from=$pType.contrats item=c}
|
||||
<tr>
|
||||
<td class="nom">{$c.client_prenom} {$c.client_nom}</td>
|
||||
<td class="frequence center">{$c.frequence_print}</td>
|
||||
<td class="nb_paniers center">{$c.nb_paniers_restants} / {$c.nb_paniers}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</body>
|
||||
|
|
@ -52,6 +52,8 @@
|
|||
<input type="text" class="form-control" placeholder="rechercher..." name="search" value="{$search}">
|
||||
{if $search!=""}<span class="input-group-addon btn-danger btnClearSearch"><i class="glyphicon glyphicon-remove"></i></span>{/if}
|
||||
</div>
|
||||
<!-- PRINT LIST -->
|
||||
<button type="button" class="btn btn-default" id="btnPrintContratsList"><i class="glyphicon glyphicon-print"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
</select>
|
||||
<span class="input-group-addon">date :</span>
|
||||
<input type="date" class="form-control" name="date" placeholder="date'">
|
||||
<span class="input-group-btn"> <button class="btn btn-danger btnDel" disabled><i class="glyphicon glyphicon-trash"></i></button> </span>
|
||||
<span class="input-group-btn"> <button class="btn btn-danger btnDel"><i class="glyphicon glyphicon-trash"></i></button> </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
<head>
|
||||
{foreach from=$cssFiles item=file}
|
||||
<link href="{$file}" rel="stylesheet" media="all">
|
||||
{/foreach}
|
||||
</head>
|
||||
|
||||
<body class="print legumes" orientation="portrait">
|
||||
<table class="printHeader">
|
||||
<tr>
|
||||
<th class="titre">{$date}<br/>{$time}</th>
|
||||
<th class="page">TARIF{if $groupes|@count>1}S{/if} LEGUMES</th>
|
||||
<th class="logo"><img src="{$logo}"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table listPrint">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="nom">légume</th>
|
||||
{foreach from=$groupes item=g}<th class="tarif center">tarif {$g.nom}</th>{/foreach}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$list item=i}
|
||||
<tr>
|
||||
<td>{$i.nom}</td>
|
||||
{foreach from=$groupes item=g}
|
||||
<td class="tarif center">{if $i.tarifs[$g.ref].ref>0}{$i.tarifs[$g.ref].print}{else}.{/if}</td>
|
||||
{/foreach}
|
||||
</tr>
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td colspan="{$groupes|@count + 1}">aucun légume</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
<input type="text" class="form-control" placeholder="rechercher..." name="search" value="{$search}">
|
||||
{if $search!=""}<span class="input-group-addon btn-danger btnClearSearch"><i class="glyphicon glyphicon-remove"></i></span>{/if}
|
||||
</div>
|
||||
<button type="button" class="btn btn-default" id="btnPrintLegumesList"><i class="glyphicon glyphicon-print"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
<li role="separator" class="divider"></li>
|
||||
<li print_type="full"><a href="#" target="_blank" print_type="full">Complet</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li print_type="legumes_distrib"><a href="#" target="_blank" print_type="legumes_distrib">Feuille de distribution</a></li>
|
||||
<li print_type="emargement" id="print_emargement"><a href="#" target="_blank" print_type="emargement">Feuille d'émargement</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
{/foreach}
|
||||
</head>
|
||||
|
||||
<body class="printLivraison" orientation="{$orientation}">
|
||||
<body class="print" orientation="{$orientation}">
|
||||
<!-- COMPOSITION -->
|
||||
<div class="formLivraison">
|
||||
<table class="printHeader">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
{/foreach}
|
||||
</head>
|
||||
|
||||
<body class="printLivraison" orientation="{$orientation}">
|
||||
<body class="print" orientation="{$orientation}">
|
||||
<!-- PANIERS -->
|
||||
<div class="formLivraison">
|
||||
<table class="printHeader">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
{/foreach}
|
||||
</head>
|
||||
|
||||
<body class="printLivraison" orientation="{$orientation}">
|
||||
<body class="print" orientation="{$orientation}">
|
||||
<!-- PANIERS -->
|
||||
<div class="formLivraison">
|
||||
<table class="printHeader">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
{/foreach}
|
||||
</head>
|
||||
|
||||
<body class="printLivraison" orientation="{$orientation}">
|
||||
<body class="print" orientation="{$orientation}">
|
||||
<!-- LEGUMES -->
|
||||
<div class="formLivraison">
|
||||
<table class="printHeader">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
<head>
|
||||
{foreach from=$cssFiles item=file}
|
||||
<link href="{$file}" rel="stylesheet" media="all">
|
||||
{/foreach}
|
||||
</head>
|
||||
{assign var=repeatLegume value=$infos.paniers_types|@count==2}
|
||||
<body class="print" orientation="{$orientation}">
|
||||
<!-- LEGUMES -->
|
||||
<div class="formLivraison">
|
||||
<table class="printHeader">
|
||||
<tr>
|
||||
<th class="titre">
|
||||
LIVRAISON {$infos.paniers_groupe_nom|upper}<br/>
|
||||
{$infos.date_long_print}
|
||||
</th>
|
||||
<th class="page">FEUILLE DE DISTRIBUTION</th>
|
||||
<th class="logo"><img src="{$logo}"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="distrib">
|
||||
<thead>
|
||||
<tr>
|
||||
{foreach from=$infos.paniers_types item=p name=types}
|
||||
{if ($repeatLegume && !$smarty.foreach.types.first && $infos.paniers_types|@count>1)
|
||||
|| (!$repeatLegume && $smarty.foreach.types.first) }
|
||||
<th class="legume"></th>{/if}
|
||||
<th class="panier">{$p.type_nom|upper}</th>
|
||||
{/foreach}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$infos.legumes_distrib item=l name=legumes}
|
||||
<tr>
|
||||
{foreach from=$infos.paniers_types item=p name=types}
|
||||
{if ($repeatLegume && !$smarty.foreach.types.first && $infos.paniers_types|@count>1)
|
||||
|| (!$repeatLegume && $smarty.foreach.types.first) }
|
||||
<td class="legume">{$l.nom|upper}</td>{/if}
|
||||
<td class="quantite">{if $l.paniers[$p.type_ref].quantite>0}{$l.paniers[$p.type_ref].quantite_print}{else}/{/if}</td>
|
||||
{/foreach}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
{/foreach}
|
||||
</head>
|
||||
|
||||
<body class="printLivraison" orientation="{$orientation}">
|
||||
<body class="print" orientation="{$orientation}">
|
||||
<!-- PANIERS -->
|
||||
<div class="formLivraison">
|
||||
<table class="printHeader">
|
||||
|
|
|
|||
Loading…
Reference in New Issue