mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
fix: not able to create invoice against patient (#18858)
This commit is contained in:
committed by
Nabin Hait
parent
f1fab871b8
commit
7496548c39
@@ -6,7 +6,7 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.utils import cint, cstr, getdate
|
from frappe.utils import cint, cstr, getdate, flt
|
||||||
import dateutil
|
import dateutil
|
||||||
from frappe.model.naming import set_name_by_naming_series
|
from frappe.model.naming import set_name_by_naming_series
|
||||||
from erpnext.healthcare.doctype.healthcare_settings.healthcare_settings import get_receivable_account,get_income_account,send_registration_sms
|
from erpnext.healthcare.doctype.healthcare_settings.healthcare_settings import get_receivable_account,get_income_account,send_registration_sms
|
||||||
@@ -64,7 +64,7 @@ class Patient(Document):
|
|||||||
def invoice_patient_registration(self):
|
def invoice_patient_registration(self):
|
||||||
frappe.db.set_value("Patient", self.name, "disabled", 0)
|
frappe.db.set_value("Patient", self.name, "disabled", 0)
|
||||||
send_registration_sms(self)
|
send_registration_sms(self)
|
||||||
if(frappe.get_value("Healthcare Settings", None, "registration_fee")>0):
|
if(flt(frappe.get_value("Healthcare Settings", None, "registration_fee"))>0):
|
||||||
company = frappe.defaults.get_user_default('company')
|
company = frappe.defaults.get_user_default('company')
|
||||||
if not company:
|
if not company:
|
||||||
company = frappe.db.get_value("Global Defaults", None, "default_company")
|
company = frappe.db.get_value("Global Defaults", None, "default_company")
|
||||||
|
|||||||
Reference in New Issue
Block a user