FIX Some report have data when several chart of accounts exists
FIX Detail per account not visible when total < 0
This commit is contained in:
parent
2b588b9e43
commit
0b13cd17ac
@ -255,6 +255,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
$sql.= " WHERE f.numero_compte = aa.account_number";
|
$sql.= " WHERE f.numero_compte = aa.account_number";
|
||||||
//$sql.= " AND fk_statut in (1,2)";
|
//$sql.= " AND fk_statut in (1,2)";
|
||||||
$sql.= " AND ".$predefinedgroupwhere;
|
$sql.= " AND ".$predefinedgroupwhere;
|
||||||
|
$sql.= " AND fk_pcg_version = '".$db->escape($charofaccountstring)."'";
|
||||||
$sql.= " AND f.entity = ".$conf->entity;
|
$sql.= " AND f.entity = ".$conf->entity;
|
||||||
if (! empty($date_start) && ! empty($date_end))
|
if (! empty($date_start) && ! empty($date_end))
|
||||||
$sql.= " AND f.doc_date >= '".$db->idate($date_start)."' AND f.doc_date <= '".$db->idate($date_end)."'";
|
$sql.= " AND f.doc_date >= '".$db->idate($date_start)."' AND f.doc_date <= '".$db->idate($date_end)."'";
|
||||||
@ -295,7 +296,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
if ($showaccountdetail != 'no')
|
if ($showaccountdetail != 'no')
|
||||||
{
|
{
|
||||||
$tmppredefinedgroupwhere="pcg_type = '".$db->escape($objp->pcg_type)."' AND pcg_subtype = '".$db->escape($objp->pcg_subtype)."'";
|
$tmppredefinedgroupwhere="pcg_type = '".$db->escape($objp->pcg_type)."' AND pcg_subtype = '".$db->escape($objp->pcg_subtype)."'";
|
||||||
$tmppredefinedgroupwhere.= " AND fk_pcg_version = '".$charofaccountstring."'";
|
$tmppredefinedgroupwhere.= " AND fk_pcg_version = '".$db->escape($charofaccountstring)."'";
|
||||||
//$tmppredefinedgroupwhere.= " AND thirdparty_code = '".$db->escape($objp->name)."'";
|
//$tmppredefinedgroupwhere.= " AND thirdparty_code = '".$db->escape($objp->name)."'";
|
||||||
|
|
||||||
// Get cpts of category/group
|
// Get cpts of category/group
|
||||||
@ -312,7 +313,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($showaccountdetail == 'all' || $resultN > 0)
|
if ($showaccountdetail == 'all' || $resultN <> 0)
|
||||||
{
|
{
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user