FIX Calculation in the activity box
This commit is contained in:
parent
41e19e723b
commit
9dbd88f0ba
@ -376,7 +376,7 @@ class box_activity extends ModeleBoxes
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||
$sql.= " AND f.fk_soc = s.rowid";
|
||||
$sql.= " AND paye=0";
|
||||
$sql.= " AND f.datef >= '".$db->idate($tmpdate)."' AND paye=0";
|
||||
$sql.= " GROUP BY f.fk_statut";
|
||||
$sql.= " ORDER BY f.fk_statut DESC";
|
||||
|
||||
@ -403,6 +403,8 @@ class box_activity extends ModeleBoxes
|
||||
if (! empty($data)) {
|
||||
$j=0;
|
||||
|
||||
$alreadypaid=-1;
|
||||
|
||||
while ($line < count($cumuldata)) {
|
||||
$billurl="search_status=".$data[$j]->fk_statut."&paye=0";
|
||||
$this->info_box_contents[$line][0] = array(
|
||||
@ -431,7 +433,7 @@ class box_activity extends ModeleBoxes
|
||||
$totalMnt += $objp->Mnttot;
|
||||
$this->info_box_contents[$line][4] = array(
|
||||
'td' => 'align="right" width="18"',
|
||||
'text' => $facturestatic->LibStatut(0,$data[$j]->fk_statut,3),
|
||||
'text' => $facturestatic->LibStatut(0,$data[$j]->fk_statut,3, $alreadypaid),
|
||||
);
|
||||
$line++;
|
||||
$j++;
|
||||
|
||||
@ -309,7 +309,7 @@ abstract class CommonInvoice extends CommonObject
|
||||
* @param int $paye Status field paye
|
||||
* @param int $status Id status
|
||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=long label + picto
|
||||
* @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise)
|
||||
* @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, -1 otherwise)
|
||||
* @param int $type Type invoice
|
||||
* @return string Libelle du statut
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user