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