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*

[email protected]




2012/8/31 Manuel Muñoz <[email protected]>

> 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
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
>
>
_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à