You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I go throw the code for the filtration of Item Tax Template in Sales Invoice and encounter a function called is_within_valid_range in apps/erpnext/erpnext/stock/get_item_details.py
The implementation for function:
defis_within_valid_range(args, tax):
ifnotflt(tax.maximum_net_rate):
# No range specified, just ignorereturnTrueelifflt(tax.minimum_net_rate) <=flt(args.get("base_net_rate")) <=flt(tax.maximum_net_rate):
returnTruereturnFalse
In the elif block the system compare the tax.minimum_net_rate and tax.maximum_net_rate with args.get("base_net_rate") but when I see if base_net_rate in args dict I found that the key never there and never put in the args dict from the first call to filter function
So, When I have to choose an Item Tax Template for an Item in Sales Invoice there nothing to choose from.
I suggest to add new key in filters variable in transaction.js called base_net_rate and handle this key to be part of args that passed to _get_item_tax_template in get_tax_template
Information about bug
I go throw the code for the filtration of Item Tax Template in Sales Invoice and encounter a function called is_within_valid_range in apps/erpnext/erpnext/stock/get_item_details.py
The implementation for function:
In the elif block the system compare the tax.minimum_net_rate and tax.maximum_net_rate with args.get("base_net_rate") but when I see if base_net_rate in args dict I found that the key never there and never put in the args dict from the first call to filter function
Code Flow:
So, When I have to choose an Item Tax Template for an Item in Sales Invoice there nothing to choose from.
I suggest to add new key in filters variable in transaction.js called base_net_rate and handle this key to be part of args that passed to _get_item_tax_template in get_tax_template
I can create PR by this
Module
stock
Version
Frappe Framework: v15.32.0 (version-15)
ERPNext: v15.28.2 (version-15)
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
No response
The text was updated successfully, but these errors were encountered: