New: Model mercure is changed to stable
This commit is contained in:
parent
798701385d
commit
b9d36ccdc6
@ -215,7 +215,7 @@ $h++;
|
||||
dolibarr_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
|
||||
|
||||
/*
|
||||
* Module num<EFBFBD>rotation
|
||||
* Module numerotation
|
||||
*/
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -272,21 +272,38 @@ while (($file = readdir($handle))!==false)
|
||||
|
||||
$facture=new Facture($db);
|
||||
|
||||
// Info
|
||||
// Example for standard invoice
|
||||
$htmltooltip='';
|
||||
$htmltooltip.='<b>'.$langs->trans("Version").'</b>: '.$module->getVersion().'<br>';
|
||||
$facture->type=0;
|
||||
$nextval=$module->getNextValue($mysoc,$facture);
|
||||
if ($nextval != $langs->trans("NotAvailable"))
|
||||
{
|
||||
$htmltooltip.='<b>'.$langs->trans("NextValueForInvoices").'</b>: '.$nextval.'<br>';
|
||||
}
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
||||
{
|
||||
$htmltooltip.='<b>'.$langs->trans("NextValueForInvoices").'</b>: ';
|
||||
if ($nextval)
|
||||
{
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
// Example for credit invoice
|
||||
$facture->type=2;
|
||||
$nextval=$module->getNextValue($mysoc,$facture);
|
||||
if ($nextval != $langs->trans("NotAvailable"))
|
||||
{
|
||||
$htmltooltip.='<b>'.$langs->trans("NextValueForCreditNotes").'</b>: '.$nextval;
|
||||
}
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
||||
{
|
||||
$htmltooltip.='<b>'.$langs->trans("NextValueForCreditNotes").'</b>: ';
|
||||
if ($nextval)
|
||||
{
|
||||
$htmltooltip.=$nextval;
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmltooltip.=$langs->trans($module->error);
|
||||
}
|
||||
}
|
||||
print '<td align="center">';
|
||||
print $html->textwithhelp('',$htmltooltip,1,0);
|
||||
print '</td>';
|
||||
|
||||
@ -118,7 +118,7 @@ class mod_facture_mercure extends ModeleNumRefFactures
|
||||
|
||||
if (! $mask)
|
||||
{
|
||||
$this->error='ErrorFormatNotDefined';
|
||||
$this->error='NotConfigured';
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -128,7 +128,8 @@ class mod_facture_mercure extends ModeleNumRefFactures
|
||||
$maskcounter=$reg[1];
|
||||
$maskraz=-1;
|
||||
$maskoffset=0;
|
||||
|
||||
if (strlen($maskcounter) < 3) return 'CounterMustHaveMoreThan3Digits';
|
||||
|
||||
$maskwithonlyymcode=$mask;
|
||||
$maskwithonlyymcode=eregi_replace('\{(0+)([@\+][0-9]+)?([@\+][0-9]+)?\}',$maskcounter,$maskwithonlyymcode);
|
||||
$maskwithonlyymcode=eregi_replace('\{dd\}','dd',$maskwithonlyymcode);
|
||||
@ -148,6 +149,7 @@ class mod_facture_mercure extends ModeleNumRefFactures
|
||||
if (! empty($reg[3]) && eregi('^@',$reg[3])) $maskraz=eregi_replace('^@','',$reg[3]);
|
||||
if ($maskraz >= 0)
|
||||
{
|
||||
if ($maskraz > 12) return 'ErrorBadMask';
|
||||
if ($maskraz > 1 && ! eregi('^(.*)\{(y+)\}\{(m+)\}',$maskwithonlyymcode,$reg)) return 'ErrorCantUseRazInStartedYearIfNoYearMonthInMask';
|
||||
if ($maskraz <= 1 && ! eregi('^(.*)\{(y+)\}',$maskwithonlyymcode,$reg)) return 'ErrorCantUseRazIfNoYearInMask';
|
||||
//print "x".$maskwithonlyymcode." ".$maskraz;
|
||||
@ -165,8 +167,7 @@ class mod_facture_mercure extends ModeleNumRefFactures
|
||||
$sqlwhere.='SUBSTRING(facnumber, '.(strlen($reg[1])+1).', '.strlen($reg[2]).') >= '.$yearcomp;
|
||||
if ($monthcomp > 1) // Test useless if monthcomp = 1 (or 0 is same as 1)
|
||||
{
|
||||
$sqlwhere.=' AND ';
|
||||
$sqlwhere.='SUBSTRING(facnumber, '.(strlen($reg[1])+strlen($reg[2])+1).', '.strlen($reg[3]).') >= '.$monthcomp;
|
||||
$sqlwhere.=' AND SUBSTRING(facnumber, '.(strlen($reg[1])+strlen($reg[2])+1).', '.strlen($reg[3]).') >= '.$monthcomp;
|
||||
}
|
||||
}
|
||||
//print "masktri=".$masktri." maskcounter=".$maskcounter." maskraz=".$maskraz." maskoffset=".$maskoffset."<br>\n";
|
||||
|
||||
@ -17,24 +17,20 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* or see http://www.gnu.org/
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/includes/modules/facture/pluton/pluton.modules.php
|
||||
\ingroup facture
|
||||
\brief Fichier contenant la classe du mod<EFBFBD>le de num<EFBFBD>rotation de r<EFBFBD>f<EFBFBD>rence de facture Pluton
|
||||
\version $Revision$
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
||||
|
||||
/**
|
||||
\class mod_facture_pluton
|
||||
\brief Classe du mod<EFBFBD>le de num<EFBFBD>rotation de r<EFBFBD>f<EFBFBD>rence de facture Pluton
|
||||
\brief Classe du mod<EFBFBD>le de numerotation de reference de facture Pluton
|
||||
*/
|
||||
class mod_facture_pluton extends ModeleNumRefFactures
|
||||
{
|
||||
@ -134,7 +130,7 @@ class mod_facture_pluton extends ModeleNumRefFactures
|
||||
$texte.= '<tr><td colspan="3">D<>but d\'ann<6E>e fiscale : '.monthArrayOrSelected($conf->global->SOCIETE_FISCAL_MONTH_START).'</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
$texte.= '</table><br>';
|
||||
$texte.= '</table>';
|
||||
|
||||
return $texte;
|
||||
}
|
||||
|
||||
@ -34,6 +34,7 @@ UsePopupCalendar=Use popup for dates input
|
||||
UsePreviewTabs=Use preview tabs
|
||||
ShowPreview=Show preview
|
||||
ThemeCurrentlyActive=Theme currently active
|
||||
Mask=Mask
|
||||
NextValue=Next value
|
||||
NextValueForInvoices=Next value (invoices)
|
||||
NextValueForCreditNotes=Next value (credit notes)
|
||||
|
||||
@ -341,53 +341,24 @@ PDFTourteauDescription=Invoice model Tourteau
|
||||
DefinedAndHasThisValue=Defined and value to
|
||||
IsNotDefined=undefined
|
||||
|
||||
# deneb
|
||||
DenebNumRefModelDesc1=Return the invoice number under the format, PREF-31-12-2004-01 where PREF is the prefix of the company followed by the date (here 31 December 2004) and a counter.
|
||||
DenebNumRefModelDesc2=If the constant FACTURE_DENEB_DELTA is defined, an offset is applied on the counter
|
||||
|
||||
# janus
|
||||
JanusNumRefModelDesc1=Return the invoice number under a special format F50201 for the first invoice of February 2005
|
||||
|
||||
# jupiter
|
||||
JupiterNumRefModelDesc1=Monthly numbering system under the format F20030715, which correspond to the 15th invoice for the month of July 2003.
|
||||
|
||||
# lune
|
||||
LuneNumRefModelDesc1=Monthly numbering system under the format F0501015, which correspond to the 15th invoice for the month January 2005
|
||||
|
||||
# mars
|
||||
MarsNumRefModelDesc1=Invoice number under the format PREF-10-2004-005, which correspond to the 5th invoice for the month of October 2004 where PREF is the prefix of the company.
|
||||
MarsNumRefModelDesc2=The final number is formatted over 3 number or more.
|
||||
MarsNumRefModelDesc3=If the constant FACTURE_MARS_DELTA is defined, an offset is applied on the counter
|
||||
|
||||
# mercure
|
||||
MercureNumRefModelDesc1=Return a customizable invoice number according to a defined mask.
|
||||
MercureMaskCodes=You may enter all mask of numbering. In this mask, the following tags could be used:<br><b>{000000}</b> correspond to a number which will be incremented on each invoice. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros at the left in order to have as many zeros as the mask. <br><b>{000000+000}</b> same as previous but a corresponding offset to the number to the right of + is applied. <br><b>{dd}</b> invoice day (01 à 31).<br><b>{mm}</b> invoice month (01 à 12).<br><b>{yy}</b> or {yyyy} year over 2 or 4 numbers of the invoice.<br>All other characters in the mask will remain intact.<br>Spaces are not allowed.<br><br><u>Example on the 99th invoice of the third party TheCompany done 31/01/2007:</u><br><b>ABC-{yy}{mm}-{000000}</b> will give <b>ABC-0701-000099</b><br><b>{0000}-ZZZ/{dd}/XXX</b> will give <b>0099-ZZZ/31/XXX</b><br>
|
||||
MercureMaskCodes=You may enter all mask of numbering. In this mask, the following tags could be used:<br><b>{000000}</b> correspond to a number which will be incremented on each invoice. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros at the left in order to have as many zeros as the mask. <br><b>{000000+000}</b> same as previous but a corresponding offset to the number to the right of + is applied beginning by first invoice. <br><b>{000000@x}</b> same as previous but counter is reset to zero when month x is reached (x between 1 and 12). If this option is used, tag {yy} is required and also {mm} if x is 2 or higher. <br><b>{dd}</b> invoice day (01 à 31).<br><b>{mm}</b> invoice month (01 à 12).<br><b>{yy}</b> or <b>{yyyy}</b> or <b>{y}</b> year over 2 or 4 numbers of the invoice.<br>All other characters in the mask will remain intact.<br>Spaces are not allowed.<br><br><u>Example on the 99th invoice of the third party TheCompany done 31/01/2007:</u><br><b>ABC{yy}{mm}-{000000}</b> will give <b>ABC0701-000099</b><br><b>{0000+100}-ZZZ/{dd}/XXX</b> will give <b>0199-ZZZ/31/XXX</b><br>
|
||||
# terre
|
||||
TerreNumRefModelDesc1=Return numero with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
|
||||
TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module.
|
||||
|
||||
# neptune
|
||||
NeptuneNumRefModelDesc1=Return the invoice number under the format of the prefix FA followed by the year over 2 numbers and a simple counter over 4 numbers.
|
||||
NeptuneNumRefModelDesc2=If the constant FACTURE_NEPTUNE_DELTA is defined, an offset is applied on the counter
|
||||
# Deprecated
|
||||
|
||||
# orion
|
||||
OrionNumRefModelDesc1=Return the number under the format FAYYNNNNN where YY is the year and NNNNN the increment number starting at 1.
|
||||
OrionNumRefModelDesc2=The year is increased by 1 WITHOUT an initialisation to zero at the start of the fiscal year.
|
||||
OrionNumRefModelDesc3=Define the variable SOCIETE_FISCAL_MONTH_START with the month at the start of the fiscal year, example: 9 for September.
|
||||
OrionNumRefModelDesc4=In this example, we shall have on the 1st of September 2006 an invoice named FA700354.
|
||||
|
||||
# terre
|
||||
TerreNumRefModelDesc1=Return numero with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
|
||||
TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module.
|
||||
|
||||
# titan
|
||||
TitanNumRefModelDesc1=Return the number with format FAYYNNNNN where YY is the year and NNNNN is the increment number starting from 1.
|
||||
TitanNumRefModelDesc2=The year is incremented by 1 and the increment number is initialized to zero at the start of the fiscal year.
|
||||
TitanNumRefModelDesc3=Define the variable SOCIETE_FISCAL_MONTH_START with the month at the start of the fiscal year, example: 9 for September.
|
||||
TitanNumRefModelDesc4=In this example, we shall have on the 1st September 2006 an invoice named FA0700001
|
||||
|
||||
# uranus
|
||||
UranusNumRefModelDesc1=Return the invoice number under a simple numerical format, prefixed by the year with one number
|
||||
|
||||
# venus
|
||||
VenusNumRefModelDesc1=Return the invoice number under the format FA-PREF-030202, where PREF is the prefix of the company and is follwed by 6 digits for the year, month and day.
|
||||
|
||||
# pluton
|
||||
PlutonNumRefModelDesc1=Return a customizable invoice number according to a defined mask.
|
||||
|
||||
@ -34,6 +34,7 @@ UsePopupCalendar=Utiliser les popups pour la saisie des dates
|
||||
UsePreviewTabs=Afficher les onglets "Aperçu"
|
||||
ShowPreview=Afficher aperçu
|
||||
ThemeCurrentlyActive=Theme actuellement actif
|
||||
Mask=Masque
|
||||
NextValue=Prochaine valeur
|
||||
NextValueForInvoices=Prochaine valeur (factures)
|
||||
NextValueForCreditNotes=Prochaine valeur (avoirs)
|
||||
|
||||
@ -340,53 +340,24 @@ PDFTourteauDescription=Mod
|
||||
DefinedAndHasThisValue=Définie et vaut
|
||||
IsNotDefined=N'est pas définie
|
||||
|
||||
# deneb
|
||||
DenebNumRefModelDesc1=Renvoie le numéro de facture sous la forme, PREF-31-12-2004-01, où PREF est le préfixe commercial de la société, et est suivi de la date (ici le 31 décembre 2004) et d'un compteur.
|
||||
DenebNumRefModelDesc2=Si la constante FACTURE_DENEB_DELTA est définie, un offset est appliqué sur le compteur
|
||||
|
||||
# janus
|
||||
JanusNumRefModelDesc1=Renvoie le numéro de facture sous une forme spéciale F50201 pour la 1ere facture de février 2005
|
||||
|
||||
# jupiter
|
||||
JupiterNumRefModelDesc1=Système de numérotation mensuel sous la forme F20030715, qui correspond à la 15ème facture du mois de Juillet 2003
|
||||
|
||||
# lune
|
||||
LuneNumRefModelDesc1=Système de numérotation mensuel sous la forme F0501015, qui correspond à la 15ème facture du mois de Janvier 2005
|
||||
|
||||
# mars
|
||||
MarsNumRefModelDesc1=Numéro de facture sous la forme, PREF-10-2004-005, qui correspond à la 5ème facture d'octobre 2004 et où PREF est le préfix de la société.
|
||||
MarsNumRefModelDesc2=Le nombre final est formaté sur 3 chiffres ou plus.
|
||||
MarsNumRefModelDesc3=Si la constante FACTURE_MARS_DELTA est définie, un offset est appliqué sur le compteur
|
||||
|
||||
# mercure
|
||||
MercureNumRefModelDesc1=Renvoie un numéro de facture personalisable selon un masque à définir.
|
||||
MercureMaskCodes=Vous pouvez saisir tout masque de numérotation. Dans ce masque, les balises suivantes peuvent etre utilisées:<br><b>{000000}</b> correspond a un numéro qui sera incrémenté à chaque facture. Mettre autant de zéro que la longueur désirée du compteur. Le compteur sera complété par des 0 à gauche afin d'avoir autant de zéro que dans le masque.<br><b>{000000+000}</b> idem précédemment mais un offset correpondant au nombre à droite du + est appliqué.<br><b>{dd}</b> jour de la facture (01 à 31).<br><b>{mm}</b> jour de la facture (01 à 12).<br><b>{yy}</b> ou {yyyy} annee sur 2 ou 4 chiffres de la facture.<br>Tout autre caractère dans le masque sera laissé inchangé.<br>Les espaces ne sont pas permis.<br><br><u>Exemple sur la 99eme facture du tiers LaCompanie faite le 31/01/2007:</u><br><b>ABC-{yy}{mm}-{000000}</b> donnera <b>ABC-0701-000099</b><br><b>{0000}-XXX/{dd}/YYY</b> donnera <b>0099-XXX/31/YYY</b><br>
|
||||
MercureMaskCodes=Vous pouvez saisir tout masque de numérotation. Dans ce masque, les balises suivantes peuvent etre utilisées:<br><b>{000000}</b> correspond a un numéro qui sera incrémenté à chaque facture. Mettre autant de zéro que la longueur désirée du compteur. Le compteur sera complété par des 0 à gauche afin d'avoir autant de zéro que dans le masque.<br><b>{000000+000}</b> idem précédemment mais un offset correpondant au nombre à droite du + est appliqué dès la premiere facture.<br><b>{000000@x}</b> idem précédemment mais le compteur est remis à zero le xeme mois de l'année (x entre 1 et 12). Si cette option est utilisée, la balise {yy} est aussi obligatoire ainsi que {mm} si x vaut 2 ou plus <br><b>{dd}</b> jour de la facture (01 à 31).<br><b>{mm}</b> jour de la facture (01 à 12).<br><b>{yy}</b> ou <b>{yyyy}</b> ou <b>{y}</b> annee sur 2 ou 4 chiffres de la facture.<br>Tout autre caractère dans le masque sera laissé inchangé.<br>Les espaces ne sont pas permis.<br><br><u>Exemple sur la 99eme facture du tiers LaCompanie faite le 31/03/2007:</u><br><b>ABC{yy}{mm}-{000000}</b> donnera <b>ABC0703-000099</b><br><b>{0000+100}-XXX/{dd}/YYY</b> donnera <b>0199-XXX/31/YYY</b><br>
|
||||
# terre
|
||||
TerreNumRefModelDesc1=Renvoie le numéro sous la forme %syymm-nnnn pour les factures et %syymm-nnnn pour les avoirs où yy est l'année, mm le mois et nnnn un compteur séquentiel sans rupture et sans remise à 0
|
||||
TerreNumRefModelError=Une facture commençant par $syymm existe en base et est incompatible avec cette numérotation. Supprimer la ou renommer la pour activer ce module.
|
||||
|
||||
# neptune
|
||||
NeptuneNumRefModelDesc1=Renvoie le numéro de facture sous une forme du préfix FA suivi de l'année sur 2 chiffres et d'un compteur simple sur 4 chiffres.
|
||||
NeptuneNumRefModelDesc2=Si la constante FACTURE_NEPTUNE_DELTA est définie, un offset est appliqué sur le compteur
|
||||
# Deprecated
|
||||
|
||||
# orion
|
||||
OrionNumRefModelDesc1=Renvoie le numéro sous la forme FAYYNNNNN où YY est l'année et NNNNN le numéro d'incrément qui commence à 1.
|
||||
OrionNumRefModelDesc2=L'année s'incrémente de 1 SANS remise à zero en début d'année d'exercice.
|
||||
OrionNumRefModelDesc3=Définir le mois de début d'exercice dans configuration->société, ex: septembre.
|
||||
OrionNumRefModelDesc4=Dans cet exemple nous aurons au 1er septembre 2007 une facture nommée FA0800354.
|
||||
|
||||
# terre
|
||||
TerreNumRefModelDesc1=Renvoie le numéro sous la forme %syymm-nnnn pour les factures et %syymm-nnnn pour les avoirs où yy est l'année, mm le mois et nnnn un compteur séquentiel sans rupture et sans remise à 0
|
||||
TerreNumRefModelError=Une facture commençant par $syymm existe en base et est incompatible avec cette numérotation. Supprimer la ou renommer la pour activer ce module.
|
||||
|
||||
# titan
|
||||
TitanNumRefModelDesc1=Renvoie le numéro sous la forme FAYYNNNNN où YY est l'année et NNNNN le numéro d'incrément qui commence à 1.
|
||||
TitanNumRefModelDesc2=L'année s'incrémente de 1 et le numéro d'incrément se remet à zero en début d'année d'exercice.
|
||||
TitanNumRefModelDesc3=Définir le mois de début d'exercice dans configuration->société, ex: septembre.
|
||||
TitanNumRefModelDesc4=Dans cet exemple nous aurons au 1er septembre 2007 une facture nommée FA0800001.
|
||||
|
||||
# uranus
|
||||
UranusNumRefModelDesc1=Renvoie le numéro de facture sous une forme numérique simple, préfixé par l'année sur un seul chiffre
|
||||
|
||||
# venus
|
||||
VenusNumRefModelDesc1=Renvoie le numéro de facture sous la forme, FA-PREF-030202, où PREF est le préfixe commercial de la société, et est suivi de la date sur un format de 6 digits avec Année, Mois et Jour
|
||||
|
||||
# pluton
|
||||
PlutonNumRefModelDesc1=Renvoie un numéro de facture personalisable selon un masque à définir.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user