Fix customer ref of shipment
This commit is contained in:
parent
6df4666cf3
commit
a3607fff77
@ -2798,7 +2798,11 @@ abstract class CommonObject
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
if (empty($elementId)) // If the element we update was $this (so $elementId is null)
|
||||||
|
{
|
||||||
$this->statut = $status;
|
$this->statut = $status;
|
||||||
|
$this->status = $status;
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -202,7 +202,7 @@ if (empty($reshook))
|
|||||||
$objectsrc->fetch($object->origin_id);
|
$objectsrc->fetch($object->origin_id);
|
||||||
|
|
||||||
$object->socid = $objectsrc->socid;
|
$object->socid = $objectsrc->socid;
|
||||||
$object->ref_customer = $objectsrc->ref_client;
|
$object->ref_customer = ''; // We don't use $objectsrc->ref_client, this is ref or order not shipment
|
||||||
$object->model_pdf = GETPOST('model');
|
$object->model_pdf = GETPOST('model');
|
||||||
$object->date_delivery = $date_delivery; // Date delivery planed
|
$object->date_delivery = $date_delivery; // Date delivery planed
|
||||||
$object->fk_delivery_address = $objectsrc->fk_delivery_address;
|
$object->fk_delivery_address = $objectsrc->fk_delivery_address;
|
||||||
|
|||||||
@ -742,6 +742,7 @@ class Expedition extends CommonObject
|
|||||||
|
|
||||||
// Change status of order to "shipment in process"
|
// Change status of order to "shipment in process"
|
||||||
$ret = $this->setStatut(Commande::STATUS_SHIPMENTONPROCESS, $this->origin_id, $this->origin);
|
$ret = $this->setStatut(Commande::STATUS_SHIPMENTONPROCESS, $this->origin_id, $this->origin);
|
||||||
|
|
||||||
if (! $ret)
|
if (! $ret)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user