> "Make" is a little ambiguous.
> The post method is only called when the {Receivable | Payable}Invoice
> is posted.
> There is a common Invoice class, in perp_api, where everything common
> to invoices is kept.
> ReceivableInvoice and PayableInvoice extend Invoice, and change things
> to be AP or AR specific.
When I said "make" I wanted to say "post", my mistake. But the thing is
when I put some code on the RecivabloInvoice function post... it's only
executed sometimes. I don't know, I will get a deeper look, because I think
I don't get to totally understand :$
>> I am trying to do the next thing:
>> *When you add a new invoice you give it its invoice number, which
>> won't
>> be necesarily definitive.
>> *When you post an invoice (you make it definitive) and you give as
>> invoice number the first "non posted" invoice number available. That
>> way,
>> you swap both numbers.
>
> I think you lost me. Could you spell it out with an example?
For example, you create three new invoices: 09-001, 09-002, 09-003.
a) Posting 09-003 will cause it to be renamed to 09-001 and the
formerly "09-001" would be renamed to 09-003.
b) Deleting 09-002 will cause the actual "09-003" to change its number
to "09-002"
c) Once an invoice has reached "posted" status (for example
"PostedReceivableInvoice") it will remain with its numbering... but since
that the number may change. I think that way you could avoid "jumping"
numbers... but its always under the assumption than an invoice "only gets
serious" (gets it's real number) when posting it.
That is what I think it's a weird solution, and I don't know if it is
really a solution or it's only messing around with no benefit (if it's
necessary a solid numbering for non posted invoices it would not be a
solution at all).
Thanks, and best regards!
Jose
On Wed, 6 May 2009 08:07:59 -0600, Nathan Gray <
nathan@...> wrote:
> On 6-May-09, at 5:55 AM, <
cotanda@...> <
cotanda@...>
> wrote:
>
>> One simple question (and maybe a little naive: :$:$)
>> When you make an invoice, you don't call the post method on
>> class.ReceivableInvoice.inc.php ??
>
> "Make" is a little ambiguous.
> The post method is only called when the {Receivable | Payable}Invoice
> is posted.
> There is a common Invoice class, in perp_api, where everything common
> to invoices is kept.
> ReceivableInvoice and PayableInvoice extend Invoice, and change things
> to be AP or AR specific.
>
>> I am trying to do the next thing:
>> *When you add a new invoice you give it its invoice number, which
>> won't
>> be necesarily definitive.
>> *When you post an invoice (you make it definitive) and you give as
>> invoice number the first "non posted" invoice number available. That
>> way,
>> you swap both numbers.
>
> I think you lost me. Could you spell it out with an example?
>
>> It's maybe a little weird, but this way you won't have to change
>> posted
>> invoices (which is suposed to be imposible) when you delete an
>> invoice, and
>> you won't get any jump in your posted (or not) invoices, even if the
>> number
>> order will be the posting one and the invoice numbering could dance
>> before
>> you post an invoice. It's posible to put messages informing the user
>> when
>> adding a new invoice.
>> What do you thing... too weird???
>
> Could be. I think some of the other reference numbers can change when
> saving, so it's not unprecedented.
>
> Invoices, however, are a little different in that you can save them
> (for a quote, for example), print them out, and give them to a
> client. My concern is about confusion. If the client accepts the
> quote, somebody brings up that invoice and posts it, the reference
> number may jump.
>
> It may not be avoidable in a multi-user system, with multiple invoices
> being entered at the same time. If you want, I can try to run it past
> accounting here, and see what they say.
>
>
> Thanks,
> Nathan Gray
> nathan at goarctic dot com
>
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled.
http://p.sf.net/sfu/kodak-com_______________________________________________
Perp-developers mailing list
Perp-developers@...
https://lists.sourceforge.net/lists/listinfo/perp-developers