Details Entered are not Saved....Plz Help

Discussion in 'Requests' started by Johar, Jul 26, 2019.

    
  1. Johar

    Johar Member


    [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
     


  2. drive

    drive Active Member


    ;;Change Repeat line
    [Part: Scheme Discount]
    Repeat : Scheme Discount : Scheme Discount ; Use direct aggregate
     


  3. Johar

    Johar Member



    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
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Code:
    Set as : $$findscheme:$date:$amrp:$discper:@@ngstigstrate
     


  5. Johar

    Johar Member



    No sir not working same error
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Check out your function...... either ngstigstrate or discper is not being found by your function.
     


  7. Johar

    Johar Member


    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 : ($$MonthOfDate:mad:findcurrdate = $$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
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    030 : If : ($$MonthOfDate:mad:findcurrdate = $$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.
     


  9. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    What 3 category? As per your above Funtion, there is only one parameter.
     


  10. Johar

    Johar Member



    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
     


  11. Johar

    Johar Member


    Sir,
    Tried but not working same it does not check for category other than first, plz help
     


  12. Johar

    Johar Member


    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 : $$Date:mad:findcurrdate >= $$Date:$Stgcmpdatef and $$Date:mad:findcurrdat <= $$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
     

    Attached Files:



  13. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Send it to me on jaytailorsikar@gmail
    Com
    Full code. That i can check every field
     


  14. Johar

    Johar Member


    Sir, Check the mail I have sent it.

    Thanks
    Johar
     


  15. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Not recd.
    Please check email address again.
     


  16. Johar

    Johar Member


    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 : $$Date:mad:findcurrdate >= $$Date:$Stgcmpdatef and $$Date:mad:findcurrdat <= $$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
     

    Attached Files:



  17. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Try Putting temporarily ..............%age in NPR and AME............
     


  18. Johar

    Johar Member


    Sir, It does not check I tried checking using log but check for 1st item only
     


  19. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Show me the Field of your scheme Column..... where your 10/- discount should be appearing..... only that field.
     


  20. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    [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
     


  21. Johar

    Johar Member




    [Field : SchemeAmt]
    Use : Number Field
    Width : 12
    Set Always : Yes
    Set As : $$Findscheme ;:mad:finddate
    ;finddate : $machinedate
    Storage : SchemeAmt
    Format : "NoZero,Decimals:2"
    Skip : YES
    Align : Right
    ;Invisible: If @@IsSales or @@IScreditNote then Yes else No
     


  22. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Set As : $$Findscheme:#PlainVCHDate
     


  23. Johar

    Johar Member


    Sir, iam not sending any parameter
     


Share This Page