Skip to content
Snippets Groups Projects
Commit 2b8efc30 authored by Maxime Kohlhaas's avatar Maxime Kohlhaas
Browse files

Fix : shipment model selection

parent c0ddfbfa
No related branches found
No related tags found
No related merge requests found
......@@ -164,8 +164,6 @@ class Expedition extends CommonObject
$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';
$error = 0;
......
......@@ -113,6 +113,7 @@ if ($action == 'add')
$object->socid = $objectsrc->socid;
$object->ref_customer = $objectsrc->ref_client;
$object->model_pdf = GETPOST('model');
$object->date_delivery = $date_delivery; // Date delivery planed
$object->fk_delivery_address = $objectsrc->fk_delivery_address;
$object->shipping_method_id = GETPOST('shipping_method_id','int');
......@@ -662,6 +663,14 @@ if ($action == 'create')
print '<td colspan="3">';
print '<input name="tracking_number" size="20" value="'.GETPOST('tracking_number','alpha').'">';
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
$parameters=array('colspan' => ' colspan="3"');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment