dolibarr-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-dev] usage of get_next_value function


From: Manuel Muñoz
Subject: [Dolibarr-dev] usage of get_next_value function
Date: Fri, 31 Aug 2012 08:32:06 -0700 (PDT)

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]