mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX #12688
This commit is contained in:
parent
c72e7e6a97
commit
a527e72124
|
|
@ -815,7 +815,9 @@ if (! empty($conf->accounting->enabled) && ($modecompta == 'BOOKKEEPING'))
|
|||
|
||||
$sql = "SELECT b.doc_ref, b.numero_compte, b.subledger_account, b.subledger_label, pcg_type, date_format(b.doc_date,'%Y-%m') as dm, sum(b.debit) as debit, sum(b.credit) as credit, sum(b.montant) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b, ".MAIN_DB_PREFIX."accounting_account as aa";
|
||||
$sql.= " WHERE b.numero_compte = aa.account_number AND b.entity = ".$conf->entity;
|
||||
$sql.= " WHERE b.entity = ".$conf->entity;
|
||||
$sql.= " AND aa.entity = ".$conf->entity;
|
||||
$sql.= " AND b.numero_compte = aa.account_number";
|
||||
$sql.= " AND ".$predefinedgroupwhere;
|
||||
$sql.= " AND fk_pcg_version = '".$db->escape($charofaccountstring)."'";
|
||||
if (! empty($date_start) && ! empty($date_end))
|
||||
|
|
|
|||
|
|
@ -194,6 +194,7 @@ elseif ($modecompta=="BOOKKEEPING")
|
|||
$sql = "SELECT date_format(b.doc_date,'%Y-%m') as dm, sum(b.credit) as amount_ttc";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b, ".MAIN_DB_PREFIX."accounting_journal as aj";
|
||||
$sql.= " WHERE b.entity = ".$conf->entity;
|
||||
$sql.= " AND aj.entity = ".$conf->entity;
|
||||
$sql.= " AND b.code_journal = aj.code AND aj.nature = 2" ; // @TODO currently count amount in sale journal, but we need to define a category group for turnover
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user