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:
parent
2b5d169575
commit
94d64bd9e8
@ -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;
|
||||
|
||||
@ -1498,7 +1498,7 @@ else
|
||||
$formquestion=array(
|
||||
//'text' => $langs->trans("ConfirmClone"),
|
||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
||||
//array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $html->select_company(GETPOST('socid'),'socid','(s.client=1 OR s.client=3)'))
|
||||
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $html->select_company(GETPOST('socid'),'socid','(s.client=1 OR s.client=3)'))
|
||||
);
|
||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||
$formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$object->ref),'confirm_clone',$formquestion,'yes',1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user