mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
add new rule
This commit is contained in:
@@ -406,14 +406,12 @@ class Commande extends CommonOrder
|
||||
if ($numref != "")
|
||||
{
|
||||
return $numref;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $obj->error;
|
||||
//dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
print $langs->trans("Error")." ".$langs->trans("Error_COMMANDE_ADDON_NotDefined");
|
||||
return "";
|
||||
}
|
||||
@@ -466,8 +464,7 @@ class Commande extends CommonOrder
|
||||
if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life
|
||||
{
|
||||
$num = $this->getNextNumRef($soc);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$num = $this->ref;
|
||||
}
|
||||
$this->newref = dol_sanitizeFileName($num);
|
||||
@@ -578,8 +575,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
@@ -664,8 +660,7 @@ class Commande extends CommonOrder
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
@@ -706,8 +701,7 @@ class Commande extends CommonOrder
|
||||
$result = $this->call_trigger('ORDER_REOPEN', $user);
|
||||
if ($result < 0) $error++;
|
||||
// End call triggers
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$error++;
|
||||
$this->error = $this->db->lasterror();
|
||||
dol_print_error($this->db);
|
||||
@@ -720,8 +714,7 @@ class Commande extends CommonOrder
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
foreach ($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(get_class($this)."::set_reopen ".$errmsg, LOG_ERR);
|
||||
@@ -776,13 +769,11 @@ class Commande extends CommonOrder
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
|
||||
$this->db->rollback();
|
||||
@@ -852,8 +843,7 @@ class Commande extends CommonOrder
|
||||
$this->statut = self::STATUS_CANCELED;
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
foreach ($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(get_class($this)."::cancel ".$errmsg, LOG_ERR);
|
||||
@@ -862,8 +852,7 @@ class Commande extends CommonOrder
|
||||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
@@ -1089,8 +1078,7 @@ class Commande extends CommonOrder
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1))
|
||||
} else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1))
|
||||
{
|
||||
$origin_id = $tmp_origin_id;
|
||||
$ret = $this->add_object_linked($origin, $origin_id);
|
||||
@@ -1136,8 +1124,7 @@ class Commande extends CommonOrder
|
||||
//print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n";
|
||||
$this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object
|
||||
}
|
||||
}
|
||||
else dol_print_error($resqlcontact);
|
||||
} else dol_print_error($resqlcontact);
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
@@ -1158,20 +1145,17 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return $this->id;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
@@ -1274,8 +1258,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return $this->id;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
@@ -1406,10 +1389,8 @@ class Commande extends CommonOrder
|
||||
$this->valid($user);
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
else return -1;
|
||||
}
|
||||
else return -1;
|
||||
} else return -1;
|
||||
} else return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1489,8 +1470,7 @@ class Commande extends CommonOrder
|
||||
if ($price_base_type == 'HT')
|
||||
{
|
||||
$pu = $pu_ht;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$pu = $pu_ttc;
|
||||
}
|
||||
$label = trim($label);
|
||||
@@ -1649,20 +1629,17 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return $this->line->id;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->line->error;
|
||||
dol_syslog(get_class($this)."::addline error=".$this->error, LOG_ERR);
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
dol_syslog(get_class($this)."::addline status of order must be Draft to allow use of ->addline()", LOG_ERR);
|
||||
return -3;
|
||||
}
|
||||
@@ -1901,13 +1878,11 @@ class Commande extends CommonOrder
|
||||
return -3;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = 'Order with id '.$id.' not found sql='.$sql;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
return -1;
|
||||
}
|
||||
@@ -1971,19 +1946,16 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $line->error;
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
@@ -2108,8 +2080,7 @@ class Commande extends CommonOrder
|
||||
$this->db->free($result);
|
||||
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
return -3;
|
||||
}
|
||||
@@ -2172,8 +2143,7 @@ class Commande extends CommonOrder
|
||||
|
||||
$this->db->free($resql);
|
||||
return $nb;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
@@ -2218,8 +2188,7 @@ class Commande extends CommonOrder
|
||||
}
|
||||
$this->db->free($resql);
|
||||
return $num;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
@@ -2248,8 +2217,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$row = $this->db->fetch_row($resql);
|
||||
return $row[0];
|
||||
}
|
||||
else dol_print_error($this->db);
|
||||
} else dol_print_error($this->db);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
@@ -2335,31 +2303,26 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
$this->error = $line->error;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = 'ErrorDeleteLineNotAllowedByObjectStatus';
|
||||
return -1;
|
||||
}
|
||||
@@ -2418,8 +2381,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
foreach ($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR);
|
||||
@@ -2485,8 +2447,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
foreach ($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR);
|
||||
@@ -2547,8 +2508,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
foreach ($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR);
|
||||
@@ -2557,8 +2517,7 @@ class Commande extends CommonOrder
|
||||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
@@ -2611,8 +2570,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
foreach ($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR);
|
||||
@@ -2621,8 +2579,7 @@ class Commande extends CommonOrder
|
||||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
@@ -2679,12 +2636,10 @@ class Commande extends CommonOrder
|
||||
if ($shortlist == 1)
|
||||
{
|
||||
$ga[$obj->cid] = $obj->ref;
|
||||
}
|
||||
elseif ($shortlist == 2)
|
||||
} elseif ($shortlist == 2)
|
||||
{
|
||||
$ga[$obj->cid] = $obj->ref.' ('.$obj->name.')';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$ga[$i]['id'] = $obj->cid;
|
||||
$ga[$i]['ref'] = $obj->ref;
|
||||
$ga[$i]['name'] = $obj->name;
|
||||
@@ -2693,8 +2648,7 @@ class Commande extends CommonOrder
|
||||
}
|
||||
}
|
||||
return $ga;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
return -1;
|
||||
}
|
||||
@@ -2748,8 +2702,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
foreach ($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR);
|
||||
@@ -2758,8 +2711,7 @@ class Commande extends CommonOrder
|
||||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$error_str = 'Command status do not meet requirement '.$this->statut;
|
||||
dol_syslog(__METHOD__.$error_str, LOG_ERR);
|
||||
$this->error = $error_str;
|
||||
@@ -2818,8 +2770,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
foreach ($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR);
|
||||
@@ -2828,8 +2779,7 @@ class Commande extends CommonOrder
|
||||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$error_str = 'order status do not meet requirement '.$this->statut;
|
||||
dol_syslog(__METHOD__.$error_str, LOG_ERR);
|
||||
$this->error = $error_str;
|
||||
@@ -2885,8 +2835,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
foreach ($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR);
|
||||
@@ -2895,8 +2844,7 @@ class Commande extends CommonOrder
|
||||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -2938,8 +2886,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
foreach ($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(get_class($this)."::classifyBilled ".$errmsg, LOG_ERR);
|
||||
@@ -2948,8 +2895,7 @@ class Commande extends CommonOrder
|
||||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
@@ -2991,8 +2937,7 @@ class Commande extends CommonOrder
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
foreach ($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(get_class($this)."::classifyUnBilled ".$errmsg, LOG_ERR);
|
||||
@@ -3001,8 +2946,7 @@ class Commande extends CommonOrder
|
||||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
@@ -3110,8 +3054,7 @@ class Commande extends CommonOrder
|
||||
if ($price_base_type == 'TTC')
|
||||
{
|
||||
$subprice = $pu_ttc;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$subprice = $pu_ht;
|
||||
}
|
||||
$remise = 0;
|
||||
@@ -3214,15 +3157,13 @@ class Commande extends CommonOrder
|
||||
|
||||
$this->db->commit();
|
||||
return $result;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->line->error;
|
||||
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = get_class($this)."::updateline Order status makes operation forbidden";
|
||||
$this->errors = array('OrderStatusMakeOperationForbidden');
|
||||
return -2;
|
||||
@@ -3316,8 +3257,7 @@ class Commande extends CommonOrder
|
||||
}
|
||||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
@@ -3449,8 +3389,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
foreach ($this->errors as $errmsg)
|
||||
{
|
||||
$this->error .= ($this->error ? ', '.$errmsg : $errmsg);
|
||||
@@ -3515,8 +3454,7 @@ class Commande extends CommonOrder
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
return -1;
|
||||
}
|
||||
@@ -3570,38 +3508,31 @@ class Commande extends CommonOrder
|
||||
$labelStatus = $langs->trans('StatusOrderCanceled');
|
||||
$labelStatusShort = $langs->trans('StatusOrderCanceledShort');
|
||||
$statusType = 'status9';
|
||||
}
|
||||
elseif ($status == self::STATUS_DRAFT) {
|
||||
} elseif ($status == self::STATUS_DRAFT) {
|
||||
$labelStatus = $langs->trans('StatusOrderDraft');
|
||||
$labelStatusShort = $langs->trans('StatusOrderDraftShort');
|
||||
$statusType = 'status0';
|
||||
}
|
||||
elseif ($status == self::STATUS_VALIDATED) {
|
||||
} elseif ($status == self::STATUS_VALIDATED) {
|
||||
$labelStatus = $langs->trans('StatusOrderValidated').$billedtext;
|
||||
$labelStatusShort = $langs->trans('StatusOrderValidatedShort').$billedtext;
|
||||
$statusType = 'status1';
|
||||
}
|
||||
elseif ($status == self::STATUS_SHIPMENTONPROCESS) {
|
||||
} elseif ($status == self::STATUS_SHIPMENTONPROCESS) {
|
||||
$labelStatus = $langs->trans('StatusOrderSentShort').$billedtext;
|
||||
$labelStatusShort = $langs->trans('StatusOrderSentShort').$billedtext;
|
||||
$statusType = 'status4';
|
||||
}
|
||||
elseif ($status == self::STATUS_CLOSED && (!$billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) {
|
||||
} elseif ($status == self::STATUS_CLOSED && (!$billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) {
|
||||
$labelStatus = $langs->trans('StatusOrderToBill');
|
||||
$labelStatusShort = $langs->trans('StatusOrderToBillShort');
|
||||
$statusType = 'status4';
|
||||
}
|
||||
elseif ($status == self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) {
|
||||
} elseif ($status == self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) {
|
||||
$labelStatus = $langs->trans('StatusOrderProcessed').$billedtext;
|
||||
$labelStatusShort = $langs->trans('StatusOrderProcessed').$billedtext;
|
||||
$statusType = 'status6';
|
||||
}
|
||||
elseif ($status == self::STATUS_CLOSED && (!empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) {
|
||||
} elseif ($status == self::STATUS_CLOSED && (!empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) {
|
||||
$labelStatus = $langs->trans('StatusOrderDelivered');
|
||||
$labelStatusShort = $langs->trans('StatusOrderDelivered');
|
||||
$statusType = 'status6';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$labelStatus = $langs->trans('Unknown');
|
||||
$labelStatusShort = '';
|
||||
$statusType = '';
|
||||
@@ -3763,8 +3694,7 @@ class Commande extends CommonOrder
|
||||
}
|
||||
|
||||
$this->db->free($result);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
}
|
||||
@@ -3838,8 +3768,7 @@ class Commande extends CommonOrder
|
||||
$line->total_ttc = 60;
|
||||
$line->total_tva = 10;
|
||||
$line->remise_percent = 50;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$line->total_ht = 100;
|
||||
$line->total_ttc = 120;
|
||||
$line->total_tva = 20;
|
||||
@@ -3897,8 +3826,7 @@ class Commande extends CommonOrder
|
||||
}
|
||||
$this->db->free($resql);
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
$this->error = $this->db->error();
|
||||
return -1;
|
||||
@@ -4149,8 +4077,7 @@ class OrderLine extends CommonOrderLine
|
||||
$this->db->free($result);
|
||||
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
@@ -4236,8 +4163,7 @@ class OrderLine extends CommonOrderLine
|
||||
}
|
||||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
@@ -4282,8 +4208,7 @@ class OrderLine extends CommonOrderLine
|
||||
if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0)
|
||||
{
|
||||
return $result;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->pa_ht = $result;
|
||||
}
|
||||
}
|
||||
@@ -4378,8 +4303,7 @@ class OrderLine extends CommonOrderLine
|
||||
}
|
||||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
@@ -4426,8 +4350,7 @@ class OrderLine extends CommonOrderLine
|
||||
if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0)
|
||||
{
|
||||
return $result;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->pa_ht = $result;
|
||||
}
|
||||
}
|
||||
@@ -4510,8 +4433,7 @@ class OrderLine extends CommonOrderLine
|
||||
}
|
||||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
@@ -4550,8 +4472,7 @@ class OrderLine extends CommonOrderLine
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
|
||||
Reference in New Issue
Block a user