Small changes

This commit is contained in:
jacques 2023-07-24 11:03:18 +02:00
parent 034d712ab8
commit 3a35ccbee5
3 changed files with 6 additions and 20 deletions

View file

@ -353,9 +353,9 @@ public class DrugListActivity extends AppCompatActivity {
TextView title = dlg.findViewById(R.id.textView);
TextView prompt = dlg.findViewById(R.id.startcip13);
EditText editText = dlg.findViewById(R.id.edittext);
Button ok = (Button)dlg.findViewById(R.id.agreed);
Button notok = (Button)dlg.findViewById(R.id.notagreed);
ImageView icon = (ImageView)dlg.findViewById(R.id.head_icon);
Button ok = dlg.findViewById(R.id.agreed);
Button notok = dlg.findViewById(R.id.notagreed);
ImageView icon = dlg.findViewById(R.id.head_icon);
title.setText(R.string.enter_cip_13);
prompt.setText(R.string.enter_cip_13_here);
ok.setEnabled(false);
@ -413,7 +413,7 @@ public class DrugListActivity extends AppCompatActivity {
TextView cpl = dlg.findViewById(R.id.cpl);
String cplString;
ImageView icon = dlg.findViewById(R.id.image);
Button btn = (Button)dlg.findViewById(R.id.txtClose);
Button btn = dlg.findViewById(R.id.txtClose);
dlg.show();
if (aMedicine != null) {
@ -464,20 +464,6 @@ public class DrugListActivity extends AppCompatActivity {
dlg.show();
}
/**
* askForComprehensive
*/
private void askForComprehensive() {
AlertDialog.Builder dlg = new AlertDialog.Builder(this);
dlg.setTitle(getString(R.string.app_name));
dlg.setMessage(R.string.understood);
dlg.setPositiveButton(R.string.Yes, (dialog, which) -> {
// Nothing to do just dismiss dialog
});
dlg.show();
}
/**
* Add New drug to the user database

View file

@ -146,7 +146,7 @@ public class WelcomeActivity extends AppCompatActivity {
TextView cpl = dlg.findViewById(R.id.cpl);
String cplString = "";
ImageView icon = dlg.findViewById(R.id.image);
Button btn = (Button)dlg.findViewById(R.id.txtClose);
Button btn = dlg.findViewById(R.id.txtClose);
dlg.show();
msgString = getString(R.string.understood);

View file

@ -169,7 +169,7 @@ public class Prescription implements Serializable {
double takeDuringPeriod = this.take * numberOfDays;
currentStock = getStock();
newStock = (float) (currentStock - takeDuringPeriod);
setStock((float) newStock);
setStock(newStock);
setLast_update(new Date().getTime());
}
}