1. X++ code to post Pending invoices
ttsbegin;
vendInvoiceInfoTablelog.updateExpectedValuesAndMatchStatus();
ttscommit;
ttsbegin;
purchFormLetter = PurchFormLetter_invoice::newFromSavedInvoice(vendInvoiceInfoTablelog);
purchFormLetter.updatePurchParmTableNum(Invoicenumber);
purchFormLetter.Update(vendInvoiceInfoTablelog.purchTable(), Invoicenumber, today());
ttscommit;
2. Post ledger vend invoice journals.
LedgerJournalCheckPost ledgerjournalcheckpost = LedgerJournalCheckPost::newLedgerJournalTable(ledgerJournalTable,NoYes::Yes);
if (ledgerjournalcheckpost.validate())
{
ledgerjournalcheckpost.run();
}
Thank you !!
No comments:
Post a Comment