Fix : shipment model selection
This commit is contained in:
parent
c0ddfbfab7
commit
2b8efc302a
@ -164,8 +164,6 @@ class Expedition extends CommonObject
|
|||||||
|
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
if (empty($this->model_pdf)) $this->model_pdf=$conf->global->EXPEDITION_ADDON_PDF;
|
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT .'/product/stock/class/mouvementstock.class.php';
|
require_once DOL_DOCUMENT_ROOT .'/product/stock/class/mouvementstock.class.php';
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
|||||||
@ -113,6 +113,7 @@ if ($action == 'add')
|
|||||||
|
|
||||||
$object->socid = $objectsrc->socid;
|
$object->socid = $objectsrc->socid;
|
||||||
$object->ref_customer = $objectsrc->ref_client;
|
$object->ref_customer = $objectsrc->ref_client;
|
||||||
|
$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;
|
||||||
$object->shipping_method_id = GETPOST('shipping_method_id','int');
|
$object->shipping_method_id = GETPOST('shipping_method_id','int');
|
||||||
@ -663,6 +664,14 @@ if ($action == 'create')
|
|||||||
print '<input name="tracking_number" size="20" value="'.GETPOST('tracking_number','alpha').'">';
|
print '<input name="tracking_number" size="20" value="'.GETPOST('tracking_number','alpha').'">';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
|
// Document model
|
||||||
|
print "<tr><td>".$langs->trans("Model")."</td>";
|
||||||
|
print '<td colspan="3">';
|
||||||
|
include_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php';
|
||||||
|
$liste = ModelePdfExpedition::liste_modeles($db);
|
||||||
|
print $form->selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF);
|
||||||
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$parameters=array('colspan' => ' colspan="3"');
|
$parameters=array('colspan' => ' colspan="3"');
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$expe,$action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$expe,$action); // Note that $action and $object may have been modified by hook
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user