diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 9069045c8b3..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'); @@ -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 ''; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index f69b37b262c..3a207088c37 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -2713,7 +2713,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'; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index d83e937dc9f..6d936e5ce65 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)) @@ -4172,8 +4175,6 @@ class Societe extends CommonObject if ($result < 0) { $error++; - $this->error = $this->error; - $this->errors = $this->errors; break; } }