(a) A pharmacist commits an offense if the pharmacist:
(1) delivers a dangerous drug under a prescription; and
(2) fails to retain the prescription as required by Section 483.023.
(b) An offense under this section is a Class B misdemeanor unless it is shown on the trial of the defendant that the defendant has previously been convicted of an offense under this chapter, in which event the offense is a Class A misdemeanor.