mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-19 23:05:12 +00:00
fix: typo with po_date when creating remarks
(cherry picked from commit a55502e0f1)
This commit is contained in:
@@ -951,7 +951,7 @@ class SalesInvoice(SellingController):
|
|||||||
if self.po_no:
|
if self.po_no:
|
||||||
self.remarks = _("Against Customer Order {0}").format(self.po_no)
|
self.remarks = _("Against Customer Order {0}").format(self.po_no)
|
||||||
if self.po_date:
|
if self.po_date:
|
||||||
self.remarks += " " + _("dated {0}").format(formatdate(self.po_data))
|
self.remarks += " " + _("dated {0}").format(formatdate(self.po_date))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.remarks = _("No Remarks")
|
self.remarks = _("No Remarks")
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import frappe
|
|||||||
from frappe import qb
|
from frappe import qb
|
||||||
from frappe.model.dynamic_links import get_dynamic_link_map
|
from frappe.model.dynamic_links import get_dynamic_link_map
|
||||||
from frappe.tests.utils import FrappeTestCase, change_settings
|
from frappe.tests.utils import FrappeTestCase, change_settings
|
||||||
from frappe.utils import add_days, flt, getdate, nowdate, today
|
from frappe.utils import add_days, flt, format_date, getdate, nowdate, today
|
||||||
|
|
||||||
import erpnext
|
import erpnext
|
||||||
from erpnext.accounts.doctype.account.test_account import create_account, get_inventory_account
|
from erpnext.accounts.doctype.account.test_account import create_account, get_inventory_account
|
||||||
@@ -3997,6 +3997,14 @@ class TestSalesInvoice(FrappeTestCase):
|
|||||||
self.assertTrue(jv)
|
self.assertTrue(jv)
|
||||||
self.assertEqual(jv[0], si.grand_total)
|
self.assertEqual(jv[0], si.grand_total)
|
||||||
|
|
||||||
|
def test_invoice_remarks(self):
|
||||||
|
si = frappe.copy_doc(test_records[0])
|
||||||
|
si.po_no = "Test PO"
|
||||||
|
si.po_date = nowdate()
|
||||||
|
si.save()
|
||||||
|
si.submit()
|
||||||
|
self.assertEqual(si.remarks, f"Against Customer Order Test PO dated {format_date(nowdate())}")
|
||||||
|
|
||||||
|
|
||||||
def set_advance_flag(company, flag, default_account):
|
def set_advance_flag(company, flag, default_account):
|
||||||
frappe.db.set_value(
|
frappe.db.set_value(
|
||||||
|
|||||||
Reference in New Issue
Block a user