Sometimes we need to post sales invoice with selected lines below is the code:
SalesFormLetter salesFormLetter = SalesFormLetter::construct(DocumentStatus::Invoice);
SalesTable salesTAble;
SalesParmLine parmLine;
SalesLine salesline;
salesTable = SalesTable::find('AU-027333');
salesFormLetter.salesTable(salesTAble);
salesFormLetter.transDate (systemDateGet());
salesFormLetter.specQty (SalesUpdate::All);
//If you want proforma you can enable the code
salesFormLetter.proforma (true);
salesFormLetter.printFormLetter (true);
salesFormLetter.createParmUpdateFromParmUpdateRecord(salesFormLetter.salesParmUpdate());
salesFormLetter.initParmSalesTable(salesTAble);
salesFormLetter.initParameters(salesFormLetter.salesParmUpdate(),Printout::After);
salesFormLetter.initLinesQuery();
while select forUpdate parmLine where parmLine.ParmId == salesFormLetter.parmId()
{
salesLine = salesline::findInventTransId(parmLine.InventTransId);
if (salesline.ShippingDateRequested > today())
{
ttsBegin;
parmLine.delete();
ttsCommit;
}
}
One more useful website to learn tally....Sales Invoice
ReplyDeleteSometimes we need to post sales invoice with selected lines below is the code.invoice software
ReplyDeleteYour blog (www.axapta-developer.blogspot.com) is good source for Microsoft Dynamics AX information. Its a good blog with lots of codes/articles. Keep the good work on.
ReplyDeleteHire Microsoft Dynamics AX Developer
Good post! Thanks for sharing this information. I appreciate it. It is very beneficial for visitors. GST accounting software for small business
ReplyDeleteThanks all,
ReplyDelete