Need help to get total value in total

Discussion in 'Free Source Codes' started by ANURAG954245, Sep 22, 2022 at 2:58 PM.

    
  1. ANURAG954245

    ANURAG954245 Member


    could somebody help to get the total value of opening qty , opening value ,closing qty and closing value



    Code:
    
    [#Menu:GATEWAYOFTALLY]
        Add:Key Item:"STOCK REPORT":S:Display:STOCKREPORT
    
    [Report:STOCKREPORT]
        Form:STOCKREPORT
       
    [Form:STOCKREPORT]
        Part:STOCKREPORT
        Space Top:-.5
        Width:100% SCREEN
        Height:100% SCREEN
        ;Button:Refresh TDL
       
    [Part:STOCKREPORT]
        Line:STOCKREPORTT,STOCKREPORT
        Repeat:STOCKREPORT:STOCKITEMCOLL
        Scroll:Vertical
        Common Border:Yes
        Bottom Line:DSP TOTALS
    
       
    
    [Line:STOCKREPORTT]
        Use:STOCKREPORT
        Local : Field : REPORTSRN: Set as :"S.No"
        Local : Field : REPORTNAME1: Set as :"Name"
        Local : Field : REPORTAL: Set as :"Alias"
        Local : Field : REPORTGRP: Set as :"Group"
        Local : Field : REPORTCAT: Set as :"CATEGORY"
        Local : Field : REPORTOPQTY: Set as :"Opening Qty."
        Local : Field : REPORTSTCO: Set as :"STRD.COST"
        Local : Field : REPOOPVAL: Set as :"OPENING VALUE"
        Local : Field : REPORTMRPRATE: Set as :"MRP"
        Local : Field : REPORTCLQTY: Set as :"Closing Qty."
        Local : Field : REPORTTOVAL: Set as:"Closing Value"
        Border : Column Titles
       
    [Line:STOCKREPORT]
        Field:REPORTSRN,REPORTNAME1,REPORTAL,REPORTGRP,REPORTCAT,REPORTOPQTY,REPORTSTCO,REPOOPVAL,REPORTMRPRATE,REPORTCLQTY
        Right Field:REPORTTOVAL
       
    [Field:REPORTSRN]
        Use : Short Name Field
        Set as : $$Line
        Style : Normal Bold
        Width : 8
        Align : Centre
       
       
    [Field:REPORTNAME1]
        Use : Name Field
        Set as : $NAME
        Width : 50
        Style : Normal Bold
        Border : Thin Left
       
    [Field:REPORTAL]
        Use :Name Field
        Set as : $OnlyAlias
        Style : Normal Bold
        Width : 15
        Align : Left
        Border : Thin Left
       
    [Field:REPORTGRP]
        USE:Simple Field
        SET AS:$Parent
        Width : 15
        Style : Normal Bold
        Border : Thin Left
       
    [Field:REPORTCAT]
        USE:Simple Field
        SET AS:$CATEGORY
        Width : 20
        Style : Normal Bold
        Border : Thin Left
       
    
    [Field:REPORTSTCO]
        USE: SIMPLE FIELD
        SET AS: $STANDARDCOST
        Width : 15
        Style : Normal Bold
        Border : Thin Left
       
    [Field:REPORTMRPRATE]
        USE: SIMPLE FIELD
        SET AS: $STANDARDPRICE
        Width : 15
        Style : Normal Bold
        Border : Thin Left
    [Field:REPOOPVAL]
        USE: SIMPLE FIELD
        SET AS: $STANDARDCOST*$OpeningBalance
        Width : 15
        Style : Normal Bold
        Border : Thin Left
    
    [Field:REPORTOPQTY]
        Use : SIMPLE FIELD
        Set As : $OpeningBalance
        Width : 15
        Style : Normal Bold
        Border : Thin Left
       
    [Field:REPORTCLQTY]
        Use : Name FIELD
        Set as : $ClosingBalance
        Width : 15
        Style : Normal Bold
        Border : Thin Left
       
    [Field:REPORTTOVAL]
        Use : Name FIELD
        Set as : $ClosingBalance*$MRPDetails[Last].MRPRateDetails[Last].MRPRate
        Width : 15
        Style : Normal Bold
        Border : Thin Left
       
    
    [Collection:STOCKITEMCOLL]
        Use         : Alias Collection
        Type        : Stock Item
        Fetch         : Name
        Filter:QTYFIL
    
    [System:Formula]
        QTYFIL:$ClosingBalance>0
    
                   
    
    
     

    Attached Files:



  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    In Part : Stockreport --- define your totals..........

    and where is the Bottomline ??? define the same within the line Dsp Totals and use --- $$Total:{fieldname] as per the fields that you need to total.

    In your case, QTY total will not come as there are different UoM.

    Also your Values will also not total-up as your have used STRING in your field definitions.
     
    Last edited: Sep 22, 2022 at 3:24 PM


  3. ANURAG954245

    ANURAG954245 Member


    ok thanks sir will try to get it fixed as you advised
     


Share This Page