2
0
forked from Wavyzz/dolibarr

Works on possibility to change customer when cloning (enable in customer orders)

New: can send extra input in ajax dialog
This commit is contained in:
Regis Houssin
2011-04-25 08:25:14 +00:00
parent 2b5d169575
commit 94d64bd9e8
2 changed files with 13 additions and 3 deletions

View File

@@ -739,8 +739,18 @@ class Commande extends CommonObject
// Change socid if needed
if (! empty($socid) && $socid != $object->socid)
{
$object->socid = $socid;
// TODO clear delivery address, project linked, change product price if multi-prices
$socstatic = new Societe($this->db);
if ($socstatic->fetch($socid)>0)
{
$object->socid = $socid;
$object->cond_reglement_id = $soc->cond_reglement_id;
$object->mode_reglement_id = $soc->mode_reglement_id;
$object->fk_project = '';
$object->fk_delivery_address = '';
}
// TODO Change product price if multi-prices
}
$object->id=0;