Please help On Batch Value

Discussion in 'Tally Developer' started by Access, Mar 18, 2024.

    
  1. Access

    Access Member


    [#Line: EI ColumnOne]
    Option : Access EI ColumnOne

    [!Line : Access EI ColumnOne]
    Add : Right Fields : Before : VCH QtyTitle :VCHBillPcs,VCHFreePcs,VchTBQtyTitle

    [#Field: VCH QtyTitle]
    Set as:"Total Sales Qty"

    [Field:VCHBillPcs]
    Info : $$LocaleString:"Quantity"
    Align : Centre
    Style : Normal Bold
    Width : 10
    Border : Thin Left Right

    [Field:VCHFreePcs]
    Info : $$LocaleString:"Free "
    Align : Centre
    Style : Normal Bold
    Width : 10
    Border : Thin Left Right

    [Field:VchTBQtyTitle]
    Info : $$LocaleString:"Billing Qty"
    Align : Centre
    Style : Normal Bold
    Width : 10
    Border : Thin Left Right
    ;Invisible : Yes

    [#Line: EI ColumnOneRate]
    Option : Access EI ColumnOneRate

    [!Line : Access EI ColumnOneRate]
    Add : Right Fields : At Beginning :VCHBillPcs1,VCHFreePcs1,VchTBQtyTitle1

    [Field:VCHBillPcs1]
    Info: ""
    Width: 10
    Align:Center
    Style:Small Bold

    [Field:VCHFreePcs1]
    Info: ""
    Width: 10
    Align:Center
    Style:Small Bold

    [Field:VchTBQtyTitle1]
    Info: ""
    Width: 10
    Align:Center
    Style:Small Bold
    ;Invisible : Yes

    [#Line: VCHBATCH ColumnOne]
    Option : Access VCHBATCH ColumnOne

    [!Line:Access VCHBATCH ColumnOne]
    Add: Right Fields: Before :VCH QtyTitle:VCHBillPcs,VCHFreePcs,VchTBQtyTitle

    [#Line: VCHBATCH Columntwo]
    Option : Access VCHBATCH Columntwo

    [!Line:Access VCHBATCH Columntwo]
    Add: Right Fields: Before :VCH ActualQtyTitle:VCHBillPcs1,VCHFreePcs1,VchTBQtyTitle1

    [#Line: EI InvInfo]
    Option : Access EI InvInfo
    [#Line: CI InvInfo]
    Option : Access EI InvInfo

    [!Line: Access EI InvInfo]
    Add : Right Fields : Before:VCH ActualQty :VCHBillPc,VCHFreePc,VchTBQty

    [Field : VCHBillPc]
    Use : Qty Primary Field
    Set Always : Yes
    Set as : If @@HasInvSubAlloc AND NOT $$IsEmpty:mad:VCHBillPc Then @VCHBillPc Else @ResetVal
    VCHBillPc : $$CollectionField:$VCHBatchBillPc:1:BatchAllocations
    ResetVal : $VCHBatchBillPc
    Storage : VCHItemBillPc
    Width : 10
    Align : Right
    Format : "NoZero,Decimals:2"
    Skip on : $$IsEnd:$StockItemName
    Inactive : (@@BatchAllocBreak) OR ((@@IsGodownTransfer AND NOT @@HasBatchWise AND $$IsEmpty:#VCHBATCHBilledQty)) OR @@JobOrderBreak
    Skip : Yes

    [Field : VCHFreePc]
    Use : Qty Primary Field
    Set Always : Yes
    Set as : If @@HasInvSubAlloc AND NOT $$IsEmpty:mad:VCHFreePc Then @VCHFreePc Else @ResetVal
    VCHFreePc : $$CollectionField:$VCHBatchFreePc:1:BatchAllocations
    ResetVal : $VCHItemFreePc
    Storage : VCHItemFreePc
    Width : 10
    Align : Right
    Format : "NoZero,Decimals:2"
    Skip on : $$IsEnd:$StockItemName
    Inactive : (@@BatchAllocBreak) OR ((@@IsGodownTransfer AND NOT @@HasBatchWise AND $$IsEmpty:#VCHBATCHBilledQty)) OR @@JobOrderBreak
    Skip : Yes

    [Field:VchTBQty]
    Use : Qty Primary Field
    Set Always : Yes
    Storage : VchTBQty
    Set as : If @@HasInvSubAlloc AND NOT $$IsEmpty:mad:VchTBQty Then @VchTBQty Else @ResetVal
    VchTBQty : $$CollectionField:$VchBatchTBQty:1:BatchAllocations
    ResetVal : $VchBatchTBQty
    Width : 10
    Align : Right
    Format : "NoZero,Decimals:2"
    Inactive : $$IsEnd:$StockItemName OR @@NoBaseUnits
    Inactive : (@@BatchAllocBreak) OR ((@@IsGodownTransfer AND NOT @@HasBatchWise AND $$IsEmpty:#VCHBATCHBilledQty)) OR @@JobOrderBreak
    Skip : Yes
    ;Invisible : Yes

    [#Line: STKVCH Batch2]
    Option : Access STKVCH Batch2
    [!Line:Access STKVCH Batch2]
    Add: Right Fields: After:VCHBATCH Name: VCHBatchBillPc,VCHBatchFreePc,VchBatchTBQty

    [Field : VCHBatchBillPc]
    Use : Qty Primary Field
    Set Always : Yes
    Storage : VCHBatchBillPc
    Width : 10
    Align : Right
    Format : "NoZero,Decimals:2"
    Inactive : @@NoBaseUnits OR @@BatchAllocBreak

    [Field : VCHBatchFreePc]
    Use : Qty Primary Field
    Set Always : Yes
    Storage : VCHBatchFreePc
    Width : 10
    Align : Right
    Format : "NoZero,Decimals:2"
    Inactive : @@NoBaseUnits OR @@BatchAllocBreak

    [Field:VchBatchTBQty]
    Use : Qty Primary Field
    Set Always : Yes
    Storage : VchBatchTBQty
    Set as : $VCHBatchBillPc
    Width : 10
    Align : Right
    Format : "NoZero,Decimals:2"
    Inactive : @@NoBaseUnits OR @@BatchAllocBreak
    ;Invisible : Yes
    [System:UDF]
    VCHItemBillPc : Quantity :10052
    VCHItemFreePc : Quantity :10053
    VchTBQty : Quantity :10054
    VCHBatchBillPc : Quantity :10055
    VCHBatchFreePc : Quantity :10056
    VchBatchTBQty : Quantity :10057

    [System:Formula]
    QtyCalculation:if $$IsEmpty:VCHBatchFreePc Then @@MyBatchQty Else @@MyBatchFreeQty
    MyBatchFreeQty:$$AsQty:$VchBatchTBQty+$$AsQty:$VCHBatchFreePc
    MyBatchQty:$$AsQty:$VchBatchTBQty
    MYCalcedAmt : (((if $$IsMultiGodownOn Then $BatchRate else $Rate) * $VchBatchTBQty * (100 - $Discount)) / 100)

    [#Field: VCHBATCH NrmlAQty]
    Option:AccessBilledQty

    [!Field:AccessBilledQty]
    Set as:mad:@QtyCalculation
    Set Always:Yes
    Background:Yellow

    [#Field: VCHBatch OrigBilledQty]
    Background:Yellow

    [#Field: VCHBATCH Value]
    Set as: If (@@NoBaseUnits OR $$IsEmpty:$VchBatchTBQty) then $$Value else (($Rate * $VchTBQty * (100 - $Discount)) / 100)
    Background:Yellow
    Set Always:Yes

    [#Field: VCH NrmlValue]
    Option : Access NrmlValue
    [!Field:Access NrmlValue]
    ResetVal : if $$InCreateMode Or $$InAlterMode Then (($Rate * $VchBatchTBQty * (100 - $Discount)) / 100) Else $$Value

    [#Field: VCH Value]
    Option : Access VCH Value

    [!Field:Access VCH Value]
    ResetVal : if $$InCreateMode Or $$InAlterMode Then (($Rate * $VchBatchTBQty * (100 - $Discount)) / 100) Else $$Value
    Background:Yellow
     


  2. Access

    Access Member


    D
    Done Thanksgiving
     


Share This Page