mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 19:19:17 +00:00
test: add unit test to validate account type and party type
This commit is contained in:
@@ -123,3 +123,20 @@ class TestGLEntry(IntegrationTestCase):
|
|||||||
str(e),
|
str(e),
|
||||||
"Party Type and Party can only be set for Receivable / Payable account_Test Account Cost for Goods Sold - _TC",
|
"Party Type and Party can only be set for Receivable / Payable account_Test Account Cost for Goods Sold - _TC",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_validate_account_party_type_shareholder(self):
|
||||||
|
jv = make_journal_entry(
|
||||||
|
"Opening Balance Equity - _TC",
|
||||||
|
"Cash - _TC",
|
||||||
|
100,
|
||||||
|
"_Test Cost Center - _TC",
|
||||||
|
save=False,
|
||||||
|
submit=False,
|
||||||
|
)
|
||||||
|
|
||||||
|
for row in jv.accounts:
|
||||||
|
row.party_type = "Shareholder"
|
||||||
|
break
|
||||||
|
|
||||||
|
jv.save().submit()
|
||||||
|
self.assertEqual(1, jv.docstatus)
|
||||||
|
|||||||
Reference in New Issue
Block a user