« Return to Thread: autoincrementing invoices numbers

Re: autoincrementing invoices numbers

by Nathan Gray :: Rate this Message:

Reply to Author | View in Thread


On 23-Apr-09, at 4:08 AM, <cotanda@...>  
<cotanda@...> wrote:

> Hi!
> I want to do a very simple thing (or I think so). I want to give an
> specific format on our reference to receivable account's invoices  
> (09/0001)
> and that pERP autoincrements it autocaticaly but I don't realy know  
> how to
> do it. Is it posible to do?? How??
> Thanks a lot for your help!!!! ^^

It depends on your definition of "auto-increments".

Try:
date(y)/%2$04d
That will auto-increment the last part for each client, but without  
the client number (%1$d) in there, you will get duplicate numbers.

A system-wide auto-increment could be implemented as %3.
The place to do so is in perp_ar/inc/class.ReceivableInvoice.inc.php,  
function suggest_invoice_number().  You can look at PayableInvoice for  
examples.  If you decide to add it, please send the diff.

Nathan Gray
nathan at goarctic dot com


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Perp-developers mailing list
Perp-developers@...
https://lists.sourceforge.net/lists/listinfo/perp-developers

 « Return to Thread: autoincrementing invoices numbers