insertItems.setObject(3, item.getPurchasableId()); insertItems.setString(4, item.getType()); insertItems.setString(5, item.getTitle()); insertItems.setLong(6, item.getQuantity()); insertItems.setBigDecimal(7, item.getUnitPrice());
for (OrderItem item : items) { Map<String, Object> orderItem = Maps.newHashMap(); orderItem.put("title", item.getTitle()); orderItem.put("quantity", item.getQuantity());
itemData.put("itemTotal", formatter.withLocale(locale) .print(Money.of(currencyUnit, item.getItemTotal(), RoundingMode.HALF_EVEN))); itemData.put("title", item.getTitle()); itemData.put("quantity", item.getQuantity()); itemData.put("vatRate", item.getVatRate().longValue());