mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/societe/class/societe.class.php
This commit is contained in:
@@ -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 '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td align="right">'.price($totalET).'</td>';
|
||||
print '<td align="right">'.price($totalIT).'</td>';
|
||||
print '<td align="right">'.price($totalVAT).'</td>';
|
||||
print '<td align="right">'.price(price2num($totalET, 'MT')).'</td>';
|
||||
print '<td align="right">'.price(price2num($totalIT, 'MT')).'</td>';
|
||||
print '<td align="right">'.price(price2num($totalVAT, 'MT')).'</td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user