mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 20:59:11 +00:00
* refactor: Clean up mutable defaults and add CI check
(cherry picked from commit 772d4753e7)
Co-authored-by: Chillar Anand <chillar@avilpage.com>
This commit is contained in:
@@ -62,7 +62,9 @@ class InpatientRecord(Document):
|
||||
admit_patient(self, service_unit, check_in, expected_discharge)
|
||||
|
||||
@frappe.whitelist()
|
||||
def discharge(self, check_out=now_datetime()):
|
||||
def discharge(self, check_out=None):
|
||||
if not check_out:
|
||||
check_out = now_datetime()
|
||||
if (getdate(check_out) < getdate(self.admitted_datetime)):
|
||||
frappe.throw(_('Discharge date cannot be less than Admission date'))
|
||||
discharge_patient(self, check_out)
|
||||
|
||||
@@ -611,7 +611,7 @@ def render_docs_as_html(docs):
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
def render_doc_as_html(doctype, docname, exclude_fields = []):
|
||||
def render_doc_as_html(doctype, docname, exclude_fields = None):
|
||||
"""
|
||||
Render document as HTML
|
||||
"""
|
||||
@@ -622,6 +622,9 @@ def render_doc_as_html(doctype, docname, exclude_fields = []):
|
||||
sec_on = has_data = False
|
||||
col_on = 0
|
||||
|
||||
if exclude_fields is None:
|
||||
exclude_fields = []
|
||||
|
||||
for df in meta.fields:
|
||||
# on section break append previous section and html to doc html
|
||||
if df.fieldtype == "Section Break":
|
||||
|
||||
Reference in New Issue
Block a user