Commit 37bdf9c3 authored by jinny.wilkin's avatar jinny.wilkin

Submission pt3 - missed a bug

parent cb20825a
...@@ -537,6 +537,9 @@ public class DatabaseHelper extends SQLiteOpenHelper { ...@@ -537,6 +537,9 @@ public class DatabaseHelper extends SQLiteOpenHelper {
if (cursor.moveToFirst()) { if (cursor.moveToFirst()) {
ticketID = cursor.getInt(cursor.getColumnIndexOrThrow("TicketID")); ticketID = cursor.getInt(cursor.getColumnIndexOrThrow("TicketID"));
int count = cursor.getInt(cursor.getColumnIndexOrThrow("TypeAmount")); int count = cursor.getInt(cursor.getColumnIndexOrThrow("TypeAmount"));
if(intAmount <= 0){
return;
}
count = count - intAmount; count = count - intAmount;
ContentValues ttUpdate = new ContentValues(); ContentValues ttUpdate = new ContentValues();
ttUpdate.put("TypeAmount", String.valueOf(count)); ttUpdate.put("TypeAmount", String.valueOf(count));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment