;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] FieldQRSno,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 [LineQRBody] FieldQRSno,PQRPartySalesMan,PQRPartyDate,PQRPartyVchNo,PQRPartyName,PQRItemName,PQRHSNCode,PQRGSTRate,PQRQty,PQRUnit,PQRIGRate,PQRRate,PQRAmount,PQRIGAmount Border :Thin Bottom [FieldQRSno] 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 [FieldQRHSNCode] Use:Name Field Set as :$PQRHSNCode Border : Thin Left Width : 6% Screen Align : Right [FieldQRGSTRate] Use:Number Field Set as :$PQRGSTRate Border : Thin Left Width : 4% Screen Align : Right [FieldQRQty] use : Qty field width: 5% Screen Border:thin left align: right set as:$PQRQty Format: "No Symbol, Short Form, No Compact" [FieldQRUnit] 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" [FieldQRIGRate] 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" [FieldQRRate] 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] ;FieldsQRSno,PQRPartySalesMan,PQRPartyDate,PQRPartyVchNo,PQRPartyName,PQRPartyName,PQRItemName,PQRQty,PQRRate,PQRAmount,PQRAmount FieldQRSno,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: $$TotalQRAmount Local : Field : PQRIGAmount : Set as: $$TotalQRIGAmount 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] LinesQRTitile,PQRBody BottomLines : PQRBody Total Repeat : PQRBody:Sales AllVoucher CommonBorder: Yes Scroll : Vertical TotalQRAmount,PQRIGAmount [Collection: PQRSalesManVouchersColl] Type:Vouchers:VoucherType Child Of:$$VchTypeSales Belongs To:Yes Fetch:VCHSalesmanName Filter : PQRSaleManVouchers Filter : SalesManFilter [Collection:Sales AllVoucher] Source CollectionQRSalesManVouchersColl 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 :""
[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
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,
Anyone With a Good TDL Knowledge can complete this Code So, Rather than asking for code...put some effort and Complete this code
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.
[#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] LinesQRTitile,PQRBody BottomLines : PQRBody Total Repeat : PQRBodyQRSalesManVouchersColl CommonBorder: Yes Scroll : Vertical TotalQRPartyAmount,PQRVCHGP [Line: PQRTitile] UseQRBody 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] FieldQRSno, PQRPartyDate,PQRPartyVchNo,PQRPartyName,PQRPartySalesMan,PQRVCHGP,PQRVCHGPPER,PQRPartyVchType,PQRPartyAmount Border :Thin Bottom Local : Field : Default : Style : Tiny Bold [FieldQRSno] 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 [FieldQRVCHGPPER] 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] UseQRBody 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: $$Totalqrvchgp local : field : PQRVCHGPPER :set as: $$Totalqrvchgp/$$TotalQRPartyAmount*100 Local : Field : PQRPartyVchType : Set as: "" Local : Field : PQRPartyAmount : Set as: $$TotalQRPartyAmount 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