Fix: Avoid to set invoice payed twice
This commit is contained in:
parent
25427f77f3
commit
fd96fd639c
@ -870,6 +870,8 @@ class Facture extends CommonObject
|
|||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
|
if ($this->paye != 1)
|
||||||
|
{
|
||||||
dolibarr_syslog("Facture::set_payed rowid=".$this->id, LOG_DEBUG);
|
dolibarr_syslog("Facture::set_payed rowid=".$this->id, LOG_DEBUG);
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture SET';
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture SET';
|
||||||
$sql.= ' fk_statut=2';
|
$sql.= ' fk_statut=2';
|
||||||
@ -893,6 +895,11 @@ class Facture extends CommonObject
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user