Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Invoice styles -->
- <style type="text/css">
- html,body {
- min-height:100%;
- margin:0;
- padding:0;
- }
- body {
- background-color:#fff;
- width:210mm;
- -moz-box-sizing:border-box;
- box-sizing:border-box;
- padding:20mm 10mm 15mm;
- }
- body > div {
- height:100%;
- }
- body p:empty {
- display:none;
- }
- body a {
- text-decoration:none;
- color:#000;
- }
- body table {
- border-collapse:collapse;
- border-spacing:0;
- }
- body .body {
- height:100%;
- width:170mm;
- margin:0 auto;
- }
- body .body td {
- vertical-align:top;
- height:0;
- font-family:Arial, Helvetica, "Sans Serif";
- font-size:8pt;
- line-height:10pt;
- color:#000;
- padding:0;
- }
- body .body td.footer {
- height:100%;
- text-align:center;
- vertical-align:bottom;
- }
- body .body td.footer div {
- border-bottom:1px solid #000;
- padding:10mm 0 5pt;
- }
- body .body .invoice td td {
- vertical-align:top;
- padding:0;
- }
- body .body .invoice p {
- margin:2pt 0;
- }
- body .body .invoice .store-info {
- width:100%;
- margin-bottom:16pt;
- }
- body .body .invoice .store-info .invoice-logo {
- max-height:25mm;
- max-width:100%;
- width:auto;
- display:block;
- margin:0 0 5mm;
- }
- body .body .invoice .store-info .store-title {
- font-size:10pt;
- line-height:12pt;
- font-weight:600;
- padding:5pt 0;
- }
- body .body .invoice .store-info .store-main-info {
- width:180mm;
- padding-right:5mm;
- }
- body .body .invoice .store-info .store-main-info .title-detached {
- margin-top:5pt;
- margin-bottom:5pt;
- }
- body .body .invoice .store-info .store-customer-info {
- vertical-align:top;
- }
- body .body .invoice .store-info .store-customer-info p {
- max-width:60mm;
- word-wrap:break-word;
- }
- body .body .invoice td.invoice-row,body .body .invoice .invoice-row > tr:first-child > td {
- border-top:1px solid #000;
- }
- body .body .invoice .order-comment {
- padding-bottom: 12pt;
- }
- body .body .invoice .order-info {
- margin-bottom:11pt;
- padding:0;
- }
- body .body .invoice .order-items {
- margin-bottom:16pt;
- padding:0;
- }
- body .body .invoice .order-info td,body .body .invoice .order-items td {
- width:14mm;
- padding-right:5mm;
- }
- body .body .invoice .order-info td:last-child,body .body .invoice .order-items td:last-child {
- width:auto;
- }
- body .body .invoice .order-info .title,body .body .invoice .order-items .title {
- font-weight:600;
- padding-top:5pt;
- padding-bottom:12pt;
- margin:0;
- }
- body .body .invoice .order-info td:last-child {
- padding-right:0;
- }
- body .body .invoice .order-info p {
- max-width:42mm;
- word-wrap:break-word;
- }
- body .body .invoice .order-info .order-comment p {
- max-width: 100%;
- word-break: break-all;
- white-space: pre-wrap;
- }
- body .body .invoice .order-comment-title {
- margin-bottom: 4pt;
- }
- body .body .invoice .order-items table tbody tr:last-child td {
- padding-bottom:3pt;
- }
- body .body .invoice .order-items .title {
- padding-bottom:5pt;
- }
- body .body .invoice .order-items .order-item-desc {
- width:150mm;
- }
- body .body .invoice .order-items .order-item-count {
- width:11mm;
- }
- body .body .invoice .order-items .order-item-count,body .body .invoice .order-items .order-item-total {
- text-align:right;
- padding-right:1mm;
- }
- body .body .invoice .order-items .order-item-total {
- padding-right:2mm;
- white-space: nowrap;
- }
- body .body .invoice .order-items .order-total td {
- padding-top:1pt;
- padding-bottom:1pt;
- }
- body .body .invoice,body .body .invoice .order-items table {
- width:100%;
- }
- body .body .invoice td,body .body .invoice .order-items table td {
- padding:0 1mm;
- }
- body .body .invoice .text-uppercase,body .body .invoice .order-info .title::first-letter,body .body .invoice .order-items .title::first-letter {
- text-transform:uppercase;
- }
- body .body .invoice .text-bold,body .body .invoice .order-items .order-item-title {
- font-weight:600;
- }
- body .body .invoice .store-info .store-main-info .url,body .body .invoice .order-info .title-detached,body .body .invoice .order-items .title-detached {
- margin-bottom:5pt;
- }
- body .body .invoice .store-info .store-main-info p,body .body .invoice .order-items .order-item-desc p {
- max-width:87mm;
- word-wrap:break-word;
- }
- body .body .invoice .order-items .order-item-desc .order-discount-coupon {
- max-width: 64mm;
- }
- body .body .invoice .order-items table tbody tr td,body .body .invoice .order-items .order-total tr:first-child td {
- padding-top:7pt;
- }
- @media print{
- * {
- -webkit-print-color-adjust:exact;
- }
- html,body {
- height:100%;
- }
- body {
- padding:0;
- }
- @page {
- margin:20mm 0 15mm;
- }
- }
- </style>
- <!-- Invoice body markup -->
- <table class="body">
- <tbody>
- <tr>
- <td>
- <table class="invoice">
- <tbody>
- <!-- Your company information -->
- <tr>
- <td>
- <table class="store-info">
- <thead>
- <!-- Invoice logo -->
- <#if store.invoiceLogoUrl?has_content>
- <tr>
- <td colspan="2">
- <img class="invoice-logo" src="${store.invoiceLogoUrl}" />
- </td>
- </tr>
- </#if>
- <tr>
- <td colspan="2" class="store-title">
- <!-- Store name -->
- <span>${store.name}</span>
- </td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <!-- Company information: store URL, tax ID, company name, address and contact information -->
- <td class="store-main-info">
- <p class="url"><@urlWithoutProtocol store.storeUrl/></p>
- <#if store.businessRegistrationID.value?has_content>
- <p class="title-detached">${store.businessRegistrationID.name}: ${store.businessRegistrationID.value}</p>
- </#if>
- <p>${store.companyName}</p>
- <p>${store.officeAddress.street}</p>
- <#if store.officeAddress.city?has_content>
- <p>${store.officeAddress.city}, ${store.officeAddress.stateCode} ${store.officeAddress.postalCode}</p>
- </#if>
- <p>${store.officeAddress.country}</p>
- </td>
- <td class="store-customer-info">
- <p><b>${textLabels.customerService}</b></p>
- <p>${store.officeAddress.phone}</p>
- <p>${store.companyEmail}</p>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <!-- Shipping and billing information -->
- <tr>
- <td class="invoice-row">
- <table class="order-info">
- <thead>
- <tr>
- <!-- Order date -->
- <td colspan="2" class="title">
- <span>${order.dateCreated}</span>
- </td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <!-- Customer shipping address -->
- <#if order.shippingAddress?has_content && !order.isSameShippingAndBilling>
- <td>
- <#if order.shippingAddress?has_content && order.billingAddress?has_content && !order.isSameShippingAndBilling>
- <p class="title-detached">${textLabels.shipTo}</p>
- </#if>
- <p class="text-uppercase">${order.shippingAddress.name}</p>
- <p>${order.shippingAddress.companyName}</p>
- <p>${order.shippingAddress.street}</p>
- <p><#if order.shippingAddress.city?has_content>${order.shippingAddress.city}, </#if><#if order.shippingAddress.state?has_content>${order.shippingAddress.state}, </#if>${order.shippingAddress.postalCode}</p>
- <p>${order.shippingAddress.country}</p>
- <p>${order.shippingAddress.phone}</p>
- </td>
- </#if>
- <!-- Customer billing address -->
- <td>
- <#if order.billingAddress?has_content>
- <#if order.shippingAddress?has_content && order.billingAddress?has_content && !order.isSameShippingAndBilling>
- <p class="title-detached">${textLabels.buyer}</p>
- </#if>
- <p class="text-uppercase">${order.billingAddress.name}</p>
- <p>${order.billingAddress.companyName}</p>
- <p>${order.billingAddress.street}</p>
- <p><#if order.billingAddress.city?has_content>${order.billingAddress.city}, </#if><#if order.billingAddress.state?has_content>${order.billingAddress.state}, </#if>${order.billingAddress.postalCode}</p>
- <p>${order.billingAddress.country}</p>
- <p>${order.billingAddress.phone}</p>
- </#if>
- <p>${customer.email}</p>
- </td>
- <#if order.shippingMethod?has_content || order.paymentMethod?has_content>
- <td>
- <!-- Shipping option chosen to deliver the order -->
- <#if order.shippingMethod?has_content>
- <p>${textLabels.shippingMethod} ${order.shippingMethod.name}</p>
- </#if>
- <!-- Payment option that customer used to pay for the order -->
- <#if order.paymentMethod?has_content>
- <p>${textLabels.paymentMethod} ${order.paymentMethod.name}</p>
- </#if>
- </td>
- </#if>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <!-- Order comments -->
- <#if order.orderComments?has_content>
- <tr>
- <td colspan="3" class="order-comment">
- <p class="order-comment-title title-detached">${textLabels.orderComments}</p>
- <p class="text-bold">${order.orderComments}</p>
- </td>
- </tr>
- </#if>
- <!-- Order information -->
- <tr>
- <td class="order-items">
- <table>
- <tbody class="invoice-row">
- <tr>
- <td colspan="3" class="title">
- <!-- Order number -->
- <span>${textLabels.order}<#if order.number?has_content> #${order.number}</#if></span>
- </td>
- <td></td>
- </tr>
- <!-- Ordered items list -->
- <#list order.items as orderItem>
- <tr>
- <td class="order-item-desc">
- <p class="order-item-title">${orderItem.name}</p>
- <p>${textLabels.sku}: ${orderItem.sku}</p>
- <p>${orderItem.formattedOptions}</p>
- </td>
- <td class="order-item-count">
- <p>${orderItem.quantity}</p>
- </td>
- <td class="order-item-total">
- <p>${orderItem.price}</p>
- <td class="order-item-total">
- <p>${orderItem.subtotal}</p>
- </tr>
- </#list>
- </tbody>
- <!-- Order totals -->
- <tbody class="invoice-row order-total">
- <!-- Order subtotal -->
- <tr>
- <td></td>
- <td colspan="2" class="order-item-count">
- <p>${textLabels.items}</p>
- </td>
- <td class="order-item-total">
- <p>${order.subtotal}</p>
- </td>
- </tr>
- <!-- Order shipping cost -->
- <#if order.shippingMethod?has_content>
- <tr>
- <td></td>
- <td colspan="2" class="order-item-count">
- <p>${textLabels.shipping}</p>
- </td>
- <td class="order-item-total">
- <p>${order.shippingCost}</p>
- </td>
- </tr>
- </#if>
- <!-- Order handling fee cost -->
- <#if order.handlingFee?has_content>
- <tr>
- <td></td>
- <td colspan="2" class="order-item-count">
- <p>${order.handlingFee.name}</p>
- </td>
- <td class="order-item-total">
- <p>${order.handlingFee.value}</p>
- </td>
- </tr>
- </#if>
- <!-- Order tax -->
- <#if order.taxes?has_content>
- <#list order.taxes as tax>
- <tr>
- <td></td>
- <td colspan="2" class="order-item-count">
- <p>${tax.name}</p>
- </td>
- <td class="order-item-total">
- <p>${tax.value}</p>
- </td>
- </tr>
- </#list>
- </#if>
- <!-- Order discounts total -->
- <#if order.discounts?has_content>
- <#list order.discounts as discount>
- <tr>
- <td></td>
- <td colspan="2" class="order-item-count">
- <p>${discount.name}</p>
- </td>
- <td class="order-item-total">
- <p>-${discount.value}</p>
- </td>
- </tr>
- </#list>
- </#if>
- <!-- Order total cost -->
- <tr>
- <td class="order-item-desc"></td>
- <td></td>
- <td class="order-item-count text-bold">
- <p>${textLabels.total}</p>
- </td>
- <td class="order-item-total text-bold">
- <p>${order.total}</p>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <!-- Invoice footer -->
- <tr>
- <td class="footer">
- <div>${textLabels.footerMessage}</div>
- </td>
- </tr>
- </tbody>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement