From ec109fa7ea155353e1c93f30237e1e3fddc0ddd2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 22 Oct 2025 22:07:17 +0200 Subject: [PATCH] Fix default fields for POS --- htdocs/compta/facture/list.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 8bc41d8250b..a337ff90677 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -335,12 +335,19 @@ foreach ($object->fields as $key => $val) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; -// For POS context, we force possource and posmodule -$arrayfields["f.pos_source"]['checked'] = 1; +// For POS context, we force some fields +if ($contextpage == 'poslist') { + $arrayfields["f.pos_source"]['checked'] = 1; + $arrayfields["f.date_lim_reglement"]['checked'] = 0; + $arrayfields["f.total_ttc"]['checked'] = 1; + $arrayfields["f.tms"]['checked'] = 1; + $arrayfields["p.ref"]['checked'] = 0; +} $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); + // Check only if it's an internal user, external users are already filtered by $socid if (empty($user->socid) && !$user->hasRight('societe', 'client', 'voir')) { $search_sale = $user->id;