Skip to content

Commit

Permalink
change entrepot to warehouse
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Battarel committed May 1, 2019
1 parent 9999ae0 commit ed12b18
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions htdocs/fourn/commande/dispatch.php
Expand Up @@ -52,7 +52,7 @@
$ref = GETPOST('ref');
$lineid = GETPOST('lineid', 'int');
$action = GETPOST('action', 'aZ09');
$fk_entrepot_default = GETPOST('fk_entrepot_default','int');
$fk_default_warehouse = GETPOST('fk_default_warehouse','int');

if ($user->societe_id)
$socid = $user->societe_id;
Expand Down Expand Up @@ -239,7 +239,7 @@
$prod = "product_" . $reg[1] . '_' . $reg[2];
$qty = "qty_" . $reg[1] . '_' . $reg[2];
$ent = "entrepot_" . $reg[1] . '_' . $reg[2];
if(empty($ent)) $ent = $fk_entrepot_default;
if(empty($ent)) $ent = $fk_default_warehouse;
$pu = "pu_" . $reg[1] . '_' . $reg[2]; // This is unit price including discount
$fk_commandefourndet = "fk_commandefourndet_" . $reg[1] . '_' . $reg[2];

Expand Down Expand Up @@ -521,11 +521,11 @@
print $langs->trans("Warehouse").' : ';
if (count($listwarehouses)>1)
{
print $form->selectarray('fk_entrepot_default', $listwarehouses, $fk_entrepot_default, 1, 0, 0, '', 0, 0, $disabled);
print $form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 1, 0, 0, '', 0, 0, $disabled);
}
elseif (count($listwarehouses)==1)
{
print $form->selectarray('fk_entrepot_default', $listwarehouses, $fk_entrepot_default, 0, 0, 0, '', 0, 0, $disabled);
print $form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 0, 0, 0, '', 0, 0, $disabled);
}
else
{
Expand Down Expand Up @@ -784,9 +784,9 @@
// traitement entrepot par défaut
print '<script type="text/javascript">
$(document).ready(function () {
$("select[name=fk_entrepot_default]").change(function() {
var fk_entrepot_default = $("option:selected", this).val();
$("select[name^=entrepot_]").val(fk_entrepot_default).change();
$("select[name=fk_default_warehouse]").change(function() {
var fk_default_warehouse = $("option:selected", this).val();
$("select[name^=entrepot_]").val(fk_default_warehouse).change();
});
});
</script>';
Expand Down

0 comments on commit ed12b18

Please sign in to comment.