diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 081f58a5798ec..06fe8f7ee28dc 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -20,6 +20,7 @@ * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 Alexandre Spangaro * Copyright (C) 2025 Benjamin Falière + * Copyright (C) 2025 Anthony Berton * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -159,6 +160,8 @@ } $price_base_type = null; +$shipping_method_id = null; +$warehouse_id = null; // Security check if (!empty($user->socid)) { @@ -2285,7 +2288,7 @@ $mode_reglement_id = empty($soc->mode_reglement_id) ? $mode_reglement_id : $soc->mode_reglement_id; $fk_account = empty($soc->fk_account) ? $fk_account : $soc->fk_account; $shipping_method_id = $soc->shipping_method_id; - $warehouse_id = $soc->fk_warehouse; + // $warehouse_id = $soc->fk_warehouse; $remise_percent = $soc->remise_percent; if (isModEnabled("multicurrency") && !empty($soc->multicurrency_code)) { @@ -2354,8 +2357,6 @@ // Third party print ''; print ''.$langs->trans('Customer').''; - $shipping_method_id = 0; - $warehouse_id = 0; if ($socid > 0) { print ''; print $soc->getNomUrl(1, 'customer'); @@ -2364,7 +2365,6 @@ if (getDolGlobalString('SOCIETE_ASK_FOR_SHIPPING_METHOD') && !empty($soc->shipping_method_id)) { $shipping_method_id = $soc->shipping_method_id; } - //$warehouse_id = $soc->warehouse_id; } else { print ''; $filter = '((s.client:IN:1,2,3) AND (s.status:=:1))'; @@ -2410,6 +2410,9 @@ } $newdatepropal = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); + if (empty($newdatepropal)) { + $newdatepropal = dol_now(); + } // Date print ''.$langs->trans('DatePropal').''; print img_picto('', 'action', 'class="pictofixedwidth"');