How to get total number of pakages From Customize Purchase voucher to a another report.

Discussion in 'Requests' started by sattam, Jul 20, 2016.

    
  1. sattam

    sattam Active Member


    sir pls help me.
     


  2. sattam

    sattam Active Member


    Here is my Purchase Invoice.




    [#Line: EI ColumnOne] ;; Invoice Column Headings1 without class

    Option : Global EI ColumnOne : @@IsPurchase

    ;; "Global" prefix is added for better readability of the code

    [!Line: Global EI ColumnOne]

    Add : Right Fields : At Beginning : Global VCH Marks, Global VCH NumPack

    ;;Need to mention Right Fields, since just Field means Left Field
    ;;and we need “NumPack” Column to the right of the screen at beginning

    Local : Field : Default : Align : Center

    Local : Field : Global VCH Marks : Info : "Bale Nos."
    Local : Field : Global VCH NumPack : Info : "No. of Bales"

    [#Line: EI ColumnTwo] ;; Invoice Column Headings1 without class

    Option : Global EI ColumnTwo : @@IsPurchase

    [!Line: Global EI ColumnTwo]

    Add : Right Fields : At Beginning : Global VCH Marks, Global VCH NumPack
    Local : Field : Default : Align : Center

    Local : Field : Global VCH Marks : Info : ""
    Local : Field : Global VCH NumPack : Info : ""

    [#Part: EI InvInfo]

    Total:Global Total NumPack

    [#Line: EI InvDetails]

    Option : Global EI InvDetails : @@IsPurchase

    [!Line: Global EI InvDetails]

    Delete : Lines : EI Marks, EI NumPackages

    [#Line: CI InvDetails]

    Option : Global CI InvDetails : @@IsPurchase

    [!Line: Global CI InvDetails]

    Delete : Lines : CI MarksPackages

    [#Line: EI InvInfo] ;; Invoice Inventory Entries without Class

    Option : Global EI InvInfo : @@IsPurchase

    [#Line: CI InvInfo] ;; Invoice Inventory Entries with Class

    Option : Global EI InvInfo : @@IsPurchase

    [!Line: Global EI InvInfo]

    Add : Right Fields : At Beginning : Global VCH Marks, Global VCH NumPack
    Local : Field : Global VCH Marks : Storage : BasicPackageMarks
    Local : Field : Global VCH NumPack : Storage : BasicNumPackages

    [Field: Global VCH Marks]

    Use : Short Name Field
    Width : 12
    Align : Right
    Border : Thin Left Right
    Invisible : NOT ##VrVarC1
    Skip on : $$IsEnd:$StockItemName
    ;; Inactive : $$IsEnd:$StockItemName

    [Field: Global VCH NumPack]

    Use : Short Name Field
    Width : 10
    Align : Center
    Border : Thin Left Right
    Invisible : NOT ##VrVarC1
    Skip on : $$IsEnd:$StockItemName
    ;; Inactive : $$IsEnd:$StockItemName

    [#Form: Export Invoice]

    Option : Global Export Invoice NP : @@IsPurchase

    [!Form : Global Export Invoice NP]

    Local : Line : VCH NarrPrompt: Add : Right Fields : At Beginning : Global Total Marks, Global Total NumPack

    [Field: Global Total Marks]

    Use : Global VCH Marks
    Border : Totals
    Set as : "Grand Total"
    Set always : Yes
    Skip : Yes

    [Field: Global Total NumPack]

    Use : Global VCH NumPack
    Border : Totals
    Set as : $$CollNumTotal:InventoryEntries:$$Number:$BasicNumPackages

    Skip : Yes
    Set always : Yes

    [#Line: EXPINV Column1]
    Option : Global EI Column1 : @@IsPurchase
    [!Line: Global EI Column1]
    Add :Right Fields : Before : EXPINV QtyTitle : Global VCH Marks, Global VCH NumPack

    Local : Field : Default : Align : Center
    Local : Field : Default : Style : Normal
    Local : Field : Global VCH Marks : Info : "Bale Nos."
    Local : Field : Global VCH NumPack : Info : "No. of Bales"

    [#Line: EXPINV Column2]
    Option : Global EI Column2 : @@IsPurchase

    [!Line: Global EI Column2]

    Add : Right Fields : At Beginning : Global VCH Marks, Global VCH NumPack
    Local : Field : Default : Align : Center

    Local : Field : Global VCH Marks : Info : ""
    Local : Field : Global VCH NumPack : Info : ""


    [#Line: EXPINV InvDetails]
    Option : Global EI InvDetails1 : @@IsPurchase

    [!Line: Global EI InvDetails1]


    Add :Right Fields : Before : EXPINV Qty : Global VCH Marks, Global VCH NumPack
    Local : Field : Global VCH Marks : Style : Normal
    Local : Field : Global VCH NumPack : Style : Normal
    Local : Field : Global VCH Marks : Storage : BasicPackageMarks
    Local : Field : Global VCH NumPack : Storage : BasicNumPackages

    [#Line: EXPINV Totals]

    Option : Global EXPINV Totals : @@IsPurchase
    [!Line: Global EXPINV Totals]

    Add:Left Field:Global Tot Marks,Global Tot NumPack
    Local : Field : EXPINV DescTitle : Info :""
    [Field: Global Tot Marks]

    Use : Global VCH Marks

    Set as : "Grand Total"
    Set always : Yes


    [Field: Global Tot NumPack]

    Use : Global VCH NumPack

    Set as : $$CollNumTotal:InventoryEntries:$$Number:$BasicNumPackages




    ;; End-of-File
     


  3. sattam

    sattam Active Member


    Now I wish to get Total number of pacage purchased in a month or in a period to a another report.
    Pls anybody help me.
     


  4. sattam

    sattam Active Member


    pls help I tried many ways but can't get result.
     


  5. NAGARAJKMAR SUBRAMANIAN

    NAGARAJKMAR SUBRAMANIAN Active Member


    Try Like this Sattam,

    [Field: Global Tot NumPack]

    ;Use : Global VCH NumPack
    use : Number Field
    Set as : $$CollNumTotal:InventoryEntries:mad:Numpak
    numpak : $$Number:$BasicNumPackages
     


  6. sattam

    sattam Active Member


    No sir I have a report where in a bottom field I wish to get Total number of package purchased in a month from purchase Voucher Collection.Sir pls help me.I realy need It.


    Here Is My Report.Its Working Fine.But Total number of Bales Purchased Field Display Zero.
     


  7. sattam

    sattam Active Member



  8. sattam

    sattam Active Member


    Sir Pls Help Me.

    [Field: TotBales]
    Use :Number Field
    Set as :$$CollNumTotal:InventoryEntries:$$Number:

    $BasicNumPackages
    Border : Thin Left
    Width : 20% Screen
    Align : Centre
    Style : Tiny



    [Line: PQRBody Total]

    Local : Field : TotBales : Set as:$$CollNumTotal:InventoryEntries:$

    $Number:Voucher:BasicNumPackages
     
    Last edited: Jul 21, 2016


  9. sattam

    sattam Active Member


    Can anyone help me?
     


  10. sattam

    sattam Active Member


    anybody can help me? its very nessesary for me.
     


  11. sattam

    sattam Active Member


    no one there to help me?
     


  12. NAGARAJKMAR SUBRAMANIAN

    NAGARAJKMAR SUBRAMANIAN Active Member


    Post Full Code, Sample Data
     


  13. sattam

    sattam Active Member


    Here is my full code sir. I got this from this foroum and modified for my personal need.Its work fine. But total nuber of bales came Zero as display in screaneshot.




    [#Part : VTYP BehaviourMain]

    Add : Line : After : VTYP Dec: CMP EnableSalesmanTable

    [Line: CMP EnableSalesmanTable]
    Field: Medium Prompt, CMP EnableSalesmanTable
    Local: Field: Medium Prompt: Set As : If $$IsPurchase:$Parent Then "Enable

    Despatch Through ? " else " "
    ;;Does not work in Tally ERP 9
    ;;Invisible: NOT $$MODAdvInventory or NOT $IsInvoicingOn
    Space Top: 1

    [Field: CMP EnableSalesmanTable]
    Use: Logical Field
    Storage: EnableSalesman
    Inactive : NOT $$IsPurchase:$Parent
    Set as: If $$IsEmpty:$$Value then "No" else $$Value


    [System:UDF]
    EnableSalesman : Logical : 5000

    [System: Formula]

    EnableSalesman : $EnableSalesman:VoucherType:##SVVoucherType = "Yes"
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [#Menu : Gateway of Tally]
    Add : Item : Despatch Through : Menu : Despatch Through

    [Menu: Despatch Through]
    Add : Item : Transport Master : Alter : Salesman Name
    Add : Item : Blank
    Add : Item : Transport Report : Display : SmReport
    Add : Item : Blank


    [Report: Salesman Name]
    Form : Salesman Name
    Object : VoucherType
    [Form: Salesman Name]
    Part : FormSubTitle, Saleman
    ;Button : Delete All, Remove Line, Restore Line, Restore All,Report

    Operations
    FullWidth : No
    Height : 90% Screen
    Background : @@SV_CHEQUE
    SpaceRight : 0.5
    SpaceLeft : 1.5
    Local : Field : Form SubTitle : Info : $$LocaleString:"Transpoter Name"
    Option : Small Size Form


    [Part: Saleman]
    Lines : CMP Salesman
    Repeat : CMP Salesman:mydbsalesman
    Break on: $$IsEmpty:$SalesmanName
    Scroll : Vertical
    Height : 90% Screen

    [Line: CMP Salesman]
    Fields : Multi SNo, CMPSalemanName, CMPSalMobNum
    Local : Field : Default : Delete : Border

    [Field: CMPSalemanName]
    Use : Short Name Field
    Storage : SalesmanName
    Unique : Yes


    [Field: CMPSalMobNum]
    Use : Short Name Field
    Storage : SalMobNum
    Unique : Yes

    [System: UDF]
    mydbsalesman : Aggregate: 999
    SalesmanName : String : 1000 ;: Yes
    SalMobNum:String: 1100

    [Collection : SalesmanNameCollection]
    Type : mydbsalesman : VoucherType
    Childof : ##SVVoucherType
    Format : $SalesmanName, 10
    Title : Transpoter Name

    [Collection : SalesmanMobNumCollection]
    Type : mydbsalesman : VoucherType
    Childof : ##SVVoucherType
    Format : $SalMobNum, 10
    Title : Transpoter Mobile Num



    ;================================================SalesMan Name & MobileNum Invoice

    Print=======================================
    [*Part: EXPINV Words]
    Lines : EXPINV WordTitle , EXPINV AmtInWords,SalesManName,PhoneNum
    Space Bottom: 0.25


    [Part:lastbal]
    Line: SalesManName
    Line:phoneNum

    [Line: SalesManName]
    Fields: SalesManNamet, SalesManNamed1

    [Field: SalesManNamet]
    Info:"Transpoter Name :"
    Width:10

    [Field: SalesManNamed1]
    Use:Name Field
    Storage : Despatch Through
    Style: Large Bold

    [Line:phoneNum]
    Field:phoneNumt,PhoneNumd

    [Field:phoneNumt]
    Info:"Phone Number"
    Width:10

    [Field:phoneNumd]
    Use:Name Field
    Set as: $VCHSalMobNum
    Style: Large Bold

    ;[Style: Custom]
    ;Font: Verdana
    ;Bold: Yes
    ;Height: 50

    ;;;;;;;;;;;;;;;;;;;;;FOR DESPATCH IN PURCHASE VOUCHER;;;;;;;;;;;;;;;;;;;;;;

    [#Part: VCHTitle2Left]
    Option : Despatch Through :mad:@EnableSalesman

    [!Part :Despatch Through]


    Add : Line:AtEnd:Despatch Through

    [Line : Despatch Through]

    Fields : Medium Prompt,Despatch Through,VCHSalMobNum,Name Field,chalan

    no,Short Name Field,SatDate

    Local : Field:Medium Prompt:Info:"Despatch Through :"
    Local : Field:Medium Prompt:Width: 20% Page
    Local : Field:Medium Prompt:Style:Normal
    Local : Field:Name Field:Style:Normal
    Local : Field:Name Field:Info:"Chalan No:"
    Local : Field:Name Field:Width: 8% Page
    Local : Field:Short Name Field:Info:"Dated:"
    Local : Field:Short Name Field:Style:Normal
    Local : Field:Short Name Field:Width: 7% Page

    [Field : Despatch Through]
    Use : Name Field
    Set as : $VCHSalesmanName
    Storage : Despatch Through
    Style : NormalBold
    Width : 25
    Color : Leaf Green
    Table : SalesmanNameCollection, not applicable
    Show Table: Always
    Key : Create SalesmanName

    [Key: Create SalesmanName]
    Key :Alt + C
    Action: Alter: SalesmanName

    [Field: VCHSalMobNum]
    Use : Name Field
    Storage : VCHSalMobNum
    Width : 25
    Table : SalesmanMobNumCollection, not applicable
    Show Table: Always
    Inactive :Yes
    ;;;;;;Key : Create SalesmanMobNum
    ;;;;;;Set as : $SalMobNum:$mydbsalesman :$VCHSalesmanName

    [System: UDF]
    VCHSalMobNum:String: 388

    [Field : chalan no]
    Use : Name Field
    Set as : ""
    Storage : chalan no
    Style : NormalBold
    Width : 20% Page
    Color : Leaf Green
    [Field : SatDate]
    Use : Uni Date Field
    Set as : $Date
    Storage : SatDate
    Style : NormalBold
    Width : 10% Page
    Color : Leaf Green






    [System : UDF]
    Despatch Through :String :366
    chalan no :String :367
    SatDate :date :368



    ;;================= Report Code start from here=====================
    ;====================================================Salesman sales

    Report==================================================





    [Report: SmReport]
    Use : DSP Template
    Form : PQRReport
    Title : "My Purchase Report"
    Set : SVFromDate : $$MonthStart:##SVCurrentDate
    Set : SVToDate : $$MonthEnd:##SVCurrentDate
    Set : SalesManChqVar : "Full"
    Set : SalesManName : ""

    [Form: PQRReport]
    Use : DSP Template
    Parts : PQRReport
    Height : 100% screen
    Width : 100% screen
    Delete : Buttons: ExplodeFlag
    Background: @@SV_RELEASEDLEAFGREEN_PL; Very Light Sea Green
    ;Delete : Bottom Buttons: DSPAutoColumns, RelReports,BudgetAnalysis,

    ReportConfig
    Bottom Toolbar Buttons : BottomToolBarBtn1, BottomToolBarBtn6,

    BottomToolBarBtn7, BottomToolBarBtn8, BottomToolBarBtn9, BottomToolBarBtn10,

    BottomToolBarBtn11, BottomToolBarBtn12,
    Add: Button: Salesmanfilter

    [Part: PQRReport]
    Lines:pQRTitile,PQRBody
    BottomLines : PQRBody Total
    Repeat : PQRBody :pQRSalesManVouchersColl
    CommonBorder: Yes
    Scroll : Vertical
    Total :pQRPartyAmount,TotBales

    [Line: PQRTitile]
    Use:pQRBody
    Local : Field : Default : Type : String
    Local : Field : Default : Style : Tiny Bold
    Local : Field : Default : Align : Centre
    Local : Field : Default : set as : $$LocaleString:"S. No"
    Local : Field : PQRPartyDate : Set as: $$LocaleString:"Date"
    Local : Field : PQRPartyVchNo : Set as: $$LocaleString:"Vch No."
    Local : Field : PQRPartyName : Set as: $$LocaleString:"Party Name"
    Local : Field : PQRPartySalesMan: Set as: $$LocaleString:"Despatch Through"
    Local : Field : TotBales : Set as: $$LocaleString:"No.of Bales"
    Local : Field : PQRPartyVchType : Set as: $$LocaleString:"Vch Type"
    Local : Field : PQRPartyAmount : Set as: $$LocaleString:"Amount"

    Border : Flush Totals

    [Line: PQRBody]
    Field:pQRSno,

    PQRPartyDate,PQRPartyVchNo,PQRPartyName,PQRPartySalesMan,TotBales,PQRPartyVchType
    RightField:pQRPartyAmount
    Border :Thin Bottom

    [Field:pQRSno]
    Set as : $$Line
    Width : 1.5 cm
    Align : Center
    Border : Thin Left Right

    [Field: PQRPartyDate]
    Set as : $Date
    Width : 10% Screen
    Align : Right
    Style : Tiny
    Border : Thin Left

    [Field: PQRPartyVchNo]
    Set as : $VoucherNumber
    Width : 10% Screen
    Align : Center
    Style : Tiny
    Border : Thin Left

    [Field: PQRPartyName]
    Use : Name Field
    Set as : $PartyLedgerName
    Border : Thin Left
    Width : 40% Screen
    Align : Left
    Style : Tiny
    Variable: LedgerName
    Display : LedgerVouchers

    [Field: PQRPartySalesMan]
    Use :Name Field
    Set as :$VCHSalesmanName
    Border : Thin Left
    Width : 20% Screen
    Align : Left
    Style : Tiny
    Key : Create SalesmanName

    [Field: TotBales]
    Use :Global VCH NumPack
    Set as :$$CollNumTotal:InventoryEntries:$$Number:

    $BasicNumPackages
    Border : Thin Left
    Width : 20% Screen
    Align : Centre
    Style : Tiny
    Key : Create SalesmanName

    [Field: PQRPartyVchType]
    Set as : $VoucherTypeName
    Border : Thin Left
    Width : 15% Screen
    Align : Centre
    Style : Tiny

    [Field: PQRPartyAmount]
    Use : Amount Forex Field
    Set as : $Amount
    Border : Thin Left
    Width : 15% Screen
    Align : Right
    Style : Tiny
    Format : "No Zero,DrCr,Symbol," + ##ShowForex
    [System: UDF]

    VCHSalesmanName:String: 366


    [Line: PQRBody Total]
    Use:pQRBody
    Local : Field : Default : Type : String
    Local : Field : Default : Style : Tiny Bold
    Local : Field : Default : Align : Centre
    Local : Field : PQRSno : Set as: ""
    Local : Field : PQRPartyDate : Set as: ""
    Local : Field : PQRPartyVchNo : Set as: ""
    Local : Field : PQRPartyName : Set as: "TOTAL"
    Local : Field : PQRPartyName : Align : Centre
    Local : Field : PQRPartySalesMan: Set as: ""
    Local : Field : TotBales : Set as:$$CollNumTotal:InventoryEntries:$

    $Number:Voucher:BasicNumPackages
    Local : Field : PQRPartyVchType : Set as: ""
    Local : Field : PQRPartyAmount : Set as: $$Total:pQRPartyAmount
    Border : Flush Totals




    ;============================== Filter ===================================

    [Button:SalesmanFilter]
    Key : Alt+S
    Action : Execute : SalesmanFilter
    Title : Transport Name

    [Report:SalesmanFilter]
    Form : SalesmanFilter
    ;Set : SalesmanName : ""
    Set : SalesManChqVar : "Filter"

    [Form:SalesmanFilter]
    Part : SalesmanFilter
    No Confirmation : Yes

    [Part:SalesmanFilter]
    Line : SalesmanFilter

    [Line:SalesmanFilter]
    Field : Medium Prompt,SalesmanFilter
    Local : Field : Medium Prompt : Set as : "Select Despatch Name: "

    [Field:SalesmanFilter]
    Table : SalesmanNameCollection,EndOfList
    ShowTable : Always
    Use : Name Field
    Width : 20
    Border : Thin Box
    Variable : SalesmanName
    Modifies : SalesmanName


    ;====================================================================================

    ============
    ;===================================== Collections

    =================================================

    [Collection: PQRSalesManVouchersColl]
    Type : Voucher
    Fetch : Date, VoucherNumber,

    VoucherTypeName,LedgerName,PartyLedgerName,VCHSalesmanName,LedgerEntries.*
    Filter : PQRSaleManVouchers
    Filter : SalesManFilter




    Commission : Number : 1001


    [Variable:SalesManName]
    Type : String

    [Variable:SalesManChqVar]
    Type : String

    [System:Variable]
    SalesManName : ""
    SalesManChqVar : ""



    [System: Formula]
    PQRSaleManVouchers: $$IsPurchase:$VoucherTypeName
    SalesManWise : $VCHSalesmanName=@@SAlesManEOL
    SalesManFull : $VCHSalesmanName=$VCHSalesmanName
    SAlesManEOL : if $$IsEndOfList:##SalesManName then $VCHSalesmanName Else

    ##SalesManName
    SalesManFilter : if ##SalesManChqVar="Filter" Then @@SalesManWise Else

    @@SalesManFull
     


  14. sattam

    sattam Active Member


    sir pls help.
     


  15. NAGARAJKMAR SUBRAMANIAN

    NAGARAJKMAR SUBRAMANIAN Active Member


    Are you working in which Rel.of Tally ,

    Share Data

    Showing Software Exemption Error
     


  16. sattam

    sattam Active Member


    sir old version rel1.1
     


  17. uttam100

    uttam100 Member


    Good one keep this post alive.
     


  18. NAGARAJKMAR SUBRAMANIAN

    NAGARAJKMAR SUBRAMANIAN Active Member


    Showing Software Exemption Error in Tally Rel 1.1 Also
     
    amit g likes this.


  19. amit g

    amit g New Member



    sir i m not gettin any error .but not showing total in bottom kindly help me..
     


  20. Nithin Patel

    Nithin Patel Member


    Help needed here to fix Total for NOP at Left side...

    Code:
    [#Line        : EI ColumnOne]                       
        Option     : Global EI ColumnOne111                : @@Issales
    [!Line     : Global EI ColumnOne111]
        Add        : Right Fields          : At Beginning  : Global VCH NumPack
        Local      : Field : Default       : Align           : Center
        Local      : Field : Global VCH NumPack  : Info    : "NOP"
    
    [#Line        : EI ColumnTwo]                       
        Option  : Global EI ColumnTwo222: @@Issales
    [!Line        : Global EI ColumnTwo222]
        Add        : Right Fields             : At Beginning     : Global VCH NumPack
        Local      : Field : Default       : Align           : Center
        Local      : Field : Global VCH NumPack  : Info    : ""
    
    [#Part        : EI InvInfo]
        Total    : Global Total NumPack
    [#Line        : EI InvDetails]
        Option    : Global EI InvDetails  : @@Issales
    [!Line        : Global EI InvDetails]
        Delete    : Lines    : EI Numpackages
    [#Line        : CI InvDetails]
        Option    : Global CI InvDetails     : @@Issales
    [!Line        : Global CI InvDetails]
      [#Line    : EI InvINFO]                           
        Option     : Global EI InvINFO11   : @@Issales
    [#Line        : CI InvINFO]                           
        Option    : Global EI InvINFO11   : @@Issales
    [!Line        : Global EI InvINFO11]
        Add     : Right Fields : At Beginning  : Global VCH NumPack
        Local    : Field : Global VCH NumPack   : Storage      : BasicNumPackages
    
    [Field        : Global VCH NumPack]
        Use     : Short Name Field
        Width   : 8
        Align   : Center
        Border  : Thin Left Right
        Color     : Black
      Set Always     : Yes
        Skip     : Yes
    Invisible     : NOT ##VrVarC1
        Skip on : $$IsEnd:$StockItemName
    ;; Inactive : $$IsEnd:$StockItemName
    
    [#Form: Export Invoice]
        Option  : Global Export Invoice NP      : @@IsSales
    [!Form         : Global Export Invoice NP]
        Local   : Line  : VCH Narrprompt: Add      : Right Fields  : At Beginning  : Global Total NumPack
    [Field: Global Total NumPack]      
        Use        : Global VCH NumPack
        Border  : Totals
        Set as     : $$CollNumTotal:InventoryEntries:$$Number:$BasicNumPackages
        Set As  : $$String:@@NumNumPackTotal
        Skip    : Yes
      Set Always: Yes
    
    [System        : Formula]
        Numnumpack      : $$Number:$BasicNumPackages
        NumNumPackTotal : $$CollNumTotal:InventoryEntries:@@NumNumPack
     

    Attached Files:



  21. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    @Nithin Patel

    From the code there is no problem....... however the problem is coming from a different TDL........

    Locate the TDL for HSN/SAC and GST Rate ....deactivate it.........and see............

    In your above code, you will have to add your Right Field ----- before the HSN/SAC field in the TOTAL line and if not there -- then add 2 dummy blank fields, so everything is aligned.
     
    Last edited: Dec 1, 2020


  22. Amit Kamdar

    Amit Kamdar Administrator Staff Member



  23. Nithin Patel

    Nithin Patel Member

    Attached Files:



Share This Page