Fix: Option FACTURE_DEPOSITS_ARE_JUST_PAYMENTS was not used into
journals.
This commit is contained in:
parent
79e3b4d792
commit
375f464553
@ -85,7 +85,9 @@ $nomlink='';
|
||||
$periodlink='';
|
||||
$exportlink='';
|
||||
$builddate=time();
|
||||
$description=$langs->trans("DescPurchasesJournal");
|
||||
$description=$langs->trans("DescPurchasesJournal").'<br>';
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
|
||||
else $description.= $langs->trans("DepositsAreIncluded");
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
|
||||
|
||||
@ -103,6 +105,8 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product p ON p.rowid = fd.fk_product";
|
||||
$sql.= " JOIN ".MAIN_DB_PREFIX."facture_fourn f ON f.rowid = fd.fk_facture_fourn";
|
||||
$sql.= " JOIN ".MAIN_DB_PREFIX."societe s ON s.rowid = f.fk_soc" ;
|
||||
$sql.= " WHERE f.fk_statut > 0 AND f.entity = ".$conf->entity;
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql.= " AND f.type IN (0,1,2)";
|
||||
else $sql.= " AND f.type IN (0,1,2,3)";
|
||||
if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
@ -87,7 +87,9 @@ $nomlink='';
|
||||
$periodlink='';
|
||||
$exportlink='';
|
||||
$builddate=time();
|
||||
$description=$langs->trans("DescSellsJournal");
|
||||
$description=$langs->trans("DescSellsJournal").'<br>';
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
|
||||
else $description.= $langs->trans("DepositsAreIncluded");
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
|
||||
|
||||
@ -106,6 +108,8 @@ $sql.= " JOIN ".MAIN_DB_PREFIX."societe s ON s.rowid = f.fk_soc";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '".$idpays."'";
|
||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||
$sql.= " AND f.fk_statut > 0";
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql.= " AND f.type IN (0,1,2)";
|
||||
else $sql.= " AND f.type IN (0,1,2,3)";
|
||||
$sql.= " AND fd.product_type IN (0,1)";
|
||||
if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
|
||||
$sql.= " ORDER BY f.rowid";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user