[Report: Scheme Discount] Form : Scheme Discount Object : Company [Form: Scheme Discount] Width : 50% Screen height : 40% Screen Parts : Scheme Discount Title, Scheme Discount Titles, Scheme Discount Background : Light Lily Yellow [Part : Scheme Discount Title] Line : Scheme Discount Title [Line : Scheme Discount Title] Space Bottom : 1 Field : Form SubTitle Local : Field :Form SubTitle: Info : "Scheme Discount Details" Local : Field :Form SubTitle: Color : Red Local : Field :Form SubTitle: Style : Normal Bold [Part: Scheme Discount Titles] Lines : Scheme Discount Titles ;Border : Column Titles [Line: Scheme Discount Titles] Use : Scheme Discount Local : Field : Default : Style : Small Bold Local : Field : Default : Skip : Yes Local : Field : Default : Type : String Local : Field : Default : Delete: Storage Local : Field : CMP Srno : Set as: "Sr. No." Local : Field : CMP StkGrp : Set as : "Stock Category" Local : Field : CMP DiscOffer : Set as : "Discount Offered" Local : Field : CMP Date : Set as : "Period" Border : Column Titles [Part: Scheme Discount] Line : Scheme Discount Repeat : Scheme Discount : CollSchemeDiscount Scroll : Vertical CommonBorder: Yes BreakOn : $$IsSysNameEqual:EndOfList:$Stgcmpstkgrp [Line: Scheme Discount] Field : CMP Srno, CMP StkGrp, CMP DiscOffer, Cmp Date Local : Field : Default : Style : Small Bold Local : Field : Default : Background : White Local : Field : Default : Align : Centre [Field: CMP SRno] Set as : $$Line Width : 5 ;Border : Thin Left Skip : Yes [Field : CMP StkGrp] Use : Name Field Set As : $Stgcmpstkgrp Storage : Stgcmpstkgrp Table : Stock Category, End of List Show Table : Always [Field : CMP DiscOffer] Use : Number Field Set As : $Stgcmpdiscoffer Storage : Stgcmpdiscoffer Format : "NoZero, Percentage" [Field : CMP Date] Use : Uni Date Field Set As : $Stgcmpdate Storage : Stgcmpdate ;Border : Thin Left Width : 20 [Collection: CollSchemeDiscount] Type : Scheme Discount : Company Childof : ##SVCurrentCompany ;Format : $stgcmpsrno,5 Format : $stgcmpstkgrp,30 Format : $stgcmpdiscoffer, 5 Format : $stgcmpdate,10 Title : "Scheme Details" [System : UDF] Scheme Discount : Aggregate : 1900 stgcmpsrno : Number : 1901 stgcmpstkgrp : String : 1902 stgcmpdiscoffer : Number : 1903 stgcmpdate : Date : 1904
;;Change Repeat line [Part: Scheme Discount] Repeat : Scheme Discount : Scheme Discount ; Use direct aggregate
Thanks it working but now problem is different Iam passing 4 parameter but Giving error in GSTRATE parameter Error say : Parsing failed $NGSTIGSTRate My code ::: [System : Formula] NGSTIGSTRATE : $$Number$gstigstrate:stock item:$stockitemname [Field : Nrate] Set as : $$findscheme:$date:$amrp:$discper:$ngstigstrate
Sir, one more query is my function is not working properly, in collection I have entered 3 category but it checks only first rest it ignore, can you plz tell me where ham wrong. [Function: Find Scheme] Variable : SchemeValue : Number Parameter : Dmmmydate : Date Local Formula : findcurrdate : $Date LOCAL Formula : SaleForm : ($AMRP:StockItem:$StockItemName-(($AMRP:StockItem:$StockItemName * #AIDiscPerc)/100)) + / (($GSTIGSTRate:StockItem:$StockItemName+100)/100) Local Formula : findStkCatg : $category:stockitem:$stockitemname Local Formula : FindbillQty : $$Number:$BilledQty 010 : Walk Collection: CollSchemeDiscount 020 : Set :schemevalue : 0 030 : If : ($$MonthOfDatefindcurrdate = $$MonthOfDate:$Stgcmpdate) and (@findStkCatg = $stgcmpstkgrp) 040 : if : $Stgcmpdiscoffer > 0 050 : Set : SchemeValue : (@SaleForm * ($stgcmpdiscoffer/100)) * @FindbillQty 060 : Else 070 : if : $stgcmpdiscoffera > 0 080 : Set : SchemeValue : @SaleForm - $stgcmpdiscoffera 090 : else 100 : Set : SchemeValue : 0 110 : End If 120 : End If 130 : Else 140 : Set : SchemeValue : 0 150 : END If 160 : Return : ##SchemeValue 170 : End Walk
030 : If : ($$MonthOfDatefindcurrdate = $$MonthOfDate:$Stgcmpdate) and (@findStkCatg = $stgcmpstkgrp) Date has a funny way of working in Tally TDL....... I suggest you do your date computation in [System: Formula] and then refer to it in your function.
Sir, I have entered 3 different category in collection : CollSchemeDiscount but it takes only first category and ignores rest Thanks for your suggestion I will do necessary changes
Sir, Please help function is not working I have entered 3 different scheme see attachment, now when I try to retrieve details from the collection is not working, again I have revised code. [Function: Find Scheme] Variable : SchemeValue : Number Parameter : Dmmmydate : Date Local Formula : findcurrdate : $Date LOCAL Formula : SaleForm : ($AMRP:StockItem:$StockItemName-(($AMRP:StockItem:$StockItemName * #AIDiscPerc)/100)) + / (($GSTIGSTRate:StockItem:$StockItemName+100)/100) Local Formula : findStkCatg : $category:stockitem:$stockitemname Local Formula : FindbillQty : $$Number:$BilledQty 010 : Walk Collection: CollSchemeDiscount 020 : Set :schemevalue : 0 030 : If : $$Datefindcurrdate >= $$Date:$Stgcmpdatef and $$Datefindcurrdat <= $$Date:$stgcmpdatete and @findStkCatg = $stgcmpstkgrp 040 : if : $Stgcmpdiscoffer > 0 050 : Set : SchemeValue : (@SaleForm * ($stgcmpdiscoffer/100)) * @FindbillQty 060 : Else 070 : if : $stgcmpdiscoffera > 0 080 : Set : SchemeValue : @SaleForm - $stgcmpdiscoffera 090 : else 100 : Set : SchemeValue : 0 110 : End If 120 : End If 130 : Else 140 : Set : SchemeValue : 0 150 : END If 160 : Return : ##SchemeValue 170 : End Walk [Collection: CollSchemeDiscount] Type : Scheme Discount:Company Childof : ##SVCurrentCompany Fetch : $stgcmpsrno, $stgcmpstkgrp, $stgcmpdiscoffer, $Stgcmpdiscoffera, $stgcmpdatef, $stgcmpdatet [System : UDF] Scheme Discount : Aggregate : 1900 stgcmpsrno : Number : 1901 stgcmpstkgrp : String : 1902 stgcmpdiscoffer : Number : 1903 stgcmpdiscoffera : Number : 1905 stgcmpdatef : Date : 1904 SetDiscountYN : Logical : 1906 stgcmpdatet : Date : 1907
Dear Amit Sir, Attached 3 different screen shot plz have a look. Please help the problem is when I enter 3 different stock category, discount details, and period it takes all that and again it shows me all, but at the time of entry voucher iam checking that category it takes only first category and ignore rest of it i.e it ignores 2nd & 3rd iam unable to get all 3 items at the time of voucher entry. That is the problem, plz help [Function: Find Scheme] Variable : SchemeValue : Number Parameter : Dmmmydate : Date Local Formula : findcurrdate : $Date LOCAL Formula : SaleForm : ($AMRP:StockItem:$StockItemName-(($AMRP:StockItem:$StockItemName * #AIDiscPerc)/100)) + / (($GSTIGSTRate:StockItem:$StockItemName+100)/100) Local Formula : findStkCatg : $category:stockitem:$stockitemname Local Formula : FindbillQty : $$Number:$BilledQty 010 : Walk Collection: CollSchemeDiscount 020 : Set :schemevalue : 0 030 : If : $$Datefindcurrdate >= $$Date:$Stgcmpdatef and $$Datefindcurrdat <= $$Date:$stgcmpdatete and @findStkCatg = $stgcmpstkgrp 040 : if : $Stgcmpdiscoffer > 0 050 : Set : SchemeValue : (@SaleForm * ($stgcmpdiscoffer/100)) * @FindbillQty 060 : Else 070 : if : $stgcmpdiscoffera > 0 080 : Set : SchemeValue : @SaleForm - $stgcmpdiscoffera 090 : else 100 : Set : SchemeValue : 0 110 : End If 120 : End If 130 : Else 140 : Set : SchemeValue : 0 150 : END If 160 : Return : ##SchemeValue 170 : End Walk [Collection: CollSchemeDiscount] Type : Scheme Discount:Company Childof : ##SVCurrentCompany Fetch : $stgcmpsrno, $stgcmpstkgrp, $stgcmpdiscoffer, $Stgcmpdiscoffera, $stgcmpdatef, $stgcmpdatet [System : UDF] Scheme Discount : Aggregate : 1900 stgcmpsrno : Number : 1901 stgcmpstkgrp : String : 1902 stgcmpdiscoffer : Number : 1903 stgcmpdiscoffera : Number : 1905 stgcmpdatef : Date : 1904 SetDiscountYN : Logical : 1906 stgcmpdatet : Date : 1907
Show me the Field of your scheme Column..... where your 10/- discount should be appearing..... only that field.
[Field : CMP StkGrp] Use : Name Field Set As : $Stgcmpstkgrp Storage : Stgcmpstkgrp Table : Stock Category, End of List Show Table : Always [Field : CMP DiscOffer] Use : Number Field Set As : $Stgcmpdiscoffer Storage : Stgcmpdiscoffer Format : "NoZero, Percentage" Inactive :$$IsSysNameEqual:EndOfList:$Stgcmpstkgrp [Field : CMP DiscOfferA] Use : Number Field Set As : $Stgcmpdiscoffera Storage : Stgcmpdiscoffera ;Format : "NoZero, Percentage" Inactive :$$IsSysNameEqual:EndOfList:$Stgcmpstkgrp [Field : CMP Datef] Use : Uni Date Field Set As : $Stgcmpdatef Storage : Stgcmpdatef ;Border : Thin Left Width : 20 Inactive :$$IsSysNameEqual:EndOfList:$Stgcmpstkgrp [Field : CMP Datet] Use : Uni Date Field Set As : $Stgcmpdatet Storage : Stgcmpdatet ;Border : Thin Left Width : 20 Inactive :$$IsSysNameEqual:EndOfList:$Stgcmpstkgrp
[Field : SchemeAmt] Use : Number Field Width : 12 Set Always : Yes Set As : $$Findscheme ;finddate ;finddate : $machinedate Storage : SchemeAmt Format : "NoZero,Decimals:2" Skip : YES Align : Right ;Invisible: If @@IsSales or @@IScreditNote then Yes else No