174 lines
9.7 KiB
XML
174 lines
9.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
|
|
<!-- ════════════════════════════════════════════════════════════════════
|
|
Paper format: 80mm thermal receipt
|
|
width = 80mm, no margins so content fills the full roll width.
|
|
════════════════════════════════════════════════════════════════════ -->
|
|
<record id="paperformat_pos_closing_receipt" model="report.paperformat">
|
|
<field name="name">POS Closing Receipt (80mm)</field>
|
|
<field name="default" eval="False"/>
|
|
<field name="format">custom</field>
|
|
<field name="page_width">80</field>
|
|
<field name="page_height">297</field>
|
|
<field name="orientation">Portrait</field>
|
|
<field name="margin_top">3</field>
|
|
<field name="margin_bottom">3</field>
|
|
<field name="margin_left">3</field>
|
|
<field name="margin_right">3</field>
|
|
<field name="header_line" eval="False"/>
|
|
<field name="header_spacing">3</field>
|
|
<field name="dpi">96</field>
|
|
</record>
|
|
|
|
<!-- ════════════════════════════════════════════════════════════════════
|
|
Report Action
|
|
════════════════════════════════════════════════════════════════════ -->
|
|
<record id="action_report_pos_closing_summary" model="ir.actions.report">
|
|
<field name="name">POS Closing Summary</field>
|
|
<field name="model">pos.session</field>
|
|
<field name="report_type">qweb-html</field>
|
|
<field name="report_name">pos_closing_receipt.report_pos_closing_summary</field>
|
|
<field name="report_file">pos_closing_receipt.report_pos_closing_summary</field>
|
|
<field name="paperformat_id" ref="paperformat_pos_closing_receipt"/>
|
|
<field name="binding_model_id" ref="point_of_sale.model_pos_session"/>
|
|
<field name="binding_type">report</field>
|
|
</record>
|
|
|
|
<!-- ════════════════════════════════════════════════════════════════════
|
|
QWeb Template
|
|
Uses the same visual layout as the POS-frontend closing receipt so
|
|
the paper output looks identical to what was auto-printed on close.
|
|
════════════════════════════════════════════════════════════════════ -->
|
|
<template id="report_pos_closing_summary">
|
|
<t t-call="web.html_container">
|
|
<t t-foreach="docs" t-as="session">
|
|
<t t-set="data" t-value="session.get_closing_summary_data()"/>
|
|
<div style="font-family: 'Courier New', Courier, monospace;
|
|
font-size: 25px;
|
|
width: 100%;
|
|
max-width: 320px;
|
|
margin: 0 auto;
|
|
padding: 12px;
|
|
page-break-after: always;">
|
|
|
|
<!-- ===== HEADER ===== -->
|
|
<div style="text-align: center; margin-bottom: 10px;">
|
|
<div style="font-size: 33px; font-weight: bold;
|
|
letter-spacing: 1px; text-transform: uppercase;">
|
|
<t t-esc="data['session_name']"/>
|
|
</div>
|
|
<div style="margin-top: 4px; font-size: 21px; letter-spacing: 2px;">
|
|
SESSION CLOSING SUMMARY
|
|
</div>
|
|
<div style="margin-top: 2px; font-size: 19px; color: #666;">
|
|
(REPRINT)
|
|
</div>
|
|
</div>
|
|
|
|
<div style="border-top: 1px dashed #000; margin: 8px 0;"/>
|
|
|
|
<!-- ===== CASHIER & DATETIME ===== -->
|
|
<table style="width: 100%; border-collapse: collapse; margin-bottom: 8px;">
|
|
<tr>
|
|
<td style="font-weight: bold; padding: 5px 0;">Cashier</td>
|
|
<td style="text-align: right; padding: 5px 0;">
|
|
<t t-esc="data['cashier_name']"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="font-weight: bold; padding: 5px 0;">Date/Time</td>
|
|
<td style="text-align: right; padding: 5px 0; font-size: 21px;">
|
|
<t t-esc="data['closing_time']"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div style="border-top: 1px dashed #000; margin: 8px 0;"/>
|
|
|
|
<!-- ===== PAYMENT METHODS ===== -->
|
|
<table style="width: 100%; border-collapse: collapse; margin-bottom: 8px;">
|
|
<!-- Cash -->
|
|
<t t-if="data['cash_payment']">
|
|
<tr>
|
|
<td style="padding: 5px 0;">
|
|
<t t-esc="data['cash_payment']['name']"/>
|
|
</td>
|
|
<td style="text-align: right; padding: 5px 0;">
|
|
<t t-esc="data['cash_payment']['amount']"
|
|
t-options="{'widget': 'monetary', 'display_currency': session.currency_id}"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
<!-- Non-cash methods -->
|
|
<t t-foreach="data['non_cash_payments']" t-as="pm">
|
|
<tr>
|
|
<td style="padding: 5px 0;">
|
|
<t t-esc="pm['name']"/>
|
|
</td>
|
|
<td style="text-align: right; padding: 5px 0;">
|
|
<t t-esc="pm['amount']"
|
|
t-options="{'widget': 'monetary', 'display_currency': session.currency_id}"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</table>
|
|
|
|
<div style="border-top: 1px solid #000; margin: 8px 0;"/>
|
|
|
|
<!-- ===== GRAND TOTAL ===== -->
|
|
<table style="width: 100%; border-collapse: collapse; margin-bottom: 8px;">
|
|
<tr>
|
|
<td style="font-weight: bold; font-size: 29px; padding: 6px 0;">TOTAL</td>
|
|
<td style="text-align: right; font-weight: bold; font-size: 29px; padding: 6px 0;">
|
|
<t t-esc="data['grand_total']"
|
|
t-options="{'widget': 'monetary', 'display_currency': session.currency_id}"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<!-- ===== CASH CONTROL DETAILS ===== -->
|
|
<t t-if="data.get('has_cash_control')">
|
|
<div style="border-top: 1px dashed #000; margin: 8px 0;"/>
|
|
<table style="width: 100%; border-collapse: collapse; margin-bottom: 8px;">
|
|
<tr>
|
|
<td style="padding: 5px 0;">Expected Cash</td>
|
|
<td style="text-align: right; padding: 5px 0;">
|
|
<t t-esc="data['closing_cash_expected']"
|
|
t-options="{'widget': 'monetary', 'display_currency': session.currency_id}"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 5px 0;">Counted Cash</td>
|
|
<td style="text-align: right; padding: 5px 0;">
|
|
<t t-esc="data['closing_cash_counted']"
|
|
t-options="{'widget': 'monetary', 'display_currency': session.currency_id}"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="font-weight: bold; padding: 5px 0;">Cash Difference</td>
|
|
<td style="text-align: right; font-weight: bold; padding: 5px 0;">
|
|
<t t-esc="data['closing_cash_difference']"
|
|
t-options="{'widget': 'monetary', 'display_currency': session.currency_id}"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</t>
|
|
|
|
<div style="border-top: 1px dashed #000; margin: 8px 0;"/>
|
|
|
|
<!-- ===== FOOTER ===== -->
|
|
<div style="text-align: center; margin-top: 12px;
|
|
font-size: 21px; letter-spacing: 1px;">
|
|
*** Session Closed ***
|
|
</div>
|
|
|
|
<!-- Margin for paper feed -->
|
|
<div style="margin-top: 28px;"> </div>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
|
|
</odoo>
|