From eebc13dd9aac5bd7e86e95605d6fc723570b227f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 28 May 2007 18:09:10 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20on=20peut=20d=E9terminer=20un=20offset?= =?UTF-8?q?=20diff=E9rent=20pour=20les=20avoirs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/includes/modules/facture/pluton/pluton.modules.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/includes/modules/facture/pluton/pluton.modules.php b/htdocs/includes/modules/facture/pluton/pluton.modules.php index 5e960fcd18a..3d6a5cbe723 100644 --- a/htdocs/includes/modules/facture/pluton/pluton.modules.php +++ b/htdocs/includes/modules/facture/pluton/pluton.modules.php @@ -205,7 +205,7 @@ function info() if ($row) $searchyy = substr($row[0],0,-$posindice); } - if ($conf->global->FACTURE_NUM_DELTA != '') + if ($conf->global->FACTURE_NUM_DELTA || $conf->global->AVOIR_NUM_DELTA) { //on vérifie si il y a une année précédente //pour éviter que le delta soit appliqué de nouveau sur la nouvelle année @@ -235,7 +235,7 @@ function info() $max = $row[0]; } } - else if ($facture->type == 1 && $conf->global->FACTURE_NUM_DELTA != '' && !eregi('^'.$this->searchLastWithPreviousYear.'',$previousyy)) + else if ($facture->type < 2 && $conf->global->FACTURE_NUM_DELTA != '' && !eregi('^'.$this->searchLastWithPreviousYear.'',$previousyy)) { // on applique le delta une seule fois $max=$conf->global->FACTURE_NUM_DELTA?$conf->global->FACTURE_NUM_DELTA-1:0; @@ -249,7 +249,7 @@ function info() { $max=0; } - + // On replace le prefix de l'avoir if ($conf->global->AVOIR_NUM_WITH_INVOICE && $facture->type == 2) {