Trial Balance - Explode Error

Discussion in 'Tally Developer' started by sivam, Oct 17, 2018.

    
  1. sivam

    sivam Active Member


    Dear Experts,
    I tried to Add a Explode in Trail Balance in Sales Accounts Group Based on Sales Entry Stock Group. I got Correct Values in Normal Trial Balance, But When i try with Monthly Or Quarterly Columnar, It ll show Same values in all columns. Help me to Resolve this Experts..
    Code:
    
    [#Form: NRM TBal]
       
        Local        : Line    : DSP AccLine    : Explode    : KHA SalesStkGrps : $$IsLedger and $$IsGrpOfGrp:($Parent):$$GroupSales
       
    [Part: KHA SalesStkGrps]
       
        Line        : DSP AccLine
        Repeat        : DSP AccLine    : KHA SalesStkGrps
        Local        : Line    : DSP AccLine    : Delete    : Explode
        Local        : Line    : DSP AccLine    : Delete    : Empty
        ;Local        : Line    : DSP AccLine    : Add        : Empty    : ($$IsEmpty:$KHAStkGrpAmount) Or ($$Number:$KHAStkGrpAmount = $$Number:0)
        Local        : Field    : DSP DispName    : Set as    : $StkGrpName
        Local        : Field    : DSP ClDrAmtA    : Info        : ""
        Local        : Field    : DSP ClCrAmtA    : Info        : $$KHAStkGroupValue:##SVFromDate:##SVToDate:$StkGrpName:($$Owner:$Name)
        Local        : Field    : DSP ClCrAmtA    : Delete    : Inactive
        Local        : Field    : Default        : Color        : Dark Green;RightButtonClr
    
    [Collection: KHA SalesStkGrps]
       
        Type        : StockGroup
        Compute        : StkGrpName        : $Name
        Filter        : KHAOnlyReportStkGrp
           
    [System: Formulae]
       
        KHAOnlyReportStkGrp    : $GKShowInReport
        KHAOnlyCurrDate        : $Date >= ##StkFromDate And $Date <= ##StkToDate
       
    ;------------- Check Flag in Stock Group       
    [Function: KHAStockGroupName]
       
        Parameter    : KHSMainGrpNme        : String
        Variable    : KHSCurrStkGrpName    : String
       
        100        : Set        : KHSCurrStkGrpName        : ##KHSMainGrpNme
       
        1000    : While        : Not $GKShowInReport:StockGroup:##KHSCurrStkGrpName
        1100    : Set        : KHSCurrStkGrpName        : $Parent:StockGroup:##KHSCurrStkGrpName
        1110    : If        : $$IsSysName:##KHSCurrStkGrpName
        1120    : Break
        1230    : End If
        1200    : End While
       
        5000    : Return    : ##KHSCurrStkGrpName
       
    ;------------- Function for Check Values and Parameters
    [Function: KHA StkGroupValue]
       
        Parameter    : StkFromDate        : Date
        Parameter    : StkToDate            : Date
        Parameter    : KHAStkGrpName        : String
        Parameter    : KHALedgerName        : String
       
        Variable    : KHAStkGrpAmt        : Amount
       
        098        : Set    : SVFromDate    : ##StkFromDate
        099        : Set    : SVToDate        : ##StkToDate
        100        : Set    : KHAStkGrpAmt    : $$CollectionFieldByKey:$KHAStkGrpAmount:##KHAStkGrpName:KHASalesStkGrpsValue
        110        : Log    : ##SVFromDate
        200        : Return    : ##KHAStkGrpAmt
       
    
    ;------------- Ledger Based Vouchers Collection
    [Collection: KHA SalesStkGrpsValue Src]
       
        Parm Var    : SVViewName        : String    : $$SysName:InvVchView
       
        Type        : Vouchers            : Ledger
        Child Of    : ##KHALedgerName
               
    ;------------- Aggregated based on Stock Group
    [Collection: KHA SalesStkGrpsValue]
    
        Source Collection    : KHA SalesStkGrpsValue Src
        Walk        : AllInventoryEntries
        By            : KHAStkGrpName        : ($$KHAStockGroupName:($Parent:StockItem:$StockItemName))
        Aggr Compute: KHAStkGrpAmount    : Sum    : If $LedgerName = ##KHALedgerName Then  $Amount Else $$AsAmount:0
       
        Search Key    : $KHAStkGrpName
     

    Attached Files:



  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Dear K N Sivam,

    am not good at functions yet.... but from your code i observe that....

    Local : Field : DSP ClCrAmtA : Info : $$KHAStkGroupValue:##SVFromDate:##SVToDate:$StkGrpName:($$Owner:$Name) .... here you have given date parameters

    AND

    in Function... [Function: KHA StkGroupValue]
    again you have given date parameters.........
     


  3. sivam

    sivam Active Member


    Thank Amit ji,

    I got this through Function based on from date and to date calculation.
     


  4. Murari Bajaj

    Murari Bajaj Member


    Dear Sivam

    This code is not working in my Trail Balance.... is there any thing at the time of Sales Entries or something else. TDL is porperly loaded not showing any error. But not working. Pls suggedt where i may be wrong.
     


Share This Page