Hi Rustem,
I have change the dates for 1 record for testing in these tables, but the vouchers are not visible.
Do I have to update in more tables?
below is the job I am using, please suggest.
static void Job11(Args _args)
{
CustInvoiceJour custInvoiceJour;
CustInvoiceTrans custInvoiceTrans;
CustInvoiceSalesLink custInvoiceSalesLink;
CustTrans custTrans;
GeneralJournalEntry generalJournalEntry;
TaxTrans taxTrans;
InventTrans inventTrans;
ttsBegin;
select forupdate custInvoiceJour
where custInvoiceJour.InvoiceId == "SI107348" &&
custInvoiceJour.SalesId == "SO191450" &&
custInvoiceJour.InvoiceDate == str2Date("01/05/2018", 123);
custInvoiceJour.InvoiceDate = str2Date("23/08/2018", 123);
custInvoiceJour.DueDate = str2Date("07/10/2018", 123);
custInvoiceJour.update();
select forUpdate custInvoiceTrans
where custInvoiceTrans.InvoiceId == "SI107348" &&
custInvoiceTrans.SalesId == "SO191450" &&
custInvoiceTrans.InvoiceDate == str2Date("01/05/2018", 123);
custInvoiceTrans.InvoiceDate = str2Date("23/08/2018", 123);
custInvoiceTrans.update();
select forUpdate custInvoiceSalesLink
where custInvoiceSalesLink.invoiceId == "SI107348" &&
custInvoiceSalesLink.origSalesId == "SO191450" &&
custInvoiceSalesLink.InvoiceDate == str2Date("01/05/2018", 123);
custInvoiceSalesLink.InvoiceDate = str2Date("23/08/2018", 123);
custInvoiceSalesLink.update();
select forUpdate custTrans
where custTrans.Invoice == "SI107348" &&
custTrans.accountNum == "1160" &&
custTrans.TransDate == str2Date("01/05/2018", 123);
custTrans.TransDate = str2Date("23/08/2018", 123);
custTrans.DueDate = str2Date("07/10/2018", 123);
custTrans.update();
select forUpdate generalJournalEntry
where generalJournalEntry.SubledgerVoucher == "INV10107347";
generalJournalEntry.AccountingDate = str2Date("23/08/2018", 123);
generalJournalEntry.AcknowledgementDate = str2Date("23/08/2018", 123);
generalJournalEntry.DocumentDate = str2Date("23/08/2018", 123);
generalJournalEntry.update();
while select forUpdate taxTrans
where taxTrans.Voucher == "INV10107347" &&
taxTrans.TransDate == str2Date("01/05/2018", 123)
{
taxTrans.RealizedDate = str2Date("23/08/2018", 123);
taxTrans.TransDate = str2Date("23/08/2018", 123);
taxTrans.update();
}
while select forUpdate inventTrans
where inventTrans.Voucher == "INV10107347" &&
inventTrans.InvoiceId == "SI107348"
//inventTrans.DateFinancial == str2Date("01/05/2018", 123)
{
inventTrans.DateFinancial = str2Date("23/08/2018", 123);
// inventTrans.TransDate = str2Date("23/08/2018", 123);
inventTrans.update();
}
ttsCommit;
//while select custInvoiceJour
//join custInvoiceTrans
//where custInvoiceTrans.InvoiceId == custInvoiceJour.InvoiceId &&
//custInvoiceTrans.SalesId == custInvoiceJour.SalesId &&
////custInvoiceTrans.InvoiceDate == custInvoiceJour.InvoiceDate &&
//custInvoiceJour.InvoiceId >= "SI107344" &&
//custInvoiceJour.InvoiceId <= "SI107351"
////custInvoiceJour.InvoiceDate == str2Date("01/05/2018", 123)
//{
//info(strFmt("CustInvoiceJour.InvoiceID = %1, CustInvoiceJour.InvoiceDate = %2, CustInvoiceJour.DueDate = %3",custInvoiceJour.InvoiceId, custInvoiceJour.InvoiceDate, custInvoiceJour.DueDate));
//info(strFmt("CustInvoiceTrans.InvoiceID = %1, CustInvoiceTrans.InvoiceDate = %2",custInvoiceTrans.InvoiceId, custInvoiceTrans.InvoiceDate));
//}
}