Debug auto archive contrat
Debug panier eligible livraison
This commit is contained in:
parent
7f1201e3da
commit
8785dddc9d
|
|
@ -150,7 +150,7 @@ function getContratPaniersLivres($id) {
|
|||
function getContratLastPanier($id) {
|
||||
$i = false;
|
||||
|
||||
$sql = getLivraisonsPaniersSelectBaseSQL()." WHERE ".CONTRATS_TABLE.".`ref`=$id ORDER BY ".LIVRAISONS_TABLE.".`date` ASC LIMIT 0,1";
|
||||
$sql = getLivraisonsPaniersSelectBaseSQL()." WHERE ".CONTRATS_TABLE.".`ref`=$id ORDER BY ".LIVRAISONS_TABLE.".`date` DESC LIMIT 0,1";
|
||||
$r = $GLOBALS['db_admin']['man']->select($sql);
|
||||
|
||||
if(!$r['erreur']) {
|
||||
|
|
@ -223,7 +223,8 @@ function archiveOldContrat() {
|
|||
." LEFT JOIN ".CONTRATS_PANIERS_STATUT." ON ".CONTRATS_TABLE.".`ref`=".CONTRATS_PANIERS_STATUT.".`ref`"
|
||||
." WHERE ".CONTRATS_PANIERS_STATUT.".`nb_paniers_restants`<=0"
|
||||
." AND ".CONTRATS_TABLE.".`force_eligible`=0"
|
||||
." AND ".CONTRATS_TABLE.".`archive`=0";
|
||||
." AND ".CONTRATS_TABLE.".`archive`=0"
|
||||
." AND ".CONTRATS_TABLE.".`del`=0";
|
||||
|
||||
$r = $GLOBALS['db_admin']['man']->select($sql);
|
||||
|
||||
|
|
|
|||
|
|
@ -163,6 +163,8 @@ function getLivraisonEmargementList($paniers_eligibles, $date, $lieu=0) {
|
|||
$p["complement_regle_print"] = "";
|
||||
|
||||
if($p["present"]) {
|
||||
$p["nb_paniers_livres"] += 1;
|
||||
|
||||
// COMPLEMENT DU
|
||||
$p["complement_du"] = getClientComplementDuAtDate($p["client_ref"], $date);
|
||||
if($p["complement_du"] > 0) $p["complement_du_print"] = number_format($p["complement_du"], 2, '.', ' ')." €";
|
||||
|
|
@ -422,7 +424,7 @@ function getNbLivraisonForContratAtDate($contrat, $date) {
|
|||
$sql = "SELECT count(*) as nb FROM ".LIVRAISONS_PANIERS_TABLE
|
||||
." LEFT JOIN ".LIVRAISONS_TABLE." ON ".LIVRAISONS_PANIERS_TABLE.".`livraison`=".LIVRAISONS_TABLE.".`ref`"
|
||||
." WHERE ".LIVRAISONS_PANIERS_TABLE.".contrat=".intval($contrat)
|
||||
." AND ".LIVRAISONS_TABLE.".date<='".$date."'";
|
||||
." AND ".LIVRAISONS_TABLE.".date<'".$date."'";
|
||||
|
||||
$r = $GLOBALS['db_admin']['man']->select($sql,1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue