Compound Unit (Quantity New Column)

Discussion in 'Tally Developer' started by Vikas617yadav, Aug 17, 2019.

  1. Vikas617yadav

    Vikas617yadav New Member

    Dear All Please help

    IN batch allocation, you have added a filed to enter the only number for qty field and one field to select alternative units then in another field you would like to convert into primary units and show the value.

    If i select DZ, Box, Pcs Then this code not calculated , if i selected Box 10 Dzn Compound unit then Calculated .

    Also Given a Tally Data ..

    the code is below.

    ;-- Batch Allocation Page Customization 2nd Qty Field...

    ;;;Batch allocation Title Lines

    [#Line: VCHBATCH ColumnOne]
    Add : Option : V EI ColumnOneme :$VoucherTypeName ="Sales" or $VoucherTypeName ="Sales-SW" or $VoucherTypeName ="Order-SW" or $VoucherTypeName ="Purchase" or $VoucherTypeName ="Order-SW" or $VoucherTypeName ="Credit Note"

    [!Line : V EI ColumnOneme]
    Add : Right Fields : Before :VCH QtyTitle: AQ Primarytitel,RajUnitsTitle

    [Field : AQ Primarytitel]
    Width : If @@IsJobOrdersOn Then @@VCHQtyWidth Else if ($DiffActualQty AND NOT $$IsPhysStock:##SVVoucherType AND NOT $$IsStockJrnl:##SVVoucherType AND NOT @@IsExciseSupplementaryInv ) then (@@VCHQtyWidth + @@VCHQtyWidth + 1) else @@VCHQtyWidth
    Set as : $$LocaleString:"QTY New"
    Sub Title : Yes
    ;Set as : $BaseUnits:Stockitem:$StockitemName
    Set Always : Yes
    Skip : Yes
    Style : Small Bold
    Align : Center
    Background : Blue

    [Field : RajUnitsTitle]
    Width : If @@IsJobOrdersOn Then @@VCHQtyWidth Else if ($DiffActualQty AND NOT $$IsPhysStock:##SVVoucherType AND NOT $$IsStockJrnl:##SVVoucherType AND NOT @@IsExciseSupplementaryInv ) then (@@VCHQtyWidth + @@VCHQtyWidth + 1) else @@VCHQtyWidth
    Set as : $$LocaleString:"Units New"
    Sub Title : Yes
    ;Set as : $BaseUnits:Stockitem:$StockitemName
    Set Always : Yes
    Skip : Yes
    Style : Small Bold
    Align : Center

    ;--Details Batch Lines-------------------------------------------------------------

    [#Line: STKVCH Batch2]
    Add : Option : VEI InvInfome : $VoucherTypeName ="Sales" or $VoucherTypeName ="Sales-SW" or $VoucherTypeName ="Order-SW" or $VoucherTypeName ="Purchase" or $VoucherTypeName ="Order-SW" or $VoucherTypeName ="Credit Note"

    [!Line : VEI InvInfome]

    Add : Right Fields: Before : VCHBATCH BilledQty : AQ Primary,RajatUnitsValue

    [Field : AQ Primary]
    Use : Number Field
    ;Use : Rate Price Field
    Width : @@VCHQtyWidth
    Storage : NewQtyField
    Set Always : Yes
    Align : Center

    [System: UDF]
    NewQtyField : Number : 4214
    NewUNit : String : 4215

    [Field : RajatUnitsValue]
    Use : Name Field
    ;Use : Rate Units Field
    Width : @@VCHQtyWidth
    Style : Normal Bold
    ;Storage : NewQtyField
    Storage : NewUNit
    Set Always : Yes
    Align : Center
    Table : Unit
    Show Table : Always


    ;[#Field: VCHBATCH BilledQty]
    ; Set as : "11"

    [#Field: VCHBATCH NrmlBQty]
    Add : Option : MyBilledQty : $VoucherTypeName ="Sales" ;or $VoucherTypeName ="Sales-SW" or $VoucherTypeName ="Order-SW" or $VoucherTypeName ="Purchase" or $VoucherTypeName ="Order-SW" or $VoucherTypeName ="Credit Note"

    [!Field : MyBilledQty]
    Delete : Set Always
    Delete : Option
    Delete : Sub Form
    Delete : Inactive
    Delete : Format
    Delete : Validate
    Delete : Switch
    Delete : Set as

    Add : Set as :($$Number:#AQPrimary)* ($$Number:$$CollectionField:$dn:1:t14) *($$Number:$$CollectionField:$conv:1:t12)
    Add : Background : Green
    Add : Set Always : Yes

    ;;---Collection Field

    Type:unit;stock item

    Source Collection:t11
    ;select $un,$dz1,$conv from t12

    Type:stock item
    ;select $name,$BASEUNITS,$ADDITIONALUNITS,$DENOMINATOR,$Conversion,$NewUNit from t13

    Source Collection:t13

    tfil:$nm=#vchstockitem and $Al=#RajatUnitsValue;"Box of 10 DZ";; Table Seclected Filter

    ;select $nm,$bu,$al,$dn from t14

    testf:$un=#RajatUnitsValue;"Box of 10 DZ";#RajatUnitsValue

    Attached Files:

  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member

    It is calculating because that is a COMPOUND unit defined by you and the rest of the unit is SIMPLE unit

    And since there is no DENOMINATOR to carry out the CONVERSION, it will not calculate.

  3. ganeshgk

    ganeshgk New Member

    it how to show on stock summary report

Share This Page