...
SalesTable salesTable;
NumberSeq NumberSeq;
SalesLine salesLine;
AxSalesLine axSalesLine = new axSalesLine();
AxSalesTable axsalesTable = new axSalesTable();
;
...
ttsbegin;
axsalesTable.parmSalesId();
if (ServiceOrder.CustName == "")
axsalesTable.parmCustAccount(ServiceOrder.CustAccount);// Cust Account
else
axsalestable.parmOneTimeCustomer(Dialog_OneTime.value());
axsalesTable.parmDlvMode(Dialog_DLVMode.value());
axsalesTable.parmDlvTerm(Dialog_DLVTerm.value());
axsalesTable.save();
while select forupdate Lines where Lines.RepairJournalId == _RepairJournalId && Lines.SalesId == "" &&
Lines.CSApproval == B_Approval::Approved && Lines.ItemId != "" && Lines.Qty > 0
{
axSalesLine = AxSalesLine::construct();
axSalesLine.parmSalesId(axsalesTable.parmSalesId());
axSalesLine.parmItemId(Lines.ItemId);
axSalesLine.parmSalesQty(Lines.Qty);
axSalesline.parmSalesPrice(Lines.ProjSalesPrice);
axSalesline.parmCurrencyCode(Lines.ProjCurrencyCode);
axSalesline.parmSalesUnit(Lines.Unit);
Lines.SalesId = axsalesTable.parmSalesId();
Lines.update();
axSalesLine.save();
}
ttscommit;
...
Axapta - Usable functions for queries
5 yıl önce
Hiç yorum yok:
Yorum Gönder