Table of Contents

 

Default TDL Related Changes in 7.1

TallyPrime Release 7.1 introduces certain internal implementation changes that may affect TDL customisations built for earlier releases. Review the changes below and update your customisations accordingly.

Discount Calculation Changes

Release 7.1 introduces line-level discount support for percentage, fixed amount, and combined discounts, with a new Discount Format option in F11 company features letting you choose between Percentage, Amount, or Both. This changes how discount amounts are calculated internally.

What changed: Previously, the calculation used only $Discount as a percentage. Release 7.1 introduces the function CalcAmountAfterDiscount, along with the system formulas CalcedAmt and CalcedBatchAmt, which support both discount percentage and discount amount.

Previous Releases (up to 7.0)

[System : Formulas]

CalcedAmt : (((if $$IsMultiGodownOn Then $BatchRate else $Rate) * $BilledQty * (100 – $Discount)) / 100)

Release 7.1 Onwards:

[System : Formulas]

CalcedAmt      : $$CalcAmountAfterDiscount:$BilledQty:@@GetVchBatchRate:$Discount:$DiscountAmount   CalcedBatchAmt : $$CalcAmountAfterDiscount:$BilledQty:@@GetVchBatchRate:$Discount:$BatchDiscountAmount   GetVchBatchRate : if $$IsMultiGodownOn Then $BatchRate else $Rate

Function used:

[Function : CalcAmountAfterDiscount]

Return       : Amount
Parameter : pQuantity       : Quantity
Parameter : pRate           : Rate
Parameter : pDiscount       : Number
Parameter : pDiscountAmount : Amount

Local Formula : lfQtyRateEmpty    : ($$IsAnyEmpty:##pQuantity:##pRate)
Local Formula : lfEmptyDiscAmount : $$IsEmpty:##pDiscountAmount OR ($$Currency:##pRate != $$Currency:##pDiscountAmount)

010 : Do If : @lfQtyRateEmpty : Return : $$InitValue:Amount

020 : Return :
      If @lfEmptyDiscAmount
      Then (##pQuantity * ##pRate * (100 – ##pDiscount) / 100)
      Else (##pQuantity * ##pRate) – ##pDiscountAmount

Where this shows up: TDL customisations that use the earlier $Discount-based calculation may not work as expected after upgrading — including Double Discount modules, rate changes after an additional discount, and incorrect amount calculation after discount.

What to do: Identify formulas, functions, UDFs, and reports that depend on the earlier $Discount-based calculation, and replace them with CalcAmountAfterDiscount or equivalent logic that supports both discount percentage and amount. Don’t assume $Discount always contains a percentage value — review Double Discount and Additional Discount logic accordingly, and test against all three F11 configurations: Percentage, Amount, and Both.

Invoice Export Customization

In scenarios where a customized report is created to display Sales transactions and selecting a Sales Voucher triggers the export of the corresponding Invoice for the selected lines. In such cases, the Invoice QR Code and Acknowledgement details may not always be exported correctly.

What changed: The variable SVExportFormatVar, used in the system formula below, returned an incorrect logical value because it was being set at the Printed Invoice form level rather than at the report level used for selected-line export.

[System : Formula]

eInvQRInfoExpFormat : ($$InExportAction OR $$InMailAction OR $$InWhatsAppAction) AND
    ($$IsSysNameEqual:PDF:##SVExportFormatVar OR
     $$IsSysNameEqual:JPegImage:##SVExportFormatVar OR
     $$IsSysNameEqual:Html:##SVExportFormatVar)

These variables are set as a system formula in the form definition:

[Form: Printed Invoice]  

Set Always : SVExportFormat    : @@VPCTMPLDefaultFileFormat  
Set Always : SVExportFormatVar : @@VPCTMPLDefaultFileFormat

Where this shows up: Customised invoice exports using selected lines may fail to include the E-Invoice QR Code, Acknowledgement Number, and Acknowledgement Date.

What to do: Set the export format variable explicitly at the report level, as shown below, so these details export correctly.

[Report : Export Invoice]

Use : Printed Invoice
Set : SAGSTWithQRInfo      : Yes
Set : SAGSTAnalysis        : Yes
Set : SAGSTHSNWiseAnalysis : Yes
Object: Voucher            : ##VoucherID

Local : Form : Printed Invoice : Set Always : SVExportFormat    : $$SysName:PDF
Local : Form : Printed Invoice : Set Always : SVExportFormatVar : $$SysName:PDF

Is this information useful?
YesNo
TallyHelpwhatsAppbanner
Is this information useful?
YesNo
TARA