Pharmacy Dispense Pop-up Submit button fails to load on a certain criteria (Please refer to attachment)

It fails to when a yellow coloured status indicated medicine is present in the pop-up and submit button is clicked and then cancelling the dialogue box appearing above