Repeat Line for description & delete for sq.mt qty & Rate

Discussion in 'Free Source Codes' started by JCTS, Jun 8, 2019.

    
  1. JCTS

    JCTS Member


    Please help me in this code. We want repeat lines for description but dont want to repeat lines for sq mt Qty & sq.mt Rate. (It should come only one time.)

    Awaiting your valuable guidance.

    ;;-------Item DEtails----------------------------------------------------------------------


    [Part : OTS AddlDesc]
    Lines : OTS AddlDesc
    Repeat : OTS AddlDesc : UserDescription:
    Option : Small Size Part

    [Line : OTS AddlDesc]
    Fields : Simple Field
    Right Field: OTS Qty, OTS Rate,OTS GrossAmt;EXPINV MyNewFields
    Local : Field : Simple Field : Set as : $UserDescription
    Local : Field : Simple Field : Full Width : Yes
    Local : Field : Simple Field : Space Left : 10 mms
    Local: Field: Name Field: Style:O9

    Local: Field:OTS Qty : Delete: Storage
    Local: Field:OTS Qty: Type: String
    Local: Field:OTS Qty : Set as: "("+$$String:mad:@MyVchSqMt + "Sq.mt.)"
    Local: Field: Name Field: Style:O9

    Local: Field:OTS Rate : Delete: Storage
    Local: Field:OTS Rate : Type: String
    Local: Field:OTS Rate : Set as: "(" +$$String:mad:@MyVchMTRate + "Sq.mt.)"
    Local: Field: Name Field: Style:O9

    Local: Field: OTS GrossAmt :Set as: ""


    ;===============================================================================
     

    Attached Files:

    Last edited: Jun 8, 2019


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    If you do not want, them simply delete the fields from the LINE.
     


  3. JCTS

    JCTS Member


    We want repeat lines for description but dont want to repeat lines for sq mt Qty & sq.mt Rate. (It should come only one time.)
    Please guide Amitjee..
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    In Field.............OTS Qty, OTS Rate

    Set as : If $$Line>1 then "" Else "("+$$String:mad:@MyVchSqMt + "Sq.mt.)"

    Do same for the other field.
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Actually you should be typing the whole Description in one line, instead, you are breaking the line manually and hence the other items are also being repeated.
     


  6. JCTS

    JCTS Member


    Thank you so much Amit jee... its absolutely working perfect. Also done for other fields.
     


  7. JCTS

    JCTS Member


    One more query is

    width x height x copies=qty
    if 2.25x2.35x2=10.575 it is coming round off. it should come abosulte

    [System : Formula]
    MyBatchFilter $StockItemName = $StockItemName
    MyVchSqMt : $$Number:$BilledQty * 0.092903
    MyVchMTRate : $$Number:$Rate / 0.092903
    MyVchArea : $MyVchWidth * $MyVchHeight * $MyVchAreaVal
    MyVchBilledQty : ($MyVchArea = $BilledQty)

    Please guide.
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Show that field code here....your QTY code
     


  9. JCTS

    JCTS Member


    Please check

    [#Field: VCH NrmlBilledQty] ; Quantity column should fill qty values automatically

    oldSet as : If @HasInvAlloc Then $$CollQtyTotal:BatchAllocations:$BilledQty Else @ResetVal

    Set as : if $$IsEmpty:$MyVchArea then @OldSetas else $$AsQty:$MyVchArea ; if Area is not Empty then only Quantity column should fill qty values automatically
    Skip: !$$IsEmpty:$MyVchArea
     


  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    show me $MyVchArea ............calculations
     


  11. JCTS

    JCTS Member


    MyVchArea : $MyVchWidth * $MyVchHeight * $MyVchAreaVal ; For RJ Qty column
     


  12. JCTS

    JCTS Member


    Now if I enter in tally
    width x height x copies=qty
    if 2.25x2.35x2=10.575 it is coming round off. means it is coming 11.00 but my requirement is it should come 10.58 in qty column instead of round off qty 11
     


  13. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Since you are using default Tally field, I would not consider changing the settings...........

    So you need to do the following.......
    Add a field before [Field: VCH NrmlBilledQty] .... say MyQtyFld.....

    In there use type Number..... put you computed formula result in this field. and then make this field Invisible.

    Then in [#Field: VCH NrmlBilledQty] .... instead of $MyVchArea ...replace it with #MyQtyFld
     


  14. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    or TRY....

    Code:
    MyVchArea : $$Abs:($MyVchWidth * $MyVchHeight * $MyVchAreaVal )
     
    Last edited: Jun 8, 2019


  15. JCTS

    JCTS Member


    It is not working..showing error
     


  16. JCTS

    JCTS Member


    Lets check tomorrow. Thank you Amitjee for your guidance. Gnt.
     


  17. JCTS

    JCTS Member


    Amijee.. As per suggestion i have done same way.. but still qty not coming absolute it is rounding off

    [Field : MyVchRSJQty] ; RJQTY column
    Use : Number Field
    Width : @@VCHRateWidth
    Style : Normal
    Inactive: $$IsEnd:$StockItemName or (! $RSColumnEnabled:StockItem:$StockITemName)
    Set as :mad:@MyVchArea
    Storage : MyVchArea
    Set Always : Yes
    Align : Right
    Skip : Yes
    Border :Thin Left Right
    Format : Decimal :0
    Invisible : Yes
     


  18. JCTS

    JCTS Member


    Thank you Amitjee for your valuable guidance.. I have done it.


    [Field : MyVchRSJQty] ; RJQTY column
    Use : Number Field
    Width : @@VCHRateWidth
    Style : Normal
    Inactive: $$IsEnd:$StockItemName or (! $RSColumnEnabled:StockItem:$StockITemName)
    Set as :mad:@MyVchArea
    Storage : MyVchArea
    Set Always : Yes
    Align : Right
    Skip : Yes
    Border :Thin Left Right
    Format : Decimal :2
    Invisible : Yes


    [#Field: VCH NrmlBilledQty] ; Quantity column should fill qty values automatically

    oldSet as : If @HasInvAlloc Then $$CollQtyTotal:BatchAllocations:$BilledQty Else @ResetVal

    Set as : if $$IsEmpty:#MyVchRSJQty then @OldSetas else $$AsQty:#MyVchRSJQty ; if Area is not Empty then only Quantity column should fill qty values automatically
    Skip: !$$IsEmpty:#MyVchRSJQty
     


  19. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You are welcome.....

    remove storage from your new field.... it is not required. Also remove style, border, align, skip....since this is an invisible field.... all specifications are redundant.
     


  20. JCTS

    JCTS Member


    Finally done it.
     

    Attached Files:



  21. JCTS

    JCTS Member


    Y
    Yes sure. Thank you
     


  22. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    for OTS Qty and OTS Rate........... use Style : Small Italic for better visibility
     


  23. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    What conversion factor are you using to convert Sq.Ft into Sq.Mtr ????
     


  24. JCTS

    JCTS Member


    We have used following conversion factor for sq.mt qty & rate.


    MyVchSqMt : $$Number:$BilledQty * 0.092903 ;For Sq.Mt.Qty Column
    MyVchMTRate : $$Number:$Rate / 0.092903 ; For Rate / Sq.Mt Column
     


  25. JCTS

    JCTS Member


    Yes we shall do finishing work now.
     


Share This Page