Files
Odoo-Modules/fusion_reports_templates/report/report_receipt.xml
gsinghpal 4d6095cd2a changes
2026-04-20 22:58:25 -04:00

272 lines
16 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Payment Receipt — portrait + landscape.
-->
<odoo>
<!-- ============================================================= -->
<!-- PORTRAIT -->
<!-- ============================================================= -->
<template id="report_fr_receipt_portrait">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="web.external_layout">
<t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang if doc.partner_id else 'en_US')"/>
<t t-call="fusion_reports_templates.fr_portrait_styles"/>
<div class="fr-report">
<div class="page">
<div style="display: flex; justify-content: space-between; align-items: center;">
<h4>
Payment Receipt <span t-field="doc.name"/>
</h4>
<div class="paid-stamp">RECEIPT</div>
</div>
<table class="bordered">
<thead>
<tr>
<th style="width: 50%;">
<t t-if="doc.payment_type == 'inbound'">RECEIVED FROM</t>
<t t-else="">PAID TO</t>
</th>
<th style="width: 50%;">
<t t-if="doc.payment_type == 'inbound'">PAID TO</t>
<t t-else="">PAID BY</t>
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="height: 70px;">
<t t-if="doc.partner_id">
<div t-field="doc.partner_id"
t-options="{'widget': 'contact', 'fields': ['name', 'address', 'phone', 'email'], 'no_marker': True}"/>
</t>
</td>
<td style="height: 70px;">
<strong><span t-field="doc.company_id.name"/></strong><br/>
<span t-field="doc.company_id.partner_id"
t-options="{'widget': 'contact', 'fields': ['address', 'phone', 'email'], 'no_marker': True}"/>
</td>
</tr>
</tbody>
</table>
<table class="bordered">
<thead>
<tr>
<th class="info-header" style="width: 25%;">PAYMENT DATE</th>
<th class="info-header" style="width: 25%;">REFERENCE</th>
<th class="info-header" style="width: 25%;">METHOD</th>
<th class="info-header" style="width: 25%;">JOURNAL</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center"><span t-field="doc.date" t-options="{'widget': 'date'}"/></td>
<td class="text-center"><span t-esc="doc.ref or doc.memo or '-'"/></td>
<td class="text-center"><span t-field="doc.payment_method_line_id"/></td>
<td class="text-center"><span t-field="doc.journal_id"/></td>
</tr>
</tbody>
</table>
<table class="bordered">
<tr>
<td class="fr-header-primary text-center" style="width: 50%; font-size: 14pt; padding: 14px;">
<strong>AMOUNT</strong>
</td>
<td class="text-center" style="width: 50%; font-size: 18pt; padding: 14px;">
<strong>
<span t-field="doc.amount" t-options='{"widget": "monetary", "display_currency": doc.currency_id}'/>
</strong>
</td>
</tr>
</table>
<t t-if="doc.reconciled_invoice_ids">
<div style="margin-top: 15px;">
<strong>Applied to:</strong>
<table class="bordered" style="margin-top: 6px;">
<thead>
<tr>
<th style="width: 30%;">DOCUMENT</th>
<th style="width: 25%;">DATE</th>
<th style="width: 25%;">ORIGINAL AMT</th>
<th style="width: 20%;">OUTSTANDING</th>
</tr>
</thead>
<tbody>
<t t-foreach="doc.reconciled_invoice_ids" t-as="inv">
<tr>
<td class="text-center"><span t-field="inv.name"/></td>
<td class="text-center"><span t-field="inv.invoice_date"/></td>
<td class="text-end">
<span t-field="inv.amount_total" t-options='{"widget": "monetary", "display_currency": inv.currency_id}'/>
</td>
<td class="text-end">
<span t-field="inv.amount_residual" t-options='{"widget": "monetary", "display_currency": inv.currency_id}'/>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
<t t-if="doc.memo">
<div style="margin-top: 15px;">
<strong>Memo:</strong>
<span t-field="doc.memo"/>
</div>
</t>
<div class="row" style="margin-top: 40px;">
<div class="col-6">
<div class="sig-line"/>
<div class="small-muted">Authorized Signature / Date</div>
</div>
</div>
</div>
</div>
</t>
</t>
</t>
</template>
<!-- ============================================================= -->
<!-- LANDSCAPE -->
<!-- ============================================================= -->
<template id="report_fr_receipt_landscape">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="web.external_layout">
<t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang if doc.partner_id else 'en_US')"/>
<t t-call="fusion_reports_templates.fr_landscape_styles"/>
<div class="fr-landscape">
<div class="page">
<div style="display: flex; justify-content: space-between; align-items: center;">
<h2>Payment Receipt <span t-field="doc.name"/></h2>
<div class="paid-stamp">RECEIPT</div>
</div>
<table class="bordered">
<thead>
<tr>
<th style="width: 50%;">
<t t-if="doc.payment_type == 'inbound'">RECEIVED FROM</t>
<t t-else="">PAID TO</t>
</th>
<th style="width: 50%;">
<t t-if="doc.payment_type == 'inbound'">PAID TO</t>
<t t-else="">PAID BY</t>
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="height: 70px; font-size: 12pt;">
<t t-if="doc.partner_id">
<div t-field="doc.partner_id"
t-options="{'widget': 'contact', 'fields': ['name', 'address', 'phone', 'email'], 'no_marker': True}"/>
</t>
</td>
<td style="height: 70px; font-size: 12pt;">
<strong><span t-field="doc.company_id.name"/></strong><br/>
<span t-field="doc.company_id.partner_id"
t-options="{'widget': 'contact', 'fields': ['address', 'phone', 'email'], 'no_marker': True}"/>
</td>
</tr>
</tbody>
</table>
<table class="bordered info-table">
<thead>
<tr>
<th>PAYMENT DATE</th>
<th>REFERENCE</th>
<th>METHOD</th>
<th>JOURNAL</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center"><span t-field="doc.date" t-options="{'widget': 'date'}"/></td>
<td class="text-center"><span t-esc="doc.ref or doc.memo or '-'"/></td>
<td class="text-center"><span t-field="doc.payment_method_line_id"/></td>
<td class="text-center"><span t-field="doc.journal_id"/></td>
</tr>
</tbody>
</table>
<table class="bordered">
<tr>
<td class="fr-header-primary text-center" style="width: 50%; font-size: 16pt; padding: 18px;">
<strong>AMOUNT</strong>
</td>
<td class="text-center" style="width: 50%; font-size: 22pt; padding: 18px;">
<strong>
<span t-field="doc.amount" t-options='{"widget": "monetary", "display_currency": doc.currency_id}'/>
</strong>
</td>
</tr>
</table>
<t t-if="doc.reconciled_invoice_ids">
<div style="margin-top: 15px;">
<strong>Applied to:</strong>
<table class="bordered" style="margin-top: 6px;">
<thead>
<tr>
<th style="width: 30%;">DOCUMENT</th>
<th style="width: 25%;">DATE</th>
<th style="width: 25%;">ORIGINAL AMT</th>
<th style="width: 20%;">OUTSTANDING</th>
</tr>
</thead>
<tbody>
<t t-foreach="doc.reconciled_invoice_ids" t-as="inv">
<tr>
<td class="text-center"><span t-field="inv.name"/></td>
<td class="text-center"><span t-field="inv.invoice_date"/></td>
<td class="text-end">
<span t-field="inv.amount_total" t-options='{"widget": "monetary", "display_currency": inv.currency_id}'/>
</td>
<td class="text-end">
<span t-field="inv.amount_residual" t-options='{"widget": "monetary", "display_currency": inv.currency_id}'/>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
<t t-if="doc.memo">
<div style="margin-top: 15px;">
<strong>Memo:</strong>
<span t-field="doc.memo"/>
</div>
</t>
<div class="row" style="margin-top: 40px;">
<div class="col-6">
<div class="sig-line"/>
<div class="small-muted">Authorized Signature / Date</div>
</div>
</div>
</div>
</div>
</t>
</t>
</t>
</template>
</odoo>