mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 17:02:34 +01:00
Debug v18
This commit is contained in:
@@ -99,7 +99,10 @@ class box_factures extends ModeleBoxes
|
||||
$sql .= ", s.code_client, s.code_compta, s.client";
|
||||
$sql .= ", s.logo, s.email, s.entity";
|
||||
$sql .= ", s.tva_intra, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= ", SUM(pf.amount) as am";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid = pf.fk_facture,";
|
||||
$sql .= " ".MAIN_DB_PREFIX."societe as s";
|
||||
if (empty($user->rights->societe->client->voir) && !$user->socid) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
}
|
||||
@@ -111,6 +114,8 @@ class box_factures extends ModeleBoxes
|
||||
if ($user->socid) {
|
||||
$sql .= " AND s.rowid = ".((int) $user->socid);
|
||||
}
|
||||
$sql .= " GROUP BY s.rowid, s.nom, s.name_alias, s.code_client, s.code_compta, s.client, s.logo, s.email, s.entity, s.tva_intra, s.siren, s.siret, s.ape, s.idprof4, s.idprof5, s.idprof6,";
|
||||
$sql .= " f.rowid, f.ref, f.type, f.total_ht, f.total_tva, f.total_ttc, f.datef, f.paye, f.fk_statut, f.datec, f.tms, f.date_lim_reglement";
|
||||
if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) {
|
||||
$sql .= " ORDER BY f.datef DESC, f.ref DESC ";
|
||||
} else {
|
||||
@@ -128,8 +133,8 @@ class box_factures extends ModeleBoxes
|
||||
|
||||
while ($line < $num) {
|
||||
$objp = $this->db->fetch_object($result);
|
||||
|
||||
$datelimite = $this->db->jdate($objp->datelimite);
|
||||
$date = $this->db->jdate($objp->date);
|
||||
$datem = $this->db->jdate($objp->tms);
|
||||
|
||||
$facturestatic->id = $objp->facid;
|
||||
@@ -142,7 +147,9 @@ class box_factures extends ModeleBoxes
|
||||
$facturestatic->status = $objp->status;
|
||||
$facturestatic->date = $this->db->jdate($objp->date);
|
||||
$facturestatic->date_lim_reglement = $this->db->jdate($objp->datelimite);
|
||||
$facturestatic->alreadypaid = $objp->paye;
|
||||
|
||||
$facturestatic->paye = $objp->paye;
|
||||
$facturestatic->alreadypaid = $objp->am;
|
||||
|
||||
$societestatic->id = $objp->socid;
|
||||
$societestatic->name = $objp->name;
|
||||
@@ -191,7 +198,7 @@ class box_factures extends ModeleBoxes
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut($objp->paye, $objp->status, 3, $objp->paye),
|
||||
'text' => $facturestatic->LibStatut($objp->paye, $objp->status, 3, $objp->am),
|
||||
);
|
||||
|
||||
$line++;
|
||||
|
||||
Reference in New Issue
Block a user