g.drawString("No.",10,20);
g.drawString(String.valueOf(id),25,20);
int x=5,y=35;
mySQL = "SELECT posId, name, quantity, price FROM product_pos a JOIN pos b on a.posId=b.id JOIN product c on c.code=a.productCode WHERE posId = '" + id + "'";
rs = db.execSQL(mySQL);
while (rs.next()) {
name = (rs.getString("name"));
qty = (rs.getInt("quantity"));
subtotal = qty * (rs.getDouble("price"));
total = total + subtotal;