Todo: prvoir les avoirs pour les factures fournisseurs

This commit is contained in:
Regis Houssin 2007-12-08 00:05:48 +00:00
parent 3e0bd42d16
commit 7a588e357e

View File

@ -177,8 +177,8 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$societestatic->id = $obj->socid;
$societestatic->nom = $obj->nom;
// Todo: Ajouter test pour les avoirs fournisseurs
if ($obj->fournisseur == 1 && ($obj->total_ttc < 0 && $obj->type != 2))
// Todo: Ajouter gestion des avoirs fournisseurs, champ ff.type = 2
if ($obj->fournisseur == 1 && ($obj->total_ttc < 0 && $obj->type != 2) || ($obj->total_ttc > 0 && $obj->type == 2))
{
$facturefournstatic->ref=$obj->facnumber;
$facturefournstatic->id=$obj->facid;