From eb203413280dcd0faf495a3062db322d72be1f63 Mon Sep 17 00:00:00 2001 From: fuhraih <55843623+fuhraih@users.noreply.github.com> Date: Tue, 8 Oct 2019 15:42:59 +0200 Subject: [PATCH 1/3] Update companies.lang --- htdocs/langs/en_US/companies.lang | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index a4ab22d47c5..31b0634f579 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -438,5 +438,6 @@ PaymentTypeCustomer=Payment Type - Customer PaymentTermsCustomer=Payment Terms - Customer PaymentTypeSupplier=Payment Type - Vendor PaymentTermsSupplier=Payment Term - Vendor +PaymentTypeBoth=Payment Type - Customer and Vendor MulticurrencyUsed=Use Multicurrency -MulticurrencyCurrency=Currency \ No newline at end of file +MulticurrencyCurrency=Currency From 8aee2fa534f313043c1d8d23d48e829878cb7206 Mon Sep 17 00:00:00 2001 From: fuhraih <55843623+fuhraih@users.noreply.github.com> Date: Tue, 8 Oct 2019 15:48:18 +0200 Subject: [PATCH 2/3] Update dict.php --- htdocs/admin/dict.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index d739205124e..31ade656480 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1510,6 +1510,10 @@ if ($id) $key=$langs->trans("PaymentType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } + elseif ($fieldlist[$field]=='type' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') { + $payment_type_list = array(0=>$langs->trans('PaymentTypeCustomer'), 1=>$langs->trans('PaymentTypeSupplier'), 2=>$langs->trans('PaymentTypeBoth')); + $valuetoshow = $payment_type_list[$valuetoshow]; + } elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') { $key=$langs->trans("DemandReasonType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); @@ -1876,6 +1880,13 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print $type.''; print ''; } + elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX.'c_paiement') + { + print ''; + $select_list = array(0=>$langs->trans('PaymentTypeCustomer'), 1=>$langs->trans('PaymentTypeSupplier'), 2=>$langs->trans('PaymentTypeBoth')); + print $form->selectarray($fieldlist[$field], $select_list, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'2')); + print ''; + } elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'type_cdr' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') { if ($fieldlist[$field] == 'type_cdr') print ''; else print ''; From 5ac8ba8c65b8737b3a5d8605a48d94d6a70b0053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 8 Oct 2019 22:13:19 +0200 Subject: [PATCH 3/3] fix travis --- htdocs/core/class/ccountry.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index 44445e7d5de..84defbfd163 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -334,6 +334,7 @@ class Ccountry // extends CommonObject return 1; } } + /** * Return a link to the object card (with optionaly the picto) * @@ -344,7 +345,7 @@ class Ccountry // extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $langs; return $langs->trans($this->label);