I Want to carry forward my UDF value in next sale bill

Discussion in 'Free Source Codes' started by Prasanna Pathak, Apr 10, 2020.

    

  1. Dear Experts
    I want to carry forward my UDF value ($TrkNo) in next sale bill please help me

    my Code is as follows

    ;;Shri
    [#Part: EI BaseInfo]
    Lines : EI Consignee, EI Trader NatureofPurc, EI PartyLimit
    Add:Line:After: EI Consignee:My Line
    [Line:My Line]
    Field:Medium Prompt,My Field1

    Local:Field:Medium Prompt:Set as:"Truck No"
    Local:Field:Medium Prompt:Color:blue
    [Field:My Field1] ;;I Want to Carry Forward This $TrkNo in Next Sale Bill
    Use:Name Field ;; If I Want to change it it can be changed
    Storage:TrkNo
    Set Always:Yes

    [System:UDF]
    TrkNo:String:3000
     


  2. Sanjeev S

    Sanjeev S Active Member


    Small Addition....

    I hope this will work

    Regards,


    Code:
    [Line:My Line]
    Field:Medium Prompt,My Field1
    
    Local:Field:Medium Prompt:Set as:"Truck No"
    Local:Field:Medium Prompt:Color:blue
    
    [Field:My Field1] ;;I Want to Carry Forward This $TrkNo in Next Sale Bill
    Use:Name Field ;; If I Want to change it it can be changed
    Set as    :    $$String:@@LTrkNo
    Storage:TrkNo
    Set Always:Yes
    
    [System:UDF]
    TrkNo:String:3000
           
    
    
    [system    :    formulae]
        LTrkNo                    :    $$CollectionField:$TrkNo:1:TrkVouchers
       
    [Collection    :    TrkVouchers]
                Type                     :     Vouchers : VoucherType
                Child of             :     $$VchTypeSales
                Belongs to     :     yes
                Fetch                :    MasterId, VoucherNumber, TrkNo   
                Sort                    :    @@Increasing    :    -$MasterId
    
     



  3. HEARTY THANKS SIR
    Thanks for solution it's Amazing idea
    I appreciate your Logic

    I used Variable for this one but they are not working
    Is it possible to save these values in Variables?
    and then to use it
    if it is then can you please explain it
     


  4. Sanjeev S

    Sanjeev S Active Member


    Dear Prasanna,

    Not thought of Variable. Basically it's UDF to be taken from previous voucher. I don't think variable can suffice the purpose.

    I am not an expert but just an amateur. Experts can throw more light on it.

    Regards,
     



  5. Don't Say that you are not expert
    I Hearty Appreciate your Logic.
    Previously I worked in Fox Pro that's why I asked for Variable
    By Profession I am Computer Hardware Technician, but Programming is my hobby

    Thanks again
     


Share This Page