Mise à NULL de projetid si il n'est pas setté
This commit is contained in:
parent
b22d707880
commit
b8d96efd74
@ -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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user