diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php
index 73d86fa56a5..f58b6725f81 100644
--- a/htdocs/core/tpl/objectline_create.tpl.php
+++ b/htdocs/core/tpl/objectline_create.tpl.php
@@ -846,7 +846,7 @@ function setforpredef() {
jQuery("#multicurrency_price_ht").val('').hide();
jQuery("#price_ht").val('');
- jQuery("#price_ttc, #fourn_ref, #tva_tx, #title_vat, #title_up_ht, #title_up_ht_currency, #title_up_ttc, #title_up_ttc_currency").hide();
+ jQuery("#price_ttc, #fourn_ref, #tva_tx, #title_vat, #title_up_ht_currency, #title_up_ttc, #title_up_ttc_currency").hide();
jQuery("#np_marginRate, #np_markRate, .np_marginRate, .np_markRate, #units, #title_units").hide();
jQuery("#buying_price").show();
jQuery('#trlinefordates, .divlinefordates').show();
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index eeed4354ce0..70b9130c434 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -1998,17 +1998,17 @@ if ($action == 'create')
// Payment term
print '
| '.$langs->trans('PaymentConditionsShort').' | ';
- $form->select_conditions_paiements(isset($_POST['cond_reglement_id'])?$_POST['cond_reglement_id']:$cond_reglement_id, 'cond_reglement_id');
+ $form->select_conditions_paiements(GETPOSTISSET('cond_reglement_id')?GETPOST('cond_reglement_id', 'int'):$cond_reglement_id, 'cond_reglement_id');
print ' |
';
// Payment mode
print '| '.$langs->trans('PaymentMode').' | ';
- $form->select_types_paiements(isset($_POST['mode_reglement_id'])?$_POST['mode_reglement_id']:$mode_reglement_id, 'mode_reglement_id', 'DBIT');
+ $form->select_types_paiements(GETPOSTISSET('mode_reglement_id')?GETPOST('mode_reglement_id', 'int'):$mode_reglement_id, 'mode_reglement_id', 'DBIT');
print ' |
';
// Bank Account
print '| '.$langs->trans('BankAccount').' | ';
- $form->select_comptes($fk_account, 'fk_account', 0, '', 1);
+ $form->select_comptes((GETPOSTISSET('fk_account')?GETPOST('fk_account', 'alpha'):$fk_account), 'fk_account', 0, '', 1);
print ' |
';
// Multicurrency
@@ -2017,7 +2017,7 @@ if ($action == 'create')
print '';
print '| '.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).' | ';
print '';
- print $form->selectMultiCurrency($currency_code, 'multicurrency_code');
+ print $form->selectMultiCurrency((GETPOSTISSET('multicurrency_code')?GETPOST('multicurrency_code', 'alpha'):$currency_code), 'multicurrency_code');
print ' |
';
}
@@ -2038,7 +2038,7 @@ if ($action == 'create')
print '';
print ' | ';
print '';
- print $form->select_incoterms((!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), (!empty($objectsrc->location_incoterms)?$objectsrc->location_incoterms:''));
+ print $form->select_incoterms(GETPOSTISSET('incoterm_id') ? GETPOST('incoterm_id', 'alphanohtml') : (!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), GETPOSTISSET('location_incoterms') ? GETPOST('location_incoterms', 'alphanohtml') : (!empty($objectsrc->location_incoterms)?$objectsrc->location_incoterms:''));
print ' |
';
}
@@ -2047,7 +2047,7 @@ if ($action == 'create')
print '';
$note_public = $object->getDefaultCreateValueFor('note_public');
if(empty($note_public))$note_public = $objectsrc->note_public;
- $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
+ $doleditor = new DolEditor('note_public', (GETPOSTISSET('note_public')?GETPOST('note_public', 'none'):$note_public), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
print $doleditor->Create(1);
print ' | ';
// print ' | ';
@@ -2059,7 +2059,7 @@ if ($action == 'create')
$note_private = $object->getDefaultCreateValueFor('note_private');
if(empty($note_private))$note_private = $objectsrc->note_private;
- $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
+ $doleditor = new DolEditor('note_private', (GETPOSTISSET('note_private')?GETPOST('note_private', 'none'):$note_private), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
print $doleditor->Create(1);
print '';
// print ' | ';