Try ERPNext Buy Support Partners Foundation

Item level taxes are not getting calculated in POS total, but in the sales invoice it appears

I am using latest version of ERPNext for testing the features. I have configured 2 items with item level taxes. One item with service tax of 5% and another one with VAT of 14.5%.

In order to consider the item level taxes in the sales/POS invoice, I have configured pos profile with tax template with 2 tax items and mentioned 0 in rate field. (both taxes are on Net total and not included in basic price).

When I tried to sale through POS with the configured profile, total amount of the sale and payment amount is coming without tax. But the related sales invoice in the “sales invoice list” hold the tax amount and it is showing overdue which is equal to the tax amount.

Error is “POS total amount for the payment is not considering the item level Taxes, but it is updated in sales invoice”. Do we have any fix already implemented for this issue.?

Earlier versions of ERPNext -->POS are working properly.

Thanks for reporting the issue.

I can replicate the issue. @rohit_w is working on it, will push a fix as soon as posible.

Great! Thanks for the update.

Released the fix

2 Likes

Its working now! Thanks!

How as this achieved?

We have some items which are taxed VAT @5% and medicines VAT Exemption.
But in POS if i assign Sales tax Vat@5% then it applies it to the non vat items also…

Can anyone advice?

EDIT: Found it. Followed the Sales Tax tutorial.
But other question, How to apply tax as per the item group.
and is there a default way to display which item have vat and which have exemption in print format?

You can apply different tax rate setup at Item Level, which is different from default tax, which is derived from COA Tax ledger & Tax template.

You can see the ‘tax break-up’ item wise on ‘Save’ of SI or PI. It generates HTML field calculated and shown on the SI or PI, which you could use in print format

Thanks for your quick reply.

But maybe I failed to explain in detail.
How to apply tax as per the item group.
We have to Item groups. Vat Items and Non Vat Item.
I want to know if there is any way where I can assign the VAT and its rate to a given Item group, Instead of doing each item one by one.

It is similar to customer group method but on item group. If I use the Tax Rule form, it only have a way to assign customer group to a given tax template.

Question 2:
I am aware of the Tax Break-Up. But I would only Like to display in pos receipt that item have vat or not.

Example:

ItemA (Vat@5%) 1USD
ItemB (Vat@0%) OR (Vat Exempted) 5USD

Something like this.

Hope this makes my questions more clear.
Thanks for your support, appreciated your response but can is there a way I can achieve this?

This is not available in ERPNext at this moment. Tax could be either Item wise or Specified as per Tax template

I’m sorry, I have not come across this requirement nor tested it

i am using pos for dubai location but when i am having any item with vat/tax it generates following error
" AttributeError: ‘NoneType’ object has no attribute ‘fieldtype’ "

Detail error is as follows

Traceback (most recent call last):
File “/opt/erpnext/erpnext/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 901, in submit
self._submit()
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 890, in _submit
self.save()
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 285, in save
return self._save(*args, **kwargs)
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 307, in _save
self.insert()
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 238, in insert
self.run_before_save_methods()
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 934, in run_before_save_methods
self.run_method(“validate”)
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 831, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 1116, in composer
return composed(self, method, *args, **kwargs)
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 1099, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 825, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/accounts/doctype/pos_invoice/pos_invoice.py”, line 30, in validate
super(SalesInvoice, self).validate()
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/selling_controller.py”, line 40, in validate
super(SellingController, self).validate()
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/stock_controller.py”, line 21, in validate
super(StockController, self).validate()
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 78, in validate
self.calculate_taxes_and_totals()
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 181, in calculate_taxes_and_totals
calculate_taxes_and_totals(self)
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 17, in init
self.calculate()
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 34, in calculate
self.set_item_wise_tax_breakup()
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 630, in set_item_wise_tax_breakup
self.doc.other_charges_calculation = get_itemised_tax_breakup_html(self.doc)
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 670, in get_itemised_tax_breakup_html
update_itemised_tax_data(doc)
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/init.py”, line 129, in caller
return frappe.get_attr(regional_overrides[region][fn_name])(*args, **kwargs)
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/regional/united_arab_emirates/utils.py”, line 27, in update_itemised_tax_data
row.tax_rate = flt(tax_rate, row.precision(“tax_rate”))
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/base_document.py”, line 786, in precision
if df.fieldtype in (“Currency”, “Float”, “Percent”):
AttributeError: ‘NoneType’ object has no attribute ‘fieldtype’
request.js:356:14
Traceback (most recent call last):
File “/opt/erpnext/erpnext/apps/frappe/frappe/app.py”, line 64, in application
response = frappe.api.handle()
File “/opt/erpnext/erpnext/apps/frappe/frappe/api.py”, line 58, in handle
return frappe.handler.handle()
File “/opt/erpnext/erpnext/apps/frappe/frappe/handler.py”, line 30, in handle
data = execute_cmd(cmd)
File “/opt/erpnext/erpnext/apps/frappe/frappe/handler.py”, line 70, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/opt/erpnext/erpnext/apps/frappe/frappe/init.py”, line 1111, in call
return fn(*args, **newargs)
File “/opt/erpnext/erpnext/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 901, in submit
self._submit()
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 890, in _submit
self.save()
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 285, in save
return self._save(*args, **kwargs)
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 307, in _save
self.insert()
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 238, in insert
self.run_before_save_methods()
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 934, in run_before_save_methods
self.run_method(“validate”)
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 831, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 1116, in composer
return composed(self, method, *args, **kwargs)
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 1099, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/document.py”, line 825, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/accounts/doctype/pos_invoice/pos_invoice.py”, line 30, in validate
super(SalesInvoice, self).validate()
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/selling_controller.py”, line 40, in validate
super(SellingController, self).validate()
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/stock_controller.py”, line 21, in validate
super(StockController, self).validate()
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 78, in validate
self.calculate_taxes_and_totals()
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 181, in calculate_taxes_and_totals
calculate_taxes_and_totals(self)
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 17, in init
self.calculate()
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 34, in calculate
self.set_item_wise_tax_breakup()
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 630, in set_item_wise_tax_breakup
self.doc.other_charges_calculation = get_itemised_tax_breakup_html(self.doc)
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 670, in get_itemised_tax_breakup_html
update_itemised_tax_data(doc)
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/init.py”, line 129, in caller
return frappe.get_attr(regional_overrides[region][fn_name])(*args, **kwargs)
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/regional/united_arab_emirates/utils.py”, line 27, in update_itemised_tax_data
row.tax_rate = flt(tax_rate, row.precision(“tax_rate”))
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/base_document.py”, line 786, in precision
if df.fieldtype in (“Currency”, “Float”, “Percent”):
AttributeError: ‘NoneType’ object has no attribute ‘fieldtype’

Do you Know how to solve this