Browse Source

Changed with invoices against a payment approch

pull/29/head
cybroodoo 8 years ago
parent
commit
899b0fc0aa
  1. 3
      payment_receipt_invoice/README.rst
  2. 5
      payment_receipt_invoice/__init__.py
  3. 14
      payment_receipt_invoice/__manifest__.py
  4. 23
      payment_receipt_invoice/models/__init__.py
  5. 91
      payment_receipt_invoice/models/account_receipt_parser.py
  6. BIN
      payment_receipt_invoice/static/description/banner.jpg
  7. BIN
      payment_receipt_invoice/static/description/customer_invoice_form_view.png
  8. BIN
      payment_receipt_invoice/static/description/customer_receipt.png
  9. BIN
      payment_receipt_invoice/static/description/diff_curr_repo.png
  10. 115
      payment_receipt_invoice/static/description/index.html
  11. BIN
      payment_receipt_invoice/static/description/invoices.png
  12. BIN
      payment_receipt_invoice/static/description/payment.png
  13. BIN
      payment_receipt_invoice/static/description/receipt_print_customer.png
  14. BIN
      payment_receipt_invoice/static/description/receipt_report2.png
  15. BIN
      payment_receipt_invoice/static/description/same_curr_repo.png
  16. BIN
      payment_receipt_invoice/static/description/vendor_invoice_form.png
  17. BIN
      payment_receipt_invoice/static/description/vendor_print_button.png
  18. BIN
      payment_receipt_invoice/static/description/vendor_receipt.png
  19. 22
      payment_receipt_invoice/views/account_payment_print.xml
  20. 82
      payment_receipt_invoice/views/receipt_print_template.xml
  21. 13
      payment_receipt_invoice/views/report.xml
  22. 137
      payment_receipt_invoice/views/report_payment.xml

3
payment_receipt_invoice/README.rst

@ -1,7 +1,6 @@
Account Payment Receipt v10
===========================
This module will print payment receipts with paid details
This module will print detailed payment receipts.
Credits

5
payment_receipt_invoice/__init__.py

@ -2,8 +2,8 @@
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Niyas Raphy(<http://www.cybrosys.com>)
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Niyas Raphy,Fasluca(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
@ -20,4 +20,3 @@
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import models

14
payment_receipt_invoice/__manifest__.py

@ -2,8 +2,8 @@
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Niyas Raphy(<http://www.cybrosys.com>)
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Niyas Raphy,Fasluca(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
@ -23,8 +23,8 @@
{
'name': 'Account Payment Receipt',
'summary': """Payment Receipt With Paid Details""",
'version': '0.3',
'description': """""",
'version': '10.0.1.0',
'description': """Payment Receipt With Paid Details""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'http://www.cybrosys.com',
@ -32,9 +32,9 @@
'depends': ['base', 'account'],
'license': 'AGPL-3',
'data': [
'views/receipt_print_template.xml',
'views/account_payment_print.xml',
],
'views/report_payment.xml',
'views/report.xml',
],
'demo': [],
'images': ['static/description/banner.jpg'],
'installable': True,

23
payment_receipt_invoice/models/__init__.py

@ -1,23 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Niyas Raphy(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import account_receipt_parser

91
payment_receipt_invoice/models/account_receipt_parser.py

@ -1,91 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Niyas Raphy(<http://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import json
from odoo.report import report_sxw
from odoo.osv import osv
from odoo import api
from odoo.http import request
class AccountReceiptParser(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context=None):
super(AccountReceiptParser, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'get_details': self.get_details,
'get_details_invoice': self.get_details_invoice,
})
self.context = context
@api.multi
def get_details_invoice(self, doc):
lines = []
if doc.number:
acc_inv = request.env['account.invoice']
acc_inv_rec = acc_inv.search([('number', '=', doc.number)])
total_amount = acc_inv_rec.amount_total
if acc_inv_rec.state == 'draft':
balance_amount = total_amount
else:
balance_amount = acc_inv_rec.residual
paid = total_amount - balance_amount
vals = {
'total_amount': total_amount,
'balance_amount': balance_amount,
'paid': paid,
}
lines.append(vals)
else:
vals = {
'total_amount': doc.amount_total,
'balance_amount': doc.amount_total,
'paid': 0,
}
lines.append(vals)
return lines
@api.multi
def get_details(self, doc):
lines = []
if doc.number:
acc_inv = request.env['account.invoice']
acc_inv_rec = acc_inv.search([('number', '=', doc.number)])
d = json.loads(acc_inv_rec.payments_widget)
for payment in d['content']:
vals = {
'memo': payment['name'],
'amount': payment['amount'],
'method': payment['journal_name'],
'date': payment['date'],
}
lines.append(vals)
return lines
class PrintReport(osv.AbstractModel):
_name = 'report.payment_receipt_invoice.report_payment'
_inherit = 'report.abstract_report'
_template = 'payment_receipt_invoice.report_payment'
_wrapped_report_class = AccountReceiptParser

BIN
payment_receipt_invoice/static/description/banner.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 66 KiB

BIN
payment_receipt_invoice/static/description/customer_invoice_form_view.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

BIN
payment_receipt_invoice/static/description/customer_receipt.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

BIN
payment_receipt_invoice/static/description/diff_curr_repo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

115
payment_receipt_invoice/static/description/index.html

@ -1,103 +1,100 @@
<section class="oe_container">
<div class="oe_row">
<h2 class="oe_slogan">Payment Receipt Report</h2>
<h3 class="oe_slogan">Customer Receipts & Vendor Payment Report</h3>
<h4 class="oe_slogan">Cybrosys Techno Solutions, www.cybrosys.com</h4>
<h3 class="oe_slogan">Customer & Vendor Payment Receipt</h3>
<h4 class="oe_slogan">Cybrosys Techno Solutions, www.cybrosys.com</h4>
</div>
</section>
<section>
<section class=oe_container>
<div class="row oe_row oe_spaced">
<div class="col-md-12">
&#9728; Generate Customer invoice receipt with payment details.<br>
&#9728; Generate Vendor receipt with payment details.<br>
&#9728; Generate Receipt for Customer & Supplier Payment.<br>
&#9728; Supports Multi Currency.<br>
</div>
</div>
<div class="oe_row">
<h2 class="oe_slogan">Customer Invoice</h2>
<h4 class="oe_slogan">Customer Invoice Form View</h4>
<h2 class="oe_slogan">Print Customer/Supplier Payment</h2>
<h4 class="oe_slogan">Payment Form</h4>
<div class="oe_span12">
<p class='oe_mt32'>
<br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="customer_invoice_form_view.png">
<div class="oe_row_img oe_demo oe_picture oe_screenshot">
<img src="payment.png">
<div class="oe_demo_footer oe_centeralign"style="background-color:rgba(162, 70, 137, 0.7);">Here you can see the option to print receipt against this payment</div>
</div>
</div>
</div>
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Customer Receipt Print</h4>
<h4 class="oe_slogan">Invoices Paid by above payment</h4>
<div class="oe_span12">
<p class='oe_mt32'>
<br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="receipt_print_customer.png">
<div class="oe_row_img oe_picture oe_screenshot oe_demo">
<img src="invoices.png">
<div class="oe_demo_footer oe_centeralign" style="background-color:rgba(162, 70, 137, 0.7);">These are the invoices paid by above payment</div>
</div>
</div>
</div>
</section>
<section class=oe_container>
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Customer Receipt Report</h4>
<h4 class="oe_slogan">Payment Receipt</h4>
<div class="oe_span12">
<p class='oe_mt32'>
<br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="customer_receipt.png">
<div class="oe_row_img">
<img src="receipt_report2.png" style="border:2px black solid !important;">
</div>
<br/>
</div>
</div>
</section>
<section>
<section class=oe_container>
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Vendor Bill</h2>
<h4 class="oe_slogan">Vendor Bill Form View</h4>
<div class="oe_span12">
<p class='oe_mt32'>
<br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="vendor_invoice_form.png">
<div class="oe_row_img oe_picture oe_screenshot oe_demo">
<img src="diff_curr_repo.png">
<div class="oe_demo_footer oe_centeralign" style="background-color:rgba(162, 70, 137, 0.7);">When payment and company are in different currency</div>
</div>
</div>
</div>
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Vendor Receipt Print</h4>
<div class="oe_span12">
<p class='oe_mt32'>
<br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="vendor_print_button.png">
</div>
</div>
</div>
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Vendor Receipt Report</h4>
<div class="oe_span12">
<p class='oe_mt32'>
<br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="vendor_receipt.png">
<br/>
<div class="oe_row_img oe_picture oe_screenshot oe_demo">
<img src="same_curr_repo.png">
<div class="oe_demo_footer oe_centeralign" style="background-color:rgba(162, 70, 137, 0.7);">When payment and company are in same currency</div>
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<h3 class="oe_slogan">Need Any Help?</h3>
<div class="oe_slogan">
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;" href="http://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;"
href="http://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;"
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
</section>
<section class="oe_container">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="http://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="http://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>

BIN
payment_receipt_invoice/static/description/invoices.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
payment_receipt_invoice/static/description/payment.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
payment_receipt_invoice/static/description/receipt_print_customer.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

BIN
payment_receipt_invoice/static/description/receipt_report2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
payment_receipt_invoice/static/description/same_curr_repo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
payment_receipt_invoice/static/description/vendor_invoice_form.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

BIN
payment_receipt_invoice/static/description/vendor_print_button.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

BIN
payment_receipt_invoice/static/description/vendor_receipt.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

22
payment_receipt_invoice/views/account_payment_print.xml

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<report
id="report_payment_receipt"
string="Payment Receipt"
model="account.invoice"
report_type="qweb-pdf"
file="payment_receipt_invoice.report_payment"
name="payment_receipt_invoice.report_payment"
/>
<template id="report_payment">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="payment_receipt_invoice.report_payment_print" t-lang="doc.partner_id.lang"/>
</t>
</t>
</template>
</data>
</odoo>

82
payment_receipt_invoice/views/receipt_print_template.xml

@ -1,82 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_payment_print">
<t t-call="report.html_container">
<t t-set="doc" t-value="doc.with_context({'lang':doc.partner_id.lang})" />
<t t-call="report.internal_layout">
<div class="page" >
<t t-call="report.external_layout">
<div class="header" style="text-align:center;"><h1><strong>Payment Receipt</strong></h1></div>
<div class="row mt32 mb32" style="text-align:center;">
</div>
<div class="row mt32 mb32" >
<div class="col-xs-12" style="text-align:left;">
<span style="float:left;"><strong>Partner:</strong><span t-field="doc.partner_id.name"/></span>
<span style="float:left; padding-left:50px;"><strong>Invoice Date:</strong><span t-field="doc.date_invoice"/></span>
<span style="float:left; padding-left:50px;"><strong>Due Date:</strong><span t-field="doc.date_due"/></span>
</div>
</div>
<table class="table table-condensed">
<thead>
<tr >
<th style="background-color:#9b9da0 !important;">INVOICE TOTAL</th>
<th style="background-color:#9b9da0 !important;">PAID</th>
<th style="background-color:#9b9da0 !important;">DUE</th>
</tr>
</thead>
<tbody>
<t t-set="paid_amount" t-value='1'></t>
<t t-foreach="get_details_invoice(doc)" t-as="rec">
<tr>
<td><span t-att-style="style" t-esc="rec['total_amount']"/></td>
<t t-set="paid_amount" t-value="rec['paid']"/>
<td><span t-att-style="style" t-esc="rec['paid']"/> </td>
<td><span t-att-style="style" t-esc="rec['balance_amount']"/></td>
</tr>
</t>
</tbody>
</table>
<t t-if="paid_amount != 0">
<div class="row mt32 mb32" style="text-align:center;">
<div class="col-xs-12">
<h3><strong>Payment Details</strong></h3>
</div>
</div>
<t t-if="doc.amount_total != doc.residual">
<table class="table table-condensed">
<thead>
<tr >
<th style="background-color:#9b9da0 !important;">MEMO</th>
<th style="background-color:#9b9da0 !important;">PAYMENT DATE</th>
<th style="background-color:#9b9da0 !important;">METHOD</th>
<th style="background-color:#9b9da0 !important;">AMOUNT</th>
</tr>
</thead>
<tbody>
<t t-foreach="get_details(doc)" t-as="b">
<tr>
<td>
<span t-att-style="style" t-esc="b['memo']"/>
</td>
<td>
<span t-att-style="style" t-esc="b['date']"/>
</td>
<td>
<span t-att-style="style" t-esc="b['method']"/>
</td>
<td>
<span t-att-style="style" t-esc="b['amount']"/>
</td>
</tr>
</t>
</tbody>
</table>
</t>
</t>
</t>
</div>
</t>
</t>
</template>
</odoo>

13
payment_receipt_invoice/views/report.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<report
id="account_receipt"
model="account.payment"
string="Receipt"
report_type="qweb-pdf"
name="payment_receipt_invoice.report_receipt"
file="payment_receipt_invoice.report_receipt"
/>
</data>
</odoo>

137
payment_receipt_invoice/views/report_payment.xml

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="report_receipt_document">
<t t-call="report.external_layout">
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})" />
<div class="page">
<br/>
<div class="header" style="text-align:center;"><h1><strong>Payment Receipt</strong></h1></div>
<div class="row mt32 mb32">
<div name="partner_address" class="col-xs-3">
<strong><span t-field="o.partner_type"/><span>:</span></strong>
<address t-field="o.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
<span t-if="o.partner_id.vat">TIN: <span t-field="o.partner_id.vat"/></span>
</div>
<div class="col-xs-3 col-xs-offset-6">
<t t-if="o.payment_date">
<strong>Payment Date:</strong>
<p t-field="o.payment_date"/></t>
<t t-if="o.name">
<strong>Reference NO:</strong>
<p t-field="o.name"/></t>
<t t-if="o.journal_id">
<strong>Payment Method:</strong>
<p t-field="o.journal_id"/></t>
</div>
</div>
<table class="table table-condensed">
<thead>
<tr style="background-color:#9b9da0 !important;">
<th>Invoice No</th>
<th>Invoice Date</th>
<th class="text-right">Total Amount</th>
<th class="text-right">Payment Amount</th>
<th class="text-right">Balance</th>
</tr>
</thead>
<tbody class="payment_tbody">
<tr t-foreach="o.invoice_ids" t-as="l">
<td><span t-field="l.number"/></td>
<td><span t-field="l.date_invoice"/></td>
<td class="text-right">
<span t-field="l.amount_total"
t-options='{"widget": "monetary", "display_currency": l.currency_id}'/>
</td>
<td class="text-right">
<t t-foreach="l.payment_move_line_ids" t-as="pm">
<t t-if="pm.payment_id.id == o.id">
<t t-if="l.type in ('out_invoice', 'in_refund')">
<t t-foreach="pm.matched_debit_ids" t-as="md">
<t t-foreach="l.move_id.line_ids" t-as="ln">
<t t-if="md.debit_move_id.id == ln.id">
<t t-if="md.debit_move_id.amount_currency == 0.0">
<span t-field="md.amount"
t-options='{"widget": "monetary", "display_currency": l.currency_id}'/>
</t>
<t t-if="md.debit_move_id.amount_currency != 0.0">
<span t-esc="abs(md.debit_move_id.amount_currency)"
t-options='{"widget": "monetary", "display_currency": l.currency_id}'/>
</t>
</t>
</t>
</t>
</t>
<t t-if="l.type in ('in_invoice', 'out_refund')">
<t t-foreach="pm.matched_credit_ids" t-as="mc">
<t t-foreach="l.move_id.line_ids" t-as="ln">
<t t-if="mc.credit_move_id.id == ln.id">
<t t-if="mc.credit_move_id.amount_currency == 0.0">
<span t-field="mc.amount"
t-options='{"widget": "monetary", "display_currency": l.currency_id}'/>
</t>
<t t-if="mc.credit_move_id.amount_currency != 0.0">
<span t-esc="abs(mc.credit_move_id.amount_currency)"
t-options='{"widget": "monetary", "display_currency": l.currency_id}'/>
</t>
</t>
</t>
</t>
</t>
</t>
</t>
</td>
<td class="text-right">
<span t-field="l.residual"
t-options='{"widget": "monetary", "display_currency": l.currency_id}'/>
</td>
</tr>
<tr style="border-top:2px solid black !important;">
<td colspan="3">
<b><span>Total Receipt Amount:</span></b>
</td>
<td class="text-right">
<b><span t-field="o.amount"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/></b>
</td>
<td/>
</tr>
<t t-if="o.currency_id != o.company_id.currency_id">
<tr>
<t t-set="c_amount" t-value="0.0"/>
<t t-foreach="o.move_line_ids" t-as="x">
<t t-if="x.credit == 0.0">
<t t-set="c_amount" t-value="x.debit"/>
</t>
<t t-if="x.credit != 0.0">
<t t-set="c_amount" t-value="x.credit"/>
</t>
</t>
<td colspan="3">
<b><span>Total Receipt Amount in </span><span t-field="o.company_id.currency_id.name"/>:</b>
</td>
<td class="text-right">
<b><span t-esc="c_amount"
t-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'/></b>
</td>
<td/>
</tr>
</t>
</tbody>
</table>
<p style="text-align:center;">Thank You For Doing Business With Us</p>
</div>
</t>
</template>
<template id="report_receipt">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="payment_receipt_invoice.report_receipt_document" t-lang="o.partner_id.lang"/>
</t>
</t>
</template>
</data>
</odoo>
Loading…
Cancel
Save