Posts

Showing posts from January, 2022

Caller form refresh task refresh #task

    FormDataSource fds;     FormRun fr;         #Task  fr  =element.args().caller();     if (fr != null)    {        fds = fr.dataSource();        PurchTableDlv = fds.getFirst(1);         ttsbegin;         PurchTableDlv.selectForUpdate(true);         PurchTableDlv.update();         PurchTableDlv = fds.getNext();         ttscommit;         fr.task(#TaskRefresh);     }     element.closeOk();                    

Find credit note original sales order on sales order invoice report

 [ExtensionOf(classStr(SalesInvoiceDP))] final class HIGSalesInvoiceDP_Extension {     protected void populateSalesInvoiceHeaderFooterTmp(CustInvoiceJour _custInvoiceJour, CompanyInfo _companyInfo)     {         CustInvoiceTrans custInvoiceTrans,custInvoiceTransOrig;         SalesLine salesLine;         InventTransOrigin  transOrigin,transOriginOrig;         InventTrans inventTrans;         next   populateSalesInvoiceHeaderFooterTmp(_custInvoiceJour,_companyInfo);         salesInvoiceHeaderFooterTmp.BuyerAddress = _custInvoiceJour.deliveryAddress();         salesInvoiceHeaderFooterTmp.BuyerName = _custInvoiceJour.DeliveryName;         salesInvoiceHeaderFooterTmp.CompanyAddress = strReplace(salesInvoiceHeaderFooterTmp.CompanyAddress,"\n",",");         salesInvoiceHeaderFooterTmp.HIGDueDate = salesInvoiceHeaderFooterTmp.InvoiceDate + PaymTerm::find(_custInvoiceJour.Payment).NumOfDays ;         //salesInvoiceHeaderFooterTmp.CompanyBankAccount = BankAccountTable::find(_