public String receiptToHtml(Receipt receipt) { StringBuffer receiptBuffer = new StringBuffer(); for (TaxedItem taxedItem : receipt.getTaxedItems()) { receiptBuffer.append(taxService.taxedItemToString(taxedItem)).append("<br>"); } receiptBuffer .append("Sales Taxes: ") .append(receipt.getTaxesTotal()) .append("<br>Total: " + receipt.getReceiptTotal() + "<br>"); return receiptBuffer.toString(); }
public void addBasketItemToReceipt(Receipt receipt, BasketItem basketItem) { addTaxedItemToReceipt(receipt, taxService.buildTaxedItem(basketItem)); }
public Receipt buildReceiptFromBasket(List<BasketItem> basketItems) { return buildReceiptFromTaxedBasket(taxService.buildTaxedBasket(basketItems)); }