3 Replies Latest reply on Dec 4, 2014 11:01 AM by 1047190

    After validate script error

    1047190

      Hi All,

       

      Please help me in this

       

      i have created logical accounts for Assets, liabilities Revenues and Expenses each of them will show there total in tdatasec tables

      Accounts     Depreciation

      1001 1002 - Total Assets

      2001 - 2002 -Total Laibilities

      5001- 5002 - Expenses

      4001-4002 - Revenues

       

       

       

      for Example

       

      Assets                                              Liabilities

       

      Account         Amount                        Account             Amount

       

      1001                100                              2001                   50

       

      1002                100                              2002                   50

       

                        -----------                                                --------------

       

                         200                                                         100

       

      Expenses                                              Incomes

       

      Account           Amount                          Account              Amount        

       

      5001               50                                   4001                    100

       

      5002               50                                   4002                   100

       

                         ------------                                                    -----------

       

                            200                                                          100

       

      Now we have income of Rs 100 which should  go to  Liabilites , then it will become Assets = Liabilities

       

       

       

      Dim rs

       

      Dim varValue

       

      Dim strSQL

       

       

      StrSQL= "Select (Select sum(Amount) from dbo.tDataSeg4 Where Desc1='TotalAssets')-(Select sum(Amount) from dbo.tDataSeg4 Where Desc1='TotalLiabilities') As Difference"

       

      Set rs= DW.DataAccess.farsSnap(strSQL)

       

      If Not rs.BOF And Not rs.EOF Then

       

      varValue = CDbl(rs.Fields("Difference").Value)

       

      Else

       

      End If

       

      If  CDbl (varValue) <> "0" Then

       

      RES.PlngActionType=2

       

      RES.PstrActionValue="Error In Trail Balance=" &varValue

       

      lngProcessType = 2

      blnProcessState = False

      strProcessMsg = "Error In Trial Balance"

       

       

      API.MaintenanceMgr.mProcessLog API.POVMgr.PPOVLocation, API.POVMgr.PPOVCategory, API.POVMgr.PPOVPeriod,2,False,"Error In Trial Balance", Now()

       

       

       

      Else

       

       

       

      RES.PlngActionType=6

       

      'lngStateExport = 21  

       

      RES.PstrActionValue="Congrats TrailBalance Matched=" &varValue

       

      End If

       

      Rs.Close

       

      Set rs = Nothing

       

      End Sub

       

       

      1. how can we send data from revenue accounts to liabilites accounts

      2. Does  this script will work for all my 50 locations ?

      3. Does  this script works for all the periods from Jan to Dec?

       

        • 1. Re: After validate script error
          SH_INT
          1. How can we send data from revenue accounts to liabilites accounts?
            Do you just want to send the source revenue accounts to a target liability accounts or do you want to populate a target revenue account and a target liability account with the same source data? In the first instance you simply have to use mappings (no logic accounts required) in the second instance map the original source to one target account and the generated logic account to the second target.

           

          2. Does  this script will work for all my 50 locations ?

          No, it is highly unlikely that this script will function as you want as it has no dynamic parameterization to filter the data by, for example, current location, current period etc

          3. Does  this script works for all the periods from Jan to Dec?

          No because it has no parameters / filters so it will simply SUM whatever is in the data table tDataSeg4 (hard coding bad) for the logic accounts you have created which could contain entries for multiple periods etc

          • 2. Re: After validate script error
            1047190

            Thanks SH for the immediate reply

             

            I will try that and let you know

             

            Can you give any example how we can create Filters for Locations and for Periods

             

             

            Thanks

             

            • 3. Re: After validate script error
              1047190

              Hi

               

              Can anyone help me

               

              How do we create Filters for locations Years  and for Periods

               

              i want the above script to work for 50 locations  for all Periods from Jan to Dec   and for Years From 2010 to 2020

               

               

              Thanks,