Fix: problème de numérotation lorsque le compteur ne se remet pas à zero en début d'année fiscale
This commit is contained in:
parent
0dfcb46182
commit
a732a83244
@ -197,7 +197,14 @@ function info()
|
|||||||
$searchyy='';
|
$searchyy='';
|
||||||
$sql = "SELECT MAX(facnumber)";
|
$sql = "SELECT MAX(facnumber)";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
|
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
|
||||||
if ($conf->global->FACTURE_NUM_RESTART_BEGIN_YEAR) $sql.= " WHERE facnumber like '".$this->searchLast."%'";
|
if ($conf->global->FACTURE_NUM_RESTART_BEGIN_YEAR)
|
||||||
|
{
|
||||||
|
$sql.= " WHERE facnumber like '".$this->searchLast."%'";
|
||||||
|
}
|
||||||
|
else if ($facture->type == 2)
|
||||||
|
{
|
||||||
|
$sql.= " WHERE type = 2";
|
||||||
|
}
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user