mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
test: test to validate rounded total
This commit is contained in:
@@ -738,6 +738,20 @@ class TestQuotation(IntegrationTestCase):
|
|||||||
item_doc.taxes = []
|
item_doc.taxes = []
|
||||||
item_doc.save()
|
item_doc.save()
|
||||||
|
|
||||||
|
def test_grand_total_and_rounded_total_values(self):
|
||||||
|
quotation = make_quotation(qty=6, rate=12.3, do_not_submit=1)
|
||||||
|
|
||||||
|
self.assertEqual(quotation.grand_total, 73.8)
|
||||||
|
self.assertEqual(quotation.rounding_adjustment, 0.2)
|
||||||
|
self.assertEqual(quotation.rounded_total, 74)
|
||||||
|
|
||||||
|
quotation.disable_rounded_total = 1
|
||||||
|
quotation.save()
|
||||||
|
|
||||||
|
self.assertEqual(quotation.grand_total, 73.8)
|
||||||
|
self.assertEqual(quotation.rounding_adjustment, 0)
|
||||||
|
self.assertEqual(quotation.rounded_total, 0)
|
||||||
|
|
||||||
|
|
||||||
def enable_calculate_bundle_price(enable=1):
|
def enable_calculate_bundle_price(enable=1):
|
||||||
selling_settings = frappe.get_doc("Selling Settings")
|
selling_settings = frappe.get_doc("Selling Settings")
|
||||||
|
|||||||
Reference in New Issue
Block a user