mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-22 04:29:22 +01:00
fix typo
This commit is contained in:
parent
7d3cdee933
commit
4486b45bd9
1 changed files with 5 additions and 4 deletions
|
@ -151,7 +151,7 @@ class DBHelper extends SQLiteOpenHelper {
|
|||
drug.setId(Integer.parseInt(cursor.getString(0)));
|
||||
drug.setCis(cursor.getString(1));
|
||||
drug.setCip13(cursor.getString(2));
|
||||
drug.setNama(cursor.getString(3));
|
||||
drug.setName(cursor.getString(3));
|
||||
drug.setAdministration_mode(cursor.getString(4));
|
||||
drug.setPresentation(cursor.getString(5));
|
||||
drug.setStock(Double.parseDouble(cursor.getString(6)));
|
||||
|
@ -199,7 +199,7 @@ class DBHelper extends SQLiteOpenHelper {
|
|||
drug.setId(Integer.parseInt(cursor.getString(0)));
|
||||
drug.setCis(cursor.getString(1));
|
||||
drug.setCip13(cursor.getString(2));
|
||||
drug.setNama(cursor.getString(3));
|
||||
drug.setName(cursor.getString(3));
|
||||
drug.setAdministration_mode(cursor.getString(4));
|
||||
drug.setPresentation(cursor.getString(5));
|
||||
drug.setStock(Double.parseDouble(cursor.getString(6)));
|
||||
|
@ -241,7 +241,7 @@ class DBHelper extends SQLiteOpenHelper {
|
|||
drug.setId(Integer.parseInt(cursor.getString(0)));
|
||||
drug.setCis(cursor.getString(1));
|
||||
drug.setCip13(cursor.getString(2));
|
||||
drug.setNama(cursor.getString(3));
|
||||
drug.setName(cursor.getString(3));
|
||||
drug.setAdministration_mode(cursor.getString(4));
|
||||
drug.setPresentation(cursor.getString(5));
|
||||
drug.setStock(Double.parseDouble(cursor.getString(6)));
|
||||
|
@ -291,13 +291,14 @@ class DBHelper extends SQLiteOpenHelper {
|
|||
Log.d(TAG, "After sort " + drugs.toString());
|
||||
|
||||
// Move drug with prise = 0 at the end of the list
|
||||
// todo: If some drug moved, must redo all the loop
|
||||
for (int position = 0 ; position < getCount() ; position++ ) {
|
||||
currentDrug = getItem(position);
|
||||
double currentTake = currentDrug.getTake();
|
||||
if (currentTake == 0)
|
||||
{
|
||||
drug = drugs.remove(position);
|
||||
drugs.add(drugs.size(), drug);
|
||||
drugs.add(drug);
|
||||
}
|
||||
}
|
||||
return drugs;
|
||||
|
|
Loading…
Reference in a new issue