mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-24 10:21:32 +01:00
Translation error messages numbering modules
This commit is contained in:
@@ -348,18 +348,16 @@ foreach ($dirmodels as $reldir)
|
|||||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||||
$commande->type=0;
|
$commande->type=0;
|
||||||
$nextval=$module->getNextValue($mysoc,$commande);
|
$nextval=$module->getNextValue($mysoc,$commande);
|
||||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||||
{
|
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
if ($nextval) {
|
||||||
if ($nextval)
|
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||||
{
|
$nextval = $langs->trans($nextval);
|
||||||
$htmltooltip.=$nextval.'<br>';
|
$htmltooltip.=$nextval.'<br>';
|
||||||
}
|
} else {
|
||||||
else
|
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||||
{
|
}
|
||||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||||
|
|||||||
@@ -299,18 +299,16 @@ foreach ($dirmodels as $reldir)
|
|||||||
$htmltooltip='';
|
$htmltooltip='';
|
||||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||||
$nextval=$module->getNextValue($mysoc,$contract);
|
$nextval=$module->getNextValue($mysoc,$contract);
|
||||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||||
{
|
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
if ($nextval) {
|
||||||
if ($nextval)
|
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||||
{
|
$nextval = $langs->trans($nextval);
|
||||||
$htmltooltip.=$nextval.'<br>';
|
$htmltooltip.=$nextval.'<br>';
|
||||||
}
|
} else {
|
||||||
else
|
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||||
{
|
}
|
||||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||||
|
|||||||
@@ -324,18 +324,16 @@ foreach ($dirmodels as $reldir)
|
|||||||
$htmltooltip='';
|
$htmltooltip='';
|
||||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||||
$nextval=$module->getNextValue($mysoc,$expedition);
|
$nextval=$module->getNextValue($mysoc,$expedition);
|
||||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||||
{
|
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
if ($nextval) {
|
||||||
if ($nextval)
|
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||||
{
|
$nextval = $langs->trans($nextval);
|
||||||
$htmltooltip.=$nextval.'<br>';
|
$htmltooltip.=$nextval.'<br>';
|
||||||
}
|
} else {
|
||||||
else
|
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||||
{
|
}
|
||||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||||
|
|||||||
@@ -393,61 +393,53 @@ foreach ($dirmodels as $reldir)
|
|||||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||||
$facture->type=0;
|
$facture->type=0;
|
||||||
$nextval=$module->getNextValue($mysoc,$facture);
|
$nextval=$module->getNextValue($mysoc,$facture);
|
||||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||||
{
|
|
||||||
$htmltooltip.=$langs->trans("NextValueForInvoices").': ';
|
$htmltooltip.=$langs->trans("NextValueForInvoices").': ';
|
||||||
if ($nextval)
|
if ($nextval) {
|
||||||
{
|
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||||
|
$nextval = $langs->trans($nextval);
|
||||||
$htmltooltip.=$nextval.'<br>';
|
$htmltooltip.=$nextval.'<br>';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Example for remplacement
|
// Example for remplacement
|
||||||
$facture->type=1;
|
$facture->type=1;
|
||||||
$nextval=$module->getNextValue($mysoc,$facture);
|
$nextval=$module->getNextValue($mysoc,$facture);
|
||||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||||
{
|
$htmltooltip.=$langs->trans("NextValueForReplacements").': ';
|
||||||
$htmltooltip.=$langs->trans("NextValueForReplacements").': ';
|
if ($nextval) {
|
||||||
if ($nextval)
|
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||||
{
|
$nextval = $langs->trans($nextval);
|
||||||
$htmltooltip.=$nextval.'<br>';
|
$htmltooltip.=$nextval.'<br>';
|
||||||
}
|
} else {
|
||||||
else
|
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||||
{
|
}
|
||||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Example for credit invoice
|
// Example for credit invoice
|
||||||
$facture->type=2;
|
$facture->type=2;
|
||||||
$nextval=$module->getNextValue($mysoc,$facture);
|
$nextval=$module->getNextValue($mysoc,$facture);
|
||||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||||
{
|
|
||||||
$htmltooltip.=$langs->trans("NextValueForCreditNotes").': ';
|
$htmltooltip.=$langs->trans("NextValueForCreditNotes").': ';
|
||||||
if ($nextval)
|
if ($nextval) {
|
||||||
{
|
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||||
|
$nextval = $langs->trans($nextval);
|
||||||
$htmltooltip.=$nextval.'<br>';
|
$htmltooltip.=$nextval.'<br>';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Example for deposit invoice
|
// Example for deposit invoice
|
||||||
$facture->type=3;
|
$facture->type=3;
|
||||||
$nextval=$module->getNextValue($mysoc,$facture);
|
$nextval=$module->getNextValue($mysoc,$facture);
|
||||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||||
{
|
|
||||||
$htmltooltip.=$langs->trans("NextValueForDeposit").': ';
|
$htmltooltip.=$langs->trans("NextValueForDeposit").': ';
|
||||||
if ($nextval)
|
if ($nextval) {
|
||||||
{
|
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||||
|
$nextval = $langs->trans($nextval);
|
||||||
$htmltooltip.=$nextval;
|
$htmltooltip.=$nextval;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$htmltooltip.=$langs->trans($module->error);
|
$htmltooltip.=$langs->trans($module->error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
*
|
*
|
||||||
@@ -328,10 +328,16 @@ foreach ($dirmodels as $reldir)
|
|||||||
$htmltooltip='';
|
$htmltooltip='';
|
||||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||||
$nextval=$module->getNextValue($mysoc,$ficheinter);
|
$nextval=$module->getNextValue($mysoc,$ficheinter);
|
||||||
if ($nextval != $langs->trans("NotAvailable"))
|
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||||
{
|
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||||
$htmltooltip.=''.$langs->trans("NextValue").': '.$nextval;
|
if ($nextval) {
|
||||||
}
|
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||||
|
$nextval = $langs->trans($nextval);
|
||||||
|
$htmltooltip.=$nextval.'<br>';
|
||||||
|
} else {
|
||||||
|
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||||
|
}
|
||||||
|
}
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@@ -309,15 +309,13 @@ foreach ($dirmodels as $reldir)
|
|||||||
$htmltooltip='';
|
$htmltooltip='';
|
||||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||||
$nextval=$module->getNextValue($mysoc,$livraison);
|
$nextval=$module->getNextValue($mysoc,$livraison);
|
||||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||||
{
|
|
||||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||||
if ($nextval)
|
if ($nextval) {
|
||||||
{
|
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||||
|
$nextval = $langs->trans($nextval);
|
||||||
$htmltooltip.=$nextval.'<br>';
|
$htmltooltip.=$nextval.'<br>';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -344,18 +344,16 @@ foreach ($dirmodels as $reldir)
|
|||||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||||
$propal->type=0;
|
$propal->type=0;
|
||||||
$nextval=$module->getNextValue($mysoc,$propal);
|
$nextval=$module->getNextValue($mysoc,$propal);
|
||||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||||
{
|
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
if ($nextval) {
|
||||||
if ($nextval)
|
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||||
{
|
$nextval = $langs->trans($nextval);
|
||||||
$htmltooltip.=$nextval.'<br>';
|
$htmltooltip.=$nextval.'<br>';
|
||||||
}
|
} else {
|
||||||
else
|
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||||
{
|
}
|
||||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||||
|
|||||||
@@ -278,15 +278,13 @@ foreach ($dirmodels as $reldir)
|
|||||||
$htmltooltip='';
|
$htmltooltip='';
|
||||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||||
$nextval=$module->getNextValue($mysoc,$invoice);
|
$nextval=$module->getNextValue($mysoc,$invoice);
|
||||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||||
{
|
|
||||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||||
if ($nextval)
|
if ($nextval) {
|
||||||
{
|
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||||
|
$nextval = $langs->trans($nextval);
|
||||||
$htmltooltip.=$nextval.'<br>';
|
$htmltooltip.=$nextval.'<br>';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -279,15 +279,13 @@ foreach ($dirmodels as $reldir)
|
|||||||
$htmltooltip='';
|
$htmltooltip='';
|
||||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||||
$nextval=$module->getNextValue($mysoc,$commande);
|
$nextval=$module->getNextValue($mysoc,$commande);
|
||||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||||
{
|
|
||||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||||
if ($nextval)
|
if ($nextval) {
|
||||||
{
|
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||||
|
$nextval = $langs->trans($nextval);
|
||||||
$htmltooltip.=$nextval.'<br>';
|
$htmltooltip.=$nextval.'<br>';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -608,7 +608,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
|||||||
$maskraz=-1;
|
$maskraz=-1;
|
||||||
$maskoffset=0;
|
$maskoffset=0;
|
||||||
$resetEveryMonth=false;
|
$resetEveryMonth=false;
|
||||||
if (dol_strlen($maskcounter) < 3) return 'CounterMustHaveMoreThan3Digits';
|
if (dol_strlen($maskcounter) < 3) return 'ErrorCounterMustHaveMoreThan3Digits';
|
||||||
|
|
||||||
// Extract value for third party mask counter
|
// Extract value for third party mask counter
|
||||||
if (preg_match('/\{(c+)(0*)\}/i',$mask,$regClientRef))
|
if (preg_match('/\{(c+)(0*)\}/i',$mask,$regClientRef))
|
||||||
@@ -620,7 +620,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
|||||||
$maskrefclient_clientcode=substr($valueforccc,0,dol_strlen($maskrefclient_maskclientcode));//get n first characters of client code where n is length in mask
|
$maskrefclient_clientcode=substr($valueforccc,0,dol_strlen($maskrefclient_maskclientcode));//get n first characters of client code where n is length in mask
|
||||||
$maskrefclient_clientcode=str_pad($maskrefclient_clientcode,dol_strlen($maskrefclient_maskclientcode),"#",STR_PAD_RIGHT);//padding maskrefclient_clientcode for having exactly n characters in maskrefclient_clientcode
|
$maskrefclient_clientcode=str_pad($maskrefclient_clientcode,dol_strlen($maskrefclient_maskclientcode),"#",STR_PAD_RIGHT);//padding maskrefclient_clientcode for having exactly n characters in maskrefclient_clientcode
|
||||||
$maskrefclient_clientcode=dol_string_nospecial($maskrefclient_clientcode);//sanitize maskrefclient_clientcode for sql insert and sql select like
|
$maskrefclient_clientcode=dol_string_nospecial($maskrefclient_clientcode);//sanitize maskrefclient_clientcode for sql insert and sql select like
|
||||||
if (dol_strlen($maskrefclient_maskcounter) > 0 && dol_strlen($maskrefclient_maskcounter) < 3) return 'CounterMustHaveMoreThan3Digits';
|
if (dol_strlen($maskrefclient_maskcounter) > 0 && dol_strlen($maskrefclient_maskcounter) < 3) return 'ErrorCounterMustHaveMoreThan3Digits';
|
||||||
}
|
}
|
||||||
else $maskrefclient='';
|
else $maskrefclient='';
|
||||||
|
|
||||||
@@ -650,7 +650,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
|||||||
// Now maskwithnocode = 0000ddmmyyyyccc for example
|
// Now maskwithnocode = 0000ddmmyyyyccc for example
|
||||||
// and maskcounter = 0000 for example
|
// and maskcounter = 0000 for example
|
||||||
//print "maskwithonlyymcode=".$maskwithonlyymcode." maskwithnocode=".$maskwithnocode."\n<br>";
|
//print "maskwithonlyymcode=".$maskwithonlyymcode." maskwithnocode=".$maskwithnocode."\n<br>";
|
||||||
//var_dump($reg);
|
//var_dump($reg);
|
||||||
|
|
||||||
// If an offset is asked
|
// If an offset is asked
|
||||||
if (! empty($reg[2]) && preg_match('/^\+/',$reg[2])) $maskoffset=preg_replace('/^\+/','',$reg[2]);
|
if (! empty($reg[2]) && preg_match('/^\+/',$reg[2])) $maskoffset=preg_replace('/^\+/','',$reg[2]);
|
||||||
@@ -667,17 +667,16 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
|||||||
|
|
||||||
//print "yearoffset=".$yearoffset." yearoffsettype=".$yearoffsettype;
|
//print "yearoffset=".$yearoffset." yearoffsettype=".$yearoffsettype;
|
||||||
if (is_numeric($yearoffsettype) && $yearoffsettype >= 1)
|
if (is_numeric($yearoffsettype) && $yearoffsettype >= 1)
|
||||||
$maskraz=$yearoffsettype; // For backward compatibility
|
$maskraz=$yearoffsettype; // For backward compatibility
|
||||||
else if ($yearoffsettype === '0' || (! empty($yearoffsettype) && ! is_numeric($yearoffsettype) && $conf->global->SOCIETE_FISCAL_MONTH_START > 1))
|
else if ($yearoffsettype === '0' || (! empty($yearoffsettype) && ! is_numeric($yearoffsettype) && $conf->global->SOCIETE_FISCAL_MONTH_START > 1))
|
||||||
$maskraz = $conf->global->SOCIETE_FISCAL_MONTH_START;
|
$maskraz = $conf->global->SOCIETE_FISCAL_MONTH_START;
|
||||||
//print "maskraz=".$maskraz; // -1=no reset
|
//print "maskraz=".$maskraz; // -1=no reset
|
||||||
|
|
||||||
if ($maskraz > 0) // A reset is required
|
if ($maskraz > 0) { // A reset is required
|
||||||
{
|
if ($maskraz == 99) {
|
||||||
if ($maskraz == 99) {
|
$maskraz = date('m', $date);
|
||||||
$maskraz = date('m', $date);
|
$resetEveryMonth = true;
|
||||||
$resetEveryMonth = true;
|
}
|
||||||
}
|
|
||||||
if ($maskraz > 12) return 'ErrorBadMaskBadRazMonth';
|
if ($maskraz > 12) return 'ErrorBadMaskBadRazMonth';
|
||||||
|
|
||||||
// Define posy, posm and reg
|
// Define posy, posm and reg
|
||||||
@@ -964,7 +963,7 @@ function check_value($mask,$value)
|
|||||||
$maskcounter=$reg[1];
|
$maskcounter=$reg[1];
|
||||||
$maskraz=-1;
|
$maskraz=-1;
|
||||||
$maskoffset=0;
|
$maskoffset=0;
|
||||||
if (dol_strlen($maskcounter) < 3) return 'CounterMustHaveMoreThan3Digits';
|
if (dol_strlen($maskcounter) < 3) return 'ErrorCounterMustHaveMoreThan3Digits';
|
||||||
|
|
||||||
// Extract value for third party mask counter
|
// Extract value for third party mask counter
|
||||||
if (preg_match('/\{(c+)(0*)\}/i',$mask,$regClientRef))
|
if (preg_match('/\{(c+)(0*)\}/i',$mask,$regClientRef))
|
||||||
@@ -976,7 +975,7 @@ function check_value($mask,$value)
|
|||||||
$maskrefclient_clientcode=substr('',0,dol_strlen($maskrefclient_maskclientcode));//get n first characters of client code to form maskrefclient_clientcode
|
$maskrefclient_clientcode=substr('',0,dol_strlen($maskrefclient_maskclientcode));//get n first characters of client code to form maskrefclient_clientcode
|
||||||
$maskrefclient_clientcode=str_pad($maskrefclient_clientcode,dol_strlen($maskrefclient_maskclientcode),"#",STR_PAD_RIGHT);//padding maskrefclient_clientcode for having exactly n characters in maskrefclient_clientcode
|
$maskrefclient_clientcode=str_pad($maskrefclient_clientcode,dol_strlen($maskrefclient_maskclientcode),"#",STR_PAD_RIGHT);//padding maskrefclient_clientcode for having exactly n characters in maskrefclient_clientcode
|
||||||
$maskrefclient_clientcode=dol_string_nospecial($maskrefclient_clientcode);//sanitize maskrefclient_clientcode for sql insert and sql select like
|
$maskrefclient_clientcode=dol_string_nospecial($maskrefclient_clientcode);//sanitize maskrefclient_clientcode for sql insert and sql select like
|
||||||
if (dol_strlen($maskrefclient_maskcounter) > 0 && dol_strlen($maskrefclient_maskcounter) < 3) return 'CounterMustHaveMoreThan3Digits';
|
if (dol_strlen($maskrefclient_maskcounter) > 0 && dol_strlen($maskrefclient_maskcounter) < 3) return 'ErrorCounterMustHaveMoreThan3Digits';
|
||||||
}
|
}
|
||||||
else $maskrefclient='';
|
else $maskrefclient='';
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ ErrorModuleSetupNotComplete=Setup of module looks to be uncomplete. Go on Setup
|
|||||||
ErrorBadMask=Error on mask
|
ErrorBadMask=Error on mask
|
||||||
ErrorBadMaskFailedToLocatePosOfSequence=Error, mask without sequence number
|
ErrorBadMaskFailedToLocatePosOfSequence=Error, mask without sequence number
|
||||||
ErrorBadMaskBadRazMonth=Error, bad reset value
|
ErrorBadMaskBadRazMonth=Error, bad reset value
|
||||||
|
ErrorMaxNumberReachForThisMask=Max number reach for this mask
|
||||||
|
ErrorCounterMustHaveMoreThan3Digits=Counter must have more than 3 digits
|
||||||
ErrorSelectAtLeastOne=Error. Select at least one entry.
|
ErrorSelectAtLeastOne=Error. Select at least one entry.
|
||||||
ErrorProductWithRefNotExist=Product with reference '<i>%s</i>' don't exist
|
ErrorProductWithRefNotExist=Product with reference '<i>%s</i>' don't exist
|
||||||
ErrorDeleteNotPossibleLineIsConsolidated=Delete not possible because record is linked to a bank transation that is conciliated
|
ErrorDeleteNotPossibleLineIsConsolidated=Delete not possible because record is linked to a bank transation that is conciliated
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ ErrorModuleSetupNotComplete=La configuration du module semble incomplète. Aller
|
|||||||
ErrorBadMask=Erreur sur le masque
|
ErrorBadMask=Erreur sur le masque
|
||||||
ErrorBadMaskFailedToLocatePosOfSequence=Erreur, masque sans numéro de séquence
|
ErrorBadMaskFailedToLocatePosOfSequence=Erreur, masque sans numéro de séquence
|
||||||
ErrorBadMaskBadRazMonth=Erreur, mauvais valeur de remise à zéro
|
ErrorBadMaskBadRazMonth=Erreur, mauvais valeur de remise à zéro
|
||||||
|
ErrorMaxNumberReachForThisMask=Valeur maximale atteinte pour ce masque
|
||||||
|
ErrorCounterMustHaveMoreThan3Digits=Le compteur doit avoir plus de 3 chiffres
|
||||||
ErrorSelectAtLeastOne=Erreur. Sélectionnez au moins une entrée.
|
ErrorSelectAtLeastOne=Erreur. Sélectionnez au moins une entrée.
|
||||||
ErrorProductWithRefNotExist=La référence produit '<i>%s</i>' n'existe pas
|
ErrorProductWithRefNotExist=La référence produit '<i>%s</i>' n'existe pas
|
||||||
ErrorDeleteNotPossibleLineIsConsolidated=Suppression impossible car l'enregistrement porte sur au moins une transaction bancaire rapprochée
|
ErrorDeleteNotPossibleLineIsConsolidated=Suppression impossible car l'enregistrement porte sur au moins une transaction bancaire rapprochée
|
||||||
|
|||||||
Reference in New Issue
Block a user