From 9d52e5c00cd8719728781a04e02f4a4e82d0b940 Mon Sep 17 00:00:00 2001 From: priojk Date: Wed, 22 Mar 2023 09:14:03 +0100 Subject: [PATCH] included 'charges' as option for table column --- htdocs/product/fournisseurs.php | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index c1b61913d9f..5875ae855bd 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -11,6 +11,7 @@ * Copyright (C) 2019 Frédéric France * Copyright (C) 2019 Tim Otte * Copyright (C) 2020 Pierre Ardoin + * Copyright (C) 2023 Joachim Kueter * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -769,6 +770,15 @@ END; print ''; } + // Option to define a transport cost on supplier price + if (!empty($conf->global->PRODUCT_CHARGES)) { + print ''; + print ''.$langs->trans("Charges").''; + print ''; + print ''; + print ''; + } + // Discount qty min print ''.$langs->trans("DiscountQtyMin").''; print ' %'; @@ -800,17 +810,6 @@ END; print ''; } - // Option to define a transport cost on supplier price - if (!empty($conf->global->PRODUCT_CHARGES)) { - if (isModEnabled('margin')) { - print ''; - print ''.$langs->trans("Charges").''; - print ''; - print ''; - print ''; - } - } - // Product description of the supplier if (!empty($conf->global->PRODUIT_FOURN_TEXTS)) { //WYSIWYG Editor @@ -948,6 +947,7 @@ END; 'pfp.quantity'=>array('label'=>$langs->trans("QtyMin"), 'checked'=>1, 'position'=>5), 'pfp.unitprice'=>array('label'=>$langs->trans("UnitPriceHT"), 'checked'=>1, 'position'=>9), 'pfp.multicurrency_unitprice'=>array('label'=>$langs->trans("UnitPriceHTCurrency"), 'enabled' => isModEnabled('multicurrency'), 'checked'=>0, 'position'=>10), + 'pfp.charges'=>array('label'=>$langs->trans("Charges"), 'enabled' => !empty($conf->global->PRODUCT_CHARGES), 'checked'=>0, 'position'=>11), 'pfp.delivery_time_days'=>array('label'=>$langs->trans("NbDaysToDelivery"), 'checked'=>-1, 'position'=>13), 'pfp.supplier_reputation'=>array('label'=>$langs->trans("ReputationForThisProduct"), 'checked'=>-1, 'position'=>14), 'pfp.fk_barcode_type'=>array('label'=>$langs->trans("BarcodeType"), 'enabled' => isModEnabled('barcode'), 'checked'=>0, 'position'=>15), @@ -1035,6 +1035,10 @@ END; print_liste_field_titre("Currency", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); $nbfields++; } + if (!empty($arrayfields['pfp.charges']['checked'])) { + print_liste_field_titre("Charges", $_SERVER["PHP_SELF"], "pfp.charges", "", $param, '', $sortfield, $sortorder, 'right '); + $nbfields++; + } print_liste_field_titre("DiscountQtyMin", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); $nbfields++; if (!empty($arrayfields['pfp.delivery_time_days']['checked'])) { @@ -1177,6 +1181,13 @@ END; print ''; } + // Charges + if (!empty($arrayfields['pfp.charges']['checked'])) { + print ''; + print price($productfourn->fourn_charges); + print ''; + } + // Discount print ''; print price2num($productfourn->fourn_remise_percent).'%';