Merge branch 'staging-fixes' into pr_staging_fixes

This commit is contained in:
Nabin Hait
2018-11-26 20:25:34 +05:30
committed by GitHub
27 changed files with 1210 additions and 1220 deletions

View File

@@ -120,3 +120,16 @@ 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){
var patient_list = [];
if(!frm.doc.__islocal) patient_list.push(frm.doc.name);
$.each(frm.doc.patient_relation, function(idx, val){
if (val.patient) patient_list.push(val.patient);
});
return { filters: [['Patient', 'name', 'not in', patient_list]] };
};
}
});