Codacy - fixes
This commit is contained in:
parent
25dda3a91a
commit
b19993b5bc
@ -16,7 +16,7 @@ class ClinicalProcedure(Document):
|
|||||||
def validate(self):
|
def validate(self):
|
||||||
if self.consume_stock and not self.status == 'Draft':
|
if self.consume_stock and not self.status == 'Draft':
|
||||||
if not self.warehouse:
|
if not self.warehouse:
|
||||||
frappe.throw(("Set warehouse for Procedure {0} ").format(self.name))
|
frappe.throw(_("Set warehouse for Procedure {0} ").format(self.name))
|
||||||
self.set_actual_qty()
|
self.set_actual_qty()
|
||||||
|
|
||||||
if self.items:
|
if self.items:
|
||||||
|
@ -115,13 +115,13 @@ def validate_invoiced_inpatient(inpatient_record):
|
|||||||
for doc in docs:
|
for doc in docs:
|
||||||
doc_name_list = get_inpatient_docs_not_invoiced(doc, inpatient_record)
|
doc_name_list = get_inpatient_docs_not_invoiced(doc, inpatient_record)
|
||||||
if doc_name_list:
|
if doc_name_list:
|
||||||
pending_invoices = get_doc_pendig(doc, doc_name_list, pending_invoices)
|
pending_invoices = get_pending_doc(doc, doc_name_list, pending_invoices)
|
||||||
|
|
||||||
if pending_invoices:
|
if pending_invoices:
|
||||||
frappe.throw(_("Can not mark Inpatient Record Discharged, there are Unpaid Invoices {0}").format(", "
|
frappe.throw(_("Can not mark Inpatient Record Discharged, there are Unbilled Invoices {0}").format(", "
|
||||||
.join(map(lambda x: """ <b>{0}</b>""".format(x), pending_invoices))))
|
.join(pending_invoices)))
|
||||||
|
|
||||||
def get_doc_pendig(doc, doc_name_list, pending_invoices):
|
def get_pending_doc(doc, doc_name_list, pending_invoices):
|
||||||
if doc_name_list:
|
if doc_name_list:
|
||||||
doc_ids = False
|
doc_ids = False
|
||||||
for doc_name in doc_name_list:
|
for doc_name in doc_name_list:
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.utils import getdate, cstr
|
from frappe.utils import cstr
|
||||||
import json
|
|
||||||
|
|
||||||
class PatientEncounter(Document):
|
class PatientEncounter(Document):
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user