Fix edit of incoterm from the shipments tab
This commit is contained in:
parent
cfacfab6cf
commit
38e620d656
@ -1533,9 +1533,9 @@ if ($action == 'create')
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Create").'">';
|
print '<input type="submit" class="button" name="add" value="'.dol_escape_htmltag($langs->trans("Create")).'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="'.($backtopage?"submit":"button").'" class="button" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'"'.($backtopage?'':' onclick="javascript:history.go(-1)"').'>'; // Cancel for create does not post form if we don't know the backtopage
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|||||||
@ -151,6 +151,15 @@ if (empty($reshook))
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set incoterm
|
||||||
|
elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled))
|
||||||
|
{
|
||||||
|
$result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// shipping method
|
// shipping method
|
||||||
if ($action == 'setshippingmethod' && $user->rights->commande->creer) {
|
if ($action == 'setshippingmethod' && $user->rights->commande->creer) {
|
||||||
$object = new Commande($db);
|
$object = new Commande($db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user