From 0dcd38b96f8d9ef22c4c994f37bd038d658cf77f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Jul 2019 14:09:42 +0200 Subject: [PATCH 1/7] Fix decimals --- htdocs/compta/accounting-files.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 9069045c8b3..8467602a6fe 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -503,9 +503,9 @@ if (!empty($date_start) && !empty($date_stop)) print ''; print ''; print ''; - print ''.price($totalET).''; - print ''.price($totalIT).''; - print ''.price($totalVAT).''; + print ''.price(price2num($totalET, 'MT')).''; + print ''.price(price2num($totalIT, 'MT')).''; + print ''.price(price2num($totalVAT, 'MT')).''; print ''; print ''; print ''; From f6c937a218a43aa8f0297f2bb3360f1f9d10cd38 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Jul 2019 14:14:18 +0200 Subject: [PATCH 2/7] Fix translation --- htdocs/compta/accounting-files.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 8467602a6fe..e52f91ba45c 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -$langs->loadLangs(array("accountancy", "bills", "companies", "salaries")); +$langs->loadLangs(array("accountancy", "bills", "companies", "salaries", "compta")); $date_start =GETPOST('date_start', 'alpha'); $date_startDay= GETPOST('date_startday', 'int'); From 6956067d8f2a48d91af81d6487f3eb32ae0c78fa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Jul 2019 15:04:11 +0200 Subject: [PATCH 3/7] Fix print of print --- htdocs/societe/paymentmodes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 51a7ccb24bb..fdd4f54b6c8 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -1208,8 +1208,8 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print_liste_field_titre("BIC"); if (! empty($conf->prelevement->enabled)) { - print print_liste_field_titre("RUM"); - print print_liste_field_titre("WithdrawMode"); + print_liste_field_titre("RUM"); + print_liste_field_titre("WithdrawMode"); } print_liste_field_titre("DefaultRIB", '', '', '', '', '', '', '', 'center '); print_liste_field_titre('', '', '', '', '', '', '', '', 'center '); From fea12c3c5969ca10f064c23133a89b37f15cb1ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Jul 2019 15:53:21 +0200 Subject: [PATCH 4/7] Fix class not found error --- htdocs/societe/class/societe.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index b1d037552aa..61419b837fb 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -4148,8 +4148,8 @@ class Societe extends CommonObject if ($result < 0) { $error++; - $this->error = $c->error; - $this->errors = $c->errors; + $this->error = $this->error; + $this->errors = $this->errors; break; } } From 6594b361b1ec45d52b80a5c9520e948515b4ecc4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Jul 2019 15:56:20 +0200 Subject: [PATCH 5/7] Removed useless code --- htdocs/societe/class/societe.class.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 61419b837fb..c9933bc711b 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -4148,8 +4148,6 @@ class Societe extends CommonObject if ($result < 0) { $error++; - $this->error = $this->error; - $this->errors = $this->errors; break; } } From 73b53029059fe27c53f7feef4de499c4c0163672 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Jul 2019 16:00:16 +0200 Subject: [PATCH 6/7] Fix var not defined --- htdocs/societe/class/societe.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index c9933bc711b..a26ff197d9e 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3024,7 +3024,7 @@ class Societe extends CommonObject for ($index = 0; $index < 9; $index ++) { - $number = (int) $siren[$index]; + $number = (int) $chaine[$index]; if (($index % 2) != 0) { if (($number *= 2) > 9) $number -= 9; } $sum += $number; } @@ -3066,13 +3066,16 @@ class Societe extends CommonObject $string=preg_replace('/(\s)/', '', $string); $string = strtoupper($string); - for ($i = 0; $i < 9; $i ++) - $num[$i] = substr($string, $i, 1); - //Check format if (!preg_match('/((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)/', $string)) return 0; + $num = array(); + for ($i = 0; $i < 9; $i ++) + { + $num[$i] = substr($string, $i, 1); + } + //Check NIF if (preg_match('/(^[0-9]{8}[A-Z]{1}$)/', $string)) if ($num[8] == substr('TRWAGMYFPDXBNJZSQVHLCKE', substr($string, 0, 8) % 23, 1)) From 6bc38acb56810ff60c9b2e26fc9525f8d552a504 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Jul 2019 16:01:28 +0200 Subject: [PATCH 7/7] Fix assignation --- htdocs/societe/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index d0f0bdeb1b8..d3cd26f8115 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -2719,7 +2719,7 @@ else $MAXEVENT = 10; - $morehtmlright.= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt', DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id); + $morehtmlright = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt', DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id); // List of actions on element include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';