From e895693c661635665610a13d309e610da42cb248 Mon Sep 17 00:00:00 2001 From: jacques Date: Fri, 18 Jun 2021 20:10:36 +0200 Subject: [PATCH] change import --- app/src/main/java/net/foucry/pilldroid/Drug.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/net/foucry/pilldroid/Drug.java b/app/src/main/java/net/foucry/pilldroid/Drug.java index b23ecce..e4fcc41 100644 --- a/app/src/main/java/net/foucry/pilldroid/Drug.java +++ b/app/src/main/java/net/foucry/pilldroid/Drug.java @@ -1,17 +1,20 @@ package net.foucry.pilldroid; +import android.util.Log; + import java.io.Serializable; -import java.lang.String; import java.util.Calendar; import java.util.Date; -import static net.foucry.pilldroid.UtilDate.*; +import static net.foucry.pilldroid.UtilDate.dateAtNoon; +import static net.foucry.pilldroid.UtilDate.nbOfDaysBetweenDateAndToday; /** * Created by jacques on 26/11/15. */ public class Drug implements Serializable { + private static final String TAG = Drug.class.getName(); /* part read form database */ private int id; private String nama; @@ -161,7 +164,10 @@ public class Drug implements Serializable { } void newStock() { + Log.d(TAG, "current drug = " + this.toString()); + Date lastUpdate = new Date(getDateLastUpdate()); + int numberOfDays = nbOfDaysBetweenDateAndToday(lastUpdate); if (numberOfDays > 0) { double takeDuringPeriod = this.take * numberOfDays;