Skip to content

Commit

Permalink
FIX #12688
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Dec 12, 2019
1 parent c72e7e6 commit a527e72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion htdocs/compta/resultat/index.php
Expand Up @@ -815,7 +815,9 @@

$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))
Expand Down
1 change: 1 addition & 0 deletions htdocs/compta/stats/index.php
Expand Up @@ -194,6 +194,7 @@
$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
}

Expand Down

0 comments on commit a527e72

Please sign in to comment.