From b7ae5bac6f15570afba5d00e229feae69a7af24a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 14 Feb 2016 20:48:25 +0100 Subject: [PATCH] Fix: The text "All" is not appropriate. --- htdocs/core/class/html.form.class.php | 17 ++++++++++------- htdocs/product/price.php | 27 ++++++++++++++++++--------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c694933f85c..5078b5932c9 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -894,7 +894,7 @@ class Form * @param string $selected Preselected type * @param string $htmlname Name of field in form * @param string $filter optional filters criteras (example: 's.rowid <> x', 's.client IN (1,3)') - * @param int $showempty Add an empty field + * @param string $showempty Add an empty field (Can be '1' or text to use on empty line) * @param int $showtype Show third party type in combolist (customer, prospect or supplier) * @param int $forcecombo Force to use combo box * @param array $events Ajax event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) @@ -903,7 +903,7 @@ class Form * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container * @return string HTML string with select box for thirdparty. */ - function select_company($selected='', $htmlname='socid', $filter='', $showempty=0, $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='') + function select_company($selected='', $htmlname='socid', $filter='', $showempty='', $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='') { $out=''; @@ -949,7 +949,7 @@ class Form * @param string $selected Preselected type * @param string $htmlname Name of field in form * @param string $filter optional filters criteras (example: 's.rowid <> x', 's.client in (1,3)') - * @param int $showempty Add an empty field + * @param string $showempty Add an empty field (Can be '1' or text to use on empty line) * @param int $showtype Show third party type in combolist (customer, prospect or supplier) * @param int $forcecombo Force to use combo box * @param array $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) @@ -960,7 +960,7 @@ class Form * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container * @return string HTML string with */ - function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100', $moreparam='') + function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty='', $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100', $moreparam='') { global $conf,$user,$langs; @@ -1017,10 +1017,13 @@ class Form $out.= ''; @@ -574,7 +583,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) print ''; } else { print ''; - print '' . $prices ['quantity'] . ''; + print '' . $prices['quantity'] . ''; print '' . price($prices['price']) . ''; print '' . price($prices['unitprice']) . ''; print '' . price($prices['remise_percent']) . ' %'; @@ -1177,7 +1186,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) if ($action == 'add_customer_price') { - // Create mode + // Form to add a new customer price $maxpricesupplier = $object->min_recommended_price(); print load_fiche_titre($langs->trans('PriceByCustomer')); @@ -1188,19 +1197,19 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; // VAT - print ''; // Price base - print ''; print ''; // Price - print '
' . $langs->trans('ThirdParty') . '' . $langs->trans('ThirdParty') . ''; - print $form->select_company('', 'socid', 's.client in (1,2,3) AND s.rowid NOT IN (SELECT fk_soc FROM ' . MAIN_DB_PREFIX . 'product_customer_price WHERE fk_product='.$object->id.')', 1, 0, 0, array(), 0, 'minwidth300'); + print $form->select_company('', 'socid', 's.client in (1,2,3) AND s.rowid NOT IN (SELECT fk_soc FROM ' . MAIN_DB_PREFIX . 'product_customer_price WHERE fk_product='.$object->id.')', 'SelectThirdParty', 0, 0, array(), 0, 'minwidth300'); print '
' . $langs->trans("VATRate") . ''; + print '
' . $langs->trans("VATRate") . ''; print $form->load_tva("tva_tx", $object->tva_tx, $mysoc, '', $object->id, $object->tva_npr); print '
'; + print '
'; print $langs->trans('PriceBase'); print ''; @@ -1209,7 +1218,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '
'; + print '
'; $text = $langs->trans('SellingPrice'); print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); print '';