SALESMAN WISE, PARTYWISE ,ITEMWISE SALES REPORT (UNDER CONSTRUCTION)

Discussion in 'Free Source Codes' started by Naresh Chawda, Jan 7, 2020.

    
  1. Naresh Chawda

    Naresh Chawda New Member


    ;TDLLic :$$CmpUserName:CompanyUsersCollection <> ÒadminÓ
    ;; Limiting based on Company Users
    [Report: PQReport]
    Use : DSP Template
    Form : PQRReport
    Title : "Salesman 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 Green
    ;Delete : Bottom Buttons: DSPAutoColumns, RelReports,BudgetAnalysis, ReportConfig
    Bottom Toolbar Buttons : BottomToolBarBtn1, BottomToolBarBtn6, BottomToolBarBtn7, BottomToolBarBtn8, BottomToolBarBtn9, BottomToolBarBtn10, BottomToolBarBtn11, BottomToolBarBtn12,
    Add: Button: Salesmanfilter





    [Line: PQRTitile]

    Field:pQRSno,PQRPartySalesMan,PQRPartyDate,PQRPartyVchNo,PQRPartyName,PQRItemName,PQRHSNCode,PQRGSTRate,PQRQty,PQRUnit,PQRIGRate,PQRRate,PQRAmount,PQRIGAmount
    Border :Thin Bottom

    Local : Field : Default : Type : String
    Local : Field : Default : Style : Tiny Bold
    Local : Field : Default : Align : Centre

    Local : Field : PQRSno : set as: $$LocaleString:"SRNo"
    Local : Field : PQRPartySalesMan : Set as: $$LocaleString:"SALESMAN"
    Local : Field : PQRPartyDate : Set as: $$LocaleString:"DATE"
    Local : Field : PQRPartyVchNo : Set as: $$LocaleString:"VCH No"
    Local : Field : PQRPartyName : Set as: $$LocaleString:"PARTY NNAME"
    Local : Field : PQRItemName : Set as: $$LocaleString:"ITEM NAME"
    Local : Field : PQRHSNCode : Set as: $$LocaleString:"HSN CODE"
    Local : Field : PQRGSTRate : Set as: $$LocaleString:"GST RATE"
    Local : Field : PQRQty : Set as: $$LocaleString:"QTY"
    Local : Field : PQRUnit : Set as: $$LocaleString:"Unit"
    Local : Field : PQRIGRate : Set as: $$LocaleString:"IG RATE"
    Local : Field : PQRRate : Set as: $$LocaleString:"RATE"
    Local : Field : PQRAmount : Set as: $$LocaleString:"AMOUNT"
    Local : Field : PQRIGAmount : Set as: $$LocaleString:"IG AMOUNT"
    Border : Flush Totals

    [Line:pQRBody]

    Field:pQRSno,PQRPartySalesMan,PQRPartyDate,PQRPartyVchNo,PQRPartyName,PQRItemName,PQRHSNCode,PQRGSTRate,PQRQty,PQRUnit,PQRIGRate,PQRRate,PQRAmount,PQRIGAmount
    Border :Thin Bottom

    [Field:pQRSno]

    Set as : $$Line
    Width : 4% Screen
    Align : Center
    Border : Thin Left Right

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

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

    [Field: PQRPartyVchNo]
    Use : Name Field
    Set as : $PQRPartyVchNo
    Width : 4% Screen
    Align : Center
    ;Style : Tiny
    Border : Thin Left

    [Field: PQRPartyName]
    Use : Name Field
    Set as : $PQRPartyName
    Border : Thin Left
    Width : 20% Screen
    Align : Left
    ;Style : Tiny
    Variable: LedgerName
    Display : Ledger Vouchers

    [Field: PQRItemName]
    Use :Name Field
    Set as :$PQRItemName
    Border : Thin Left
    Width : 20% Screen
    Align : Left
    ;Style : Tiny

    [Field:pQRHSNCode]
    Use:Name Field
    Set as :$PQRHSNCode
    Border : Thin Left
    Width : 6% Screen
    Align : Right

    [Field:pQRGSTRate]
    Use:Number Field
    Set as :$PQRGSTRate
    Border : Thin Left
    Width : 4% Screen
    Align : Right

    [Field:pQRQty]
    use : Qty field
    width: 5% Screen
    Border:thin left
    align: right
    set as:$PQRQty
    Format: "No Symbol, Short Form, No Compact"

    [Field:pQRUnit]
    use : Number Field
    width: 3% Screen
    Border:thin left
    align: right
    set as:$PQRUnit
    Type : Rate : Unit Symbol
    Style : Small Bold
    Format: "No Symbol, Short Form, No Compact"


    [Field:pQRIGRate]
    Use : Rate Price Field
    ;Use: VCH RateIncl
    ;use : Number Field
    width: 4% Screen
    Border:thin left
    align: right
    set as:$PQRIGRate
    ;Type : Rate : Price

    ;Format: "No Symbol, Short Form, No Compact"

    [Field:pQRRate]
    Use:Number Field
    Set as :$PQRRate
    Border : Thin Left
    Width : 4% Screen
    Align : Right
    ;Format: "No Short Form, Compact"
    ;Style : Tiny
    ;Format : "no Symbol," + ##ShowForex


    [Field: PQRAmount]
    Use : Amount Field
    Set as : $PQRAmount
    Border : Thin Left
    Width : 5% Screen
    Align : Right
    ;Style : Tiny
    ;Format : "No Zero,DrCr,Symbol," + ##ShowForex

    [Field: PQRIGAmount]
    Use : Amount Field
    Set as : $PQRIGAmount
    Border : Thin Left
    Width : 5% Screen
    Align : Right
    ;Style : Tiny
    ;Format : "No Zero,DrCr,Symbol," + ##ShowForex

    [Line: PQRBody Total]

    ;Fields:pQRSno,PQRPartySalesMan,PQRPartyDate,PQRPartyVchNo,PQRPartyName,PQRPartyName,PQRItemName,PQRQty,PQRRate,PQRAmount,PQRAmount


    Field:pQRSno,PQRPartySalesMan,PQRPartyDate,PQRPartyVchNo,PQRPartyName,PQRItemName,PQRHSNCode,PQRGSTRate,PQRQty,PQRUnit,PQRIGRate,PQRRate,PQRAmount,PQRIGAmount
    Border :Thin Bottom

    Local : Field : Default : Type : String
    Local : Field : Default : Style : Tiny Bold
    Local : Field : Default : Align : Centre
    Local : Field : PQRSno : Set as: ""
    Local : Field : PQRPartySalesMan: 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 : PQRItemName :set as: ""
    local : field : PQRHSNCode :set as: ""
    local : field : PQRGSTRate :set as: ""
    local : field : PQRQty :set as:""
    local : field : PQRUnit :set as:""
    Local : Field : PQRIncTaxRate : Set as: ""
    Local : Field : PQRRate : Set as: ""
    Local : Field : PQRAmount : Set as: $$Total:pQRAmount
    Local : Field : PQRIGAmount : Set as: $$Total:pQRIGAmount
    Local : Field : PQRIGAmount : Align:Right
    Border : Flush Totals




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

    [Button:SalesmanFilter]
    Key : Alt+S
    Action : Execute : SalesmanFilter
    Title : Salesman 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 Salesman Name: "

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


    ;================================================================================================
    ;===================================== Collections =================================================
    [Part: PQRReport]
    Lines:pQRTitile,PQRBody
    BottomLines : PQRBody Total
    Repeat : PQRBody:Sales AllVoucher
    CommonBorder: Yes
    Scroll : Vertical
    Total:pQRAmount,PQRIGAmount

    [Collection: PQRSalesManVouchersColl]
    Type:Vouchers:VoucherType
    Child Of:$$VchTypeSales
    Belongs To:Yes
    Fetch:VCHSalesmanName
    Filter : PQRSaleManVouchers
    Filter : SalesManFilter

    [Collection:Sales AllVoucher]
    Source Collection:pQRSalesManVouchersColl
    Walk:Inventory Entries

    Compute : PQRPartySalesMan :$SFSALESMANUDF
    Compute : PQRPartyVchNo :$VoucherNumber
    Compute : PQRPartyDate :$Date
    Compute : PQRPartyName :$PartyLedgerName
    Compute : PQRItemName :$StockItemName
    Compute : PQRHSNCode :$(Stockitem,$stockitem).GstDetails[Last].hsncode
    Compute : PQRGSTRate :$(Stockitem,$stockitem).GSTIGSTRate
    Compute : PQRQty :$BilledQuantity
    Compute : PQRUnit :$Rate
    Compute : PQRIGRate :(100 + $(Stockitem,$stockitem).GSTIGSTRate)* $rate / 100
    Compute : PQRRate :$Rate
    Compute : PQRAmount :$Amount
    Compute : PQRIGAmount :$BilledQuantity * (100 + $(Stockitem,$stockitem).GSTIGSTRate)* $rate / 100
    [#Field:VCH Rate Incl]

    [System:UDF]
    EnableSalesman : Logical : 1000


    Commission : Number : 1001


    [Variable:SalesManName]
    Type : String

    [Variable:SalesManChqVar]
    Type : String

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

    Attached Files:

    sandeep76out and Rajsrisrimal like this.


  2. Naresh Chawda

    Naresh Chawda New Member


    [System: Formula]
    ;PQRSaleManVouchers: $$IsSales:$VoucherTypeName OR $$IsDelNote:$VoucherTypeName
    PQRSaleManVouchers: $$IsSales:$VoucherTypeName
    SalesManWise : $VCHSalesmanName=@@SAlesManEOL
    SalesManFull : $VCHSalesmanName=$VCHSalesmanName
    SAlesManEOL : if $$IsEndOfList:##SalesManName then $VCHSalesmanName Else ##SalesManName
    SalesManFilter : if ##SalesManChqVar="Filter" Then @@SalesManWise Else @@SalesManFull
     
    Frz likes this.


  3. Rajsrisrimal

    Rajsrisrimal Member



  4. Sanjeev S

    Sanjeev S Active Member


    Dear Nareshji,

    Where are UDF's
    SFSALESMANUDF
    VCHSalesmanName

    How are you capturing them in voucher?


    Seems that you have sent a single TDL from the project and UDF's are somewhere else.

    Please update the code and send it back.

    Regards,
     


  5. mkraju_mst

    mkraju_mst New Member


    sir i want this report please send me full code
     


  6. Himanshu-2002

    Himanshu-2002 Active Member


    Anyone With a Good TDL Knowledge can complete this Code So, Rather than asking for code...put some effort and Complete this code
     


  7. Abhijeet samal

    Abhijeet samal New Member


    NOT WORKING
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    What is not working ???

    It is not a complete code. User can develop further as per their needs.
     
    Ozair Ahmad likes this.


  9. Jayaseelan

    Jayaseelan New Member


    IS THE AGENT MODULE COMPLETED
     


  10. Jayaseelan

    Jayaseelan New Member





    WHEN YOU COMPLETE THIS SIR
     


  11. Deepak K Swain

    Deepak K Swain New Member


    Already done . If u know code go to billsreceivable collection. Then use their fetch: vchsalesman. Filter, salesman. In next write filter salesman then add button salesman in outstanding receivable. Then define salesman button by following this program.


    This program is enough for understand one how outstanding and commision wise.

    Thanks in advance for trying Coding.
     


  12. Deepak K Swain

    Deepak K Swain New Member



  13. indra kumar

    indra kumar New Member


    outstanding and commision wise. sir i want this TDL sir
     


  14. Deepak Masan

    Deepak Masan New Member


     


  15. Deepak Masan

    Deepak Masan New Member


    Sir don't showing Salesman Menu Button in Tally screen
     


  16. Access

    Access Member


    [#Part: CMP TallyShop F11]
    Add : Part : After : CMP TallyShopFeaturesTitle :CMP EnableSalesmanTable

    [Part: CMP EnableSalesmanTable]
    Line : CMP EnableSalesmanTable
    Space Top : .30

    [Line: CMP EnableSalesmanTable]
    Field: Medium Prompt, CMP EnableSalesmanTable
    Local: Field: Medium Prompt: Info: "Enable Salesman ? "
    Space Top: 1

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

    [#Menu: Gateway Of Tally]
    Add : Item : Salesman : Menu : SalesmanMenu
    Add : Item : Blank

    [Menu: SalesmanMenu]
    Add : Item : Salesman Master : Alter : Salesman Name
    Add : Item : Blank
    Add : Item : Salesman Sales Report : Display : SmReport
    Add : Item : Blank


    [Report: Salesman Name]
    Form : Salesman Name
    Object : Company

    [Form: Salesman Name]
    Part : FormSubTitle,SalemanHPart, Saleman
    Height : 70% Screen
    Width : 20% Screen
    Background : PurchaseVocherclr
    SpaceRight : 0.5
    SpaceLeft : 1.5
    Local : Field : Form SubTitle : Info : $$LocaleString:"Salesman Name"

    [Part:SalemanHPart]
    Line:SalemanTitle
    Vertical: Yes

    [Line:SalemanTitle]
    Left Field : Saleman SNoTitle,
    Right Field: Saleman Types
    Border:Thin Box

    [Field: Saleman SNoTitle]
    Use: Name Field
    Info:"S.No"
    Align:Center
    Width:8

    [Field: Saleman Types]
    Use: Name Field
    Info:"Salesman Name"
    Align:Center
    Width:20

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

    [Line: CMP Salesman]
    Left Field : Saleman SNo,
    Right Field: CMPSalemanName
    Local : Field : Default : Delete : Border
    Local : Field : Default : Style:Normal Bold

    [Field: Saleman SNo]
    Use: Simple Field
    Set as: $$Line
    Align: Center
    Skip:Yes
    Width:8

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

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

    [Collection : SalesmanNameCollection]
    Type : mydbsalesman : Company
    Childof : ##SVCurrentCompany
    Format : $SalesmanName, 10
    Title : Salesman Name

    ;=============== During Sales Voucher Entry=============

    [#Part: EI Consignee]
    Add : Option : SalesmaninVCH : @@IsSales And $EnableSalesman:Company:##SVCurrentCompany

    [!Part:SalesmaninVCH]
    Add : Line : After : EI Consignee : SalesmanTitle , ;SalesmanName

    [Line:SalesmanTitle]
    Field : SalesmanTitle,SalesmanName
    Local : Field : SalesmanTitle: Width : @@VchLeftPromptWidth % Page

    [Field:SalesmanTitle]
    Use : short Prompt
    Set as : "Salesman"
    Width : 12
    Style : Tiny Bold
    Color : Red

    [Field: SalesmanName]
    Storage : VCHSalesmanName
    Set as : $VCHSalesmanName
    Table : SalesmanNameCollection, not applicable
    Show Table : Always
    Key : Create SalesmanName
    Style : Tiny Bold
    Width : 15

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

    [System: UDF]
    VCHSalesmanName:String:375

    ;;================= Report Code start from here=====================
    ;====================================================Salesman sales Report==================================================
    [Report: SmReport]
    Use : DSP Template
    Form : PQRReport
    Title : "Salesman 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: PurchaseVocherclr
    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,PQRVCHGP

    [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:"SalesMan"
    Local : Field : PQRVCHGP: Set as: $$LocaleString:"GrossProfit"
    Local : Field : PQRVCHGPPER: Set as: $$LocaleString:"Profit%"
    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,PQRVCHGP,PQRVCHGPPER,PQRPartyVchType,PQRPartyAmount
    Border :Thin Bottom
    Local : Field : Default : Style : Tiny Bold

    [Field:pQRSno]
    Set as : $$Line
    Width : 5% Screen
    Align : Center
    Border : Thin Left Right

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

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

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

    [Field: PQRPartySalesMan]
    Use :Name Field
    Set as :$VCHSalesmanName
    Border : Thin Left
    Width : 12% Screen
    Align : Right

    [Field: PQRVCHGP]
    Use :Amount Forex Field
    Set as :$GrossProfit
    Border : Thin Left
    Width : 10% Screen
    Align : Right

    [Field:pQRVCHGPPER]
    use : amount field
    width: 10% Screen
    Border:thin left
    align: Right
    set as: $GROSSPROFIT/$GROSSREVENUE*100

    [Field: PQRPartyVchType]
    Set as : $VoucherTypeName
    Border : Thin Left
    Width : 10% Screen
    Align : Center

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

    [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 : PQRVCHGP :set as: $$Total:pqrvchgp
    local : field : PQRVCHGPPER :set as: $$Total:pqrvchgp/$$Total:pQRPartyAmount*100
    Local : Field : PQRPartyVchType : Set as: ""
    Local : Field : PQRPartyAmount : Set as: $$Total:pQRPartyAmount
    Border : Flush Totals

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

    [Button:SalesmanFilter]
    Key : F5
    Action : Execute : SalesmanFilter
    Title : Salesman Name

    [Report:SalesmanFilter]
    Form : SalesmanFilter
    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 Salesman 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,GrossProfit,GROSSREVENUE, LedgerEntries.*
    Filter : PQRSaleManVouchers
    Filter : SalesManFilter

    [System:UDF]
    EnableSalesman : Logical : 1000

    [Variable:SalesManName]
    Type : String

    [Variable:SalesManChqVar]
    Type : String

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

    [System: Formula]
    PQRSaleManVouchers: $$IsSales:$VoucherTypeName
    SalesManWise : $VCHSalesmanName=@@SAlesManEOL
    SalesManFull : $VCHSalesmanName=$VCHSalesmanName
    SAlesManEOL : if $$IsEndOfList:##SalesManName then $VCHSalesmanName Else ##SalesManName
    SalesManFilter : if ##SalesManChqVar="Filter" Then @@SalesManWise Else @@SalesManFull
     


  17. Hems

    Hems Member



    Sir
    Bills receivable me salesman filter kaise lagaye
     


Share This Page