static void D_SalesInvoicePosting(Args _args)
{
List il = new List(Types::Record);
List newList;
container packedList;
SalesTable salesTable;
TmpFrmVirtual tmpFrmVirtual;
CustPackingSlipJour custPackingSlipJour;
SalesFormLetter_Invoice SalesFormLetter;
;
ttsBegin;
select custPackingSlipJour
where custPackingSlipJour.SalesId == "SO13-1325"
&& custPackingSlipJour.PackingSlipId == "ND13-1261";
tmpFrmVirtual.NoYes = true;
tmpFrmVirtual.TableNum = custPackingSlipJour.TableId;
tmpFrmVirtual.RecordNo = custPackingSlipJour.RecId;
tmpFrmVirtual.Id = custPackingSlipJour.SalesId;
tmpFrmVirtual.insert();
il.addEnd(tmpFrmVirtual);
packedList = il.pack();
salesTable = SalesTable::find('SO13-1325');
salesFormLetter = SalesFormLetter::construct(DocumentStatus::Invoice);
salesFormLetter.hideProgress(true);
salesFormLetter.printFormLetter(false);
salesFormLetter.update(salesTable, systemDateGet(), SalesUpdate::PackingSlip, AccountOrder::None, false, false, false, false, packedList);
ttsCommit;
}
If you want to create an invoice without any software, there are hundreds of tools available on internet. But I am not sure, all tools are best and free. But here is the best online invoice creator tools for free. Project Management Software
ReplyDeleteThanks Paul, you saved my life whit this code. Congratulations!! (y)
ReplyDeleteThis comment has been removed by the author.
ReplyDeletemany thanks :)
ReplyDelete