Reverse Calculation of Rate from Rate Inclusive Tax

Discussion in 'Tally Developer' started by suraj_kum, Oct 17, 2022.

    
  1. suraj_kum

    suraj_kum New Member


    Hello Developers,

    Can someone help me in correcting the billow mentioned code as with this code I am unable to reverse calculate the rate from the rate inclusive tax field
    Code:
    [#Field: VCH RateIncl]
      
        Use            : Rate Price Field
        Set as                : If ($$InAlterMode AND NOT $$IsEmpty:$Rate AND (@@STKInclTax OR ##ICFGInclTax)) Then  $$AlterInclusiveTaxValue:@@ExItemRate:@@STItemRate:@@VATItemRate:@@TCSItemRate:@@GSTItemRate:@@GSTItemQtyRate:@@ExItemMRPDutyValue:@@VATItemMRPDutyValue:@@ExItemQuantum Else +
                                If $$NumFilledItems:BatchAllocations = 0 Then @MRPRateSetVal Else $$CollectionField:$InclusiveTaxValue:1:BatchAllocations
                              
        Set By Condition    : $$InAlterMode AND ((@@STKInclTax OR ##ICFGInclTax) AND $$IsEmpty:$Rate AND $$IsEmpty:$InclVATRate) : ""
        Set By Condition    : $$InAlterMode AND (NOT $$IsEmpty:$Amount AND NOT $$IsEmpty:$Rate AND (@@STKInclTax OR ##ICFGInclTax) AND (@LocInclusiveRate!=$Rate)) : $$AlterInclusiveTaxValue:@@ExItemRate:@@STItemRate:@@VATItemRate:@@TCSItemRate:@@GSTItemRate:@@GSTItemQtyRate:@@ExItemMRPDutyValue:@@VATItemMRPDutyValue:@@ExItemQuantum
    
        Storage        : InclusiveTaxValue
        MRPRateSetVal: If @@IsItemMRPEnabled Then $$ForexValue:@@StdVchRate  Else @MRPValue
      
        MRPValue    : If $$IsEnd:$StockItemName Then "" Else If +
                        $$IsFieldEdited Then $InclusiveTaxValue Else +
                        If NOT $$IsEmpty:$MRPRate Then $$Number:$MRPRate +
                    Else If $$IsEmpty:@locPartyStateName OR $$IsSysName:@locPartyStateName Then $$GetEIStkItemMRP:$StockItemName:$Date Else +
                    $$GetEIStkItemMRP:$StockItemName:$Date:@locPartyStateName
                  
        locPartyStateName: If @@IsGSTOnAppl Then $$BaseOwner:$GSTVchPartyState Else $$BaseOwner:$VATPartyLedState
        LocInclusiveRate: $$InclusiveTaxValue:@@ExItemRate:@@STItemRate:@@VATItemRate:@@TCSItemRate:@@GSTItemRate:@@GSTItemQtyRate:@@ExItemMRPDutyValue:@@VATItemMRPDutyValue:@@ExItemQuantum
    
        Set Always    : Yes
        Width        : @@VCHGodownNameWidth
        Inactive    : $$IsEnd:$StockItemName
        Invisible    : @@InclTaxcfg
        HasBatchAllocation: (@@HasBatchWise OR $$IsMultiGodownOn OR $$IsTrackingOn OR @@IsOrdersOn OR @@IsStkCostTrackingON)
        Skip Forward    : $$InAlterMode
    
    [System: Formulae]
        ICFGInclTax        : ##ICFGInclTax AND @@SalesInvoiceMode
        InclTaxcfg        : NOT (@@ICFGInclTax AND (($$IsTCSOn AND @@IsIndian) OR @@IsExciseTraderOn OR @@IsIndianVAT OR @@IsKenyaVAT OR ($$IsServiceTaxOn AND (@@IsIndian OR @@IsMalaysia)) OR (@@IsGCCCountriesVATOn AND ##VARVchDate >= ##GVATApplicableDate) OR (@@IsGSTon AND (NOT $$IsEmpty:@@GSTApplDate AND ##VARVchDate >= @@GSTApplDate))))
        WOICFGInclTax    : @@InvoiceInCreate AND NOT ##ICFGInclTax AND @@STKInclTax AND @@SalesInvoiceMode AND NOT $UseForPOSInvoice:VoucherType:$VoucherTypeName
        STKInclTax        : $InclusiveTax:StockItem:$StockItemName
        SalesInvoiceMode: $$IsAccountingVch:$VoucherTypeName OR $$IsOrderVch:##pVoucherType OR $$IsInventoryVch:##pVoucherType AND $IsInvoice AND NOT ##SVAcctsInvoice
     
    Last edited: Oct 17, 2022



  2. Its already there in Prime no need to re-invent it
     


  3. suraj_kum

    suraj_kum New Member


    But its not working is there any correction needed in the above code??

    Capture.JPG
     
    Last edited: Oct 18, 2022


  4. suraj_kum

    suraj_kum New Member


    Sir please find the attached screenshot for the reference
     


  5. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    It is there since Tally ERP 9.

    you need to specify GST Rate in either ledger or stock Item , before you could use this feature
     


Share This Page