static void CreateFreeTextInvoice(Args _args)
{
CustInvoiceTable custInvoiceTable;
CustInvoiceLine custInvoiceLine;
CustTable custTable;
CustPostInvoice custPostInvoice;
LineNum lineNum;
;
custTable = CustTable::find('******');
custInvoiceTable.clear();
custInvoiceTable.initFromCustTable(custTable);
custInvoiceTable.insert();
custInvoiceLine.clear();
custInvoiceLine.initValue();
custInvoiceLine.LedgerDimension = 123456;
custInvoiceLine.initFromCustInvoiceTable(custInvoiceTable);
custInvoiceLine.AmountCur = 101.00;
custInvoiceLine.Description = "Test";
custInvoiceLine.TaxItemGroup = "";
custInvoiceLine.ParentRecId = custInvoiceTable.RecId;
if(!lineNum)
lineNum = CustInvoiceLine::lastLineNum_W(custInvoiceLine.ParentRecId);
lineNum += 1;
custInvoiceLine.LineNum = lineNum;
custInvoiceLine.insert();
custPostInvoice = new CustPostInvoice(custInvoiceTable);
custPostInvoice.run();
}
{
CustInvoiceTable custInvoiceTable;
CustInvoiceLine custInvoiceLine;
CustTable custTable;
CustPostInvoice custPostInvoice;
LineNum lineNum;
;
custTable = CustTable::find('******');
custInvoiceTable.clear();
custInvoiceTable.initFromCustTable(custTable);
custInvoiceTable.insert();
custInvoiceLine.clear();
custInvoiceLine.initValue();
custInvoiceLine.LedgerDimension = 123456;
custInvoiceLine.initFromCustInvoiceTable(custInvoiceTable);
custInvoiceLine.AmountCur = 101.00;
custInvoiceLine.Description = "Test";
custInvoiceLine.TaxItemGroup = "";
custInvoiceLine.ParentRecId = custInvoiceTable.RecId;
if(!lineNum)
lineNum = CustInvoiceLine::lastLineNum_W(custInvoiceLine.ParentRecId);
lineNum += 1;
custInvoiceLine.LineNum = lineNum;
custInvoiceLine.insert();
custPostInvoice = new CustPostInvoice(custInvoiceTable);
custPostInvoice.run();
}
No comments:
Post a Comment