{@com.eszes.saas.app.be.bms.ecom.model.entity.Order order} {@com.eszes.saas.app.be.bms.ecom.service.invoice.InvoiceView invoice} {! A4 invoice. OrderResource GET /order/{id}/invoice-html renders it; the admin FE prints it from a hidden iframe. Same rules as orderRecord.html: - Qute treats { as literal only when the next char is whitespace; every CSS brace below is followed by a newline. - A null amount hides its whole row; never print a fabricated 0.00. tenant is the branding Map; invoice carries the customer, the resolved Bill to / Ship to (order address, else the customer's default) and the seller's legal name + tax id (blank = hidden). Rate is the catalogue price (originalUnitPrice) on a discounted POS line, otherwise the charged unit price; the Discount cell is item.invoiceDiscount (Rate x Qty - Amount), so the row adds up even when the catalogue price had more than 2 decimals and the stored discount is a penny off that. !} Invoice #{order.orderNumber}
{#if tenant.brand.logo}{/if}

{#if invoice.sellerLegalName}{invoice.sellerLegalName}{#else}{tenant.brand.name}{/if}

{#if tenant.brand.address}
{tenant.brand.address}
{/if} {#if tenant.brand.phone}
Phone: {tenant.brand.phone}
{/if} {#if tenant.brand.email}
Email: {tenant.brand.email}
{/if} {#if invoice.taxId && !order.taxOff}
{invoice.taxIdLabel}: {invoice.taxId}
{/if}

INVOICE

Invoice No: {order.orderNumber}
{#if order.createdDateTime}
Date: {order.createdDateTime.formattedDateIn(tenant.timezone)}
{/if} {#if order.serviceModeText}
{order.serviceModeText}
{/if}
Bill to
{#if invoice.customer.name}
{invoice.customer.name}
{/if} {#if invoice.billTo} {#if invoice.billTo.line1}
{invoice.billTo.line1}
{/if} {#if invoice.billTo.line2}
{invoice.billTo.line2}
{/if}
{#if invoice.billTo.city}{invoice.billTo.city}{#if invoice.billTo.stateName}, {/if}{/if}{#if invoice.billTo.stateName}{invoice.billTo.stateName}{/if}{#if invoice.billTo.postalCode} {invoice.billTo.postalCode}{/if}
{#if invoice.billTo.countryName}
{invoice.billTo.countryName}
{/if} {/if} {#if invoice.customer.email}
{invoice.customer.email}
{/if} {#if invoice.customer.phone}
{invoice.customer.phone}
{/if} {#if order.hasAccountPrices}
Account prices applied
{/if}
{#if invoice.shipTo}
Ship to
{#if invoice.shipTo.recipientName}
{invoice.shipTo.recipientName}
{/if} {#if invoice.shipTo.line1}
{invoice.shipTo.line1}
{/if} {#if invoice.shipTo.line2}
{invoice.shipTo.line2}
{/if}
{#if invoice.shipTo.city}{invoice.shipTo.city}{#if invoice.shipTo.stateName}, {/if}{/if}{#if invoice.shipTo.stateName}{invoice.shipTo.stateName}{/if}{#if invoice.shipTo.postalCode} {invoice.shipTo.postalCode}{/if}
{#if invoice.shipTo.countryName}
{invoice.shipTo.countryName}
{/if} {#if invoice.shipTo.phone}
{invoice.shipTo.phone}
{/if}
{/if}
Payment
{#if order.paymentMethod}
{order.paymentMethod}
{/if} {#if order.paymentStatus}
{order.paymentStatus}
{/if}
{#if !order.taxOff}{/if} {#for item in order.orderProducts} {#if !order.taxOff}{/if} {/for} {#if order.giftCardLinesDetail} {#for card in order.giftCardLinesDetail} {#if !order.taxOff}{/if} {/for} {/if}
# Item Qty Rate DiscountTaxAmount
{item_count} {#if item.productName}{item.productName}{#else}Product #{item.productId}{/if} {#if item.variationId}
{#if item.variationName}{item.variationName}{#else}Variation #{item.variationId}{/if}
{/if} {#for m in item.modifierNames}
+ {m}
{/for}
{item.quantity} {#if item.discount && item.discount.isPositive && item.originalUnitPrice}{item.originalUnitPrice.plainAmount}{#else}{#if item.unitPrice}{item.unitPrice.plainAmount}{/if}{/if} {#if item.invoiceLineDiscount && item.invoiceLineDiscount.isPositive}{item.invoiceLineDiscount.plainAmount}{/if}{#if item.invoiceTax && item.invoiceTax.isPositive}{item.invoiceTax.plainAmount}{/if}{#if item.invoiceAmount}{item.invoiceAmount.plainAmount}{#else}{#if item.unitPrice}{item.unitPrice.plainAmount}{/if}{/if}
{#if card.walletTopUp}Wallet top-up{#else}Gift card{#if card.codeSuffix} ••••{card.codeSuffix}{/if} ({card.opLabel}){/if} {#if card.recipientEmailMasked}
For {card.recipientEmailMasked}
{/if}
1 {card.formattedAmount} {card.formattedAmount}
{#if order.amount && order.hasGoods}{/if} {#if order.shippingTotal && order.shippingTotal.isPositive}{/if} {#if order.couponTotalDiscount && order.couponTotalDiscount.isPositive}{/if} {#if order.taxTotal && order.taxTotal.isPositive && !order.taxOff}{#if order.gstDocument}{/if}{/if} {#if order.giftCardLinesDetail}{/if} {#if order.total}{/if} {#if order.hasPromotions}{#for p in order.promotionRows}{#if p.code}{/if}{/for}{/if} {#if order.hasTicketDiscount}{/if} {#if order.hasPointsDiscount}{/if}
Subtotal{order.amount.symbolFormatted}
Shipping{order.shippingTotal.symbolFormatted}
Discount− {order.couponTotalDiscount.symbolFormatted}
Tax{order.taxTotal.symbolFormatted}
CGST{order.cgstTotal.symbolFormatted}
SGST{order.sgstTotal.symbolFormatted}
{order.giftCardTotalLabel}{order.giftCardTotalFormatted}
Total{order.total.symbolFormatted}
Promotion {p.name} − {p.saving.symbolFormatted}
Code {p.code}
You saved {order.youSavedFormatted}
Includes ticket discount {order.ticketDiscountText}
Includes points discount {order.pointsDiscountFormatted} ({order.pointsRedeemed} points)