mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 19:19:17 +00:00
Merge pull request #48671 from aerele/journal-entry-print-settings
revert: do not set pay_to_recd_from to None
This commit is contained in:
@@ -1145,9 +1145,7 @@ class JournalEntry(AccountsController):
|
|||||||
|
|
||||||
def set_print_format_fields(self):
|
def set_print_format_fields(self):
|
||||||
bank_amount = party_amount = total_amount = 0.0
|
bank_amount = party_amount = total_amount = 0.0
|
||||||
currency = (
|
currency = bank_account_currency = party_account_currency = pay_to_recd_from = None
|
||||||
bank_account_currency
|
|
||||||
) = party_account_currency = pay_to_recd_from = self.pay_to_recd_from = None
|
|
||||||
party_type = None
|
party_type = None
|
||||||
for d in self.get("accounts"):
|
for d in self.get("accounts"):
|
||||||
if d.party_type in ["Customer", "Supplier"] and d.party:
|
if d.party_type in ["Customer", "Supplier"] and d.party:
|
||||||
|
|||||||
@@ -579,6 +579,18 @@ class TestJournalEntry(IntegrationTestCase):
|
|||||||
]
|
]
|
||||||
self.assertEqual(expected, actual)
|
self.assertEqual(expected, actual)
|
||||||
|
|
||||||
|
def test_pay_to_recd_from(self):
|
||||||
|
jv = make_journal_entry("_Test Cash - _TC", "_Test Bank - _TC", 100, save=False)
|
||||||
|
jv.pay_to_recd_from = "_Test Receiver"
|
||||||
|
jv.save()
|
||||||
|
self.assertEqual(jv.pay_to_recd_from, "_Test Receiver")
|
||||||
|
|
||||||
|
jv.pay_to_recd_from = "_Test Receiver 2"
|
||||||
|
jv.save()
|
||||||
|
jv.submit()
|
||||||
|
|
||||||
|
self.assertEqual(jv.pay_to_recd_from, "_Test Receiver 2")
|
||||||
|
|
||||||
|
|
||||||
def make_journal_entry(
|
def make_journal_entry(
|
||||||
account1,
|
account1,
|
||||||
|
|||||||
Reference in New Issue
Block a user