From 433be914bf3463ca44fab45e2bd89dc5fa32388b Mon Sep 17 00:00:00 2001 From: ywarnier Date: Fri, 30 May 2008 07:22:10 +0000 Subject: [PATCH] Added due date to due invoices boxes and re-ordered by due date instead of invoice date --- .../includes/boxes/box_factures_fourn_imp.php | 17 ++++++++-------- htdocs/includes/boxes/box_factures_imp.php | 20 ++++++++++--------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/htdocs/includes/boxes/box_factures_fourn_imp.php b/htdocs/includes/boxes/box_factures_fourn_imp.php index ab09504689c..eda482d86cb 100644 --- a/htdocs/includes/boxes/box_factures_fourn_imp.php +++ b/htdocs/includes/boxes/box_factures_fourn_imp.php @@ -83,7 +83,7 @@ class box_factures_fourn_imp extends ModeleBoxes { { $sql .= " AND s.rowid = ".$user->societe_id; } - $sql .= " ORDER BY f.datef DESC, f.facnumber DESC "; + $sql .= " ORDER BY datelimite DESC, f.facnumber DESC "; $sql .= $db->plimit($max, 0); $result = $db->query($sql); @@ -110,8 +110,11 @@ class box_factures_fourn_imp extends ModeleBoxes { $this->info_box_contents[$i][1] = array('align' => 'left', 'text' => $objp->nom, 'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid); + + $this->info_box_contents[$i][2] = array('align' => 'right', + 'text' => dolibarr_print_date($objp->datelimite,'day')); - $this->info_box_contents[$i][2] = array( + $this->info_box_contents[$i][3] = array( 'align' => 'right', 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3)); @@ -124,15 +127,13 @@ class box_factures_fourn_imp extends ModeleBoxes { if ($num==0 && $i==$num) { $this->info_box_contents[$i][0] = array('align' => 'center','text'=>$langs->trans("NoUnpayedCustomerBills")); - $this->info_box_contents[$i][1] = array('text'=>' '); - $this->info_box_contents[$i][2] = array('text'=>' '); - $this->info_box_contents[$i][3] = array('text'=>' '); } else { $this->info_box_contents[$i][0] = array('text'=>' '); - $this->info_box_contents[$i][1] = array('text'=>' '); - $this->info_box_contents[$i][2] = array('text'=>' '); - $this->info_box_contents[$i][3] = array('text'=>' '); } + $this->info_box_contents[$i][1] = array('text'=>' '); + $this->info_box_contents[$i][2] = array('text'=>' '); + $this->info_box_contents[$i][3] = array('text'=>' '); + $this->info_box_contents[$i][4] = array('text'=>' '); $i++; } } diff --git a/htdocs/includes/boxes/box_factures_imp.php b/htdocs/includes/boxes/box_factures_imp.php index 0ed213e858e..4f965b94c9d 100644 --- a/htdocs/includes/boxes/box_factures_imp.php +++ b/htdocs/includes/boxes/box_factures_imp.php @@ -84,7 +84,7 @@ class box_factures_imp extends ModeleBoxes { $sql .= " AND s.rowid = ".$user->societe_id; } //$sql .= " ORDER BY f.datef DESC, f.facnumber DESC "; - $sql .= " ORDER BY f.datef ASC, f.facnumber ASC "; + $sql .= " ORDER BY datelimite ASC, f.facnumber ASC "; $sql .= $db->plimit($max, 0); $result = $db->query($sql); @@ -113,9 +113,13 @@ class box_factures_imp extends ModeleBoxes { 'maxlength'=>44, 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); - $this->info_box_contents[$i][2] = array( + $this->info_box_contents[$i][2] = array('align' => 'right', + 'text' => dolibarr_print_date($objp->datelimite,'day'), + ); + + $this->info_box_contents[$i][3] = array( 'align' => 'right', - 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3)); + 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3)); $i++; } @@ -126,15 +130,13 @@ class box_factures_imp extends ModeleBoxes { if ($num==0 && $i==$num) { $this->info_box_contents[$i][0] = array('align' => 'center','text'=>$langs->trans("NoUnpayedCustomerBills")); - $this->info_box_contents[$i][1] = array('text'=>' '); - $this->info_box_contents[$i][2] = array('text'=>' '); - $this->info_box_contents[$i][3] = array('text'=>' '); } else { $this->info_box_contents[$i][0] = array('text'=>' '); - $this->info_box_contents[$i][1] = array('text'=>' '); - $this->info_box_contents[$i][2] = array('text'=>' '); - $this->info_box_contents[$i][3] = array('text'=>' '); } + $this->info_box_contents[$i][1] = array('text'=>' '); + $this->info_box_contents[$i][2] = array('text'=>' '); + $this->info_box_contents[$i][3] = array('text'=>' '); + $this->info_box_contents[$i][4] = array('text'=>' '); $i++; } }