2
0
forked from Wavyzz/dolibarr

Fix: Deadlock situation (when order were canceled, no way to make

nothing on it)
Fix: Don't know how I forgot this events into trigger system.
This commit is contained in:
Laurent Destailleur
2015-04-01 16:07:22 +02:00
parent ad1e4134a9
commit 16a620f926
7 changed files with 61 additions and 17 deletions

View File

@@ -60,7 +60,7 @@ class Commande extends CommonOrder
var $ref_int;
var $contactid;
var $fk_project;
var $statut; // -1=Canceled, 0=Draft, 1=Validated, (2=Accepted/On process not managed for customer orders), 3=Closed (Sent/Received, billed or not)
var $statut; // -1=Canceled, 0=Draft, 1=Validated, (2=Accepted/On process not managed for customer orders), 3=Closed (Delivered=Sent/Received, billed or not)
var $facturee; // deprecated
var $billed; // billed or not
@@ -437,7 +437,7 @@ class Commande extends CommonOrder
global $conf,$langs;
$error=0;
if ($this->statut != 3)
if ($this->statut != -1 && $this->statut != 3)
{
dol_syslog(get_class($this)."::set_reopen order has not status closed", LOG_WARNING);
return 0;
@@ -461,7 +461,7 @@ class Commande extends CommonOrder
else
{
$error++;
$this->error=$this->db->error();
$this->error=$this->db->lasterror();
dol_print_error($this->db);
}