Numbering module for invoice use same number for invoice and credit note if mask is same.

This commit is contained in:
Laurent Destailleur 2011-04-23 09:50:41 +00:00
parent 9052a83f17
commit 6e27bf0b19
2 changed files with 5 additions and 3 deletions

View File

@ -33,6 +33,8 @@ For users:
- New: Add region/country statistics for member module. - New: Add region/country statistics for member module.
- New: Can define a proxy for external web access. - New: Can define a proxy for external web access.
- New: task #11003: checkbox on checks to deposit - New: task #11003: checkbox on checks to deposit
- New: Numbering module for invoice use same number for invoice
and credit note if mask is same.
- Fix: Better Postgresql compatibility. - Fix: Better Postgresql compatibility.
For developers: For developers:

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr> * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* *
@ -128,8 +128,8 @@ class mod_facture_mercure extends ModeleNumRefFactures
} }
$where=''; $where='';
if ($facture->type == 2) $where.= " AND type = 2"; //if ($facture->type == 2) $where.= " AND type = 2";
else $where.=" AND type != 2"; //else $where.=" AND type != 2";
$numFinal=get_next_value($db,$mask,'facture','facnumber',$where,$objsoc,$facture->date,$mode); $numFinal=get_next_value($db,$mask,'facture','facnumber',$where,$objsoc,$facture->date,$mode);
if (! preg_match('/([0-9])+/',$numFinal)) $this->error = $numFinal; if (! preg_match('/([0-9])+/',$numFinal)) $this->error = $numFinal;