Hello dear developers:
I'm trying to use this function to obtain a numeration code:
function getNextValue()
{
global $db,$conf;
require_once(DOL_DOCUMENT_ROOT
."/core/lib/functions2.lib.php");
// We get cursor rule
$mask=$conf->global->ICONCONTA_TRANS_MASK;
if (! $mask)
{
$this->error='NotConfigured';
return 0;
}
$numFinal=get_next_value($db,$mask,'iconta_accountingtransaction','number','','',$this->datec);
return
$numFinal;
}
the mask stored in ICONCONTA_TRANS_MASK is applied correctly, but the final number is never incremented, can you help me understand how get_next_value works?
Thanks in advance.