Question Status

Suggested Answer
Sergio Sepúlveda asked a question on 19 Dec 2012 10:39 PM

Hello,

I've created a Purch Order, but I want to post and invoice with partial lines of purch order.

I've been following these steps:

- Intanciate PurchFormLetter with PurchFormLetter::construct(DocumentStatus::Invoice)

- CreateParmTable, CreateParmLine, respectively.

- Executed PurchFormLetter.run()

I've read that is possible use PurchFormLetter.update(), what is the difference, in AX 2009, with run it's works, but in AX2012 is different.

I'll appreciate any help.

regards!

 

Reply
Saju Kanakaraj responded on 29 Jan 2013 12:06 AM

Hi,

    Did you achieved this requirement in AX 2012.I am also having same requirement.

Reply
Sergio Sepúlveda responded on 14 Mar 2013 10:50 PM

I didn´t. Did you find information about it?

Reply
Bill Pfingsten responded on 15 Mar 2013 3:12 PM

Assuming you have access to source code, one good place to look (in AX 2009 or 2012) is CustInvoiceJour.interCompanyUpdate().  You can see there how purchLine.PurchReceivedNow is updated to the quantity to invoice for each PO line, the chooseLinesQuery is defined to include each PO being received, and then purchFormletter specQty is set before calling run.

There are quite a few other calls made to purchFormletter in this example, some of which are required, others which aren't.

Please reply if you need more explanation.

Bill Pfingsten

Reply
Sergio Sepúlveda responded on 30 Mar 2013 10:09 AM

Bill,

     Have  you Suggesting update receivenow field and make invoice?

Best regards,

Sergio Sepúlveda M.

Dev-Solutions

Reply
Bill Pfingsten responded on 2 Apr 2013 1:59 PM

Sergio,

Yes.  I guess I'm just looking at a known solution that is working already in the product.

Bill

Reply
André Arnaud de Calavon responded on 2 Apr 2013 2:04 PM

Hi,

Also be aware of the changed tables and from used for vendor invoices. AX2012 is now using the tables VendInvoiceInfoTable, VendInvoiceInfoLine and some more related to the PurchParmUpdate tables.

Reply
Suggested Answer
Dick Wenning responded on 3 Apr 2013 2:58 AM

 

the data model has changed, read development 4 training of AX 2012

Reply
Joe Piotrowski responded on 16 May 2013 2:01 PM

this blog has a simple example.

shrishailtechnologies.wordpress.com/.../ax-2012-x-code-to-create-and-post-purchase-order-invoice

i have a much more complex scenario that requires invoice matching to receipts. when i work that out, and you still need more inof i will be happy to share.

Reply
Suggested Answer
Dick Wenning responded on 3 Apr 2013 2:58 AM

 

the data model has changed, read development 4 training of AX 2012

Reply