change lastDateUpdate calculation
This commit is contained in:
jacques 2021-01-09 11:18:09 +01:00
parent 5088d912de
commit 26349ef644

View file

@ -54,7 +54,7 @@ public class MedicamentDetailActivity extends AppCompatActivity {
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Log.d(TAG, "Click on save icone");
Log.d(TAG, "Click on save icon");
getMedicamentChanges();
setResult(1);
@ -150,7 +150,8 @@ public class MedicamentDetailActivity extends AppCompatActivity {
newMedicament.setPrise(Double.parseDouble(priseValue));
newMedicament.setWarnThreshold(Integer.parseInt(warningValue));
newMedicament.setAlertThreshold(Integer.parseInt(alertValue));
newMedicament.setDateLastUpdate(UtilDate.dateAtNoon(new Date()).getTime());
// newMedicament.setDateLastUpdate(UtilDate.dateAtNoon(new Date()).getTime());
newMedicament.setDateLastUpdate(new Date().getTime());
newMedicament.setDateEndOfStock();
dbHelper.updateDrug(newMedicament);