diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index c8d7a5a9e90..48c2bbbaa62 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -372,13 +372,13 @@ if (empty($reshook)) $object->ref_client = GETPOST('ref_client'); $object->datep = $datep; $object->date_livraison = $date_delivery; - $object->availability_id = GETPOST('availability_id'); - $object->demand_reason_id = GETPOST('demand_reason_id'); - $object->fk_delivery_address = GETPOST('fk_address'); + $object->availability_id = GETPOST('availability_id', 'int'); + $object->demand_reason_id = GETPOST('demand_reason_id', 'int'); + $object->fk_delivery_address = GETPOST('fk_address', 'int'); $object->shipping_method_id = GETPOST('shipping_method_id', 'int'); - $object->duree_validite = GETPOST('duree_validite'); - $object->cond_reglement_id = GETPOST('cond_reglement_id'); - $object->mode_reglement_id = GETPOST('mode_reglement_id'); + $object->duree_validite = price2num(GETPOST('duree_validite', 'alpha')); + $object->cond_reglement_id = GETPOST('cond_reglement_id', 'int'); + $object->mode_reglement_id = GETPOST('mode_reglement_id', 'int'); $object->fk_account = GETPOST('fk_account', 'int'); $object->contact_id = GETPOST('contactid', 'int'); $object->fk_project = GETPOST('projectid', 'int'); @@ -1550,7 +1550,7 @@ if ($action == 'create') print ''; // Validaty duration - print ''.$langs->trans("ValidityDuration").' '.$langs->trans("days").''; + print ''.$langs->trans("ValidityDuration").' '.$langs->trans("days").''; // Terms of payment print ''.$langs->trans('PaymentConditionsShort').''; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 525a267dacc..a09844da014 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -193,8 +193,12 @@ class Propal extends CommonObject public $address_type; public $address; + public $availability_id; public $availability_code; + + public $duree_validite; + public $demand_reason_id; public $demand_reason_code;