public static List<Receipt> formatOutputs(JSONArray results) {
		final List<Receipt> ret = new ArrayList<Receipt>();

		for (int i = 0; i < results.length(); i++) {
			JSONObject r = null;
			if (results.get(i) instanceof JSONObject)
				r = (JSONObject) results.get(i);
			if (r != null) {
				final Receipt receipt = new Receipt();
				receipt.setUuid(r.get("uuid").toString());
				receipt.setCashier(r.get("cashier").toString());
				// receipt.setCreateTime(toBool(result.get("createTime")));
				if (r.has("currency"))
					receipt.setCurrency(r.get("currency").toString());
				if (r.has("customer"))
					receipt.setCustomer(r.get("customer").toString());
				receipt.setDeleted(toBool(r.get("deleted")).booleanValue());
				// receipt.setFinishTime(result.get("finishTime").toString());
				// receipt.setGrossTotalAmount(result.get("grossTotalAmount").toString());
				// receipt.setNetTotalAmount(result.get("netTotalAmount").toString());
				receipt.setNumber(r.get("number").toString());
				// receipt.setTaxAmount(result.get("taxAmount").toString());
				if (r.has("priceGroup"))
				receipt.setPriceGroup(r.get("priceGroup").toString());
				ret.add(receipt);
			}
		}
		return ret;
	}