Merge pull request #23168 from ruchamahabal/fix-appointment-overlap

fix: don't overwrite patient appointment duration if already specified
This commit is contained in:
rohitwaghchaure 2020-08-28 10:39:25 +05:30 committed by GitHub
commit 78a32f79df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,7 +226,9 @@ let check_and_set_availability = function(frm) {
primary_action_label: __('Book'),
primary_action: function() {
frm.set_value('appointment_time', selected_slot);
frm.set_value('duration', duration);
if (!frm.doc.duration) {
frm.set_value('duration', duration);
}
frm.set_value('practitioner', d.get_value('practitioner'));
frm.set_value('department', d.get_value('department'));
frm.set_value('appointment_date', d.get_value('appointment_date'));