I need Discount for the item group....

Discussion in 'Free Source Codes' started by udaya, Jan 18, 2022.

    
  1. udaya

    udaya Active Member


    [#Field: VCH Discount]
    Use : Number Field
    width : 3
    Forced : Yes
    set as : "2%"
    Delete : Format
    Add : Format :"NoZero,Percentage"
     


  2. udaya

    udaya Active Member


    I try but cant get the value in Discount Column in Sales Invoice.... Please Guide me....
     


  3. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Add this........... Delete : Set By Condition
     


  4. udaya

    udaya Active Member


    Thanks ..Lot ... Sir ... I will Try.....
     


  5. udaya

    udaya Active Member


    This Code is not working sir any one can guide..


    [#Part: MST LED Explode Sundry]
    Add : Line : At end : SetDisParWisYn

    [Line : SetDisParWisYn]
    Field : Medium Prompt, SetDisParWisYn
    Local : Field : Medium Prompt : Set As : "Set/Alter Party Wise Discount :"
    [Field : SetDisParWisYn]
    use : Logical Field
    Set aS : No
    Sub form : ItemRateSF : $$Value

    [Report : ItemRateSF]
    Form :ItemRateSF

    [Form :ItemRateSF]
    Part :ItemRateSF

    [Part :ItemRateSF]
    Line : ItemRateSF
    Repeat : ItemRateSF : ItemRatesAggregate
    Scroll : Vertical
    Break on : $$Isend:$MSTSFItemName

    [Line :ItemRateSF]
    Field : MSTSFItemName,MSTSFItemRate

    [Field : MSTSFItemName]
    Use : Name Field
    Storage : MSTSFItemName
    Table : MyStockitems,End of List

    [Field : MSTSFItemRate]
    Use : Number Field
    Storage : MSTSFItemRate
    Format : "NoZero,Percentage"
    Inactive: $$IsEnd:$MSTSFItemName

    [System : UDF]
    ItemRatesAggregate : Aggregate : 21000
    MSTSFItemName : String : 21001
    MSTSFItemRate : Number : 21002

    [Collection : MyStockitems]
    Title : "List of Group"
    Type : Stock Group
    Format : $Name,25

    [#Field: VCH Discount]
    Delete : Set By Condition
    Use : Number Field
    width : 3
    Forced : Yes
    set as : $(Ledger,$PartyLedgerName).ItemRatesAggregate[1,@@IsSameItem].MSTSFItemRate
    Delete : Format
    Add : Format :"NoZero,Percentage"

    [System : Formula]
    IsSameItem : $$ReqObject:$Parent:StockItem:$StockitemName = $MSTSFItemName
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    From code, it should work.

    So kindly show screenshot, on why it is not working.
     


  7. udaya

    udaya Active Member


    Sir. Its working by your Valuable Guidance.... thank... so much Amit sir....
     


  8. udaya

    udaya Active Member


    Sir One Issue... Discount calculated in previous date vouchers also... How stop previous voucher not affect??
    upload_2022-1-20_22-20-9.png
    i am started discount on 21/01/22
    but it affect all previous vouchers also....
    upload_2022-1-20_22-21-50.png
     


  9. love

    love Member


    add this ,should work
    Add : Set As : If $$InCreateMode then $(Ledger,$PartyLedgerName).ItemRatesAggregate[1,@@IsSameItem].MSTSFItemRate Else $$Value
    Add : Set By Condition : ($$IsFieldEdited OR $$InAlterMode OR NOT $$IsEmpty:$$Value): $$Value
     


  10. udaya

    udaya Active Member


    Its working fine Mr.love.....thanks so Much... pls Guid an other type discount by Item Group only (not Party wise)


    [System:UDF]
    RdGDiscount : Number: 100

    [#Field: VCH Discount]
    Delete : Set By Condition
    Add : Set By Condition : not ($$IsEmpty:mad:@GrpDiscount): @@GrpDiscount
    Color : Blue

    [System: Formula]
    GrpDiscount: $RdGDiscount:StockGroup:($Parent:StockItem:$StockItemName)

    Its Giving same problem... As Previous screen shots .... Please Give Solution... Thanks Advance.....
     


  11. love

    love Member


    your set by condition is wrong, modify it to fetch value only when it is in create mode , you are directing it to fetch value whenever their is a value in the UDF and that is what it is doing.
     


  12. PANKAJ BHONDLE

    PANKAJ BHONDLE Active Member


    Mr.Love, above code Enable Purchase Order & Sales Order Processing "No" then Proper Work But "Yes" not Proper Work
     
    love likes this.


  13. udaya

    udaya Active Member


    Mr. love Give me an Example please ......
     


Share This Page