From 0e9677fd3417f3f9ef8501814ca594a94b797711 Mon Sep 17 00:00:00 2001 From: Christian Foellmann Date: Mon, 24 Aug 2020 15:59:05 +0200 Subject: [PATCH 1/4] allow default settings for "cond_reglement_id" and "mode_reglement_id" (cherry picked from commit 2e5475d181af2e8ceb6ea220424fd1329e72e342) --- htdocs/comm/propal/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index f275f16ee03..794344fd5f8 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1556,12 +1556,12 @@ if ($action == 'create') // Terms of payment print ''.$langs->trans('PaymentConditionsShort').''; - $form->select_conditions_paiements($soc->cond_reglement_id, 'cond_reglement_id', -1, 1); + $form->select_conditions_paiements( empty($soc->cond_reglement_id) ? (GETPOST('cond_reglement_id', 'int') ? GETPOST('cond_reglement_id', 'int') : '' ) : $soc->cond_reglement_id, 'cond_reglement_id', -1, 1); print ''; // Mode of payment print ''.$langs->trans('PaymentMode').''; - $form->select_types_paiements($soc->mode_reglement_id, 'mode_reglement_id'); + $form->select_types_paiements(empty($soc->mode_reglement_id) ? (GETPOST('mode_reglement_id', 'int') ? GETPOST('mode_reglement_id', 'int') : '' ) : $soc->mode_reglement_id, 'mode_reglement_id'); print ''; // Bank Account From a60968e95b5d50b8aaff176adfd662b9135514c0 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 24 Aug 2020 14:17:15 +0000 Subject: [PATCH 2/4] Fixing style errors. --- htdocs/comm/propal/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 794344fd5f8..4f2c0de238b 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1556,7 +1556,7 @@ if ($action == 'create') // Terms of payment print ''.$langs->trans('PaymentConditionsShort').''; - $form->select_conditions_paiements( empty($soc->cond_reglement_id) ? (GETPOST('cond_reglement_id', 'int') ? GETPOST('cond_reglement_id', 'int') : '' ) : $soc->cond_reglement_id, 'cond_reglement_id', -1, 1); + $form->select_conditions_paiements(empty($soc->cond_reglement_id) ? (GETPOST('cond_reglement_id', 'int') ? GETPOST('cond_reglement_id', 'int') : '' ) : $soc->cond_reglement_id, 'cond_reglement_id', -1, 1); print ''; // Mode of payment From 7730569dff1e66e364a0166ac9711b27456f0596 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 27 Aug 2020 21:00:01 +0200 Subject: [PATCH 3/4] Update card.php --- htdocs/comm/propal/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 4f2c0de238b..cf3dac232fc 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1556,12 +1556,12 @@ if ($action == 'create') // Terms of payment print ''.$langs->trans('PaymentConditionsShort').''; - $form->select_conditions_paiements(empty($soc->cond_reglement_id) ? (GETPOST('cond_reglement_id', 'int') ? GETPOST('cond_reglement_id', 'int') : '' ) : $soc->cond_reglement_id, 'cond_reglement_id', -1, 1); + $form->select_conditions_paiements(empty($soc->cond_reglement_id) ? (GETPOSTISSET('cond_reglement_id') ? GETPOST('cond_reglement_id', 'int') : '') : $soc->cond_reglement_id, 'cond_reglement_id', -1, 1); print ''; // Mode of payment print ''.$langs->trans('PaymentMode').''; - $form->select_types_paiements(empty($soc->mode_reglement_id) ? (GETPOST('mode_reglement_id', 'int') ? GETPOST('mode_reglement_id', 'int') : '' ) : $soc->mode_reglement_id, 'mode_reglement_id'); + $form->select_types_paiements(empty($soc->mode_reglement_id) ? (GETPOSTISSET('mode_reglement_id') ? GETPOST('mode_reglement_id', 'int') : '') : $soc->mode_reglement_id, 'mode_reglement_id'); print ''; // Bank Account From f997d11761480f32bb0d6c6258622b63add3c7f5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 27 Aug 2020 21:02:01 +0200 Subject: [PATCH 4/4] Update card.php --- htdocs/comm/propal/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index cf3dac232fc..cd4432707cd 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1556,12 +1556,12 @@ if ($action == 'create') // Terms of payment print ''.$langs->trans('PaymentConditionsShort').''; - $form->select_conditions_paiements(empty($soc->cond_reglement_id) ? (GETPOSTISSET('cond_reglement_id') ? GETPOST('cond_reglement_id', 'int') : '') : $soc->cond_reglement_id, 'cond_reglement_id', -1, 1); + $form->select_conditions_paiements((GETPOSTISSET('cond_reglement_id') ? GETPOST('cond_reglement_id', 'int') : $soc->cond_reglement_id), 'cond_reglement_id', -1, 1); print ''; // Mode of payment print ''.$langs->trans('PaymentMode').''; - $form->select_types_paiements(empty($soc->mode_reglement_id) ? (GETPOSTISSET('mode_reglement_id') ? GETPOST('mode_reglement_id', 'int') : '') : $soc->mode_reglement_id, 'mode_reglement_id'); + $form->select_types_paiements((GETPOSTISSET('mode_reglement_id') ? GETPOST('mode_reglement_id', 'int') : $soc->mode_reglement_id), 'mode_reglement_id'); print ''; // Bank Account