Mise à NULL de projetid si il n'est pas setté

This commit is contained in:
Rodolphe Quiedeville 2003-06-22 09:57:42 +00:00
parent b22d707880
commit b8d96efd74

View File

@ -67,7 +67,8 @@ class Facture {
* *
*/ */
Function create($userid) { Function create($userid)
{
/* /*
* Insertion dans la base * Insertion dans la base
*/ */
@ -76,10 +77,16 @@ class Facture {
$amount = $this->amount; $amount = $this->amount;
$remise = $this->remise; $remise = $this->remise;
if (! $remise) { if (! $remise)
{
$remise = 0 ; $remise = 0 ;
} }
if (! $this->projetid)
{
$this->projetid = "NULL";
}
$totalht = ($amount - $remise); $totalht = ($amount - $remise);
$tva = tva($totalht); $tva = tva($totalht);
$total = $totalht + $tva; $total = $totalht + $tva;