if(paymentType.getSelectedItem().equals("Cash")){
mySQL = "INSERT INTO pos_transaction(paymentType, totalPayment, totalReturn, create_date) VALUES('" + paymentType.getSelectedItem() + "'," + pay + "," + payReturn + ",'" + date + "')";
db.execute(mySQL);
}else{
mySQL = "INSERT INTO pos_transaction(paymentType, name, creditCardNo, create_date) VALUES('" + paymentType.getSelectedItem() + "','" + txtName.getText() + "','" + txtNumber.getText() + "','" + date + "')";
db.execute(mySQL);
}
int id = 0;
mySQL = "SELECT MAX(id) from pos";
ResultSet rs = db.execSQL(mySQL);