From 077a9c65103616518f9ed99f47d815d09e8734af Mon Sep 17 00:00:00 2001 From: fmarcet Date: Mon, 4 May 2015 09:22:55 +0200 Subject: [PATCH] FIX: Bug on order and supplier invoice numeration mask when use supplier code --- htdocs/core/lib/functions2.lib.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 826008036db..378ef395b36 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -3,6 +3,7 @@ * Copyright (C) 2008-2012 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2014 Marcos GarcĂ­a + * Copyright (C) 2015 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -589,6 +590,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m global $conf; if (! is_object($objsoc)) $valueforccc=$objsoc; + else if($table == "commande_fournisseur" || $table == "facture_fourn" ) $valueforccc=$objsoc->code_fournisseur; else $valueforccc=$objsoc->code_client; // Clean parameters