Posts

Showing posts from August, 2018

SalesOrder and PurchaseOrder Cycle

Image
SalesOrder and PurchaseOrder Cycle: A). Sales Order   Classes : 1. Confirmation  :  SalesFormLetter_Confirm 2. Picking List :  SalesFormLetter_PickingList 3. PackingSlip :  SalesFormLetter_PackingSlip 4. Invoice :  SalesFormLetter_Invoice Tables : 1.  SalesTable contains all SalesOrder headers regardless whether they have been  posted  or not. 2 . SalesParmTable, SalesParmLine and SalesParmSubTable, SalesParmSubLine contains detailed information regarding posting sales headers and Lines. 3. Confirmation   :  CustConfirmJour and CustConfirmTrans tables. 4. PackingSlip   :  CustPackingSlipJour and CustPackingSlipTrans   tables. 5. Invoice :  CustInvoiceJour and CustInvoiceTrans tables. 6. PickingList : WMSPickingRoute (Handling Status: Activated) + WMSOutputOrder 7. PickingList Registration :  WMSPickingRoute (Handling Status: Completed) + WMSOutpu...

To find first approver and last approver for the workflow

To find first approver and last approver for the workflow: static void Job54(Args _args) {     WorkflowTrackingStatusTable     workflowTrackingStatusTable;     WorkflowTrackingTable           workflowTrackingTable;     DirPersonUser                   dirPersonUser;     UserInfo                        userInfo; //First Approver-Start     select workflowTrackingStatusTable         join workflowTrackingTable         where workflowTrackingStatusTable.ContextRecId == 5637144644         && workflowTrackingTable.TrackingContext == workflowtrackingcontext::WorkItem         && workflowTrackingTable.TrackingType == workflowtrackingtype::Approval         && w...

To find currency exchange from other currency code to current currency code

To find currency exchange from other currency code to current currency code: static void SR_CEH_Example1(Args _args) {     CurrencyExchangeHelper currencyExchangeHelper;     CurrencyCode transCurrency = ‘EUR’;     AmountCur amountCur = 500.00;     AmountMst amountMST;       currencyExchangeHelper = CurrencyExchangeHelper::newExchangeDate(Ledger::current(), systemDateGet());     amountMST = currencyExchangeHelper.calculateTransactionToAccounting(transCurrency, amountCur ,true);     info(strFmt(‘%1’,amountMST)); }

To find numeral to txt in US format

To find numeral to txt in US format: public TempStr numeralsToTxt_US(real _num) {     int     numOfPennies = (decRound(frac(_num), 2) * 100) mod 100;     real    amount         = _num - frac(_num);     int     numOfTenths;     str 20  ones[19], tenths[9], hundreds, thousands, millions, billions, trillions;     int64   temp;     str 200 returntxt;     boolean checkStatus = false;     #define.paise("paise")     real modOperator(real a1, real a2)     {     int tmpi;     real tmp1, tmp2;     tmp1 = a1 / a2;     tmpi = real2int(tmp1);     tmp2 = tmpi;     return (tmp1 - tmp2)*a2;     }     real checkPower(real  _amount, int64 _power)     {         int64   numOfPower...

To find details individually for ledgerjournaltrans default dimensions

To find details individually for ledgerjournaltrans default dimensions:         DimensionAttributeLevelValueAllView     dimAttrView;     DimensionAttributeLevelValueView        DimensionAttributeLevelValueView;     DimensionAttribute                      dimAttr;     DimensionFinancialTag                   DimensionFinancialTag;     str     a,b,c,d,e;     while select dimAttrView                             where dimAttrView.DimensionAttributeValueGroup == 5637147579                             join dimAttr                               ...

To find default dimensions in PurchLine

To find default dimensions in PurchLine: this.departmentDim("Departments", purchLine.DefaultDimension); public OMOperatingUnitNumber departmentDim(Name _dimensionName, DimensionDefault _dimensionDefault) {     DimensionAttribute              dimAttr;     DimensionAttributeValue         dimAttrValue;     DimensionAttributeValueSet      dimAttrValueSet;     DimensionAttributeValueSetItem  dimAttrValueSetItem;     select dimAttr         where dimAttr.Name == _dimensionName             join dimAttrValue                 where dimAttrValue.DimensionAttribute == dimAttr.RecId                     join dimAttrValueSetItem                         where dim...

To find company data in temp table for displaying in report

To find company data in temp table for displaying in report: In ClassDeclaration    CompanyInfo                         companyInfo;//Define table         companyInfo = CompanyInfo::find();         fcc_KIBCustBankTmp.CompanyName              =   companyInfo.Name;         fcc_KIBCustBankTmp.CompanyAddress           =   companyInfo.postalAddress().Street;         fcc_KIBCustBankTmp.CompanyPhone             =   companyInfo.phone();         fcc_KIBCustBankTmp.CompanyFax               =   companyInfo.teleFax();         fcc_KIBCustBankTmp.CompanyEmail             =   c...

To find InvoiceID and need to show as string field in temp table based on ledgerjournaltrans table

To find InvoiceID and need to show as string field in temp table based on ledgerjournaltrans table: used tables: SpecTrans                     VendTransOpen                     VendTrans                     LedgerJournalTrans //invoiceId-start         while select spectrans                 join vendtransopen                 join vendtrans                     where spectrans.SpecCompany == ledgerJournalTrans.DataAreaId &&                     spectrans.SpecTableId == ledgerJournalTrans.TableId &&                     spectrans.SpecRecId == ledgerJournalTrans.RecId ...

Numerals to TXT in QAR(Qatar)

Numerals to TXT in QAR(Qatar): static TempStr numeralsToTxt_QAR(real _num)     {         int     numOfPennies = (decRound(frac(_num), 2) * 100) mod 100;         real    test         = _num - frac(_num);         int64   numOfTenths;         str 20  ones[19], tenths[9], hundreds, thousands, millions, billions, trillions;         int64   temp;         str 200 returntxt;         int64   testLoc;         boolean checkStatus = false;         #define.dirhams("Dirhams")         real modOperator(real a1, real a2)         {             int tmpi;             real tmp1, tmp2;          ...

To find Default Dimension of particular PurchID in LedgerJournalTrans Table

To find Default Dimension of particular PurchID in LedgerJournalTrans Table: while select * from purchLine         where purchLine.PurchId == purchPurchaseOrderHeader.PurchId         join RecId from DimensionAttributeValueSet         where  DimensionAttributeValueSet.RecId == purchLine.DefaultDimension         join RecId, DisplayValue from DimensionAttributeValueSetItem         where DimensionAttributeValueSetItem.DimensionAttributeValueSet == DimensionAttributeValueSet.RecId         join RecId from DimensionAttributeValue         where DimensionAttributeValue.RecId == DimensionAttributeValueSetItem.DimensionAttributeValue         join RecId, Name from DimensionAttribute         where DimensionAttribute.RecId == DimensionAttributeValue.DimensionAttribute         {   ...

To create JV and Post by using class

To create JV and Post by using class: [SysEntryPointAttribute] public void InterPropsaol(WRE_InterestProposalDC _WRE_InterestProposalDC) {     QueryRun queryrun;     BankAccountTable            bankAccountTable;     WRE_LoanDetails             wre_LoanDetails;     WRE_LoanDetailsTrans        wre_LoanDetailsTrans;     AxLedgerJournalTrans        journalTrans; // class     AxLedgerJournalTable        journalTable;     DimensionAttributeValueCombination  ledgerDimension, ledgerDimension2;     //<Wrexim_Shafee_7/11/2017>     TransDate                   effectiveDate;     WRE_BankPostingTable        bankPostingTable, bankPostingTable2;     MainAccount    ...