{@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. !}
{#if invoice.sellerLegalName}{invoice.sellerLegalName}{#else}{tenant.brand.name}{/if}
{#if tenant.brand.address}| # | Item | Qty | Rate | Discount | {#if !order.taxOff}Tax | {/if}Amount |
|---|---|---|---|---|---|---|
| {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 !order.taxOff}{#if item.invoiceTax && item.invoiceTax.isPositive}{item.invoiceTax.plainAmount}{/if} | {/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} | {#if !order.taxOff} | {/if} | {card.formattedAmount} |
| 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) | |