Add loop for calling newStock for each prescription

This commit is contained in:
jacques 2022-06-27 15:55:55 +02:00
parent d0a5bfb74e
commit 95fc6b382c

View file

@ -48,6 +48,12 @@ public class AlarmReceiver extends BroadcastReceiver {
PrescriptionsDAO prescriptionsDAO = prescriptions.getPrescriptionsDAO();
List<Prescription> prescriptionList = prescriptionsDAO.getAllMedics();
Prescription currentPrescription;
for (int i=0; i < prescriptionList.size(); i++) {
currentPrescription = prescriptionList.get(i);
currentPrescription.newStock();
}
prescriptionList = Utils.sortPrescriptionList(prescriptionList);
Prescription firstPrescription = null ;