From da70b69d68ccff4cc2b4d5e863971d46af5e1598 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Mon, 20 Jun 2022 22:00:32 +0530 Subject: [PATCH] test: Add test case (cherry picked from commit 8f373930448af79e7222eb78eb7d8c364a4b7fd0) --- .../doctype/sales_invoice/test_sales_invoice.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 068d1ffd89d..16210e78bdd 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -1612,6 +1612,17 @@ class TestSalesInvoice(unittest.TestCase): self.assertTrue(gle) + def test_invoice_exchange_rate(self): + si = create_sales_invoice( + customer="_Test Customer USD", + debit_to="_Test Receivable USD - _TC", + currency="USD", + conversion_rate=1, + do_not_save=1, + ) + + self.assertRaises(frappe.ValidationError, si.save) + def test_invalid_currency(self): # Customer currency = USD