fix: Missing commits from hotfix branch (#17997)

* fix: merge conflict

* fix: restored missing set_gst_state_and_state_number function

* fix: style linting as per codacy

* fix: Fixes related to customer/lead merging

* fix: merge conflict

* fix: Fixes related to customer/lead merging

* fix: Assign isue/opportunity to user

* fix: Assign isue/opportunity to user

* fix: Replaced Invoice type by GST Category

* fix: merge conflict

* fix: merge conflict

* fix: test cases

* fix: test cases
This commit is contained in:
Nabin Hait
2019-07-03 10:34:31 +05:30
committed by GitHub
parent 7763d0a059
commit 34c551d9a5
194 changed files with 34197 additions and 21884 deletions

View File

@@ -123,13 +123,13 @@ var btn_invoice_registration = function (frm) {
frappe.ui.form.on('Patient Relation', {
patient_relation_add: function(frm){
frm.fields_dict['patient_relation'].grid.get_field('patient').get_query = function(frm){
frm.fields_dict['patient_relation'].grid.get_field('patient').get_query = function(doc){
var patient_list = [];
if(!frm.doc.__islocal) patient_list.push(frm.doc.name);
$.each(frm.doc.patient_relation, function(idx, val){
if(!doc.__islocal) patient_list.push(doc.name);
$.each(doc.patient_relation, function(idx, val){
if (val.patient) patient_list.push(val.patient);
});
return { filters: [['Patient', 'name', 'not in', patient_list]] };
};
}
});
});

View File

@@ -82,7 +82,7 @@ def get_healthcare_services_to_invoice(patient):
'service': service_item, 'rate': practitioner_charge,
'income_account': income_account})
lab_tests = frappe.get_list("Lab Test", {'patient': patient.name, 'invoiced': False})
lab_tests = frappe.get_list("Lab Test", {'patient': patient.name, 'invoiced': False, 'docstatus': 1})
if lab_tests:
for lab_test in lab_tests:
lab_test_obj = frappe.get_doc("Lab Test", lab_test['name'])