When i create a sale invoice, it does not calculation total quantity and total INR, therefore it does not calculate Grand Total and other fields too. But the gets calculated when i click on Save button
Installed Apps
ERPNext: v15.27.0 (version-15)
Frappe Framework: v15.29.1 (version-15)
Frappe HR: v15.22.0 (version-15)
India Compliance: v15.7.5 (version-15)
Microsoft Integration: v0.0.1 (main)
NCP
June 5, 2024, 10:36am
6
I raised the PR, so please check it.
frappe:develop ← Nihantra-Patel:update_totals_taxes_15
opened 10:30AM - 05 Jun 24 UTC
version 15
fixes: #41779 and https://discuss.frappe.io/t/total-auto-calculati… on-not-working-on-screen-it-works-while-saving/124758?u=ncp
**Before:**
https://github.com/frappe/erpnext/pull/41591 I know the `refresh_fields` method slows down the entry, but the totals and taxes are not calculated when the quantity and rate are changed.
https://github.com/frappe/erpnext/assets/141945075/1c0417ba-58d5-47c4-8a44-8f275f47b9d7
**After:**
https://github.com/frappe/erpnext/assets/141945075/e78c88f8-a053-4bdb-9f87-ca65b2cf72bc
If the PR is merged, the problem will be solved.
1 Like
do i need to update the erpnext? i see you gave me some java file, where to add i need to add
NCP
June 5, 2024, 11:09am
8
Open the PR and check the changes of the code.
PR means purchase request?
NCP
June 5, 2024, 11:13am
10
Pull Request, that i provide in the above post.
frappe:develop ← Nihantra-Patel:update_totals_taxes_15
opened 10:30AM - 05 Jun 24 UTC
version 15
fixes: #41779 and https://discuss.frappe.io/t/total-auto-calculati… on-not-working-on-screen-it-works-while-saving/124758?u=ncp
**Before:**
https://github.com/frappe/erpnext/pull/41591 I know the `refresh_fields` method slows down the entry, but the totals and taxes are not calculated when the quantity and rate are changed.
https://github.com/frappe/erpnext/assets/141945075/1c0417ba-58d5-47c4-8a44-8f275f47b9d7
**After:**
https://github.com/frappe/erpnext/assets/141945075/e78c88f8-a053-4bdb-9f87-ca65b2cf72bc
i think i am missing some procedure, actually i am new to this. when i try PR-41793, i get below error fatal: couldn’t find remote ref pr-41793
ERROR: git pull upstream pr-41793
NCP
June 5, 2024, 1:05pm
12
You need to update only two lines in the taxes_and_totals.js file.
The line
this.frm.refresh_field("taxes");
appears twice in the file. You need to replace both instances with
this.frm.refresh_fields();
NCP
June 10, 2024, 10:02am
14
PR is merged, and the upcoming v15 update will resolve your issue without any customization or override.