diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index c7eb5700b66..8d5ca949e22 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -215,6 +215,9 @@ if (empty($user->socid)) { $fieldstosearchall["c.note_private"] = "NotePrivate"; } +// Show POS fields if cashdesk or takepos module enabled or if global configuration to show POS fields on order list is enabled +$showpos = (isModEnabled('cashdesk') || isModEnabled('takepos') || getDolGlobalInt('ORDER_SHOW_POS')) ? '1' : '0'; + $checkedtypetiers = '0'; $arrayfields = array( 'c.rowid' => array('label' => "ID", 'checked' => '1', 'enabled' => (string) getDolGlobalInt('MAIN_SHOW_TECHNICAL_ID'), 'position' => 1), @@ -237,8 +240,8 @@ $arrayfields = array( 'c.fk_cond_reglement' => array('label' => "PaymentConditionsShort", 'checked' => '-1', 'position' => 67), 'c.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => '-1', 'position' => 68), 'c.fk_input_reason' => array('label' => "Origin", 'checked' => '-1', 'position' => 69), - 'c.module_source' => array('label' => "POSModule", 'langfile' => 'cashdesk', 'checked' => ($contextpage == 'poslist' ? '1' : '0'), 'enabled' => "(isModEnabled('cashdesk') || isModEnabled('takepos') || getDolGlobalInt('ORDER_SHOW_POS'))", 'position' => 90), - 'c.pos_source' => array('label' => "POSTerminal", 'langfile' => 'cashdesk', 'checked' => ($contextpage == 'poslist' ? '1' : '0'), 'enabled' => "(isModEnabled('cashdesk') || isModEnabled('takepos') || getDolGlobalInt('ORDER_SHOW_POS'))", 'position' => 91), + 'c.module_source' => array('label' => "POSModule", 'langfile' => 'cashdesk', 'checked' => ($contextpage == 'poslist' ? '1' : '0'), 'enabled' => $showpos, 'position' => 90), + 'c.pos_source' => array('label' => "POSTerminal", 'langfile' => 'cashdesk', 'checked' => ($contextpage == 'poslist' ? '1' : '0'), 'enabled' => $showpos, 'position' => 91), 'c.total_ht' => array('label' => "AmountHT", 'checked' => '1', 'position' => 75), 'c.total_vat' => array('label' => "AmountVAT", 'checked' => '0', 'position' => 80), 'c.total_ttc' => array('label' => "AmountTTC", 'checked' => '0', 'position' => 85), diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 9027cc16f60..1f3acc34b65 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -237,6 +237,9 @@ if (empty($user->socid)) { $fieldstosearchall["f.note_private"] = "NotePrivate"; } +// Show POS fields if cashdesk or takepos module enabled or if global configuration to show POS fields on order list is enabled +$showpos = (isModEnabled('cashdesk') || isModEnabled('takepos') || getDolGlobalInt('INVOICE_SHOW_POS')) ? '1' : '0'; + $checkedtypetiers = '0'; $arrayfields = array( 'f.ref' => array('label' => "Ref", 'checked' => '1', 'position' => 5), @@ -261,8 +264,8 @@ $arrayfields = array( 'f.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => '1', 'position' => 80), 'f.fk_cond_reglement' => array('label' => "PaymentConditionsShort", 'checked' => '1', 'position' => 85), 'f.fk_input_reason' => array('label' => "Source", 'checked' => 0, 'enabled' => 1, 'position' => 88), - 'f.module_source' => array('label' => "POSModule", 'langfile' => 'cashdesk', 'checked' => ($contextpage == 'poslist' ? '1' : '0'), 'enabled' => "(isModEnabled('cashdesk') || isModEnabled('takepos') || getDolGlobalInt('INVOICE_SHOW_POS'))", 'position' => 90), - 'f.pos_source' => array('label' => "POSTerminal", 'langfile' => 'cashdesk', 'checked' => ($contextpage == 'poslist' ? '1' : '0'), 'enabled' => "(isModEnabled('cashdesk') || isModEnabled('takepos') || getDolGlobalInt('INVOICE_SHOW_POS'))", 'position' => 91), + 'f.module_source' => array('label' => "POSModule", 'langfile' => 'cashdesk', 'checked' => ($contextpage == 'poslist' ? '1' : '0'), 'enabled' => $showpos, 'position' => 90), + 'f.pos_source' => array('label' => "POSTerminal", 'langfile' => 'cashdesk', 'checked' => ($contextpage == 'poslist' ? '1' : '0'), 'enabled' => $showpos, 'position' => 91), 'f.total_ht' => array('label' => "AmountHT", 'checked' => '1', 'position' => 95), 'f.total_tva' => array('label' => "AmountVAT", 'checked' => '0', 'position' => 100), 'f.total_localtax1' => array('label' => $langs->transcountry("AmountLT1", $mysoc->country_code), 'checked' => '0', 'enabled' => ($mysoc->localtax1_assuj == "1"), 'position' => 110),