def update_fee_validity(self): if not frappe.db.get_single_value('Healthcare Settings', 'enable_free_follow_ups'): return fee_validity = manage_fee_validity(self) if fee_validity: frappe.msgprint( _('{0}: {1} has fee validity till {2}').format( self.patient, frappe.bold(self.patient_name), fee_validity.valid_till))
def cancel_appointment(appointment_id): appointment = frappe.get_doc('Patient Appointment', appointment_id) if appointment.invoiced: sales_invoice = check_sales_invoice_exists(appointment) if sales_invoice and cancel_sales_invoice(sales_invoice): msg = _('Appointment {0} and Sales Invoice {1} cancelled').format(appointment.name, sales_invoice.name) else: msg = _('Appointment Cancelled. Please review and cancel the invoice {0}').format(sales_invoice.name) else: fee_validity = manage_fee_validity(appointment) msg = _('Appointment Cancelled.') if fee_validity: msg += _('Fee Validity {0} updated.').format(fee_validity.name) frappe.msgprint(msg)
def update_fee_validity(self): fee_validity = manage_fee_validity(self) if fee_validity: frappe.msgprint(_('{0} has fee validity till {1}').format(self.patient, fee_validity.valid_till))