Fix: mieux diffrencier les factures ngatives et les avoirs des clients qui seraient aussi fournisseurs

This commit is contained in:
Regis Houssin 2007-12-07 23:46:15 +00:00
parent e077caed84
commit 59a8af644e

View File

@ -176,8 +176,8 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$societestatic->id = $obj->socid;
$societestatic->nom = $obj->nom;
if ($obj->fournisseur == 1)
if ($obj->fournisseur == 1 && $obj->total_ttc < 0 && $obj->type != 2)
{
$facturefournstatic->ref=$obj->facnumber;
$facturefournstatic->id=$obj->facid;