help needed in group wise discount

Discussion in 'Requests' started by Vivian Fernandes, Feb 24, 2022.

    
  1. Vivian Fernandes

    Vivian Fernandes New Member


    sir

    I want to provide group-wise discount on total quantity at voucher, I have written this code
    please help in correction


    ;;==================At Voucher================================

    [#Line : EI Column One]
    Add : Right Field: At Beginning: GRPName

    [Field: GRPName]
    Use:Name Field
    Set as: "Group Name"
    Skip: Yes
    Width:10
    Align: Center

    [#Line : EI Inv Info]
    Add: Right Field:At Beginning: GRPNameNo

    [Field: GRPNameNo]
    Use: Name Field
    Set as:$PARENT:STOCKITEM:#VCHSTOCKITEM
    Width:10
    Align: Center
    Skip:Yes


    ;;====================logical Above Narration =============================

    [#Part: VCH Narration]
    Add: Line: at end: GWD Logical

    [Line:GWD Logical]
    Fields : Medium Prompt, GWD Logical
    Local : Field : Medium Prompt : Info : $$LocaleString:"Provide Group Wise Discount ?"
    Space Top : 0.4

    [Field:GWD Logical]
    Type:Logical
    max: 3
    Width:3
    Style: normal Bold
    Table: Yes No Table
    Show Table: Always
    Storage: GWDLogical
    Sub Form: GWDisc : $$Value= "Yes"

    [System:UDF]
    GWDLogical:Logical: 930

    ;;========================== Main Report =============================================

    [Report:GWDisc]
    Form:GWDisc

    [Form:GWDisc]
    Part:GWDisc

    [Part:GWDisc]
    Line:GWDTitle, GWDisc
    Repeat:GWDisc:GWDColl
    Total:GWDAmt
    Bottom Line:GWD Total
    Break On:$$IsEmpty:#GWDAmt
    Scroll:Vertical
    Common Border:Yes


    [Line:GWDTitle]
    Field:GWDName, GWDQty, GWDRate,
    Right Field:GWDAmt
    Local:Field:GWDName:Info:"Group Name"
    Local:Field:GWDQty:Info:"Group Total Qty"
    Local:Field:GWDRate:Info:"Discount Rate"
    Local:Field:GWDAmt:Info:"Discount Amount"
    Border:Column Titles

    [Line:GWDisc]
    Field:GWDName, GWDQty, GWDRate,
    Right Field: GWDAmt

    [Field:GWDName]
    Use:Name Field
    Set as:$parent
    Storage:GWDName
    Width:25
    Skip:Yes

    [Field:GWDQty]
    Use:number Field
    Set as:$BilledQty
    Storage:GWDQty
    Width:20

    [Field:GWDRate]
    Use:number field
    Set as:$rate
    Storage:GWDRate
    Width:20

    [Field:GWDAmt]
    Use:number Field
    Set as: #GWDQty * #GWDRate
    Storage:GWDAmt
    Width:20
    Set Always:Yes

    [Line:GWDTOTAL]
    Right Field:GWDT Title, GWD Total

    [Field:gwdttitle]
    Use:medium prompt
    Info:"Total discount amount :"
    Skip:Yes

    [Field:GWD total]
    Use:Number foeld
    Set as:$$Total:GWDAmt
    Storage:GWDTotal

    [System:UDF]
    ;gwdtotal:Aggregate: 931

    ;;===================== Storage =====================================

    [System:UDF]
    GWDValue:Aggregate:101
    GWDName:String:102
    GWDQty:Number:103
    GWDRate:Number:104
    GWDAmt:Number:105

    ;;==================== Collection ==================================

    [Collection:GWDColl]
    Source Collection:Default
    Walk:Inventory Entries

    By:stockitemName:$stockitemName
    By:$parent:$Parent;:Stockitem:$stockItem
    ;By:rate:$rate

    Aggr Compute:BilledQty:Sum:$BilledQty
     


  2. Vivian Fernandes

    Vivian Fernandes New Member


    CAN ANYONE HELP IN THIS???????
     


Share This Page