In the Summary and Problems tabs of Patients - Medical Records and the Visit editor - Summary, allow medication quantities to be edited that update the corresponding invoice.
This will apply to medications linked to invoices that are not finalised. If they are finalised, the quantity will be read-only. Changing the quantity will send out a pharmacy order, if one is required.
In the Visit editor, the change will need to be reflected in the Invoice tab, to avoid subsequent rollback.
Medications not linked to invoices will display a warning on edit, as per