cancel
Showing results for 
Search instead for 
Did you mean: 

Create invoice automatically - get invoice total before invoice is created

Former Member
0 Kudos

Greetings all!

I'm using SAP B1 2005A and I have a code that automatically creates A/R invoices based on delivery notes. Is there a way to get the invoice total before the invoice is added to the company database? The problem is I do not include all items from a processed delivery when creating an invoice so I cannot use the delivery total in this case.

Regards, Yavor

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Yavor,

You need to add the document (invoice) before you can use fields like DocTotal. Only thing that might work is create a concept document, and get the DocTotal from that document.

regards,

Winfried Tiemessen

Former Member
0 Kudos

Hi Winfried!

What do you mean by concept document? Is it some sort of a draft document?

Regards, Yavor

Former Member
0 Kudos

That's right, the correct english term is draft document.

gr.

Winfried

Former Member
0 Kudos

Hi Winfried!

Thanks for the answer - will try to use the draft though i must remove it after I'm done with it for I wouldn't unnecessary drafts to pile up.

Regards, Yavor

PS: I think that ODLN.PaidToDate field should do just fine. It seems that ODLN.DocTotal - ODLN.PaidToDate returns the sum that is not yet processed in the corresponding delivery.

Edited by: Yavor Naumov on Nov 25, 2008 7:46 PM