dolibarr-dev
[Top][All Lists]
Advanced

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

Re: [Dolibarr-dev] usage of get_next_value function


From: Marcos García
Subject: Re: [Dolibarr-dev] usage of get_next_value function
Date: Fri, 31 Aug 2012 17:45:28 +0200

Hi Manuel,

I think that's because it retrieves the "next ref", so try creating an invoice or whatever after obtaining that ref and you'll get it increated.

Regards,
 
Marcos García
address@hidden



2012/8/31 Manuel Muñoz <address@hidden>
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.

_______________________________________________
Dolibarr-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev



reply via email to

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