Posts

Showing posts from July, 2018

To find Financial dimension for a particular dimension from PurchLine

To find Financial dimension for a particular dimension from PurchLine: 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 find numerals in QATAR = In Global Class, by adding NumberalsToQAR( )

In Global Class, by adding NumberalsToQAR( ): 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; tmp1 = a1 / a2; tmpi = real2int(tmp1); tmp2 = tmpi; return (tmp1 - tmp2)*a2; } real checkPower(real test, int64 power) { int64 numOfPower; if ( test >= power) { testLoc = real2double(_test); numOfPower = testLoc div _power; if ...

To insert item description, ItemUnitofmeasure,Item category,Item storage dimension,Item tracking dimension, Module groupid based on Itemid:

To insert item description, ItemUnitofmeasure,Item category,Item storage dimension,Item tracking dimension, Module groupid based on Itemid: public void modified() {     InventTable                         inventTable;     InventTableModule                   inventTableModule;     EcoResCategory                      ecoResCategory;     EcoResProductCategory               ecoResProductCategory;     EcoResProduct                       ecoResProduct;     EcoResStorageDimensionGroup         ecoResStorageDimensionGroup;     EcoResStorageDimensionGroupItem     ecoResStorageDimensionGroupItem;     Ec...

To find particular separate dimension from Default dimension in purchline

To find particular separate dimension from Default dimension in purchline: DimAttributeOMDepartment    dimAttrOMDepartment; DimAttributeOMCostCenter    dimAttrOMCostCenter; public OMOperatingUnitNumber departmentDim                                         (Name _dimensionName, DimensionDefault _dimensionDefault) {     DimensionAttribute              dimAttr;     DimensionAttributeValue         dimAttrValue;     DimensionAttributeValueSet      dimAttrValueSet;     DimensionAttributeValueSetItem  dimAttrValueSetItem;     select dimAttr         where dimAttr.Name == _dimensionName             join dimAttrValue                 where dimAt...

To find particular dimension one by one in Ledgerjournaltrans table

To find particular dimension one by one in Ledgerjournaltrans table static void getDimensionValues(Args _args) {//5637159585     DimensionAttributeLevelValueAllView     dimAttrView;     DimensionAttributeLevelValueView        DimensionAttributeLevelValueView;     DimensionAttribute                      dimAttr;     DimensionFinancialTag                   DimensionFinancialTag;     LedgerJournalTrans  ledgerJournalTrans;     str     a,b,c,d,e;     select ledgerJournalTrans where ledgerJournalTrans.JournalNum == 'GOFS-00028';     while select dimAttrView             where dimAttrView.DimensionAttributeValueGroup == ledgerJournalTrans.LedgerDimension             join dimAttr ...

Import data from Excel for Fixed Asset Location by using previous Fixed Asset template

Import data from Excel for Fixed Asset Location class FCC_FixedAssetLocationImport {     int                 i, j; } --------------------- public void readFromExcell() {     SysExcelApplication                 application;     SysExcelWorkbooks                   workbooks;     SysExcelWorkbook                    workbook;     SysExcelWorksheets                  worksheets;     SysExcelWorksheet                   worksheet;     SysExcelCells                       cells;     COMVariantType                  ...

create template of FCC_FixedAssetLocationTemplate

To create template of FCC_FixedAssetLocationTemplate class FCC_FixedAssetLocationTemplate { } ------------- public static void createTemplate(int noOfColumns) {     SysExcelApplication         application;     SysExcelWorkbooks           workbooks;     SysExcelWorkbook            workbook;     SysExcelWorksheets          worksheets;     SysExcelWorksheet           worksheet;     SysExcelCells               cells;     SysExcelCell                cell;     COM                         comg,comfont;     int                         i; ...

To display mainacc and posting profile account in General ledger

To display   mainaccount(10037-COM-ADMIN-G-CR 3…CRANE-Iran) and Accountnumber(10037) of Ledger   Customeraccount(CUST0009) and posting profile of Customer(10501) of Customer   Vendoraccount(F0003) and posting profile of vendor(20201) of Vendor  BankAccounnt(Loan) and posting profile of Bank(10023) of Bank  Fixed assets(COMHRD-00006) and posting profile of Fixed assets(12410) of Fixed assets display str 20  mainAccDisplay() {     Name                nameFind;     MainAccountNum      mainaccountdisplay;     switch(this.AccountType)     {         case LedgerJournalACType::Cust :             mainaccountdisplay = this.mainAccFind(this.AccountType,this.LedgerDimension);             break;         case LedgerJournalACType::Vend :   ...

To find MainAccount name in GeneralJournal

To find MainAccount name in GeneralJournal public LedgerJournalAccountName accountNameFind(     LedgerJournalACType     _accountType,     DimensionDynamicAccount _dimensionDynamicAccount,     SelectableDataArea      _company) {     if (xDataArea::exist(_company))     {         changecompany(_company)         {             switch(_accountType)             {                 case LedgerJournalACType::Ledger :                     return DimensionStorage::getMainAccountFromLedgerDimension(_dimensionDynamicAccount).localizedName();                 case LedgerJournalACType::Cust :                     return CustTable::find(...

MainAccount display and offsetAccount display based on General ledger dimensions

LedgerJournalTrans Table methods() for MainAccount display and offsetAccount display     DimensionAttributeValueCombination  ledgerDimension;     LedgerJournalAC                                   account;      //MainAccount display    if (this.LedgerDimension)    {             // If the account has not been changed, then pull the value from ledger dimension as the                        //master             select DisplayValue from ledgerDimension where ledgerDimension.RecId ==                                                                 this.Led...