From 3ae6a1d7867f414bc343488188bac5435006075e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 3 May 2022 16:18:52 +0200 Subject: [PATCH] Fix preselection of type of invoice --- htdocs/compta/facture/card.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 2b9ad68f241..0cf7af2996e 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -987,6 +987,10 @@ if (empty($reshook)) { } $selectedLines = GETPOST('toselect', 'array'); + if (GETPOST('type', 'int') === '') { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); + } + $db->begin(); $error = 0; @@ -3176,6 +3180,9 @@ if ($action == 'create') { $i++; } print ''; + + print ajax_combobox("fac_rec"); + // Option to reload page to retrieve customer informations. Note, this clear other input if (empty($conf->global->RELOAD_PAGE_ON_TEMPLATE_CHANGE_DISABLED)) { print '