mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 23:52:24 +01:00
Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts: htdocs/core/lib/functions2.lib.php htdocs/fourn/class/fournisseur.facture.class.php
This commit is contained in:
@@ -739,8 +739,8 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
|
||||
global $conf,$user;
|
||||
|
||||
if (! is_object($objsoc)) $valueforccc=$objsoc;
|
||||
elseif ($table == "commande_fournisseur" || $table == "facture_fourn" ) $valueforccc=$objsoc->code_fournisseur;
|
||||
else $valueforccc=$objsoc->code_client;
|
||||
elseif ($table == "commande_fournisseur" || $table == "facture_fourn" ) $valueforccc=dol_string_unaccent($objsoc->code_fournisseur);
|
||||
else $valueforccc=dol_string_unaccent($objsoc->code_client);
|
||||
|
||||
$sharetable = $table;
|
||||
if ($table == 'facture' || $table == 'invoice') $sharetable = 'invoicenumber'; // for getEntity function
|
||||
@@ -988,6 +988,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
|
||||
// Define $maskLike
|
||||
$maskLike = dol_string_nospecial($mask);
|
||||
$maskLike = str_replace("%", "_", $maskLike);
|
||||
|
||||
// Replace protected special codes with matching number of _ as wild card caracter
|
||||
$maskLike = preg_replace('/\{yyyy\}/i', '____', $maskLike);
|
||||
$maskLike = preg_replace('/\{yy\}/i', '__', $maskLike);
|
||||
@@ -1163,7 +1164,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
|
||||
// Now we replace the refclient
|
||||
if ($maskrefclient)
|
||||
{
|
||||
//print "maskrefclient=".$maskrefclient." maskwithonlyymcode=".$maskwithonlyymcode." maskwithnocode=".$maskwithnocode."\n<br>";
|
||||
//print "maskrefclient=".$maskrefclient." maskwithonlyymcode=".$maskwithonlyymcode." maskwithnocode=".$maskwithnocode." maskrefclient_clientcode=".$maskrefclient_clientcode."\n<br>";exit;
|
||||
$maskrefclient_maskbefore='{'.$maskrefclient.'}';
|
||||
$maskrefclient_maskafter=$maskrefclient_clientcode.str_pad($maskrefclient_counter, dol_strlen($maskrefclient_maskcounter), "0", STR_PAD_LEFT);
|
||||
$numFinal = str_replace($maskrefclient_maskbefore, $maskrefclient_maskafter, $numFinal);
|
||||
|
||||
Reference in New Issue
Block a user