How to set formula for billedqty ?

Discussion in 'Tally Developer' started by mahadev loke, Jul 3, 2012.

    
  1. mahadev loke

    mahadev loke New Member


    below are few line of the code I want to set BilledQty with the following formula. and it should get updated if any of the width/heaight/sqft changes. qty field automatically calculated.


    [System: Formula]
    SCSCalcQty : $$Number:$GlobalVCHHeight*$$Number:$GlobalVCHWidth*$$Number:$GlobalVCHsqft

    [#Field: VCH BilledQty]

    set as : $$String:mad:@SCSCalcQty
    Set always : Yes


    [!Line: Global EI InvInfo]
    Add : Right Fields : At Beginning : Global VCH Width, Global VCH Height, Global VCH sqft
    Local : Field : Global VCH Width : Storage : SCSInvWidth
    Local : Field : Global VCH Height : Storage : SCSInvHeight
    Local : Field : Global VCH sqft : Storage : SCSInvsqft


    [Field: Global VCH Width]
    Use : Short Name Field
    Width : 8
    Align : Right
    Border : Thin Left Right
    Skip on: $$IsEnd:$StockItemName

    [Field: Global VCH Height]
    Use : Short Name Field
    Width : 8
    Align : Right
    Border : Thin Left Right
    Skip on: $$IsEnd:$StockItemName


    [Field: Global VCH sqft]
    Use : Short Name Field
    Width : 8
    Align : Right
    Border : Thin Left Right
    Skip on: $$IsEnd:$StockItemName
     


  2. PKR

    PKR New Member


    Dear Mr. Mahadev,

    Please find the below code for "Qty Field"

    It will not work if you are activated the godown, batch allocations or tracking or po

    In your code i didn't find the UDF's, some of the fields, please send the proper code to get the fast reply. sorry if the comment is wrong

    Note:

    If you need the batch allocation subform then add the fields batch allocation line.

    Code also attached

    ;; Code Start

    [#Field: VCH BilledQty]

    GlobalResetVal: $$AsQty:mad:@SCSCalcQty

    [#Field: VCH NrmlBilledQty]

    Set as : If @HasInvAlloc Then $$CollQtyTotal:BatchAllocations:$BilledQty Else @GlobalResetVal

    [#Line: EI InvInfo]

    Option: Global EI InvInfo : @@IsSales

    [!Line: Global EI InvInfo]

    Add : Right Fields : Before: VCH BilledQty : Global VCH Width, Global VCH Height, Global VCH sqft



    [Field: Global VCH Width]

    Use: Number Field
    Storage: SCSInvWidth
    Border: Thin Left Right
    Inactive: $$IsEnd:$StockItemName

    [Field: Global VCH Height]

    Use: Number Field
    Storage: SCSInvHeights
    Border: Thin Left Right
    Inactive: $$IsEnd:$StockItemName


    [Field: Global VCH sqft]

    Use: Number Field
    Storage: SCSInvsqft
    Border: Thin Left Right
    Inactive: $$IsEnd:$StockItemName

    [System: UDF]

    SCSInvWidth: Number: 100
    SCSInvHeights: Number: 101
    SCSInvsqft: Number: 102

    [System: Formula]

    SCSCalcQty : ($SCSInvWidth*$SCSInvHeights*$SCSInvsqft)

    ;;; End of File

    Thanks





     

    Attached Files:

    • Qty.txt
      File size:
      1.1 KB
      Views:
      73


  3. mahadev loke

    mahadev loke New Member


    Thank you very much for you reply. Since code contains other info, I have posted only part of the code. I tried your code but it is not calculating (WidthXHeightXSqFt). I tried with GlobalResetVal and ResetVal also.
     



  4. I think U had to add the swith for vch billed qty.
    [#Field : VchBilledQty]
    Add : Switch : At End : Vch MyBillQty : Not $$IsStockJournal:##SvVoucherType And Not @@IsPosInvoice And (Not $$Isempty:mad:GlobalResetValue

    [!Field : VchMyBillQty]
    set By Condition : Not $$IsEmpty:mad:GlobalresetValue : @GlobalresetValue
     


  5. kamal

    kamal Member


    Dear Experts
    this code is working
    but qty field in purchase is disappearing
    please correct the code i have checked in release 4.93
     


Share This Page