mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-10 07:51:20 +01:00
change import
This commit is contained in:
parent
ed6052ba1b
commit
e895693c66
1 changed files with 8 additions and 2 deletions
|
@ -1,17 +1,20 @@
|
||||||
package net.foucry.pilldroid;
|
package net.foucry.pilldroid;
|
||||||
|
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.lang.String;
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
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.
|
* Created by jacques on 26/11/15.
|
||||||
*/
|
*/
|
||||||
public class Drug implements Serializable {
|
public class Drug implements Serializable {
|
||||||
|
|
||||||
|
private static final String TAG = Drug.class.getName();
|
||||||
/* part read form database */
|
/* part read form database */
|
||||||
private int id;
|
private int id;
|
||||||
private String nama;
|
private String nama;
|
||||||
|
@ -161,7 +164,10 @@ public class Drug implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
void newStock() {
|
void newStock() {
|
||||||
|
Log.d(TAG, "current drug = " + this.toString());
|
||||||
|
|
||||||
Date lastUpdate = new Date(getDateLastUpdate());
|
Date lastUpdate = new Date(getDateLastUpdate());
|
||||||
|
|
||||||
int numberOfDays = nbOfDaysBetweenDateAndToday(lastUpdate);
|
int numberOfDays = nbOfDaysBetweenDateAndToday(lastUpdate);
|
||||||
if (numberOfDays > 0) {
|
if (numberOfDays > 0) {
|
||||||
double takeDuringPeriod = this.take * numberOfDays;
|
double takeDuringPeriod = this.take * numberOfDays;
|
||||||
|
|
Loading…
Reference in a new issue