@ -1,48 +0,0 @@ | 
				
			|||
Dynamic Financial Reports | 
				
			|||
========================= | 
				
			|||
* Dynamic financial reports for Odoo 13 community editions | 
				
			|||
 | 
				
			|||
Installation | 
				
			|||
============ | 
				
			|||
	- www.odoo.com/documentation/13.0/setup/install.html | 
				
			|||
	- Install our custom addon | 
				
			|||
 | 
				
			|||
License | 
				
			|||
------- | 
				
			|||
General Public License, Version 3 (LGPL v3). | 
				
			|||
(https://www.odoo.com/documentation/user/13.0/legal/licenses/licenses.html) | 
				
			|||
 | 
				
			|||
Company | 
				
			|||
------- | 
				
			|||
* 'Cybrosys Techno Solutions <https://cybrosys.com/>`__ | 
				
			|||
 | 
				
			|||
Credits | 
				
			|||
------- | 
				
			|||
* Developer: | 
				
			|||
(v13) Mehjabin @ Cybrosys | 
				
			|||
(v13) Jibin @ Cybrosys | 
				
			|||
(v13) Sachin @ Cybrosys | 
				
			|||
(v13) Mily @ Cybrosys | 
				
			|||
(v13) Arunima @ Cybrosys | 
				
			|||
(v13) Aneesh @ Cybrosys | 
				
			|||
(v13) Sonu @ Cybrosys | 
				
			|||
(v13) Vaishnavi @ Cybrosys | 
				
			|||
 | 
				
			|||
Contacts | 
				
			|||
-------- | 
				
			|||
* Mail Contact : odoo@cybrosys.com | 
				
			|||
 | 
				
			|||
Bug Tracker | 
				
			|||
----------- | 
				
			|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. | 
				
			|||
 | 
				
			|||
Maintainer | 
				
			|||
========== | 
				
			|||
This module is maintained by Cybrosys Technologies. | 
				
			|||
 | 
				
			|||
For support and more information, please visit https://www.cybrosys.com | 
				
			|||
 | 
				
			|||
Further information | 
				
			|||
=================== | 
				
			|||
HTML Description: `<static/description/index.html>`__ | 
				
			|||
 | 
				
			|||
@ -1,3 +0,0 @@ | 
				
			|||
from . import wizard | 
				
			|||
from . import report | 
				
			|||
from . import controllers | 
				
			|||
@ -1,74 +0,0 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
############################################################################# | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2020-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			|||
#    Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) | 
				
			|||
# | 
				
			|||
#    You can modify it under the terms of the GNU LESSER | 
				
			|||
#    GENERAL PUBLIC LICENSE (LGPL v3), Version 3. | 
				
			|||
# | 
				
			|||
#    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 | 
				
			|||
#    (LGPL v3) along with this program. | 
				
			|||
#    If not, see <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
############################################################################# | 
				
			|||
 | 
				
			|||
{ | 
				
			|||
    'name': 'Dynamic Financial Reports', | 
				
			|||
    'version': '13.0.1.0.1', | 
				
			|||
    'category': 'Accounting', | 
				
			|||
    'summary': """Dynamic Financial Reports with drill  | 
				
			|||
                down and filters– Community Edition""", | 
				
			|||
    'description': "This module creates dynamic Accounting General Ledger, Trial Balance, Balance Sheet " | 
				
			|||
                   "Proft and Loss, Cash Flow Statements, Partner Ledger," | 
				
			|||
                   "Partner Ageing, Day book" | 
				
			|||
                   "Bank book and Cash book reports in Odoo 14 community edition.", | 
				
			|||
    'author': 'Cybrosys Techno Solutions', | 
				
			|||
    'website': "https://www.cybrosys.com", | 
				
			|||
    'company': 'Cybrosys Techno Solutions', | 
				
			|||
    'maintainer': 'Cybrosys Techno Solutions', | 
				
			|||
    'depends': ['base', 'base_accounting_kit'], | 
				
			|||
    'data': [ | 
				
			|||
        'security/ir.model.access.csv', | 
				
			|||
        'views/general_ledger_view.xml', | 
				
			|||
        'views/gl_template.xml', | 
				
			|||
        'wizard/dynamic_ledger_view.xml', | 
				
			|||
        'views/templates.xml', | 
				
			|||
        'views/pl_template.xml', | 
				
			|||
        'wizard/partner_ledger_view.xml', | 
				
			|||
        'views/al_template.xml', | 
				
			|||
        'views/kit_menus.xml', | 
				
			|||
        'wizard/dynamic_partner_ageing.xml', | 
				
			|||
        'views/bank_book_pdf_template.xml', | 
				
			|||
        'views/cash_book_pdf_template.xml', | 
				
			|||
        'views/cashfl.xml', | 
				
			|||
        'views/financial_report_qweb_pdf_template.xml', | 
				
			|||
        'views/menu_dynamic_financial_reports.xml', | 
				
			|||
        'views/db_templates.xml', | 
				
			|||
 | 
				
			|||
    ], | 
				
			|||
    'qweb': [ | 
				
			|||
        'static/src/xml/views.xml', | 
				
			|||
        'static/src/xml/tb_view.xml', | 
				
			|||
        'static/src/xml/bs_template_views.xml', | 
				
			|||
        'static/src/xml/profit_loss_template_views.xml', | 
				
			|||
        'static/src/xml/partner_ledger_views.xml', | 
				
			|||
        'static/src/xml/al_views.xml', | 
				
			|||
        'static/src/xml/bank_book_view.xml', | 
				
			|||
        'static/src/xml/cash_book_view.xml', | 
				
			|||
        'static/src/xml/cash_flow.xml', | 
				
			|||
        'static/src/xml/db_lines.xml', | 
				
			|||
    ], | 
				
			|||
    'license': 'LGPL-3', | 
				
			|||
    'images': ['static/description/banner.jpg'], | 
				
			|||
    'installable': True, | 
				
			|||
    'auto_install': False, | 
				
			|||
    'application': True, | 
				
			|||
} | 
				
			|||
@ -1 +0,0 @@ | 
				
			|||
from . import main | 
				
			|||
@ -1,39 +0,0 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
 | 
				
			|||
import json | 
				
			|||
from odoo import http | 
				
			|||
from odoo.http import content_disposition, request | 
				
			|||
from odoo.addons.web.controllers.main import _serialize_exception | 
				
			|||
from odoo.tools import html_escape | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class TBXLSXReportController(http.Controller): | 
				
			|||
    @http.route('/xlsx_reports', type='http', auth='user', methods=['POST'], csrf=False) | 
				
			|||
    def get_report_xlsx(self, model, options, output_format, token, report_data, report_name, dfr_data, **kw): | 
				
			|||
 | 
				
			|||
        uid = request.session.uid | 
				
			|||
        report_obj = request.env[model].with_user(uid) | 
				
			|||
        dfr_data = dfr_data | 
				
			|||
 | 
				
			|||
        options = options | 
				
			|||
 | 
				
			|||
        try: | 
				
			|||
            if output_format == 'xlsx': | 
				
			|||
                response = request.make_response( | 
				
			|||
                    None, | 
				
			|||
                    headers=[ | 
				
			|||
                        ('Content-Type', 'application/vnd.ms-excel'), | 
				
			|||
                        ('Content-Disposition', content_disposition(report_name + '.xlsx')) | 
				
			|||
                    ] | 
				
			|||
                ) | 
				
			|||
                report_obj.get_xlsx_report(options, response, report_data, dfr_data) | 
				
			|||
            response.set_cookie('fileToken', token) | 
				
			|||
            return response | 
				
			|||
        except Exception as e: | 
				
			|||
            se = _serialize_exception(e) | 
				
			|||
            error = { | 
				
			|||
                'code': 200, | 
				
			|||
                'message': 'Odoo Server Error', | 
				
			|||
                'data': se | 
				
			|||
            } | 
				
			|||
            return request.make_response(html_escape(json.dumps(error))) | 
				
			|||
@ -1,16 +0,0 @@ | 
				
			|||
## Module <dynamic_financial_report> | 
				
			|||
 | 
				
			|||
#### 30.03.2021 | 
				
			|||
#### Version 13.0.1.0.0 | 
				
			|||
#### ADD | 
				
			|||
- Initial commit for Odoo 13 dynamic financial reports | 
				
			|||
 | 
				
			|||
#### 04.04.2021 | 
				
			|||
#### Version 13.0.1.0.1 | 
				
			|||
#### UPDT | 
				
			|||
- Resolved the bug in trial balance | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
@ -1,7 +0,0 @@ | 
				
			|||
from . import general_ledger | 
				
			|||
from . import financial_reports | 
				
			|||
from . import partner_ledger | 
				
			|||
from . import ageing_partner | 
				
			|||
from . import bank_book | 
				
			|||
from . import cash_flow_report | 
				
			|||
from . import daybook_report | 
				
			|||
@ -1,15 +0,0 @@ | 
				
			|||
from odoo import api, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class InsReportAgeingPartner(models.AbstractModel): | 
				
			|||
    _name = 'report.dynamic_financial_report.ageing_partner' | 
				
			|||
 | 
				
			|||
    @api.model | 
				
			|||
    def _get_report_values(self, docids, data=None): | 
				
			|||
        """ fetch values for get pdf report""" | 
				
			|||
        if self.env.context.get('js_report'): | 
				
			|||
            if data.get('report_data'): | 
				
			|||
                data.update({'account_data': data.get('report_data')[1], | 
				
			|||
                             'Filters': data.get('report_data')[0], | 
				
			|||
                             }) | 
				
			|||
        return data | 
				
			|||
@ -1,31 +0,0 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
 | 
				
			|||
import time | 
				
			|||
from odoo import api, models, _ | 
				
			|||
from odoo.exceptions import UserError | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class InsReportBankBook(models.AbstractModel): | 
				
			|||
    _name = 'report.dynamic_financial_report.bank_book' | 
				
			|||
 | 
				
			|||
    @api.model | 
				
			|||
    def _get_report_values(self, docids, data=None): | 
				
			|||
        if self.env.context.get('js_report'): | 
				
			|||
            if data.get('report_data'): | 
				
			|||
                data.update({'account_data': data.get('report_data')[1], | 
				
			|||
                             'Filters': data.get('report_data')[0], | 
				
			|||
                             }) | 
				
			|||
        return data | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class InsReportCashBook(models.AbstractModel): | 
				
			|||
    _name = 'report.dynamic_financial_report.cash_book' | 
				
			|||
 | 
				
			|||
    @api.model | 
				
			|||
    def _get_report_values(self, docids, data=None): | 
				
			|||
        if self.env.context.get('js_report'): | 
				
			|||
            if data.get('report_data'): | 
				
			|||
                data.update({'account_data': data.get('report_data')[1], | 
				
			|||
                             'Filters': data.get('report_data')[0], | 
				
			|||
                             }) | 
				
			|||
        return data | 
				
			|||
@ -1,17 +0,0 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
 | 
				
			|||
from odoo import api, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class InsReportCashFlow(models.AbstractModel): | 
				
			|||
    _name = 'report.dynamic_financial_report.cash_flow' | 
				
			|||
 | 
				
			|||
    @api.model | 
				
			|||
    def _get_report_values(self, docids, data=None): | 
				
			|||
        if self.env.context.get('js_report'): | 
				
			|||
            if data.get('report_data'): | 
				
			|||
 | 
				
			|||
                data.update({'account_data': data.get('report_data')[1], | 
				
			|||
                             'Filters': data.get('report_data')[0], | 
				
			|||
                             }) | 
				
			|||
        return data | 
				
			|||
@ -1,18 +0,0 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
from odoo import api, models, _ | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class InsReportDayBook(models.AbstractModel): | 
				
			|||
    _name = 'report.dynamic_financial_report.dynamic_day_book' | 
				
			|||
 | 
				
			|||
    @api.model | 
				
			|||
    def _get_report_values(self, docids, data=None): | 
				
			|||
        """ fetch values for get pdf report""" | 
				
			|||
        if self.env.context.get('js_report'): | 
				
			|||
            if data.get('report_data'): | 
				
			|||
                data.update({'account_data': data.get('report_data')[1], | 
				
			|||
                             'Filters': data.get('report_data')[0], | 
				
			|||
                             'lines': data.get('report_data')[2], | 
				
			|||
                             }) | 
				
			|||
 | 
				
			|||
        return data | 
				
			|||
@ -1,21 +0,0 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
import time | 
				
			|||
from odoo import api, models, _ | 
				
			|||
from odoo.exceptions import UserError | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class InsReportBalanceSheet(models.AbstractModel): | 
				
			|||
    _name = 'report.dynamic_financial_report.balance_sheet' | 
				
			|||
 | 
				
			|||
    @api.model | 
				
			|||
    def _get_report_values(self, docids, data=None): | 
				
			|||
        if self.env.context.get('js_report'): | 
				
			|||
            if data.get('report_data'): | 
				
			|||
                data.update({ | 
				
			|||
                    'Filters': data.get('report_data')[0], | 
				
			|||
                    'account_data': data.get('report_data')[1], | 
				
			|||
                    'report_lines': data.get('report_data')[2], | 
				
			|||
                    'report_name': data.get('report_name') | 
				
			|||
                }) | 
				
			|||
 | 
				
			|||
        return data | 
				
			|||
@ -1,32 +0,0 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
 | 
				
			|||
import time | 
				
			|||
from odoo import api, models, _ | 
				
			|||
from odoo.exceptions import UserError | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class InsReportGeneralLedger(models.AbstractModel): | 
				
			|||
    _name = 'report.dynamic_financial_report.general_ledger' | 
				
			|||
    @api.model | 
				
			|||
    def _get_report_values(self, docids, data=None): | 
				
			|||
        if self.env.context.get('js_report'): | 
				
			|||
            if data.get('report_data'): | 
				
			|||
                data.update({'account_data': data.get('report_data')[1], | 
				
			|||
                             'Filters': data.get('report_data')[0], | 
				
			|||
                             }) | 
				
			|||
        return data | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class InsReportTrialBalance(models.AbstractModel): | 
				
			|||
    _name = 'report.dynamic_financial_report.trial_balance' | 
				
			|||
 | 
				
			|||
    @api.model | 
				
			|||
    def _get_report_values(self, docids, data=None): | 
				
			|||
        if self.env.context.get('js_report'): | 
				
			|||
 | 
				
			|||
            if data.get('report_data'): | 
				
			|||
                data.update({'account_data': data.get('report_data')[1], | 
				
			|||
                             'Filters': data.get('report_data')[0], | 
				
			|||
                             'total': data.get('report_data')[2], | 
				
			|||
                             }) | 
				
			|||
        return data | 
				
			|||
@ -1,16 +0,0 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
 | 
				
			|||
from odoo import api, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class InsReportPartnerLedger(models.AbstractModel): | 
				
			|||
    _name = 'report.dynamic_financial_report.partner_ledger' | 
				
			|||
 | 
				
			|||
    @api.model | 
				
			|||
    def _get_report_values(self, docids, data=None): | 
				
			|||
        if self.env.context.get('js_report'): | 
				
			|||
            if data.get('report_data'): | 
				
			|||
                data.update({'account_data': data.get('report_data')[1], | 
				
			|||
                             'Filters': data.get('report_data')[0], | 
				
			|||
                             }) | 
				
			|||
        return data | 
				
			|||
		
		
			
  | 
| 
		 Before Width: | Height: | Size: 181 KiB  | 
| 
		 Before Width: | Height: | Size: 50 KiB  | 
| 
		 Before Width: | Height: | Size: 23 KiB  | 
| 
		 Before Width: | Height: | Size: 53 KiB  | 
| 
		 Before Width: | Height: | Size: 471 KiB  | 
| 
		 Before Width: | Height: | Size: 65 KiB  | 
| 
		 Before Width: | Height: | Size: 328 KiB  | 
| 
		 Before Width: | Height: | Size: 712 KiB  | 
| 
		 Before Width: | Height: | Size: 93 KiB  | 
| 
		 Before Width: | Height: | Size: 54 KiB  | 
| 
		 Before Width: | Height: | Size: 42 KiB  | 
| 
		 Before Width: | Height: | Size: 62 KiB  | 
| 
		 Before Width: | Height: | Size: 59 KiB  | 
| 
		 Before Width: | Height: | Size: 36 KiB  | 
| 
		 Before Width: | Height: | Size: 90 KiB  | 
| 
		 Before Width: | Height: | Size: 57 KiB  | 
| 
		 Before Width: | Height: | Size: 38 KiB  | 
| 
		 Before Width: | Height: | Size: 33 KiB  | 
| 
		 Before Width: | Height: | Size: 58 KiB  | 
| 
		 Before Width: | Height: | Size: 51 KiB  | 
| 
		 Before Width: | Height: | Size: 58 KiB  | 
| 
		 Before Width: | Height: | Size: 15 KiB  | 
| 
		 Before Width: | Height: | Size: 111 KiB  | 
| 
		 Before Width: | Height: | Size: 51 KiB  | 
| 
		 Before Width: | Height: | Size: 71 KiB  | 
| 
		 Before Width: | Height: | Size: 80 KiB  | 
| 
		 Before Width: | Height: | Size: 80 KiB  | 
| 
		 Before Width: | Height: | Size: 213 KiB  | 
| 
		 Before Width: | Height: | Size: 82 KiB  | 
| 
		 Before Width: | Height: | Size: 115 KiB  | 
| 
		 Before Width: | Height: | Size: 58 KiB  | 
| 
		 Before Width: | Height: | Size: 61 KiB  | 
| 
		 Before Width: | Height: | Size: 129 KiB  | 
| 
		 Before Width: | Height: | Size: 82 KiB  | 
| 
		 Before Width: | Height: | Size: 96 KiB  | 
| 
		 Before Width: | Height: | Size: 90 KiB  | 
| 
		 Before Width: | Height: | Size: 89 KiB  | 
| 
		 Before Width: | Height: | Size: 112 KiB  | 
| 
		 Before Width: | Height: | Size: 60 KiB  | 
| 
		 Before Width: | Height: | Size: 47 KiB  | 
| 
		 Before Width: | Height: | Size: 43 KiB  | 
| 
		 Before Width: | Height: | Size: 30 KiB  | 
| 
		 Before Width: | Height: | Size: 19 KiB  | 
| 
		 Before Width: | Height: | Size: 40 KiB  | 
| 
		 Before Width: | Height: | Size: 96 KiB  | 
| 
		 Before Width: | Height: | Size: 44 KiB  | 
| 
		 Before Width: | Height: | Size: 93 KiB  | 
| 
		 Before Width: | Height: | Size: 106 KiB  | 
| 
		 Before Width: | Height: | Size: 342 KiB  | 
| 
		 Before Width: | Height: | Size: 112 KiB  | 
| 
		 Before Width: | Height: | Size: 114 KiB  | 
| 
		 Before Width: | Height: | Size: 45 KiB  | 
| 
		 Before Width: | Height: | Size: 28 KiB  | 
@ -1,52 +0,0 @@ | 
				
			|||
odoo.define('dynamic_financial_report.action_manager', function (require) { | 
				
			|||
"use strict"; | 
				
			|||
/** | 
				
			|||
 * The purpose of this file is to add the actions of type | 
				
			|||
 * 'xlsx' to the ActionManager. | 
				
			|||
 */ | 
				
			|||
var ActionManager = require('web.ActionManager'); | 
				
			|||
var framework = require('web.framework'); | 
				
			|||
var session = require('web.session'); | 
				
			|||
 | 
				
			|||
 | 
				
			|||
ActionManager.include({ | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * Executes actions of type 'ir.actions.report'. | 
				
			|||
     * | 
				
			|||
     * @private | 
				
			|||
     * @param {Object} action the description of the action to execute | 
				
			|||
     * @param {Object} options @see doAction for details | 
				
			|||
     * @returns {Promise} resolved when the action has been executed | 
				
			|||
     */ | 
				
			|||
    _executexlsxReportDownloadAction: function (action) { | 
				
			|||
        framework.blockUI(); | 
				
			|||
        var def = $.Deferred(); | 
				
			|||
        session.get_file({ | 
				
			|||
            url: '/xlsx_reports', | 
				
			|||
            data: action.data, | 
				
			|||
            success: def.resolve.bind(def), | 
				
			|||
            error: (error) => this.call('crash_manager', 'rpc_error', error), | 
				
			|||
            complete: framework.unblockUI, | 
				
			|||
        }); | 
				
			|||
        return def; | 
				
			|||
    }, | 
				
			|||
    /** | 
				
			|||
     * Overrides to handle the 'ir.actions.report' actions. | 
				
			|||
     * | 
				
			|||
     * @override | 
				
			|||
     * @private | 
				
			|||
     */ | 
				
			|||
 | 
				
			|||
     _handleAction: function (action, options) { | 
				
			|||
 | 
				
			|||
        if (action.type === 'ir_actions_xlsx_download') { | 
				
			|||
            return this._executexlsxReportDownloadAction(action, options); | 
				
			|||
        } | 
				
			|||
        return this._super.apply(this, arguments); | 
				
			|||
    }, | 
				
			|||
 | 
				
			|||
 | 
				
			|||
}); | 
				
			|||
 | 
				
			|||
}); | 
				
			|||
@ -1,558 +0,0 @@ | 
				
			|||
odoo.define('dynamic_financial_report.ageing_partner', function(require) { | 
				
			|||
    'use strict'; | 
				
			|||
 | 
				
			|||
    var AbstractAction = require('web.AbstractAction'); | 
				
			|||
    var core = require('web.core'); | 
				
			|||
    var field_utils = require('web.field_utils'); | 
				
			|||
    var rpc = require('web.rpc'); | 
				
			|||
    var session = require('web.session'); | 
				
			|||
    var utils = require('web.utils'); | 
				
			|||
    var QWeb = core.qweb; | 
				
			|||
    var _t = core._t; | 
				
			|||
 | 
				
			|||
    var AgeingPartner = AbstractAction.extend({ | 
				
			|||
        template: 'AgeingPartner', | 
				
			|||
        events: { | 
				
			|||
            'click .al-line': 'get_move_lines', | 
				
			|||
            'click .view-move': 'view_move', | 
				
			|||
            'click #filter_apply_button': 'apply_filter', | 
				
			|||
            'click #pdf': 'print_pdf', | 
				
			|||
            'click #xlsx': 'print_xlsx', | 
				
			|||
        }, | 
				
			|||
        init: function(view, code) { | 
				
			|||
            this._super(view, code); | 
				
			|||
            this.wizard = code.context.wizard | null; | 
				
			|||
            this.session = session; | 
				
			|||
        }, | 
				
			|||
        start: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self.initial_render = true; | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.ageing.partner', | 
				
			|||
                method: 'create', | 
				
			|||
                args: [{ | 
				
			|||
                    res_model: this.res_model | 
				
			|||
                }] | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.wizard = res; | 
				
			|||
                self.ledger_view(self.initial_render); | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        apply_filter: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
 | 
				
			|||
            self.initial_render = false; | 
				
			|||
            var output = {}; | 
				
			|||
            output.type=false | 
				
			|||
            output.partner_type=false | 
				
			|||
            var partner_ids = []; | 
				
			|||
            var partner_text = []; | 
				
			|||
            var span_res = document.getElementById("partner_res") | 
				
			|||
            var partner_list = $(".partners").select2('data') | 
				
			|||
 | 
				
			|||
            for (var i = 0; i < partner_list.length; i++) { | 
				
			|||
                if(partner_list[i].element[0].selected === true) | 
				
			|||
                    {partner_ids.push(parseInt(partner_list[i].id)) | 
				
			|||
                    if(partner_text.includes(partner_list[i].text) === false) | 
				
			|||
                    {partner_text.push(partner_list[i].text) | 
				
			|||
                    } | 
				
			|||
                    span_res.value = partner_text | 
				
			|||
                    span_res.innerHTML=span_res.value; | 
				
			|||
                    } | 
				
			|||
            } | 
				
			|||
            if (partner_list.length == 0){ | 
				
			|||
            span_res.value = "" | 
				
			|||
            span_res.innerHTML=""; } | 
				
			|||
            output.partner_ids = partner_ids | 
				
			|||
            var partner_category_ids = []; | 
				
			|||
            var category_text = []; | 
				
			|||
            var span_res = document.getElementById("category_res") | 
				
			|||
 | 
				
			|||
            var category_list = $(".partner-tag").select2('data') | 
				
			|||
            for (var i = 0; i < category_list.length; i++) { | 
				
			|||
 | 
				
			|||
                if(category_list[i].element[0].selected === true) | 
				
			|||
                    {partner_category_ids.push(parseInt(category_list[i].id)) | 
				
			|||
                    if(category_text.includes(category_list[i].text) === false) | 
				
			|||
                    {category_text.push(category_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    span_res.value = category_text | 
				
			|||
                    span_res.innerHTML=span_res.value; | 
				
			|||
                    } | 
				
			|||
            } | 
				
			|||
            if (category_list.length == 0){ | 
				
			|||
            span_res.value = "" | 
				
			|||
            span_res.innerHTML=""; } | 
				
			|||
            output.partner_category_ids = partner_category_ids | 
				
			|||
 | 
				
			|||
              if ($(".target-moves").length){ | 
				
			|||
              var target_res = document.getElementById("target_res") | 
				
			|||
              output.target_moves = $(".target-moves")[1].value | 
				
			|||
              target_res.value = $(".target-moves")[1].value | 
				
			|||
                 target_res.innerHTML=target_res.value; | 
				
			|||
              if ($(".target-moves").value==""){ | 
				
			|||
              target_res.innerHTML="draft"; | 
				
			|||
              output.target_moves = "draft" | 
				
			|||
                } | 
				
			|||
              } | 
				
			|||
 | 
				
			|||
            if ($(".partner-type").length){ | 
				
			|||
              var partner_type_res = document.getElementById("partner_type_res") | 
				
			|||
              output.partner_type = $(".partner-type")[1].value | 
				
			|||
              partner_type_res.value = $(".partner-type")[1].value | 
				
			|||
                 partner_type_res.innerHTML=partner_type_res.value; | 
				
			|||
              if ($(".partner-type").value==""){ | 
				
			|||
              partner_type_res.innerHTML="customer"; | 
				
			|||
              output.partner_type = "customer" | 
				
			|||
                } | 
				
			|||
              } | 
				
			|||
 | 
				
			|||
            if ($(".account").length){ | 
				
			|||
              var type_res = document.getElementById("type_res") | 
				
			|||
              output.type = $(".account")[1].value | 
				
			|||
              type_res.value = $(".account")[1].value | 
				
			|||
                 type_res.innerHTML=type_res.value; | 
				
			|||
              if ($(".account").value==""){ | 
				
			|||
              type_res.innerHTML="receivable"; | 
				
			|||
              output.type = "receivable" | 
				
			|||
                } | 
				
			|||
              } | 
				
			|||
 | 
				
			|||
            if ($("#as_on_date").val()) { | 
				
			|||
                var dateObject = $("#as_on_date").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.as_on_date = dateString; | 
				
			|||
            } | 
				
			|||
            output.include_details = true; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.ageing.partner', | 
				
			|||
                method: 'write', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], output | 
				
			|||
                ], | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.ledger_view(self.initial_render); | 
				
			|||
 | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        print_pdf: function(e) { | 
				
			|||
            e.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.ageing.partner', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir.actions.report', | 
				
			|||
                    'report_type': 'qweb-pdf', | 
				
			|||
                    'report_name': 'dynamic_financial_report.ageing_partner', | 
				
			|||
                    'report_file': 'dynamic_financial_report.ageing_partner', | 
				
			|||
                    'data': { | 
				
			|||
                        'report_data': data | 
				
			|||
                    }, | 
				
			|||
                    'context': { | 
				
			|||
                        'active_model': 'dynamic.ageing.partner', | 
				
			|||
                        'landscape': 1, | 
				
			|||
                        'js_report': true | 
				
			|||
                    }, | 
				
			|||
                    'display_name': 'Ageing Partner Report', | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        print_xlsx: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.ageing.partner', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir_actions_xlsx_download', | 
				
			|||
                    'data': { | 
				
			|||
                         'model': 'dynamic.ageing.partner', | 
				
			|||
                         'options': JSON.stringify(data[1]), | 
				
			|||
                         'output_format': 'xlsx', | 
				
			|||
                         'report_data': JSON.stringify(data[0]), | 
				
			|||
                         'report_name': 'Partner Ageing', | 
				
			|||
                         'dfr_data': JSON.stringify(data), | 
				
			|||
                    }, | 
				
			|||
                }; | 
				
			|||
 | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        ledger_view: function(initial_render = true) { | 
				
			|||
            var self = this; | 
				
			|||
            var node = self.$('.container-al-main'); | 
				
			|||
            var last; | 
				
			|||
            while (last = node.lastChild) node.removeChild(last); | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.ageing.partner', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(datas) { | 
				
			|||
                self.filter_data = datas[0] | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                self.account_data = datas[1] | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                _.each(self.account_data, function(account) { | 
				
			|||
 | 
				
			|||
                    var currency_format = { | 
				
			|||
                        currency_id: account.company_currency_id, | 
				
			|||
                        position: account.company_currency_position, | 
				
			|||
                        symbol: account.company_currency_symbol, | 
				
			|||
 | 
				
			|||
                        noSymbol: true, | 
				
			|||
                    }; | 
				
			|||
 | 
				
			|||
                      if (currency_format.position == "before") { | 
				
			|||
 | 
				
			|||
                         if (account.total == 0) { | 
				
			|||
                                account.total = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.total = currency_format.symbol + ' ' + account.total.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.Not == 0) { | 
				
			|||
                                account.Not = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.Not = currency_format.symbol + ' ' + account.Not.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.value_20 == 0) { | 
				
			|||
                                account.value_20 = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.value_20 = currency_format.symbol + ' ' + account.value_20.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account[2140] == 0) { | 
				
			|||
                                account[2140] = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account[2140] = currency_format.symbol + ' ' + account[2140].toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account[4160] == 0) { | 
				
			|||
                                account[4160] = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account[4160] = currency_format.symbol + ' ' + account[4160].toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account[6180] == 0) { | 
				
			|||
                                account[6180] = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account[6180] = currency_format.symbol + ' ' + account[6180].toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account[81100] == 0) { | 
				
			|||
                                account[81100] = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account[81100] = currency_format.symbol + ' ' + account[81100].toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account[100] == 0) { | 
				
			|||
                                account[100] = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account[100] = currency_format.symbol + ' ' + account[100].toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                        } else { | 
				
			|||
 | 
				
			|||
                            if (account.total == 0) { | 
				
			|||
                                account.total = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.total = account.total.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
//
 | 
				
			|||
                            } | 
				
			|||
                            if (account.Not == 0) { | 
				
			|||
                                account.Not = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.Not = account.Not.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.value_20 == 0) { | 
				
			|||
                                account.value_20 = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.value_20 = account.value_20.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account[2140] == 0) { | 
				
			|||
                                account[2140] = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account[2140] = account[2140].toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account[4160] == 0) { | 
				
			|||
                                account[4160] = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account[4160] = account[4160].toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account[6180] == 0) { | 
				
			|||
                                account[6180] = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account[6180] = account[6180].toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account[81100] == 0) { | 
				
			|||
                                account[81100] = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account[81100] = account[81100].toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account[100] == 0) { | 
				
			|||
                                account[100] = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account[100] = account[100].toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                        } | 
				
			|||
 | 
				
			|||
                }); | 
				
			|||
                if (initial_render) { | 
				
			|||
                    self.$('.al-filter').html(QWeb.render('FilterSection-al', { | 
				
			|||
                        filter_data: datas[0], | 
				
			|||
                    })); | 
				
			|||
                    self.$el.find('.account').select2({ | 
				
			|||
                        placeholder: 'Select Account Type...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.partner-type').select2({ | 
				
			|||
                        placeholder: 'Select Partner Type...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.partner-tag').select2({ | 
				
			|||
                        placeholder: 'Select Partner Tag...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.partners').select2({ | 
				
			|||
                        placeholder: 'Select Partners...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.target-moves').select2({ | 
				
			|||
                       placeholder: 'Posted or All Entries...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('#as_on_date').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
 | 
				
			|||
                } | 
				
			|||
 | 
				
			|||
                self.$('.container-al-main').html(QWeb.render('AgeingPartnerData', { | 
				
			|||
                    account_data: datas[1] | 
				
			|||
                })); | 
				
			|||
 | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        al_lines_by_page: function(offset, account_id) { | 
				
			|||
 | 
				
			|||
            var self = this; | 
				
			|||
            return rpc.query({ | 
				
			|||
                model: 'dynamic.ageing.partner', | 
				
			|||
                method: 'al_move_lines', | 
				
			|||
                args: [self.wizard, offset, account_id], | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
get_move_lines: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var account_id = $(event.currentTarget).data('account-id'); | 
				
			|||
            var offset = 0; | 
				
			|||
            var td = $(event.currentTarget).next('tr').find('td'); | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            if (td.length == 1) { | 
				
			|||
                self.al_lines_by_page(offset, account_id).then(function(datas) { | 
				
			|||
 | 
				
			|||
                    _.each(datas[2], function(data) { | 
				
			|||
 | 
				
			|||
                        var currency_format = { | 
				
			|||
                            currency_id: data.company_currency_id, | 
				
			|||
                            position: data.company_currency_position, | 
				
			|||
                            symbol: data.company_currency_symbol, | 
				
			|||
                            noSymbol: true, | 
				
			|||
                        }; | 
				
			|||
 | 
				
			|||
                         if (currency_format.position == "before") { | 
				
			|||
                            if (data.range_0 == 0) { | 
				
			|||
                                data.range_0 = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.range_0 = currency_format.symbol  + data.range_0.toFixed(2) ; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.range_1 == 0) { | 
				
			|||
                                data.range_1 = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.range_1 = currency_format.symbol  + data.range_1.toFixed(2) ; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.range_2 == 0) { | 
				
			|||
                                data.range_2 = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.range_2 = currency_format.symbol  + data.range_2.toFixed(2)  ; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.range_3 == 0) { | 
				
			|||
                                data.range_3 = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.range_3 = currency_format.symbol  + data.range_3.toFixed(2)  ; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.range_4 == 0) { | 
				
			|||
                                data.range_4 = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.range_4 = currency_format.symbol  + data.range_4.toFixed(2)  ; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.range_5 == 0) { | 
				
			|||
                                data.range_5 = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.range_5 = currency_format.symbol  + data.range_5.toFixed(2)  ; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.range_6 == 0) { | 
				
			|||
                                data.range_6 = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.range_6 = currency_format.symbol  + data.range_6.toFixed(2)  ; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                        } else { | 
				
			|||
                            if (data.range_0 == 0) { | 
				
			|||
                                data.range_0 = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.range_0 = data.range_0.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.range_1 == 0) { | 
				
			|||
                                data.range_1 = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.range_1 = data.range_1.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.range_2 == 0) { | 
				
			|||
                                data.range_2 = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.range_2 = data.range_2.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.range_3 == 0) { | 
				
			|||
                                data.range_3 = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.range_3 = data.range_3.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.range_4 == 0) { | 
				
			|||
                                data.range_4 = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.range_4 = data.range_4.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.range_5 == 0) { | 
				
			|||
                                data.range_5 = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.range_5 = data.range_5.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.range_6 == 0) { | 
				
			|||
                                data.range_6 = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.range_6 = data.range_6.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                        } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    }); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td .al-table-div').remove(); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul').after( | 
				
			|||
                        QWeb.render('SubSection_al', { | 
				
			|||
                            count: datas[0], | 
				
			|||
                            offset: datas[1], | 
				
			|||
                            account_data: datas[2], | 
				
			|||
                        })) | 
				
			|||
 | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul li:first a').css({ | 
				
			|||
                        'background-color': '#00ede8', | 
				
			|||
                        'font-weight': 'bold', | 
				
			|||
                    }); | 
				
			|||
 | 
				
			|||
                }) | 
				
			|||
            } | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        view_move: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var context = {}; | 
				
			|||
            var redirect_to_document = function(res_model, res_id, view_id) { | 
				
			|||
 | 
				
			|||
                var action = { | 
				
			|||
                    type: 'ir.actions.act_window', | 
				
			|||
                    view_type: 'form', | 
				
			|||
                    view_mode: 'form', | 
				
			|||
                    res_model: res_model, | 
				
			|||
                    views: [ | 
				
			|||
                        [view_id || false, 'form'] | 
				
			|||
                    ], | 
				
			|||
                    res_id: res_id, | 
				
			|||
                    target: 'current', | 
				
			|||
                    context: context, | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }; | 
				
			|||
            rpc.query({ | 
				
			|||
                    model: 'account.move', | 
				
			|||
                    method: 'search_read', | 
				
			|||
                    domain: [ | 
				
			|||
                        ['id', '=', $(event.currentTarget).data('move-id')] | 
				
			|||
                    ], | 
				
			|||
                    fields: ['id'], | 
				
			|||
                    limit: 1, | 
				
			|||
                }) | 
				
			|||
                .then(function(record) { | 
				
			|||
                    if (record.length > 0) { | 
				
			|||
                        redirect_to_document('account.move', record[0].id); | 
				
			|||
                    } else { | 
				
			|||
                        redirect_to_document('account.move', $(event.currentTarget).data('move-id')); | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
    }); | 
				
			|||
    core.action_registry.add('dynamic.al', AgeingPartner); | 
				
			|||
 | 
				
			|||
}); | 
				
			|||
@ -1,530 +0,0 @@ | 
				
			|||
odoo.define('dynamic_financial_report.balance_sheet', function(require) { | 
				
			|||
    'use strict'; | 
				
			|||
    var AbstractAction = require('web.AbstractAction'); | 
				
			|||
    var core = require('web.core'); | 
				
			|||
    var field_utils = require('web.field_utils'); | 
				
			|||
    var rpc = require('web.rpc'); | 
				
			|||
    var session = require('web.session'); | 
				
			|||
    var utils = require('web.utils'); | 
				
			|||
    var QWeb = core.qweb; | 
				
			|||
    var _t = core._t; | 
				
			|||
 | 
				
			|||
    var BalanceSheet = AbstractAction.extend({ | 
				
			|||
        template: 'BalanceSheet', | 
				
			|||
        events: { | 
				
			|||
            'click .bs-line': 'get_move_lines', | 
				
			|||
            'click .view-move': 'view_move', | 
				
			|||
            'click #filter_apply_button': 'apply_filter', | 
				
			|||
            'click #pdf': 'print_pdf', | 
				
			|||
            'click #xlsx': 'print_xlsx', | 
				
			|||
            'click .open-gl': 'get_gl', | 
				
			|||
        }, | 
				
			|||
        init: function(view, code) { | 
				
			|||
            this._super(view, code); | 
				
			|||
            this.wizard = code.context.wizard | null; | 
				
			|||
            this.session = session; | 
				
			|||
        }, | 
				
			|||
        start: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self.initial_render = true; | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.balance.sheet', | 
				
			|||
                method: 'create', | 
				
			|||
                args: [{ | 
				
			|||
 | 
				
			|||
                }] | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.wizard = res; | 
				
			|||
                self.sheet_view(self.initial_render); | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
            apply_filter: function(event) { | 
				
			|||
 | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
 | 
				
			|||
            self.initial_render = false; | 
				
			|||
            var output = {}; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var account_ids = []; | 
				
			|||
            var account_text = []; | 
				
			|||
            var account_res = document.getElementById("acc_res") | 
				
			|||
            var account_list = $(".account").select2('data') | 
				
			|||
            for (var i = 0; i < account_list.length; i++) { | 
				
			|||
 | 
				
			|||
                if(account_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    account_ids.push(parseInt(account_list[i].id)) | 
				
			|||
                    if(account_text.includes(account_list[i].text) === false){ | 
				
			|||
                        account_text.push(account_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
                    account_res.value = account_text | 
				
			|||
                    account_res.innerHTML=account_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (account_list.length == 0){ | 
				
			|||
               account_res.value = "" | 
				
			|||
                    account_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.account_ids = account_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
             var journal_ids = []; | 
				
			|||
            var journal_text = []; | 
				
			|||
            var journal_res = document.getElementById("journal_res") | 
				
			|||
            var journal_list = $(".journal").select2('data') | 
				
			|||
            for (var i = 0; i < journal_list.length; i++) { | 
				
			|||
 | 
				
			|||
                if(journal_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    journal_ids.push(parseInt(journal_list[i].id)) | 
				
			|||
                    if(journal_text.includes(journal_list[i].text) === false){ | 
				
			|||
                        journal_text.push(journal_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    journal_res.value = journal_text | 
				
			|||
                    journal_res.innerHTML=journal_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (journal_list.length == 0){ | 
				
			|||
               journal_res.value = "" | 
				
			|||
                    journal_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.journal_ids = journal_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var account_tag_ids = []; | 
				
			|||
            var account_tag_text = []; | 
				
			|||
            var account_tag_res = document.getElementById("acc_tag_res") | 
				
			|||
            var account_tag_list = $(".account-tag").select2('data') | 
				
			|||
            for (var i = 0; i < account_tag_list.length; i++) { | 
				
			|||
                if(account_tag_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    account_tag_ids.push(parseInt(account_tag_list[i].id)) | 
				
			|||
                    if(account_tag_text.includes(account_tag_list[i].text) === false){ | 
				
			|||
                        account_tag_text.push(account_tag_list[i].text) | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    account_tag_res.value = account_tag_text | 
				
			|||
                    account_tag_res.innerHTML=account_tag_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (account_tag_list.length == 0){ | 
				
			|||
               account_tag_res.value = "" | 
				
			|||
                    account_tag_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.account_tag_ids = account_tag_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
               var analytic_ids = []; | 
				
			|||
            var analytic_text = []; | 
				
			|||
            var span_res = document.getElementById("analic_res") | 
				
			|||
            var analytic_list = $(".analytic").select2('data') | 
				
			|||
            for (var i = 0; i < analytic_list.length; i++) { | 
				
			|||
                if(analytic_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    analytic_ids.push(parseInt(analytic_list[i].id)) | 
				
			|||
                    if(analytic_text.includes(analytic_list[i].text) === false){ | 
				
			|||
                        analytic_text.push(analytic_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    span_res.value = analytic_text | 
				
			|||
                    span_res.innerHTML=span_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (analytic_list.length == 0){ | 
				
			|||
               span_res.value = "" | 
				
			|||
                    span_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.analytic_ids = analytic_ids | 
				
			|||
 | 
				
			|||
            output.analytic_tag_ids = analytic_tag_ids | 
				
			|||
 | 
				
			|||
            var analytic_tag_ids = []; | 
				
			|||
            var analytic_tag_text = []; | 
				
			|||
            var analytic_tag_res = document.getElementById("analic_tag_res") | 
				
			|||
            var analytic_tag_list = $(".analytic-tag").select2('data') | 
				
			|||
            for (var i = 0; i < analytic_tag_list.length; i++) { | 
				
			|||
                if(analytic_tag_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    analytic_tag_ids.push(parseInt(analytic_tag_list[i].id)) | 
				
			|||
                    if(analytic_tag_text.includes(analytic_tag_list[i].text) === false){ | 
				
			|||
                        analytic_tag_text.push(analytic_tag_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    analytic_tag_res.value = analytic_tag_text | 
				
			|||
                    analytic_tag_res.innerHTML=analytic_tag_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (analytic_tag_list.length == 0){ | 
				
			|||
               analytic_tag_res.value = "" | 
				
			|||
                    analytic_tag_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.analytic_tag_ids = analytic_tag_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            if ($("#date_from").val()) { | 
				
			|||
                var dateObject = $("#date_from").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_from = dateString; | 
				
			|||
            } | 
				
			|||
            if ($("#date_to").val()) { | 
				
			|||
                var dateObject = $("#date_to").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_to = dateString; | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
            if ($(".entries").length) { | 
				
			|||
            var post_res = document.getElementById("post_res") | 
				
			|||
 | 
				
			|||
            output.entries = $(".entries")[1].value | 
				
			|||
            post_res.value = $(".entries")[1].value | 
				
			|||
                    post_res.innerHTML=post_res.value; | 
				
			|||
              if ($(".entries")[1].value == "") { | 
				
			|||
              post_res.innerHTML="all"; | 
				
			|||
 | 
				
			|||
              } | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
            output.include_details = true; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.balance.sheet', | 
				
			|||
                method: 'write', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], output | 
				
			|||
                ], | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.sheet_view(self.initial_render); | 
				
			|||
 | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        get_gl: function(e) { | 
				
			|||
            var self = this; | 
				
			|||
            var account_id = $(e.target).attr('data-account-id'); | 
				
			|||
            var options = { | 
				
			|||
                account_ids: [account_id], | 
				
			|||
            } | 
				
			|||
                var action = { | 
				
			|||
                    type: 'ir.actions.client', | 
				
			|||
                    name: 'GL View', | 
				
			|||
                    tag: 'dynamic.gl', | 
				
			|||
                    target: 'new', | 
				
			|||
 | 
				
			|||
                    domain: [['account_ids','=', account_id]], | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                } | 
				
			|||
                return this.do_action(action); | 
				
			|||
 | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        print_pdf: function(e) { | 
				
			|||
            e.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
                        var action_title = self._title | 
				
			|||
 | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.balance.sheet', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], action_title | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
 | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir.actions.report', | 
				
			|||
                    'report_type': 'qweb-pdf', | 
				
			|||
                    'report_name': 'dynamic_financial_report.balance_sheet', | 
				
			|||
                    'report_file': 'dynamic_financial_report.balance_sheet', | 
				
			|||
                    'data': { | 
				
			|||
                        'report_data': data, | 
				
			|||
                        'report_name': 'Balance Sheet' | 
				
			|||
                    }, | 
				
			|||
                    'context': { | 
				
			|||
                        'active_model': 'dynamic.balance.sheet', | 
				
			|||
                        'landscape': 1, | 
				
			|||
                        'js_report': true | 
				
			|||
                    }, | 
				
			|||
                    'display_name': 'Balance Sheet', | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        print_xlsx: function() { | 
				
			|||
            var self = this; | 
				
			|||
            var action_title = self._title | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.balance.sheet', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], action_title | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
 | 
				
			|||
                var action = { | 
				
			|||
                       'type': 'ir_actions_xlsx_download', | 
				
			|||
                        'data': { | 
				
			|||
                             'model': 'dynamic.balance.sheet', | 
				
			|||
                             'options': 'Balance Sheet', | 
				
			|||
                             'output_format': 'xlsx', | 
				
			|||
                             'report_data': JSON.stringify(data[0]), | 
				
			|||
                             'report_name': 'Balance Sheet', | 
				
			|||
                             'dfr_data':JSON.stringify(data[2]), | 
				
			|||
                        }, | 
				
			|||
                    }; | 
				
			|||
 | 
				
			|||
                    return self.do_action(action); | 
				
			|||
                }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        sheet_view: function(initial_render = true) { | 
				
			|||
            var self = this; | 
				
			|||
            console.log("self",self._title) | 
				
			|||
//            console.log("afgkjhs",self.__parentedParent.controllerStack[0])
 | 
				
			|||
//            var action_controller = self.__parentedParent.controllerStack[0]
 | 
				
			|||
            var action_title = self._title | 
				
			|||
            var node = self.$('.container-bs-main'); | 
				
			|||
            var last; | 
				
			|||
            while (last = node.lastChild) node.removeChild(last); | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.balance.sheet', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], action_title | 
				
			|||
                ], | 
				
			|||
            }).then(function(datas) { | 
				
			|||
                self.filter_data = datas[0] | 
				
			|||
 | 
				
			|||
                self.account_data = datas[1] | 
				
			|||
 | 
				
			|||
                _.each(self.account_data, function(account) { | 
				
			|||
                    var currency_format = { | 
				
			|||
                        currency_id: account.company_currency_id, | 
				
			|||
                        position: account.company_currency_position, | 
				
			|||
                        symbol: account.company_currency_symbol, | 
				
			|||
                        noSymbol: true, | 
				
			|||
                    }; | 
				
			|||
                    if (currency_format.position == "before") { | 
				
			|||
 | 
				
			|||
                         if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = currency_format.symbol + ' ' + account.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = currency_format.symbol + ' ' + account.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = currency_format.symbol + ' ' + account.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } else { | 
				
			|||
 | 
				
			|||
                        if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = account.debit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = account.credit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = account.balance.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
 | 
				
			|||
                if (initial_render) { | 
				
			|||
                    self.$('.bs-filter').html(QWeb.render('FilterSectionBS', { | 
				
			|||
                        filter_data: datas[0], | 
				
			|||
                    })); | 
				
			|||
 | 
				
			|||
                    self.$el.find('.journal').select2({ | 
				
			|||
                        placeholder: 'Select Journal...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.account').select2({ | 
				
			|||
                        placeholder: 'Select Account...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.account-tag').select2({ | 
				
			|||
                        placeholder: 'Select Account Tag...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.analytic-tag').select2({ | 
				
			|||
                        placeholder: 'Select Analytic Tag...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.analytic').select2({ | 
				
			|||
                        placeholder: 'Select Analytic...', | 
				
			|||
                    }); | 
				
			|||
 | 
				
			|||
                    self.$el.find('#date_from').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('#date_to').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.entries').select2({ | 
				
			|||
                        placeholder: 'Select Moves', | 
				
			|||
                    }); | 
				
			|||
                } | 
				
			|||
                self.$('.container-bs-main').html(QWeb.render('BalanceSheetData', { | 
				
			|||
                    account_data: datas[1], | 
				
			|||
                    report_lines: datas[2] | 
				
			|||
                })); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        bs_lines_by_page: function(offset, account_id) { | 
				
			|||
            var self = this; | 
				
			|||
            return rpc.query({ | 
				
			|||
                model: 'dynamic.balance.sheet', | 
				
			|||
                method: 'bs_move_lines', | 
				
			|||
                args: [self.wizard, offset, account_id], | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
        get_move_lines: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var account_id = $(event.currentTarget).data('account-id'); | 
				
			|||
            var offset = 0; | 
				
			|||
            var td = $(event.currentTarget).next('tr').find('td'); | 
				
			|||
            if (td.length == 1) { | 
				
			|||
                self.bs_lines_by_page(offset, account_id).then(function(datas) { | 
				
			|||
                    _.each(datas[2], function(data) { | 
				
			|||
                        var currency_format = { | 
				
			|||
                            currency_id: data.company_currency_id, | 
				
			|||
                            position: data.company_currency_position, | 
				
			|||
                            symbol: data.company_currency_symbol, | 
				
			|||
                            noSymbol: true, | 
				
			|||
                        }; | 
				
			|||
                        if (currency_format.position == "before") { | 
				
			|||
                            if (data.debit == 0) { | 
				
			|||
                                data.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.debit = currency_format.symbol + ' ' + data.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.credit == 0) { | 
				
			|||
                                data.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.credit = currency_format.symbol + ' ' + data.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.balance == 0) { | 
				
			|||
                                data.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.balance = currency_format.symbol + ' ' + data.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                        } else { | 
				
			|||
                            if (data.debit == 0) { | 
				
			|||
                                data.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.debit = data.debit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.credit == 0) { | 
				
			|||
                                data.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.credit = data.credit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.balance == 0) { | 
				
			|||
                                data.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.balance = data.balance.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
 | 
				
			|||
                        } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    }); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td .bs-table-div').remove(); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul').after( | 
				
			|||
                        QWeb.render('SubSectionBS', { | 
				
			|||
                            count: datas[0], | 
				
			|||
                            offset: datas[1], | 
				
			|||
                            account_data: datas[2], | 
				
			|||
                        })) | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul li:first a').css({ | 
				
			|||
                        'background-color': '#00ede8', | 
				
			|||
                        'font-weight': 'bold', | 
				
			|||
                    }); | 
				
			|||
                }) | 
				
			|||
            } | 
				
			|||
        }, | 
				
			|||
        view_move: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var context = {}; | 
				
			|||
            var redirect_to_document = function(res_model, res_id, view_id) { | 
				
			|||
                var action = { | 
				
			|||
                    type: 'ir.actions.act_window', | 
				
			|||
                    view_type: 'form', | 
				
			|||
                    view_mode: 'form', | 
				
			|||
                    res_model: res_model, | 
				
			|||
                    views: [ | 
				
			|||
                        [view_id || false, 'form'] | 
				
			|||
                    ], | 
				
			|||
                    res_id: res_id, | 
				
			|||
                    target: 'current', | 
				
			|||
                    context: context, | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }; | 
				
			|||
            rpc.query({ | 
				
			|||
                    model: 'account.move', | 
				
			|||
                    method: 'search_read', | 
				
			|||
                    domain: [ | 
				
			|||
                        ['id', '=', $(event.currentTarget).data('move-id')] | 
				
			|||
                    ], | 
				
			|||
                    fields: ['id'], | 
				
			|||
                    limit: 1, | 
				
			|||
                }) | 
				
			|||
                .then(function(record) { | 
				
			|||
                    if (record.length > 0) { | 
				
			|||
                        redirect_to_document('account.move', record[0].id); | 
				
			|||
                    } else { | 
				
			|||
                        redirect_to_document('account.move', $(event.currentTarget).data('move-id')); | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
    }); | 
				
			|||
    core.action_registry.add('dynamic.bs', BalanceSheet); | 
				
			|||
 | 
				
			|||
}); | 
				
			|||
@ -1,996 +0,0 @@ | 
				
			|||
odoo.define('dynamic_financial_report.bank_book', function(require) { | 
				
			|||
    'use strict'; | 
				
			|||
    var AbstractAction = require('web.AbstractAction'); | 
				
			|||
    var core = require('web.core'); | 
				
			|||
    var field_utils = require('web.field_utils'); | 
				
			|||
    var rpc = require('web.rpc'); | 
				
			|||
    var session = require('web.session'); | 
				
			|||
    var utils = require('web.utils'); | 
				
			|||
    var QWeb = core.qweb; | 
				
			|||
    var _t = core._t; | 
				
			|||
 | 
				
			|||
   var BankBook = AbstractAction.extend({ | 
				
			|||
        template: 'BankBook', | 
				
			|||
        events: { | 
				
			|||
            'click .bb-line': 'get_move_lines', | 
				
			|||
            'click .view-move': 'view_move', | 
				
			|||
            'click #filter_apply_button': 'apply_filter', | 
				
			|||
            'click #pdf': 'print_pdf', | 
				
			|||
            'click #xlsx': 'print_xlsx', | 
				
			|||
        }, | 
				
			|||
        init: function(view, code) { | 
				
			|||
            this._super(view, code); | 
				
			|||
            this.wizard = code.context.wizard | null; | 
				
			|||
            this.session = session; | 
				
			|||
        }, | 
				
			|||
        start: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self.initial_render = true; | 
				
			|||
 | 
				
			|||
                rpc.query({ | 
				
			|||
                model: 'dynamic.bank.book', | 
				
			|||
                method: 'create', | 
				
			|||
                args: [{ | 
				
			|||
 | 
				
			|||
                }] | 
				
			|||
                }).then(function(res) { | 
				
			|||
                    self.wizard = res; | 
				
			|||
                    self.bank_view(self.initial_render); | 
				
			|||
                }) | 
				
			|||
 | 
				
			|||
        }, | 
				
			|||
            apply_filter: function(event) { | 
				
			|||
 | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
 | 
				
			|||
            self.initial_render = false; | 
				
			|||
            var output = {}; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var account_ids = []; | 
				
			|||
            var account_text = []; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var account_res = document.getElementById("acc_res") | 
				
			|||
            var account_list = $(".account").select2('data') | 
				
			|||
            for (var i = 0; i < account_list.length; i++) { | 
				
			|||
 | 
				
			|||
                if(account_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    account_ids.push(parseInt(account_list[i].id)) | 
				
			|||
                    if(account_text.includes(account_list[i].text) === false){ | 
				
			|||
                        account_text.push(account_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    account_res.value = account_text | 
				
			|||
                    account_res.innerHTML=account_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (account_list.length == 0){ | 
				
			|||
               account_res.value = "" | 
				
			|||
                    account_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.account_ids = account_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
             var journal_ids = []; | 
				
			|||
            var journal_text = []; | 
				
			|||
            var journal_res = document.getElementById("journal_res") | 
				
			|||
            var journal_list = $(".journal").select2('data') | 
				
			|||
            for (var i = 0; i < journal_list.length; i++) { | 
				
			|||
 | 
				
			|||
                if(journal_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    journal_ids.push(parseInt(journal_list[i].id)) | 
				
			|||
                    if(journal_text.includes(journal_list[i].text) === false){ | 
				
			|||
                        journal_text.push(journal_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    journal_res.value = journal_text | 
				
			|||
                    journal_res.innerHTML=journal_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (journal_list.length == 0){ | 
				
			|||
               journal_res.value = "" | 
				
			|||
                    journal_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.journal_ids = journal_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var account_tag_ids = []; | 
				
			|||
            var account_tag_text = []; | 
				
			|||
            var account_tag_res = document.getElementById("acc_tag_res") | 
				
			|||
            var account_tag_list = $(".account-tag").select2('data') | 
				
			|||
            for (var i = 0; i < account_tag_list.length; i++) { | 
				
			|||
                if(account_tag_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    account_tag_ids.push(parseInt(account_tag_list[i].id)) | 
				
			|||
                    if(account_tag_text.includes(account_tag_list[i].text) === false){ | 
				
			|||
                        account_tag_text.push(account_tag_list[i].text) | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    account_tag_res.value = account_tag_text | 
				
			|||
                    account_tag_res.innerHTML=account_tag_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (account_tag_list.length == 0){ | 
				
			|||
               account_tag_res.value = "" | 
				
			|||
                    account_tag_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.account_tag_ids = account_tag_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
               var analytic_ids = []; | 
				
			|||
            var analytic_text = []; | 
				
			|||
            var span_res = document.getElementById("analic_res") | 
				
			|||
            var analytic_list = $(".analytic").select2('data') | 
				
			|||
            for (var i = 0; i < analytic_list.length; i++) { | 
				
			|||
                if(analytic_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    analytic_ids.push(parseInt(analytic_list[i].id)) | 
				
			|||
                    if(analytic_text.includes(analytic_list[i].text) === false){ | 
				
			|||
                        analytic_text.push(analytic_list[i].text) | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    span_res.value = analytic_text | 
				
			|||
                    span_res.innerHTML=span_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (analytic_list.length == 0){ | 
				
			|||
               span_res.value = "" | 
				
			|||
                    span_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.analytic_ids = analytic_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            output.analytic_tag_ids = analytic_tag_ids | 
				
			|||
 | 
				
			|||
            var analytic_tag_ids = []; | 
				
			|||
            var analytic_tag_text = []; | 
				
			|||
            var analytic_tag_res = document.getElementById("analic_tag_res") | 
				
			|||
            var analytic_tag_list = $(".analytic-tag").select2('data') | 
				
			|||
            for (var i = 0; i < analytic_tag_list.length; i++) { | 
				
			|||
                if(analytic_tag_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    analytic_tag_ids.push(parseInt(analytic_tag_list[i].id)) | 
				
			|||
                    if(analytic_tag_text.includes(analytic_tag_list[i].text) === false){ | 
				
			|||
                        analytic_tag_text.push(analytic_tag_list[i].text) | 
				
			|||
                    } | 
				
			|||
                    analytic_tag_res.value = analytic_tag_text | 
				
			|||
                    analytic_tag_res.innerHTML=analytic_tag_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (analytic_tag_list.length == 0){ | 
				
			|||
               analytic_tag_res.value = "" | 
				
			|||
                    analytic_tag_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.analytic_tag_ids = analytic_tag_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            if ($("#date_from").val()) { | 
				
			|||
                var dateObject = $("#date_from").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_from = dateString; | 
				
			|||
            } | 
				
			|||
            if ($("#date_to").val()) { | 
				
			|||
                var dateObject = $("#date_to").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_to = dateString; | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
            if ($(".entries").length) { | 
				
			|||
            var post_res = document.getElementById("post_res") | 
				
			|||
            output.entries = $(".entries")[1].value | 
				
			|||
            post_res.value = $(".entries")[1].value | 
				
			|||
                    post_res.innerHTML=post_res.value; | 
				
			|||
              if ($(".entries")[1].value == "") { | 
				
			|||
              post_res.innerHTML="all"; | 
				
			|||
 | 
				
			|||
              } | 
				
			|||
            } | 
				
			|||
            output.include_details = true; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.bank.book', | 
				
			|||
                method: 'write', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], output | 
				
			|||
                ], | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.bank_view(self.initial_render); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        print_pdf: function(e) { | 
				
			|||
            e.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var action_title = self._title | 
				
			|||
 | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.bank.book', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], action_title | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir.actions.report', | 
				
			|||
                    'report_type': 'qweb-pdf', | 
				
			|||
                    'report_name': 'dynamic_financial_report.bank_book', | 
				
			|||
                    'report_file': 'dynamic_financial_report.bank_book', | 
				
			|||
                    'data': { | 
				
			|||
                        'report_data': data | 
				
			|||
                    }, | 
				
			|||
                    'context': { | 
				
			|||
                        'active_model': 'dynamic.bank.book', | 
				
			|||
                        'landscape': 1, | 
				
			|||
                        'js_report': true | 
				
			|||
                    }, | 
				
			|||
                    'display_name': 'Bank Book', | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        print_xlsx: function() { | 
				
			|||
            var self = this; | 
				
			|||
            var action_title = self._title | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.bank.book', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], action_title | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir_actions_xlsx_download', | 
				
			|||
                    'data': { | 
				
			|||
                         'model': 'dynamic.bank.book', | 
				
			|||
                         'options': JSON.stringify(data[1]), | 
				
			|||
                         'output_format': 'xlsx', | 
				
			|||
                         'report_data': JSON.stringify(data[0]), | 
				
			|||
                         'report_name': 'Bank Book', | 
				
			|||
                         'dfr_data': 'Bank Book', | 
				
			|||
                    }, | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        bank_view: function(initial_render = true) { | 
				
			|||
            var self = this; | 
				
			|||
            var node = self.$('.container-bb-main'); | 
				
			|||
            var action_title = self._title | 
				
			|||
            console.log("dhdkfsdf",action_title) | 
				
			|||
            var last; | 
				
			|||
            while (last = node.lastChild) node.removeChild(last); | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.bank.book', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], action_title | 
				
			|||
                ], | 
				
			|||
            }).then(function(datas) { | 
				
			|||
                self.filter_data = datas[0] | 
				
			|||
 | 
				
			|||
                self.account_data = datas[1] | 
				
			|||
 | 
				
			|||
                _.each(self.account_data, function(account) { | 
				
			|||
                    var currency_format = { | 
				
			|||
                        currency_id: account.company_currency_id, | 
				
			|||
                        position: account.company_currency_position, | 
				
			|||
                        symbol: account.company_currency_symbol, | 
				
			|||
                        noSymbol: true, | 
				
			|||
                    }; | 
				
			|||
                    if (currency_format.position == "before") { | 
				
			|||
 | 
				
			|||
                         if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = currency_format.symbol + ' ' + account.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = currency_format.symbol + ' ' + account.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = currency_format.symbol + ' ' + account.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } else { | 
				
			|||
 | 
				
			|||
                        if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = account.debit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = account.credit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = account.balance.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
                if (initial_render) { | 
				
			|||
                    self.$('.bb-filter').html(QWeb.render('FilterSectionBB', { | 
				
			|||
                        filter_data: datas[0], | 
				
			|||
                    })); | 
				
			|||
 | 
				
			|||
                    self.$el.find('.journal').select2({ | 
				
			|||
                        placeholder: 'Select Journal...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.account').select2({ | 
				
			|||
                        placeholder: 'Select Account...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.account-tag').select2({ | 
				
			|||
                        placeholder: 'Select Account Tag...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.analytic-tag').select2({ | 
				
			|||
                        placeholder: 'Select Analytic Tag...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.analytic').select2({ | 
				
			|||
                        placeholder: 'Select Analytic...', | 
				
			|||
                    }); | 
				
			|||
 | 
				
			|||
                    self.$el.find('#date_from').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('#date_to').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.entries').select2({ | 
				
			|||
                        placeholder: 'Select Moves', | 
				
			|||
                    }); | 
				
			|||
                } | 
				
			|||
                self.$('.container-bb-main').html(QWeb.render('BankBookData', { | 
				
			|||
                    account_data: datas[1] | 
				
			|||
                })); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        bb_lines_by_page: function(offset, account_id) { | 
				
			|||
            var self = this; | 
				
			|||
            return rpc.query({ | 
				
			|||
                model: 'dynamic.bank.book', | 
				
			|||
                method: 'bb_move_lines', | 
				
			|||
                args: [self.wizard, offset, account_id], | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
        get_move_lines: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var account_id = $(event.currentTarget).data('account-id'); | 
				
			|||
            var offset = 0; | 
				
			|||
            var td = $(event.currentTarget).next('tr').find('td'); | 
				
			|||
            if (td.length == 1) { | 
				
			|||
                self.bb_lines_by_page(offset, account_id).then(function(datas) { | 
				
			|||
                    _.each(datas[2], function(data) { | 
				
			|||
                        var currency_format = { | 
				
			|||
                            currency_id: data.company_currency_id, | 
				
			|||
                            position: data.company_currency_position, | 
				
			|||
                            symbol: data.company_currency_symbol, | 
				
			|||
                            noSymbol: true, | 
				
			|||
                        }; | 
				
			|||
                        if (currency_format.position == "before") { | 
				
			|||
                            if (data.debit == 0) { | 
				
			|||
                                data.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.debit = currency_format.symbol + ' ' + data.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.credit == 0) { | 
				
			|||
                                data.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.credit = currency_format.symbol + ' ' + data.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.balance == 0) { | 
				
			|||
                                data.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.balance = currency_format.symbol + ' ' + data.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                        } else { | 
				
			|||
                            if (data.debit == 0) { | 
				
			|||
                                data.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.debit = data.debit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.credit == 0) { | 
				
			|||
                                data.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.credit = data.credit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.balance == 0) { | 
				
			|||
                                data.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.balance = data.balance.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
 | 
				
			|||
                        } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    }); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td .bb-table-div').remove(); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul').after( | 
				
			|||
                        QWeb.render('SubSectionBB', { | 
				
			|||
                            count: datas[0], | 
				
			|||
                            offset: datas[1], | 
				
			|||
                            account_data: datas[2], | 
				
			|||
                        })) | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul li:first a').css({ | 
				
			|||
                        'background-color': '#00ede8', | 
				
			|||
                        'font-weight': 'bold', | 
				
			|||
                    }); | 
				
			|||
                }) | 
				
			|||
            } | 
				
			|||
        }, | 
				
			|||
        view_move: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var context = {}; | 
				
			|||
            var redirect_to_document = function(res_model, res_id, view_id) { | 
				
			|||
                var action = { | 
				
			|||
                    type: 'ir.actions.act_window', | 
				
			|||
                    view_type: 'form', | 
				
			|||
                    view_mode: 'form', | 
				
			|||
                    res_model: res_model, | 
				
			|||
                    views: [ | 
				
			|||
                        [view_id || false, 'form'] | 
				
			|||
                    ], | 
				
			|||
                    res_id: res_id, | 
				
			|||
                    target: 'current', | 
				
			|||
                    context: context, | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }; | 
				
			|||
            rpc.query({ | 
				
			|||
                    model: 'account.move', | 
				
			|||
                    method: 'search_read', | 
				
			|||
                    domain: [ | 
				
			|||
                        ['id', '=', $(event.currentTarget).data('move-id')] | 
				
			|||
                    ], | 
				
			|||
                    fields: ['id'], | 
				
			|||
                    limit: 1, | 
				
			|||
                }) | 
				
			|||
                .then(function(record) { | 
				
			|||
                    if (record.length > 0) { | 
				
			|||
                        redirect_to_document('account.move', record[0].id); | 
				
			|||
                    } else { | 
				
			|||
                        redirect_to_document('account.move', $(event.currentTarget).data('move-id')); | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
    }); | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    var CashBook = AbstractAction.extend({ | 
				
			|||
        template: 'CashBook', | 
				
			|||
        events: { | 
				
			|||
            'click .cb-line': 'get_move_lines', | 
				
			|||
            'click .view-move': 'view_move', | 
				
			|||
            'click #filter_apply_button': 'apply_filter', | 
				
			|||
            'click #pdf': 'print_pdf', | 
				
			|||
            'click #xlsx': 'print_xlsx', | 
				
			|||
        }, | 
				
			|||
        init: function(view, code) { | 
				
			|||
            this._super(view, code); | 
				
			|||
            this.wizard = code.context.wizard | null; | 
				
			|||
            this.session = session; | 
				
			|||
        }, | 
				
			|||
        start: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self.initial_render = true; | 
				
			|||
                rpc.query({ | 
				
			|||
                model: 'dynamic.bank.book', | 
				
			|||
                method: 'create', | 
				
			|||
                args: [{ | 
				
			|||
 | 
				
			|||
                }] | 
				
			|||
                }).then(function(res) { | 
				
			|||
                    self.wizard = res; | 
				
			|||
                    self.cash_view(self.initial_render); | 
				
			|||
                }) | 
				
			|||
 | 
				
			|||
        }, | 
				
			|||
            apply_filter: function(event) { | 
				
			|||
 | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
 | 
				
			|||
            self.initial_render = false; | 
				
			|||
            var output = {}; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var account_ids = []; | 
				
			|||
            var account_text = []; | 
				
			|||
 | 
				
			|||
            var account_res = document.getElementById("acc_res") | 
				
			|||
            var account_list = $(".account").select2('data') | 
				
			|||
            for (var i = 0; i < account_list.length; i++) { | 
				
			|||
 | 
				
			|||
                if(account_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    account_ids.push(parseInt(account_list[i].id)) | 
				
			|||
                    if(account_text.includes(account_list[i].text) === false){ | 
				
			|||
                        account_text.push(account_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    account_res.value = account_text | 
				
			|||
                    account_res.innerHTML=account_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (account_list.length == 0){ | 
				
			|||
               account_res.value = "" | 
				
			|||
                    account_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.account_ids = account_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
             var journal_ids = []; | 
				
			|||
            var journal_text = []; | 
				
			|||
            var journal_res = document.getElementById("journal_res") | 
				
			|||
            var journal_list = $(".journal").select2('data') | 
				
			|||
            for (var i = 0; i < journal_list.length; i++) { | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                if(journal_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    journal_ids.push(parseInt(journal_list[i].id)) | 
				
			|||
                    if(journal_text.includes(journal_list[i].text) === false){ | 
				
			|||
                        journal_text.push(journal_list[i].text) | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    journal_res.value = journal_text | 
				
			|||
                    journal_res.innerHTML=journal_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (journal_list.length == 0){ | 
				
			|||
               journal_res.value = "" | 
				
			|||
                    journal_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.journal_ids = journal_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var account_tag_ids = []; | 
				
			|||
            var account_tag_text = []; | 
				
			|||
            var account_tag_res = document.getElementById("acc_tag_res") | 
				
			|||
            var account_tag_list = $(".account-tag").select2('data') | 
				
			|||
            for (var i = 0; i < account_tag_list.length; i++) { | 
				
			|||
                if(account_tag_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    account_tag_ids.push(parseInt(account_tag_list[i].id)) | 
				
			|||
                    if(account_tag_text.includes(account_tag_list[i].text) === false){ | 
				
			|||
                        account_tag_text.push(account_tag_list[i].text) | 
				
			|||
                    } | 
				
			|||
                    account_tag_res.value = account_tag_text | 
				
			|||
                    account_tag_res.innerHTML=account_tag_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (account_tag_list.length == 0){ | 
				
			|||
               account_tag_res.value = "" | 
				
			|||
                    account_tag_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.account_tag_ids = account_tag_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
               var analytic_ids = []; | 
				
			|||
            var analytic_text = []; | 
				
			|||
            var span_res = document.getElementById("analic_res") | 
				
			|||
            var analytic_list = $(".analytic").select2('data') | 
				
			|||
            for (var i = 0; i < analytic_list.length; i++) { | 
				
			|||
                if(analytic_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    analytic_ids.push(parseInt(analytic_list[i].id)) | 
				
			|||
                    if(analytic_text.includes(analytic_list[i].text) === false){ | 
				
			|||
                        analytic_text.push(analytic_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    span_res.value = analytic_text | 
				
			|||
                    span_res.innerHTML=span_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (analytic_list.length == 0){ | 
				
			|||
               span_res.value = "" | 
				
			|||
                    span_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.analytic_ids = analytic_ids | 
				
			|||
 | 
				
			|||
            output.analytic_tag_ids = analytic_tag_ids | 
				
			|||
 | 
				
			|||
            var analytic_tag_ids = []; | 
				
			|||
            var analytic_tag_text = []; | 
				
			|||
            var analytic_tag_res = document.getElementById("analic_tag_res") | 
				
			|||
            var analytic_tag_list = $(".analytic-tag").select2('data') | 
				
			|||
            for (var i = 0; i < analytic_tag_list.length; i++) { | 
				
			|||
                if(analytic_tag_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    analytic_tag_ids.push(parseInt(analytic_tag_list[i].id)) | 
				
			|||
                    if(analytic_tag_text.includes(analytic_tag_list[i].text) === false){ | 
				
			|||
                        analytic_tag_text.push(analytic_tag_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    analytic_tag_res.value = analytic_tag_text | 
				
			|||
                    analytic_tag_res.innerHTML=analytic_tag_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (analytic_tag_list.length == 0){ | 
				
			|||
               analytic_tag_res.value = "" | 
				
			|||
                    analytic_tag_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.analytic_tag_ids = analytic_tag_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            if ($("#date_from").val()) { | 
				
			|||
                var dateObject = $("#date_from").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_from = dateString; | 
				
			|||
            } | 
				
			|||
            if ($("#date_to").val()) { | 
				
			|||
                var dateObject = $("#date_to").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_to = dateString; | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
            if ($(".entries").length) { | 
				
			|||
            var post_res = document.getElementById("post_res") | 
				
			|||
            output.entries = $(".entries")[1].value | 
				
			|||
            post_res.value = $(".entries")[1].value | 
				
			|||
                    post_res.innerHTML=post_res.value; | 
				
			|||
              if ($(".entries")[1].value == "") { | 
				
			|||
              post_res.innerHTML="all"; | 
				
			|||
 | 
				
			|||
              } | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
            output.include_details = true; | 
				
			|||
 | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.bank.book', | 
				
			|||
                method: 'write', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], output | 
				
			|||
                ], | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.cash_view(self.initial_render); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        print_pdf: function(e) { | 
				
			|||
            e.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var action_title = self._title | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.bank.book', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], action_title | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir.actions.report', | 
				
			|||
                    'report_type': 'qweb-pdf', | 
				
			|||
                    'report_name': 'dynamic_financial_report.cash_book', | 
				
			|||
                    'report_file': 'dynamic_financial_report.cash_book', | 
				
			|||
                    'data': { | 
				
			|||
                        'report_data': data | 
				
			|||
                    }, | 
				
			|||
                    'context': { | 
				
			|||
                        'active_model': 'dynamic.bank.book', | 
				
			|||
                        'landscape': 1, | 
				
			|||
                        'js_report': true | 
				
			|||
                    }, | 
				
			|||
                    'display_name': 'Cash Book', | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        print_xlsx: function() { | 
				
			|||
            var self = this; | 
				
			|||
            var action_title = self._title | 
				
			|||
 | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.bank.book', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], action_title | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir_actions_xlsx_download', | 
				
			|||
                    'data': { | 
				
			|||
                         'model': 'dynamic.bank.book', | 
				
			|||
                         'options': JSON.stringify(data[1]), | 
				
			|||
                         'output_format': 'xlsx', | 
				
			|||
                         'report_data': JSON.stringify(data[0]), | 
				
			|||
                         'report_name': 'Cash Book', | 
				
			|||
                         'dfr_data': 'Cash Book', | 
				
			|||
                    }, | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        cash_view: function(initial_render = true) { | 
				
			|||
            var self = this; | 
				
			|||
            var action_title = self._title | 
				
			|||
            console.log("djhhdbkjd", action_title) | 
				
			|||
 | 
				
			|||
            var node = self.$('.container-cb-main'); | 
				
			|||
            var last; | 
				
			|||
            while (last = node.lastChild) node.removeChild(last); | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.bank.book', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], action_title | 
				
			|||
                ], | 
				
			|||
            }).then(function(datas) { | 
				
			|||
                self.filter_data = datas[0] | 
				
			|||
 | 
				
			|||
                self.account_data = datas[1] | 
				
			|||
 | 
				
			|||
                _.each(self.account_data, function(account) { | 
				
			|||
                    var currency_format = { | 
				
			|||
                        currency_id: account.company_currency_id, | 
				
			|||
                        position: account.company_currency_position, | 
				
			|||
                        symbol: account.company_currency_symbol, | 
				
			|||
                        noSymbol: true, | 
				
			|||
                    }; | 
				
			|||
                    if (currency_format.position == "before") { | 
				
			|||
 | 
				
			|||
                         if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = currency_format.symbol + ' ' + account.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = currency_format.symbol + ' ' + account.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = currency_format.symbol + ' ' + account.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } else { | 
				
			|||
 | 
				
			|||
                        if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = account.debit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = account.credit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = account.balance.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
                if (initial_render) { | 
				
			|||
                    self.$('.cb-filter').html(QWeb.render('FilterSectionCB', { | 
				
			|||
                        filter_data: datas[0], | 
				
			|||
                    })); | 
				
			|||
 | 
				
			|||
                    self.$el.find('.journal').select2({ | 
				
			|||
                        placeholder: 'Select Journal...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.account').select2({ | 
				
			|||
                        placeholder: 'Select Account...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.account-tag').select2({ | 
				
			|||
                        placeholder: 'Select Account Tag...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.analytic-tag').select2({ | 
				
			|||
                        placeholder: 'Select Analytic Tag...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.analytic').select2({ | 
				
			|||
                        placeholder: 'Select Analytic...', | 
				
			|||
                    }); | 
				
			|||
 | 
				
			|||
                    self.$el.find('#date_from').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('#date_to').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.entries').select2({ | 
				
			|||
                        placeholder: 'Select Moves', | 
				
			|||
                    }); | 
				
			|||
                } | 
				
			|||
                self.$('.container-cb-main').html(QWeb.render('CashBookData', { | 
				
			|||
                    account_data: datas[1] | 
				
			|||
                })); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        cb_lines_by_page: function(offset, account_id) { | 
				
			|||
            var self = this; | 
				
			|||
            return rpc.query({ | 
				
			|||
                model: 'dynamic.bank.book', | 
				
			|||
                method: 'bb_move_lines', | 
				
			|||
                args: [self.wizard, offset, account_id], | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
        get_move_lines: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var account_id = $(event.currentTarget).data('account-id'); | 
				
			|||
            var offset = 0; | 
				
			|||
            var td = $(event.currentTarget).next('tr').find('td'); | 
				
			|||
            if (td.length == 1) { | 
				
			|||
                self.cb_lines_by_page(offset, account_id).then(function(datas) { | 
				
			|||
                    _.each(datas[2], function(data) { | 
				
			|||
                        var currency_format = { | 
				
			|||
                            currency_id: data.company_currency_id, | 
				
			|||
                            position: data.company_currency_position, | 
				
			|||
                            symbol: data.company_currency_symbol, | 
				
			|||
                            noSymbol: true, | 
				
			|||
                        }; | 
				
			|||
                        if (currency_format.position == "before") { | 
				
			|||
                            if (data.debit == 0) { | 
				
			|||
                                data.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.debit = currency_format.symbol + ' ' + data.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.credit == 0) { | 
				
			|||
                                data.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.credit = currency_format.symbol + ' ' + data.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.balance == 0) { | 
				
			|||
                                data.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.balance = currency_format.symbol + ' ' + data.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                        } else { | 
				
			|||
                            if (data.debit == 0) { | 
				
			|||
                                data.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.debit = data.debit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.credit == 0) { | 
				
			|||
                                data.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.credit = data.credit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.balance == 0) { | 
				
			|||
                                data.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.balance = data.balance.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
 | 
				
			|||
                        } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    }); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td .cb-table-div').remove(); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul').after( | 
				
			|||
                        QWeb.render('SubSectionCB', { | 
				
			|||
                            count: datas[0], | 
				
			|||
                            offset: datas[1], | 
				
			|||
                            account_data: datas[2], | 
				
			|||
                        })) | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul li:first a').css({ | 
				
			|||
                        'background-color': '#00ede8', | 
				
			|||
                        'font-weight': 'bold', | 
				
			|||
                    }); | 
				
			|||
                }) | 
				
			|||
            } | 
				
			|||
        }, | 
				
			|||
        view_move: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var context = {}; | 
				
			|||
            var redirect_to_document = function(res_model, res_id, view_id) { | 
				
			|||
                var action = { | 
				
			|||
                    type: 'ir.actions.act_window', | 
				
			|||
                    view_type: 'form', | 
				
			|||
                    view_mode: 'form', | 
				
			|||
                    res_model: res_model, | 
				
			|||
                    views: [ | 
				
			|||
                        [view_id || false, 'form'] | 
				
			|||
                    ], | 
				
			|||
                    res_id: res_id, | 
				
			|||
                    target: 'current', | 
				
			|||
                    context: context, | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }; | 
				
			|||
            rpc.query({ | 
				
			|||
                    model: 'account.move', | 
				
			|||
                    method: 'search_read', | 
				
			|||
                    domain: [ | 
				
			|||
                        ['id', '=', $(event.currentTarget).data('move-id')] | 
				
			|||
                    ], | 
				
			|||
                    fields: ['id'], | 
				
			|||
                    limit: 1, | 
				
			|||
                }) | 
				
			|||
                .then(function(record) { | 
				
			|||
                    if (record.length > 0) { | 
				
			|||
                        redirect_to_document('account.move', record[0].id); | 
				
			|||
                    } else { | 
				
			|||
                        redirect_to_document('account.move', $(event.currentTarget).data('move-id')); | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
    }); | 
				
			|||
 | 
				
			|||
    core.action_registry.add('dynamic.bb', BankBook); | 
				
			|||
    core.action_registry.add('dynamic.cb', CashBook); | 
				
			|||
 | 
				
			|||
}); | 
				
			|||
@ -1,369 +0,0 @@ | 
				
			|||
odoo.define('dynamic_financial_report.DynamicReports', function(require) { | 
				
			|||
    'use strict'; | 
				
			|||
    var AbstractAction = require('web.AbstractAction'); | 
				
			|||
    var core = require('web.core'); | 
				
			|||
    var Dialog = require('web.Dialog'); | 
				
			|||
    var field_utils = require('web.field_utils'); | 
				
			|||
    var rpc = require('web.rpc'); | 
				
			|||
    var session = require('web.session'); | 
				
			|||
    var utils = require('web.utils'); | 
				
			|||
    var QWeb = core.qweb; | 
				
			|||
    var _t = core._t; | 
				
			|||
    var CashFlow = AbstractAction.extend({ | 
				
			|||
        template: 'CashFlow', | 
				
			|||
        events: { | 
				
			|||
            'click .cf-line': 'get_move_lines', | 
				
			|||
            'click .view-move': 'view_move', | 
				
			|||
            'click #filter_apply_button': 'apply_filter', | 
				
			|||
            'click #pdf': 'print_pdf', | 
				
			|||
            'click #xlsx': 'print_xlsx', | 
				
			|||
        }, | 
				
			|||
        init: function(view, code) { | 
				
			|||
            this._super(view, code); | 
				
			|||
            this.wizard = code.context.wizard | null; | 
				
			|||
            this.session = session; | 
				
			|||
 | 
				
			|||
        }, | 
				
			|||
        start: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self.initial_render = true; | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.cash.flow', | 
				
			|||
                method: 'create', | 
				
			|||
                args: [{ | 
				
			|||
                    res_model: this.res_model | 
				
			|||
                }] | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.wizard = res; | 
				
			|||
                self.ledger_view(self.initial_render); | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
        apply_filter: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
 | 
				
			|||
            self.initial_render = false; | 
				
			|||
            var output = {}; | 
				
			|||
            output.reconciled=false; | 
				
			|||
            output.type=false; | 
				
			|||
            output.date_from=false; | 
				
			|||
            output.date_to=false; | 
				
			|||
 | 
				
			|||
            if ($(".level").length){ | 
				
			|||
            var level_res = document.getElementById("level_res") | 
				
			|||
            output.level = $(".level")[1].value | 
				
			|||
            level_res.value = $(".level")[1].value | 
				
			|||
            level_res.innerHTML=level_res.value; | 
				
			|||
            if ($(".level").value==""){ | 
				
			|||
            type_res.innerHTML="summary"; | 
				
			|||
            output.type = "Summary" | 
				
			|||
            } | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var journal_ids = []; | 
				
			|||
            var journal_list = $(".journal").select2('data') | 
				
			|||
            for (var i = 0; i < journal_list.length; i++) { | 
				
			|||
                journal_ids.push(parseInt(journal_list[i].id)) | 
				
			|||
            } | 
				
			|||
            output.journal_ids = journal_ids | 
				
			|||
            var analytic_ids = []; | 
				
			|||
            var analytic_list = $(".analytic").select2('data') | 
				
			|||
            for (var i = 0; i < analytic_list.length; i++) { | 
				
			|||
                analytic_ids.push(parseInt(analytic_list[i].id)) | 
				
			|||
            } | 
				
			|||
            output.analytic_ids = analytic_ids | 
				
			|||
            var analytic_tag_ids = []; | 
				
			|||
            var analytic_tag_list = $(".analytic-tag").select2('data') | 
				
			|||
            for (var i = 0; i < analytic_tag_list.length; i++) { | 
				
			|||
                analytic_tag_ids.push(parseInt(analytic_tag_list[i].id)) | 
				
			|||
            } | 
				
			|||
            output.analytic_tag_ids = analytic_tag_ids | 
				
			|||
            if ($(".target-moves").length){ | 
				
			|||
                var target_res = document.getElementById("target_res") | 
				
			|||
                output.target_moves = $(".target-moves")[1].value | 
				
			|||
                target_res.value = $(".target-moves")[1].value | 
				
			|||
                target_res.innerHTML=target_res.value; | 
				
			|||
                if ($(".target-moves").value==""){ | 
				
			|||
                target_res.innerHTML="all"; | 
				
			|||
                output.target_moves = "all" | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
            if ($("#date_from").val()) { | 
				
			|||
                var dateObject = $("#date_from").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_from = dateString; | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
            if ($("#date_to").val()) { | 
				
			|||
                var dateObject = $("#date_to").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_to = dateString; | 
				
			|||
            } | 
				
			|||
            output.include_details = true; | 
				
			|||
 | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.cash.flow', | 
				
			|||
                method: 'write', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], output | 
				
			|||
                ], | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.ledger_view(self.initial_render); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        print_pdf: function(e) { | 
				
			|||
            e.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.cash.flow', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir.actions.report', | 
				
			|||
                    'report_type': 'qweb-pdf', | 
				
			|||
                    'report_name': 'dynamic_financial_report.cash_flow', | 
				
			|||
                    'report_file': 'dynamic_financial_report.cash_flow', | 
				
			|||
                    'data': { | 
				
			|||
                        'report_data': data | 
				
			|||
                    }, | 
				
			|||
                    'context': { | 
				
			|||
                        'active_model': 'dynamic.cash.flow', | 
				
			|||
                        'landscape': 1, | 
				
			|||
                        'js_report': true | 
				
			|||
                    }, | 
				
			|||
                    'display_name': 'Cash Flow', | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        print_xlsx: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.cash.flow', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir_actions_xlsx_download', | 
				
			|||
                    'data': { | 
				
			|||
                         'model': 'dynamic.cash.flow', | 
				
			|||
                         'options': JSON.stringify(data[1]), | 
				
			|||
                         'output_format': 'xlsx', | 
				
			|||
                         'report_data': JSON.stringify(data[0]), | 
				
			|||
                         'report_name': 'Cash Flow', | 
				
			|||
                         'dfr_data': JSON.stringify(data), | 
				
			|||
                    }, | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        ledger_view: function(initial_render = true) { | 
				
			|||
            var self = this; | 
				
			|||
            var node = self.$('.container-cf-main'); | 
				
			|||
            var last; | 
				
			|||
            while (last = node.lastChild) node.removeChild(last); | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.cash.flow', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(datas) { | 
				
			|||
                self.filter_data = datas[0] | 
				
			|||
                self.account_data = datas[1] | 
				
			|||
                console.log("account_data",self.account_data) | 
				
			|||
                _.each(self.account_data.fetched_data, function(account) { | 
				
			|||
                var currency_format = { | 
				
			|||
                        currency_id: datas[1].company_currency_id, | 
				
			|||
                        position: datas[1].company_currency_position, | 
				
			|||
                        symbol: datas[1].company_currency_symbol, | 
				
			|||
 | 
				
			|||
                        noSymbol: true, | 
				
			|||
                    }; | 
				
			|||
                    if (currency_format.position == "before") { | 
				
			|||
 | 
				
			|||
                         if (account.total_credit == 0) { | 
				
			|||
                                account.total_credit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                               account.total_credit = currency_format.symbol + ' ' + account.total_credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.total_debit == 0) { | 
				
			|||
                                account.total_debit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.total_debit = currency_format.symbol + ' ' + account.total_debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.total_balance == 0) { | 
				
			|||
                                account.total_balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.total_balance = currency_format.symbol + ' ' + account.total_balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                        } else {if (account.total_credit == 0) { | 
				
			|||
                                account.total_credit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.total_credit = account.total_credit.toFixed(2) + ' ' + currency_format.symbol; | 
				
			|||
//
 | 
				
			|||
                            } | 
				
			|||
                            if (account.total_debit == 0) { | 
				
			|||
                                account.total_debit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.total_debit = account.total_debit.toFixed(2) + ' ' + currency_format.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.total_balance == 0) { | 
				
			|||
                                account.total_balance  = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.total_balance  = account.total_balance.toFixed(2) + ' ' + currency_format.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
//
 | 
				
			|||
                        } | 
				
			|||
                }); | 
				
			|||
                if (initial_render) { | 
				
			|||
                    self.$('.cf-filter').html(QWeb.render('FilterSectionCF', { | 
				
			|||
                        filter_data: datas[0], | 
				
			|||
                    })); | 
				
			|||
 | 
				
			|||
                    self.$el.find('.journal').select2({ | 
				
			|||
                        placeholder: 'Select Journal...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.level').select2({ | 
				
			|||
                        placeholder: 'Select Level...', | 
				
			|||
                    }); | 
				
			|||
 | 
				
			|||
                     self.$el.find('.analytic-tag').select2({ | 
				
			|||
                        placeholder: 'Select Analytic Tag...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.analytic').select2({ | 
				
			|||
                        placeholder: 'Select Analytic...', | 
				
			|||
                    }); | 
				
			|||
 | 
				
			|||
                    self.$el.find('#date_from').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('#date_to').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.target-moves').select2({ | 
				
			|||
                       placeholder: 'Posted or All Entries...', | 
				
			|||
                    }); | 
				
			|||
                } | 
				
			|||
 | 
				
			|||
                self.$('.container-cf-main').html(QWeb.render('CashFlowData', { | 
				
			|||
                    account_data: datas[1].fetched_data, | 
				
			|||
                    level:datas[1].levels, | 
				
			|||
                })); | 
				
			|||
 | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        get_move_lines: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var account_id = $(event.currentTarget).data('account-id'); | 
				
			|||
            var offset = 0; | 
				
			|||
            var td = $(event.currentTarget).next('tr').find('td'); | 
				
			|||
            if (td.length == 1) { | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.cash.flow', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(datas) { | 
				
			|||
 | 
				
			|||
                    if(datas[1].levels== 'detailed'){ | 
				
			|||
                        $(event.currentTarget).next('tr').find('td ul').after( | 
				
			|||
                            QWeb.render('SubSectionCF', { | 
				
			|||
                                count: 3, | 
				
			|||
                                offset: 0, | 
				
			|||
                                account_data: datas[1].journal_res, | 
				
			|||
                                level:datas[1].levels, | 
				
			|||
                                data_currency: datas[1], | 
				
			|||
                                line_id:parseInt(event.currentTarget.attributes[3].value), | 
				
			|||
                            })) | 
				
			|||
                    }else if(datas[1].levels== 'very'  || datas[1].levels== false){ | 
				
			|||
                            $(event.currentTarget).next('tr').find('td ul').after( | 
				
			|||
                            QWeb.render('ChildSubSectionCF', { | 
				
			|||
                                count: 3, | 
				
			|||
                                offset: 0, | 
				
			|||
                                account_data: datas[1].account_res, | 
				
			|||
                                level:datas[1].levels, | 
				
			|||
                                data_currency: datas[1], | 
				
			|||
                                line_id:parseInt(event.currentTarget.attributes[3].value), | 
				
			|||
                            })) | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul li:first a').css({ | 
				
			|||
                        'background-color': '#00ede8', | 
				
			|||
                        'font-weight': 'bold', | 
				
			|||
                    }); | 
				
			|||
                }) | 
				
			|||
            } | 
				
			|||
        }, | 
				
			|||
        view_move: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var context = {}; | 
				
			|||
            var redirect_to_document = function(res_model, res_id, view_id) { | 
				
			|||
 | 
				
			|||
                var action = { | 
				
			|||
                    type: 'ir.actions.act_window', | 
				
			|||
                    view_type: 'form', | 
				
			|||
                    view_mode: 'form', | 
				
			|||
                    res_model: res_model, | 
				
			|||
                    views: [ | 
				
			|||
                        [view_id || false, 'form'] | 
				
			|||
                    ], | 
				
			|||
                    res_id: res_id, | 
				
			|||
                    target: 'current', | 
				
			|||
                    context: context, | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }; | 
				
			|||
            rpc.query({ | 
				
			|||
                    model: 'account.move', | 
				
			|||
                    method: 'search_read', | 
				
			|||
                    domain: [ | 
				
			|||
                        ['id', '=', $(event.currentTarget).data('move-id')] | 
				
			|||
                    ], | 
				
			|||
                    fields: ['id'], | 
				
			|||
                    limit: 1, | 
				
			|||
                }) | 
				
			|||
                .then(function(record) { | 
				
			|||
                    if (record.length > 0) { | 
				
			|||
                        redirect_to_document('account.move', record[0].id); | 
				
			|||
                    } else { | 
				
			|||
                        redirect_to_document('account.move', $(event.currentTarget).data('move-id')); | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
    }); | 
				
			|||
 | 
				
			|||
    core.action_registry.add('dynamic.cf', CashFlow); | 
				
			|||
        return CashFlow; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
}); | 
				
			|||
@ -1,414 +0,0 @@ | 
				
			|||
odoo.define('dynamic_financial_report.daybook', function(require) { | 
				
			|||
    'use strict'; | 
				
			|||
    var AbstractAction = require('web.AbstractAction'); | 
				
			|||
    var core = require('web.core'); | 
				
			|||
    var field_utils = require('web.field_utils'); | 
				
			|||
    var rpc = require('web.rpc'); | 
				
			|||
    var session = require('web.session'); | 
				
			|||
    var utils = require('web.utils'); | 
				
			|||
    var QWeb = core.qweb; | 
				
			|||
    var _t = core._t; | 
				
			|||
 | 
				
			|||
    var DayBook = AbstractAction.extend({ | 
				
			|||
        template: 'DayBook', | 
				
			|||
        events: { | 
				
			|||
            'click .db-line': 'get_move_lines', | 
				
			|||
            'click .view-move': 'view_move', | 
				
			|||
            'click #filter_apply_button': 'apply_filter', | 
				
			|||
            'click #pdf': 'print_pdf', | 
				
			|||
            'click #xlsx': 'print_xlsx', | 
				
			|||
        }, | 
				
			|||
        init: function(view, code) { | 
				
			|||
            this._super(view, code); | 
				
			|||
            this.wizard = code.context.wizard | null; | 
				
			|||
            this.session = session; | 
				
			|||
        }, | 
				
			|||
        start: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self.initial_render = true; | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.day.book', | 
				
			|||
                method: 'create', | 
				
			|||
                args: [{ | 
				
			|||
                    res_model: this.res_model | 
				
			|||
                }] | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.wizard = res; | 
				
			|||
                self.ledger_view(self.initial_render); | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
        apply_filter: function(event) { | 
				
			|||
 | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            self.initial_render = false; | 
				
			|||
            var output = {}; | 
				
			|||
            output.date_from=false; | 
				
			|||
            output.date_to=false; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var journal_ids = []; | 
				
			|||
            var journal_text = []; | 
				
			|||
            var span_res = document.getElementById("journal_res") | 
				
			|||
 | 
				
			|||
            var journal_list = $(".journal").select2('data') | 
				
			|||
            for (var i = 0; i < journal_list.length; i++) { | 
				
			|||
 | 
				
			|||
                if(journal_list[i].element[0].selected === true) | 
				
			|||
                    {journal_ids.push(parseInt(journal_list[i].id)) | 
				
			|||
                    if(journal_text.includes(journal_list[i].text) === false) | 
				
			|||
                    {journal_text.push(journal_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    span_res.value = journal_text | 
				
			|||
                    span_res.innerHTML=span_res.value; | 
				
			|||
                    } | 
				
			|||
            } | 
				
			|||
            if (journal_list.length == 0){ | 
				
			|||
            span_res.value = "" | 
				
			|||
            span_res.innerHTML=""; } | 
				
			|||
            output.journal_ids = journal_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var account_ids = []; | 
				
			|||
            var account_text = []; | 
				
			|||
            var span_res = document.getElementById("account_res") | 
				
			|||
 | 
				
			|||
            var account_list = $(".account").select2('data') | 
				
			|||
            for (var i = 0; i < account_list.length; i++) { | 
				
			|||
 | 
				
			|||
                if(account_list[i].element[0].selected === true) | 
				
			|||
                    {account_ids.push(parseInt(account_list[i].id)) | 
				
			|||
                    if(account_text.includes(account_list[i].text) === false) | 
				
			|||
                    {account_text.push(account_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    span_res.value = account_text | 
				
			|||
                    span_res.innerHTML=span_res.value; | 
				
			|||
                    } | 
				
			|||
            } | 
				
			|||
            if (account_list.length == 0){ | 
				
			|||
            span_res.value = "" | 
				
			|||
            span_res.innerHTML=""; } | 
				
			|||
            output.account_ids = account_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
             if ($(".entries").length){ | 
				
			|||
              var target_res = document.getElementById("target_res") | 
				
			|||
              output.entries = $(".entries")[1].value | 
				
			|||
              target_res.value = $(".entries")[1].value | 
				
			|||
                 target_res.innerHTML=target_res.value; | 
				
			|||
              if ($(".entries").value==""){ | 
				
			|||
              target_res.innerHTML="all"; | 
				
			|||
              output.entries = "all" | 
				
			|||
                } | 
				
			|||
              } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            if ($("#date_from").val()) { | 
				
			|||
                var dateObject = $("#date_from").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_from = dateString; | 
				
			|||
            } | 
				
			|||
            if ($("#date_to").val()) { | 
				
			|||
                var dateObject = $("#date_to").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_to = dateString; | 
				
			|||
            } | 
				
			|||
            output.include_details = true; | 
				
			|||
 | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.day.book', | 
				
			|||
                method: 'write', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], output | 
				
			|||
                ], | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.ledger_view(self.initial_render); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        print_pdf: function(e) { | 
				
			|||
            e.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.day.book', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir.actions.report', | 
				
			|||
                    'report_type': 'qweb-pdf', | 
				
			|||
                    'report_name': 'dynamic_financial_report.dynamic_day_book', | 
				
			|||
                    'report_file': 'dynamic_financial_report.dynamic_day_book', | 
				
			|||
                    'data': { | 
				
			|||
                        'report_data': data | 
				
			|||
                    }, | 
				
			|||
                    'context': { | 
				
			|||
                        'active_model': 'dynamic.day.book', | 
				
			|||
                        'landscape': 1, | 
				
			|||
                        'js_report': true | 
				
			|||
                    }, | 
				
			|||
                    'display_name': 'Day Book', | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        print_xlsx: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.day.book', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
 | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir_actions_xlsx_download', | 
				
			|||
                    'data': { | 
				
			|||
                         'model': 'dynamic.day.book', | 
				
			|||
                         'options': JSON.stringify(data[1]), | 
				
			|||
                         'output_format': 'xlsx', | 
				
			|||
                         'report_data': JSON.stringify((data[2][2])), | 
				
			|||
                         'report_name': 'Day Book', | 
				
			|||
                         'dfr_data':JSON.stringify(data[0]), | 
				
			|||
 | 
				
			|||
                    }, | 
				
			|||
 | 
				
			|||
                }; | 
				
			|||
 | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        ledger_view: function(initial_render = true) { | 
				
			|||
 | 
				
			|||
            var self = this; | 
				
			|||
            var node = self.$('.container-db-main'); | 
				
			|||
            var last; | 
				
			|||
            while (last = node.lastChild) node.removeChild(last); | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.day.book', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(datas) { | 
				
			|||
 | 
				
			|||
                self.filter_data = datas[0] | 
				
			|||
                self.account_data = datas[1] | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                _.each(self.account_data, function(account) { | 
				
			|||
 | 
				
			|||
                    var currency_format = { | 
				
			|||
                        currency_id: account.company_currency_id, | 
				
			|||
                        position: account.company_currency_position, | 
				
			|||
                        symbol: account.company_currency_symbol, | 
				
			|||
                        noSymbol: true, | 
				
			|||
                    }; | 
				
			|||
                    if (currency_format.position == "before") { | 
				
			|||
 | 
				
			|||
                         if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = currency_format.symbol + ' ' + account.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = currency_format.symbol + ' ' + account.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = currency_format.symbol + ' ' + account.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } else { | 
				
			|||
 | 
				
			|||
                        if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = account.debit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = account.credit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = account.balance.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
                if (initial_render) { | 
				
			|||
                    self.$('.db-filter').html(QWeb.render('FilterSectiondb', { | 
				
			|||
                        filter_data: datas[0], | 
				
			|||
                    })); | 
				
			|||
 | 
				
			|||
                    self.$el.find('.journal').select2({ | 
				
			|||
                        placeholder: 'Select Journal...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.account').select2({ | 
				
			|||
                        placeholder: 'Select Account...', | 
				
			|||
                    }); | 
				
			|||
                     self.$el.find('.entries').select2({ | 
				
			|||
                        placeholder: 'Select Moves', | 
				
			|||
                    }); | 
				
			|||
 | 
				
			|||
                    self.$el.find('#date_from').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('#date_to').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                } | 
				
			|||
                self.$('.container-db-main').html(QWeb.render('DayBookData', { | 
				
			|||
                    account_data: datas[1] | 
				
			|||
                })); | 
				
			|||
 | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        db_lines_by_page: function(offset, account_id) { | 
				
			|||
            var self = this; | 
				
			|||
            return rpc.query({ | 
				
			|||
                model: 'dynamic.day.book', | 
				
			|||
                method: 'db_move_lines', | 
				
			|||
                args: [self.wizard, offset, account_id], | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
        get_move_lines: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var account_id = $(event.currentTarget).data('account-id'); | 
				
			|||
            var date_id = $(event.currentTarget)[0].cells[0].innerText; | 
				
			|||
            var offset = 0; | 
				
			|||
            var td = $(event.currentTarget).next('tr').find('td'); | 
				
			|||
            if (td.length == 1) { | 
				
			|||
                self.db_lines_by_page(offset, account_id).then(function(datas) { | 
				
			|||
                    _.each(datas[2], function(data) { | 
				
			|||
 | 
				
			|||
                        var currency_format = { | 
				
			|||
                            currency_id: data.company_currency_id, | 
				
			|||
                            position: data.company_currency_position, | 
				
			|||
                            symbol: data.company_currency_symbol, | 
				
			|||
                            noSymbol: true, | 
				
			|||
                        }; | 
				
			|||
                        if (currency_format.position == "before") { | 
				
			|||
                            if (data.debit == 0) { | 
				
			|||
                                data.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.debit = currency_format.symbol + ' ' + data.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.credit == 0) { | 
				
			|||
                                data.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.credit = currency_format.symbol + ' ' + data.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.balance == 0) { | 
				
			|||
                                data.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.balance = currency_format.symbol + ' ' + data.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                        } else { | 
				
			|||
                            if (data.debit == 0) { | 
				
			|||
                                data.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.debit = data.debit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.credit == 0) { | 
				
			|||
                                data.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.credit = data.credit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.balance == 0) { | 
				
			|||
                                data.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.balance = data.balance.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
                            } | 
				
			|||
                        } | 
				
			|||
                    }); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td .db-table-div').remove(); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul').after( | 
				
			|||
                        QWeb.render('SubSectiondb', { | 
				
			|||
                            count: datas[0], | 
				
			|||
                            offset: datas[1], | 
				
			|||
                            account_data: datas[2], | 
				
			|||
                            date_id: date_id.trim() | 
				
			|||
                        })); | 
				
			|||
 | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul li:first a').css({ | 
				
			|||
                        'background-color': '#00ede8', | 
				
			|||
                        'font-weight': 'bold', | 
				
			|||
                    }); | 
				
			|||
                }) | 
				
			|||
            } | 
				
			|||
        }, | 
				
			|||
        view_move: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var context = {}; | 
				
			|||
            var redirect_to_document = function(res_model, res_id, view_id) { | 
				
			|||
 | 
				
			|||
                var action = { | 
				
			|||
                    type: 'ir.actions.act_window', | 
				
			|||
                    view_type: 'form', | 
				
			|||
                    view_mode: 'form', | 
				
			|||
                    res_model: res_model, | 
				
			|||
                    views: [ | 
				
			|||
                        [view_id || false, 'form'] | 
				
			|||
                    ], | 
				
			|||
                    res_id: res_id, | 
				
			|||
                    target: 'current', | 
				
			|||
                    context: context, | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }; | 
				
			|||
            rpc.query({ | 
				
			|||
                    model: 'account.move', | 
				
			|||
                    method: 'search_read', | 
				
			|||
                    domain: [ | 
				
			|||
                        ['id', '=', $(event.currentTarget).data('move-id')] | 
				
			|||
                    ], | 
				
			|||
                    fields: ['id'], | 
				
			|||
                    limit: 1, | 
				
			|||
                }) | 
				
			|||
                .then(function(record) { | 
				
			|||
                    if (record.length > 0) { | 
				
			|||
                        redirect_to_document('account.move', record[0].id); | 
				
			|||
                    } else { | 
				
			|||
                        redirect_to_document('account.move', $(event.currentTarget).data('move-id')); | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
    }); | 
				
			|||
 | 
				
			|||
    core.action_registry.add('dynamic.db', DayBook); | 
				
			|||
 | 
				
			|||
}); | 
				
			|||
@ -1,872 +0,0 @@ | 
				
			|||
odoo.define('dynamic_financial_report.DynamicReport', function(require) { | 
				
			|||
    'use strict'; | 
				
			|||
    var AbstractAction = require('web.AbstractAction'); | 
				
			|||
    var core = require('web.core'); | 
				
			|||
    var field_utils = require('web.field_utils'); | 
				
			|||
    var rpc = require('web.rpc'); | 
				
			|||
    var session = require('web.session'); | 
				
			|||
    var utils = require('web.utils'); | 
				
			|||
    var QWeb = core.qweb; | 
				
			|||
    var _t = core._t; | 
				
			|||
 | 
				
			|||
    var GeneralLedger = AbstractAction.extend({ | 
				
			|||
        template: 'GeneralLedger', | 
				
			|||
        events: { | 
				
			|||
            'click .gl-line': 'get_move_lines', | 
				
			|||
            'click .view-move': 'view_move', | 
				
			|||
            'click #filter_apply_button': 'apply_filter', | 
				
			|||
            'click #pdf': 'print_pdf', | 
				
			|||
            'click #xlsx': 'print_xlsx', | 
				
			|||
        }, | 
				
			|||
        init: function(view, code) { | 
				
			|||
            this._super(view, code); | 
				
			|||
            this.wizard = code.context.wizard | null; | 
				
			|||
            this.session = session; | 
				
			|||
        }, | 
				
			|||
        start: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self.initial_render = true; | 
				
			|||
            var view_act = this.__parentedParent.actions | 
				
			|||
            var act_id = view_act[Object.keys(view_act).pop()] | 
				
			|||
            if (act_id.domain) { | 
				
			|||
                rpc.query({ | 
				
			|||
                    model: 'dynamic.general.ledger', | 
				
			|||
                    method: 'create', | 
				
			|||
                    args: [{ | 
				
			|||
                        account_ids: [act_id.domain[0][2]] | 
				
			|||
                    }] | 
				
			|||
                }).then(function(res) { | 
				
			|||
                    self.wizard = res; | 
				
			|||
                    self.ledger_view(self.initial_render); | 
				
			|||
                }) | 
				
			|||
            }else{ | 
				
			|||
                rpc.query({ | 
				
			|||
                model: 'dynamic.general.ledger', | 
				
			|||
                method: 'create', | 
				
			|||
                args: [{ | 
				
			|||
                }] | 
				
			|||
                }).then(function(res) { | 
				
			|||
                    self.wizard = res; | 
				
			|||
                    self.ledger_view(self.initial_render); | 
				
			|||
                }) | 
				
			|||
            } | 
				
			|||
        }, | 
				
			|||
            apply_filter: function(event) { | 
				
			|||
 | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
 | 
				
			|||
            self.initial_render = false; | 
				
			|||
            var output = {}; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var account_ids = []; | 
				
			|||
            var account_text = []; | 
				
			|||
 | 
				
			|||
            var account_res = document.getElementById("acc_res") | 
				
			|||
            var account_list = $(".account").select2('data') | 
				
			|||
            for (var i = 0; i < account_list.length; i++) { | 
				
			|||
                if(account_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    account_ids.push(parseInt(account_list[i].id)) | 
				
			|||
                    if(account_text.includes(account_list[i].text) === false){ | 
				
			|||
                        account_text.push(account_list[i].text) | 
				
			|||
                    } | 
				
			|||
                    account_res.value = account_text | 
				
			|||
                    account_res.innerHTML=account_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (account_list.length == 0){ | 
				
			|||
               account_res.value = "" | 
				
			|||
                    account_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.account_ids = account_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
             var journal_ids = []; | 
				
			|||
            var journal_text = []; | 
				
			|||
            var journal_res = document.getElementById("journal_res") | 
				
			|||
            var journal_list = $(".journal").select2('data') | 
				
			|||
            for (var i = 0; i < journal_list.length; i++) { | 
				
			|||
                if(journal_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    journal_ids.push(parseInt(journal_list[i].id)) | 
				
			|||
                    if(journal_text.includes(journal_list[i].text) === false){ | 
				
			|||
                        journal_text.push(journal_list[i].text) | 
				
			|||
                    } | 
				
			|||
                    journal_res.value = journal_text | 
				
			|||
                    journal_res.innerHTML=journal_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (journal_list.length == 0){ | 
				
			|||
               journal_res.value = "" | 
				
			|||
                    journal_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.journal_ids = journal_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var account_tag_ids = []; | 
				
			|||
            var account_tag_text = []; | 
				
			|||
            var account_tag_res = document.getElementById("acc_tag_res") | 
				
			|||
            var account_tag_list = $(".account-tag").select2('data') | 
				
			|||
            for (var i = 0; i < account_tag_list.length; i++) { | 
				
			|||
                if(account_tag_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    account_tag_ids.push(parseInt(account_tag_list[i].id)) | 
				
			|||
                    if(account_tag_text.includes(account_tag_list[i].text) === false){ | 
				
			|||
                        account_tag_text.push(account_tag_list[i].text) | 
				
			|||
                    } | 
				
			|||
                    account_tag_res.value = account_tag_text | 
				
			|||
                    account_tag_res.innerHTML=account_tag_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (account_tag_list.length == 0){ | 
				
			|||
               account_tag_res.value = "" | 
				
			|||
                    account_tag_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.account_tag_ids = account_tag_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
               var analytic_ids = []; | 
				
			|||
            var analytic_text = []; | 
				
			|||
            var span_res = document.getElementById("analic_res") | 
				
			|||
            var analytic_list = $(".analytic").select2('data') | 
				
			|||
            for (var i = 0; i < analytic_list.length; i++) { | 
				
			|||
                if(analytic_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    analytic_ids.push(parseInt(analytic_list[i].id)) | 
				
			|||
                    if(analytic_text.includes(analytic_list[i].text) === false){ | 
				
			|||
                        analytic_text.push(analytic_list[i].text) | 
				
			|||
                    } | 
				
			|||
                    span_res.value = analytic_text | 
				
			|||
                    span_res.innerHTML=span_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (analytic_list.length == 0){ | 
				
			|||
               span_res.value = "" | 
				
			|||
                    span_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.analytic_ids = analytic_ids | 
				
			|||
 | 
				
			|||
            output.analytic_tag_ids = analytic_tag_ids | 
				
			|||
 | 
				
			|||
            var analytic_tag_ids = []; | 
				
			|||
            var analytic_tag_text = []; | 
				
			|||
            var analytic_tag_res = document.getElementById("analic_tag_res") | 
				
			|||
            var analytic_tag_list = $(".analytic-tag").select2('data') | 
				
			|||
            for (var i = 0; i < analytic_tag_list.length; i++) { | 
				
			|||
                if(analytic_tag_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    analytic_tag_ids.push(parseInt(analytic_tag_list[i].id)) | 
				
			|||
                    if(analytic_tag_text.includes(analytic_tag_list[i].text) === false){ | 
				
			|||
                        analytic_tag_text.push(analytic_tag_list[i].text) | 
				
			|||
                    } | 
				
			|||
                    analytic_tag_res.value = analytic_tag_text | 
				
			|||
                    analytic_tag_res.innerHTML=analytic_tag_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (analytic_tag_list.length == 0){ | 
				
			|||
               analytic_tag_res.value = "" | 
				
			|||
                    analytic_tag_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.analytic_tag_ids = analytic_tag_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            if ($("#date_from").val()) { | 
				
			|||
                var dateObject = $("#date_from").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_from = dateString; | 
				
			|||
            } | 
				
			|||
            if ($("#date_to").val()) { | 
				
			|||
                var dateObject = $("#date_to").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_to = dateString; | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
            if ($(".entries").length) { | 
				
			|||
            var post_res = document.getElementById("post_res") | 
				
			|||
            output.entries = $(".entries")[1].value | 
				
			|||
            post_res.value = $(".entries")[1].value | 
				
			|||
                    post_res.innerHTML=post_res.value; | 
				
			|||
              if ($(".entries")[1].value == "") { | 
				
			|||
              post_res.innerHTML="all"; | 
				
			|||
 | 
				
			|||
              } | 
				
			|||
            } | 
				
			|||
            output.include_details = true; | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.general.ledger', | 
				
			|||
                method: 'write', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], output | 
				
			|||
                ], | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.ledger_view(self.initial_render); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        print_pdf: function(e) { | 
				
			|||
            e.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.general.ledger', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir.actions.report', | 
				
			|||
                    'report_type': 'qweb-pdf', | 
				
			|||
                    'report_name': 'dynamic_financial_report.general_ledger', | 
				
			|||
                    'report_file': 'dynamic_financial_report.general_ledger', | 
				
			|||
                    'data': { | 
				
			|||
                        'report_data': data | 
				
			|||
                    }, | 
				
			|||
                    'context': { | 
				
			|||
                        'active_model': 'dynamic.general.ledger', | 
				
			|||
                        'landscape': 1, | 
				
			|||
                        'js_report': true | 
				
			|||
                    }, | 
				
			|||
                    'display_name': 'General Ledger', | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        print_xlsx: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.general.ledger', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir_actions_xlsx_download', | 
				
			|||
                    'data': { | 
				
			|||
                         'model': 'dynamic.general.ledger', | 
				
			|||
                         'options': JSON.stringify(data[1]), | 
				
			|||
                         'output_format': 'xlsx', | 
				
			|||
                         'report_data': JSON.stringify(data[0]), | 
				
			|||
                         'report_name': 'General Ledger', | 
				
			|||
                         'dfr_data': JSON.stringify(data), | 
				
			|||
                    }, | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        ledger_view: function(initial_render = true) { | 
				
			|||
            var self = this; | 
				
			|||
            console.log("uhfuf",self) | 
				
			|||
            var node = self.$('.container-gl-main'); | 
				
			|||
            var last; | 
				
			|||
            while (last = node.lastChild) node.removeChild(last); | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.general.ledger', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(datas) { | 
				
			|||
                self.filter_data = datas[0] | 
				
			|||
 | 
				
			|||
                self.account_data = datas[1] | 
				
			|||
 | 
				
			|||
                _.each(self.account_data, function(account) { | 
				
			|||
                    var currency_format = { | 
				
			|||
                        currency_id: account.company_currency_id, | 
				
			|||
                        position: account.company_currency_position, | 
				
			|||
                        symbol: account.company_currency_symbol, | 
				
			|||
                        noSymbol: true, | 
				
			|||
                    }; | 
				
			|||
                    if (currency_format.position == "before") { | 
				
			|||
 | 
				
			|||
                         if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = currency_format.symbol + ' ' + account.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = currency_format.symbol + ' ' + account.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = currency_format.symbol + ' ' + account.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } else { | 
				
			|||
 | 
				
			|||
                        if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = account.debit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = account.credit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = account.balance.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
                if (initial_render) { | 
				
			|||
                    self.$('.gl-filter').html(QWeb.render('FilterSection', { | 
				
			|||
                        filter_data: datas[0], | 
				
			|||
                    })); | 
				
			|||
 | 
				
			|||
                    self.$el.find('.journal').select2({ | 
				
			|||
                        placeholder: 'Select Journal...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.account').select2({ | 
				
			|||
                        placeholder: 'Select Account...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.account-tag').select2({ | 
				
			|||
                        placeholder: 'Select Account Tag...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.analytic-tag').select2({ | 
				
			|||
                        placeholder: 'Select Analytic Tag...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.analytic').select2({ | 
				
			|||
                        placeholder: 'Select Analytic...', | 
				
			|||
                    }); | 
				
			|||
 | 
				
			|||
                    self.$el.find('#date_from').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('#date_to').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.entries').select2({ | 
				
			|||
                        placeholder: 'Select Moves', | 
				
			|||
                    }); | 
				
			|||
                } | 
				
			|||
                self.$('.container-gl-main').html(QWeb.render('GeneralLedgerData', { | 
				
			|||
                    account_data: datas[1] | 
				
			|||
                })); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        gl_lines_by_page: function(offset, account_id) { | 
				
			|||
            var self = this; | 
				
			|||
            return rpc.query({ | 
				
			|||
                model: 'dynamic.general.ledger', | 
				
			|||
                method: 'gl_move_lines', | 
				
			|||
                args: [self.wizard, offset, account_id], | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
        get_move_lines: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var account_id = $(event.currentTarget).data('account-id'); | 
				
			|||
            var offset = 0; | 
				
			|||
            var td = $(event.currentTarget).next('tr').find('td'); | 
				
			|||
            if (td.length == 1) { | 
				
			|||
                self.gl_lines_by_page(offset, account_id).then(function(datas) { | 
				
			|||
                    _.each(datas[2], function(data) { | 
				
			|||
                        var currency_format = { | 
				
			|||
                            currency_id: data.company_currency_id, | 
				
			|||
                            position: data.company_currency_position, | 
				
			|||
                            symbol: data.company_currency_symbol, | 
				
			|||
                            noSymbol: true, | 
				
			|||
                        }; | 
				
			|||
                        if (currency_format.position == "before") { | 
				
			|||
                            if (data.debit == 0) { | 
				
			|||
                                data.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.debit = currency_format.symbol + ' ' + data.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.credit == 0) { | 
				
			|||
                                data.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.credit = currency_format.symbol + ' ' + data.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.balance == 0) { | 
				
			|||
                                data.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.balance = currency_format.symbol + ' ' + data.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                        } else { | 
				
			|||
                            if (data.debit == 0) { | 
				
			|||
                                data.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.debit = data.debit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.credit == 0) { | 
				
			|||
                                data.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.credit = data.credit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.balance == 0) { | 
				
			|||
                                data.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.balance = data.balance.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
 | 
				
			|||
                        } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    }); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td .gl-table-div').remove(); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul').after( | 
				
			|||
                        QWeb.render('SubSection', { | 
				
			|||
                            count: datas[0], | 
				
			|||
                            offset: datas[1], | 
				
			|||
                            account_data: datas[2], | 
				
			|||
                        })) | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul li:first a').css({ | 
				
			|||
                        'background-color': '#00ede8', | 
				
			|||
                        'font-weight': 'bold', | 
				
			|||
                    }); | 
				
			|||
                }) | 
				
			|||
            } | 
				
			|||
        }, | 
				
			|||
        view_move: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var context = {}; | 
				
			|||
            var redirect_to_document = function(res_model, res_id, view_id) { | 
				
			|||
                var action = { | 
				
			|||
                    type: 'ir.actions.act_window', | 
				
			|||
                    view_type: 'form', | 
				
			|||
                    view_mode: 'form', | 
				
			|||
                    res_model: res_model, | 
				
			|||
                    views: [ | 
				
			|||
                        [view_id || false, 'form'] | 
				
			|||
                    ], | 
				
			|||
                    res_id: res_id, | 
				
			|||
                    target: 'current', | 
				
			|||
                    context: context, | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }; | 
				
			|||
            rpc.query({ | 
				
			|||
                    model: 'account.move', | 
				
			|||
                    method: 'search_read', | 
				
			|||
                    domain: [ | 
				
			|||
                        ['id', '=', $(event.currentTarget).data('move-id')] | 
				
			|||
                    ], | 
				
			|||
                    fields: ['id'], | 
				
			|||
                    limit: 1, | 
				
			|||
                }) | 
				
			|||
                .then(function(record) { | 
				
			|||
                    if (record.length > 0) { | 
				
			|||
                        redirect_to_document('account.move', record[0].id); | 
				
			|||
                    } else { | 
				
			|||
                        redirect_to_document('account.move', $(event.currentTarget).data('move-id')); | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
    }); | 
				
			|||
 | 
				
			|||
     var TrialBalance = AbstractAction.extend({ | 
				
			|||
        template: 'TrialBalance', | 
				
			|||
        events: { | 
				
			|||
            'click #filter_apply_button': 'apply_filter', | 
				
			|||
            'click .open-gl': 'get_gl', | 
				
			|||
            'click #pdf': 'print_pdf', | 
				
			|||
            'click #xlsx': 'print_xlsx', | 
				
			|||
        }, | 
				
			|||
        init: function(view, code) { | 
				
			|||
            this._super(view, code); | 
				
			|||
            this.wizard = code.context.wizard | null; | 
				
			|||
            this.session = session; | 
				
			|||
        }, | 
				
			|||
        start: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self.initial_render = true; | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.trial.balance', | 
				
			|||
                method: 'create', | 
				
			|||
                args: [{ | 
				
			|||
 | 
				
			|||
                }] | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.wizard = res; | 
				
			|||
                self.ledger_view(self.initial_render); | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
        apply_filter: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
 | 
				
			|||
            self.initial_render = false; | 
				
			|||
            var output = {}; | 
				
			|||
            var account_ids = []; | 
				
			|||
            var journal_ids = []; | 
				
			|||
            var journal_text = []; | 
				
			|||
            var journal_res = document.getElementById("journal_res") | 
				
			|||
            var journal_list = $(".journal").select2('data') | 
				
			|||
            for (var i = 0; i < journal_list.length; i++) { | 
				
			|||
                if(journal_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    journal_ids.push(parseInt(journal_list[i].id)) | 
				
			|||
                    if(journal_text.includes(journal_list[i].text) === false){ | 
				
			|||
                        journal_text.push(journal_list[i].text) | 
				
			|||
                    } | 
				
			|||
                    journal_res.value = journal_text | 
				
			|||
                    journal_res.innerHTML=journal_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (journal_list.length == 0){ | 
				
			|||
               journal_res.value = "" | 
				
			|||
                    journal_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.journal_ids = journal_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var analytic_ids = []; | 
				
			|||
            var analytic_text = []; | 
				
			|||
            var span_res = document.getElementById("analic_res") | 
				
			|||
            var analytic_list = $(".analytic").select2('data') | 
				
			|||
            for (var i = 0; i < analytic_list.length; i++) { | 
				
			|||
                if(analytic_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    analytic_ids.push(parseInt(analytic_list[i].id)) | 
				
			|||
                    if(analytic_text.includes(analytic_list[i].text) === false){ | 
				
			|||
                        analytic_text.push(analytic_list[i].text) | 
				
			|||
                    } | 
				
			|||
                    span_res.value = analytic_text | 
				
			|||
                    span_res.innerHTML=span_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (analytic_list.length == 0){ | 
				
			|||
               span_res.value = "" | 
				
			|||
                    span_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.analytic_ids = analytic_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            if ($("#date_from").val()) { | 
				
			|||
                var dateObject = $("#date_from").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_from = dateString; | 
				
			|||
            } | 
				
			|||
            if ($("#date_to").val()) { | 
				
			|||
                var dateObject = $("#date_to").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_to = dateString; | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
            if ($(".entries").length) { | 
				
			|||
            var post_res = document.getElementById("post_res") | 
				
			|||
            output.entries = $(".entries")[1].value | 
				
			|||
            post_res.value = $(".entries")[1].value | 
				
			|||
                    post_res.innerHTML=post_res.value; | 
				
			|||
              if ($(".entries")[1].value == "") { | 
				
			|||
              post_res.innerHTML="all"; | 
				
			|||
              output.entries = "all" | 
				
			|||
 | 
				
			|||
              } | 
				
			|||
            } | 
				
			|||
            output.include_details = true; | 
				
			|||
 | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.trial.balance', | 
				
			|||
                method: 'write', | 
				
			|||
                args: [ | 
				
			|||
                    self.wizard, output | 
				
			|||
                ], | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.ledger_view(self.initial_render); | 
				
			|||
            }); | 
				
			|||
 | 
				
			|||
            var dropDown = document.getElementById("entries"); | 
				
			|||
            dropDown.value = ""; | 
				
			|||
 | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        get_gl: function(e) { | 
				
			|||
            var self = this; | 
				
			|||
            var account_id = $(e.target).attr('data-account-id'); | 
				
			|||
            var options = { | 
				
			|||
                account_ids: [account_id], | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
                var action = { | 
				
			|||
                    type: 'ir.actions.client', | 
				
			|||
                    name: 'GL View', | 
				
			|||
                    tag: 'dynamic.gl', | 
				
			|||
                    target: 'new', | 
				
			|||
 | 
				
			|||
                    domain: [['account_ids','=', account_id]], | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                } | 
				
			|||
                return this.do_action(action); | 
				
			|||
 | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        print_pdf: function(e) { | 
				
			|||
            e.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.trial.balance', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir.actions.report', | 
				
			|||
                    'report_type': 'qweb-pdf', | 
				
			|||
                    'report_name': 'dynamic_financial_report.trial_balance', | 
				
			|||
                    'report_file': 'dynamic_financial_report.trial_balance', | 
				
			|||
                    'data': { | 
				
			|||
                        'report_data': data | 
				
			|||
                    }, | 
				
			|||
                    'context': { | 
				
			|||
                        'active_model': 'dynamic.trial.balance', | 
				
			|||
                        'landscape': 1, | 
				
			|||
                        'js_report': true | 
				
			|||
                    }, | 
				
			|||
                    'display_name': 'Trial Balance', | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        print_xlsx: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.trial.balance', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir_actions_xlsx_download', | 
				
			|||
                    'data': { | 
				
			|||
                         'model': 'dynamic.trial.balance', | 
				
			|||
                         'options': JSON.stringify(data[1]), | 
				
			|||
                         'output_format': 'xlsx', | 
				
			|||
                         'report_data': JSON.stringify({"d1":JSON.stringify(data[2]) , "d2":JSON.stringify(data[0])}) , | 
				
			|||
                         'report_name': 'Trial Balance', | 
				
			|||
                         'dfr_data': JSON.stringify(data), | 
				
			|||
                    }, | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        ledger_view: function(initial_render = true) { | 
				
			|||
            var self = this; | 
				
			|||
            var node = self.$('.container-tb-main'); | 
				
			|||
            var last; | 
				
			|||
            while (last = node.lastChild) node.removeChild(last); | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.trial.balance', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(datas) { | 
				
			|||
                self.filter_data = datas[0] | 
				
			|||
                self.account_data = datas[1] | 
				
			|||
                      if (datas[2].currency_details.length > 0){ | 
				
			|||
                        var currency_format = { | 
				
			|||
                            currency_id: datas[2].currency_details[0].currency, | 
				
			|||
                            position: datas[2].currency_details[0].position, | 
				
			|||
                            symbol: datas[2].currency_details[0].symbol, | 
				
			|||
                            noSymbol: true, | 
				
			|||
                        }; | 
				
			|||
                        if (currency_format.position == "before") { | 
				
			|||
                            if (datas[2].debit  == 0) { | 
				
			|||
                                datas[2].debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                datas[2].debit  = currency_format.symbol  + datas[2].debit.toFixed(2) ; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (datas[2].credit  == 0) { | 
				
			|||
                                datas[2].credit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                datas[2].credit  = currency_format.symbol + datas[2].credit.toFixed(2) ; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
 | 
				
			|||
                        }else{ | 
				
			|||
 | 
				
			|||
                                if (datas[2].debit == 0) { | 
				
			|||
                                    datas[2].debit = ' - ' | 
				
			|||
                                } else { | 
				
			|||
                                    datas[2].debit = datas[2].debit.toFixed(2) + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                                } | 
				
			|||
                                if (datas[2].credit == 0) { | 
				
			|||
                                    datas[2].credit = ' - ' | 
				
			|||
                                } else { | 
				
			|||
                                    datas[2].credit = datas[2].credit.toFixed(2) + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                                } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                        } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                      } | 
				
			|||
 | 
				
			|||
                _.each(self.account_data, function(account) { | 
				
			|||
                    var currency_format = { | 
				
			|||
                        currency_id: account.company_currency_id, | 
				
			|||
                        position: account.company_currency_position, | 
				
			|||
                        symbol: account.company_currency_symbol, | 
				
			|||
                        noSymbol: true, | 
				
			|||
                    }; | 
				
			|||
                    for (var i = 0; i < account.lines.length; i++) { | 
				
			|||
                      if (account.lines[i].initial_bal == true){ | 
				
			|||
                        if (currency_format.position == "before") { | 
				
			|||
                            if (account.lines[i].debit  == 0) { | 
				
			|||
                                account.lines[i].debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.lines[i].debit  = currency_format.symbol + ' ' + account.lines[i].debit .toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.lines[i].credit  == 0) { | 
				
			|||
                                account.lines[i].credit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.lines[i].credit  = currency_format.symbol + ' ' + account.lines[i].credit .toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
 | 
				
			|||
                        }else{ | 
				
			|||
 | 
				
			|||
                                if (account.lines[i].debit == 0) { | 
				
			|||
                                    account.lines[i].debit = ' - ' | 
				
			|||
                                } else { | 
				
			|||
                                    account.lines[i].debit = account.lines[i].debit.toFixed(2) + ' ' + currency_format.symbol; | 
				
			|||
 | 
				
			|||
                                } | 
				
			|||
                                if (account.lines[i].credit == 0) { | 
				
			|||
                                    account.lines[i].credit = ' - ' | 
				
			|||
                                } else { | 
				
			|||
                                    account.lines[i].credit = account.lines[i].credit.toFixed(2) + ' ' + currency_format.symbol; | 
				
			|||
 | 
				
			|||
                                } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                        } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                      } | 
				
			|||
                    } | 
				
			|||
                    if (currency_format.position == "before") { | 
				
			|||
 | 
				
			|||
                         if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = currency_format.symbol + ' ' + account.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = currency_format.symbol + ' ' + account.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = currency_format.symbol + ' ' + account.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } else { | 
				
			|||
 | 
				
			|||
                        if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = account.debit.toFixed(2) + ' ' + currency_format.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = account.credit.toFixed(2) + ' ' + currency_format.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = account.balance.toFixed(2) + ' ' + currency_format.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
                if (initial_render) { | 
				
			|||
                    self.$('.tb-filter').html(QWeb.render('FilterSectionTB', { | 
				
			|||
                        filter_data: datas[0], | 
				
			|||
                    })); | 
				
			|||
 | 
				
			|||
                    self.$el.find('.journal').select2({ | 
				
			|||
                        placeholder: 'Select Journal...', | 
				
			|||
                    }); | 
				
			|||
 | 
				
			|||
                    self.$el.find('.analytic').select2({ | 
				
			|||
                        placeholder: 'Select Analytic...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.entries').select2({ | 
				
			|||
                        placeholder: 'Select Moves', | 
				
			|||
                    }).val('all').trigger('change'); | 
				
			|||
 | 
				
			|||
                    self.$el.find('#date_from').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
 | 
				
			|||
                    self.$el.find('#date_to').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                } | 
				
			|||
                self.$('.container-tb-main').html(QWeb.render('TrialBalanceData', { | 
				
			|||
 | 
				
			|||
                    account_data: datas[1], | 
				
			|||
                    filter : datas[0], | 
				
			|||
                    total_b : datas[2], | 
				
			|||
                })); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
    }); | 
				
			|||
 | 
				
			|||
    core.action_registry.add('dynamic.gl', GeneralLedger); | 
				
			|||
    core.action_registry.add('dynamic.tb', TrialBalance); | 
				
			|||
 | 
				
			|||
}); | 
				
			|||
@ -1,476 +0,0 @@ | 
				
			|||
odoo.define('dynamic_financial_report.partner_ledger', function(require) { | 
				
			|||
    'use strict'; | 
				
			|||
    var AbstractAction = require('web.AbstractAction'); | 
				
			|||
    var core = require('web.core'); | 
				
			|||
    var field_utils = require('web.field_utils'); | 
				
			|||
    var rpc = require('web.rpc'); | 
				
			|||
    var session = require('web.session'); | 
				
			|||
    var utils = require('web.utils'); | 
				
			|||
    var QWeb = core.qweb; | 
				
			|||
    var _t = core._t; | 
				
			|||
 | 
				
			|||
    var PartnerLedger = AbstractAction.extend({ | 
				
			|||
        template: 'PartnerLedger', | 
				
			|||
        events: { | 
				
			|||
            'click .pl-line': 'get_move_lines', | 
				
			|||
            'click .view-move': 'view_move', | 
				
			|||
            'click #filter_apply_button': 'apply_filter', | 
				
			|||
            'click #pdf': 'print_pdf', | 
				
			|||
            'click #xlsx': 'print_xlsx', | 
				
			|||
        }, | 
				
			|||
        init: function(view, code) { | 
				
			|||
            this._super(view, code); | 
				
			|||
            this.wizard = code.context.wizard | null; | 
				
			|||
            this.session = session; | 
				
			|||
        }, | 
				
			|||
        start: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self.initial_render = true; | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.partner.ledger', | 
				
			|||
                method: 'create', | 
				
			|||
                args: [{ | 
				
			|||
                    res_model: this.res_model | 
				
			|||
                }] | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.wizard = res; | 
				
			|||
                self.ledger_view(self.initial_render); | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
        apply_filter: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
 | 
				
			|||
            self.initial_render = false; | 
				
			|||
            var output = {}; | 
				
			|||
            output.reconciled=false; | 
				
			|||
            output.type=false; | 
				
			|||
            output.date_from=false; | 
				
			|||
            output.date_to=false; | 
				
			|||
            var journal_ids = []; | 
				
			|||
            var journal_text = []; | 
				
			|||
            var span_res = document.getElementById("journal_res") | 
				
			|||
            var journal_list = $(".journal").select2('data') | 
				
			|||
            for (var i = 0; i < journal_list.length; i++) { | 
				
			|||
            if(journal_list[i].element[0].selected === true){ journal_ids.push(parseInt(journal_list[i].id)) | 
				
			|||
            if(journal_text.includes(journal_list[i].text) === false){ | 
				
			|||
            journal_text.push(journal_list[i].text) | 
				
			|||
            } | 
				
			|||
            span_res.value = journal_text | 
				
			|||
            span_res.innerHTML=span_res.value; | 
				
			|||
            } | 
				
			|||
            } | 
				
			|||
            if (journal_list.length == 0){ | 
				
			|||
            span_res.value = "" | 
				
			|||
            span_res.innerHTML=""; } | 
				
			|||
            output.journal_ids = journal_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var partner_ids = []; | 
				
			|||
            var partner_text = []; | 
				
			|||
            var span_res = document.getElementById("partner_res") | 
				
			|||
            var partner_list = $(".partner").select2('data') | 
				
			|||
            for (var i = 0; i < partner_list.length; i++) { | 
				
			|||
            if(partner_list[i].element[0].selected === true) | 
				
			|||
            {partner_ids.push(parseInt(partner_list[i].id)) | 
				
			|||
            if(partner_text.includes(partner_list[i].text) === false) | 
				
			|||
            {partner_text.push(partner_list[i].text) | 
				
			|||
            } | 
				
			|||
            span_res.value = partner_text | 
				
			|||
            span_res.innerHTML=span_res.value; | 
				
			|||
            } | 
				
			|||
            } | 
				
			|||
            if (partner_list.length == 0){ | 
				
			|||
            span_res.value = "" | 
				
			|||
            span_res.innerHTML=""; } | 
				
			|||
            output.partner_ids = partner_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var account_ids = []; | 
				
			|||
            var account_text = []; | 
				
			|||
            var span_res = document.getElementById("account_res") | 
				
			|||
            var account_list = $(".account").select2('data') | 
				
			|||
            for (var i = 0; i < account_list.length; i++) { | 
				
			|||
            if(account_list[i].element[0].selected === true) | 
				
			|||
            {account_ids.push(parseInt(account_list[i].id)) | 
				
			|||
            if(account_text.includes(account_list[i].text) === false) | 
				
			|||
            {account_text.push(account_list[i].text) | 
				
			|||
            } | 
				
			|||
            span_res.value = account_text | 
				
			|||
            span_res.innerHTML=span_res.value; | 
				
			|||
            } | 
				
			|||
            } | 
				
			|||
            if (account_list.length == 0){ | 
				
			|||
            span_res.value = "" | 
				
			|||
            span_res.innerHTML=""; } | 
				
			|||
            output.account_ids = account_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var partner_category_ids = []; | 
				
			|||
            var partner_category_text = []; | 
				
			|||
            var span_res = document.getElementById("category_res") | 
				
			|||
            var category_list = $(".category").select2('data') | 
				
			|||
            for (var i = 0; i < category_list.length; i++) { | 
				
			|||
            if(category_list[i].element[0].selected === true) | 
				
			|||
            {partner_category_ids.push(parseInt(category_list[i].id)) | 
				
			|||
            if(partner_category_text.includes(category_list[i].text) === false) | 
				
			|||
            {partner_category_text.push(category_list[i].text) | 
				
			|||
            } | 
				
			|||
            span_res.value = partner_category_text | 
				
			|||
            span_res.innerHTML=span_res.value; | 
				
			|||
            } | 
				
			|||
            } | 
				
			|||
            if (category_list.length == 0){ | 
				
			|||
            span_res.value = "" | 
				
			|||
            span_res.innerHTML=""; } | 
				
			|||
            output.partner_category_ids = partner_category_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            if ($(".reconcile").length){ | 
				
			|||
            var reconciled_res = document.getElementById("reconciled_res") | 
				
			|||
            output.reconciled = $(".reconcile")[1].value | 
				
			|||
            reconciled_res.value = $(".reconcile")[1].value | 
				
			|||
            reconciled_res.innerHTML=reconciled_res.value; | 
				
			|||
            if ($(".reconcile").value==""){ | 
				
			|||
            reconciled_res.innerHTML="unreconciled"; | 
				
			|||
            output.reconciled = "unreconciled" | 
				
			|||
            } | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            if ($(".type").length){ | 
				
			|||
            var type_res = document.getElementById("type_res") | 
				
			|||
            output.type = $(".type")[1].value | 
				
			|||
            type_res.value = $(".type")[1].value | 
				
			|||
            type_res.innerHTML=type_res.value; | 
				
			|||
            if ($(".type").value==""){ | 
				
			|||
            type_res.innerHTML="receivable"; | 
				
			|||
            output.type = "Receivable" | 
				
			|||
            } | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
            if ($(".target-moves").length){ | 
				
			|||
                var target_res = document.getElementById("target_res") | 
				
			|||
                output.target_moves = $(".target-moves")[1].value | 
				
			|||
                target_res.value = $(".target-moves")[1].value | 
				
			|||
                target_res.innerHTML=target_res.value; | 
				
			|||
            if ($(".target-moves").value==""){ | 
				
			|||
                target_res.innerHTML="all_entries"; | 
				
			|||
                output.target_moves = "all_entries" | 
				
			|||
                } | 
				
			|||
                } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            if ($("#date_from").val()) { | 
				
			|||
                var dateObject = $("#date_from").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_from = dateString; | 
				
			|||
            } | 
				
			|||
            if ($("#date_to").val()) { | 
				
			|||
                var dateObject = $("#date_to").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_to = dateString; | 
				
			|||
            } | 
				
			|||
            output.include_details = true; | 
				
			|||
 | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.partner.ledger', | 
				
			|||
                method: 'write', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], output | 
				
			|||
                ], | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.ledger_view(self.initial_render); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        print_pdf: function(e) { | 
				
			|||
            e.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.partner.ledger', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir.actions.report', | 
				
			|||
                    'report_type': 'qweb-pdf', | 
				
			|||
                    'report_name': 'dynamic_financial_report.partner_ledger', | 
				
			|||
                    'report_file': 'dynamic_financial_report.partner_ledger', | 
				
			|||
                    'data': { | 
				
			|||
                        'report_data': data | 
				
			|||
                    }, | 
				
			|||
                    'context': { | 
				
			|||
                        'active_model': 'dynamic.partner.ledger', | 
				
			|||
                        'landscape': 1, | 
				
			|||
                        'js_report': true | 
				
			|||
                    }, | 
				
			|||
                    'display_name': 'Partner Ledger', | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        print_xlsx: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.partner.ledger', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir_actions_xlsx_download', | 
				
			|||
                    'data': { | 
				
			|||
                         'model': 'dynamic.partner.ledger', | 
				
			|||
                         'options': JSON.stringify(data[1]), | 
				
			|||
                         'output_format': 'xlsx', | 
				
			|||
                         'report_data': JSON.stringify(data[0]), | 
				
			|||
                         'report_name': 'Partner Ledger', | 
				
			|||
                         'dfr_data': JSON.stringify(data), | 
				
			|||
                    }, | 
				
			|||
 | 
				
			|||
                }; | 
				
			|||
 | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        ledger_view: function(initial_render = true) { | 
				
			|||
            var self = this; | 
				
			|||
            var node = self.$('.container-pl-main'); | 
				
			|||
            var last; | 
				
			|||
            while (last = node.lastChild) node.removeChild(last); | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.partner.ledger', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard] | 
				
			|||
                ], | 
				
			|||
            }).then(function(datas) { | 
				
			|||
                self.filter_data = datas[0] | 
				
			|||
                self.account_data = datas[1] | 
				
			|||
 | 
				
			|||
                _.each(self.account_data, function(account) { | 
				
			|||
                    var currency_format = { | 
				
			|||
                        currency_id: account.company_currency_id, | 
				
			|||
                        position: account.company_currency_position, | 
				
			|||
                        symbol: account.company_currency_symbol, | 
				
			|||
                        noSymbol: true, | 
				
			|||
                    }; | 
				
			|||
                    if (currency_format.position == "before") { | 
				
			|||
 | 
				
			|||
                         if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = currency_format.symbol + ' ' + account.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = currency_format.symbol + ' ' + account.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = currency_format.symbol + ' ' + account.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } else { | 
				
			|||
 | 
				
			|||
                        if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = account.debit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = account.credit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = account.balance.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
                if (initial_render) { | 
				
			|||
                    self.$('.pl-filter').html(QWeb.render('FilterSectionPl', { | 
				
			|||
                        filter_data: datas[0], | 
				
			|||
                    })); | 
				
			|||
 | 
				
			|||
                    self.$el.find('.journal').select2({ | 
				
			|||
                        placeholder: 'Select Journal...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.account').select2({ | 
				
			|||
                        placeholder: 'Select Account...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.partner').select2({ | 
				
			|||
                        placeholder: 'Select Partner...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.reconcile').select2({ | 
				
			|||
                        placeholder: 'Select Reconciled status...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.target-moves').select2({ | 
				
			|||
                        placeholder: 'Posted or All Entries...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.type').select2({ | 
				
			|||
                        placeholder: 'Select Account...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.category').select2({ | 
				
			|||
                        placeholder: 'Select Category...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('#date_from').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('#date_to').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                } | 
				
			|||
 | 
				
			|||
                self.$('.container-pl-main').html(QWeb.render('PartnerLedgerData', { | 
				
			|||
                    account_data: datas[1] | 
				
			|||
                })); | 
				
			|||
 | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        pl_lines_by_page: function(offset, account_id) { | 
				
			|||
            var self = this; | 
				
			|||
            return rpc.query({ | 
				
			|||
                model: 'dynamic.partner.ledger', | 
				
			|||
                method: 'pl_move_lines', | 
				
			|||
                args: [self.wizard, offset, account_id], | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
        get_move_lines: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var account_id = $(event.currentTarget).data('account-id'); | 
				
			|||
            var offset = 0; | 
				
			|||
            var td = $(event.currentTarget).next('tr').find('td'); | 
				
			|||
            if (td.length == 1) { | 
				
			|||
                self.pl_lines_by_page(offset, account_id).then(function(datas) { | 
				
			|||
                    _.each(datas[2], function(data) { | 
				
			|||
                        var currency_format = { | 
				
			|||
                            currency_id: data.company_currency_id, | 
				
			|||
                            position: data.company_currency_position, | 
				
			|||
                            symbol: data.company_currency_symbol, | 
				
			|||
                            noSymbol: true, | 
				
			|||
                        }; | 
				
			|||
                        if (currency_format.position == "before") { | 
				
			|||
                            if (data.debit == 0) { | 
				
			|||
                                data.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.debit = currency_format.symbol + ' ' + data.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.credit == 0) { | 
				
			|||
                                data.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.credit = currency_format.symbol + ' ' + data.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.balance == 0) { | 
				
			|||
                                data.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.balance = currency_format.symbol + ' ' + data.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                        } else { | 
				
			|||
                            if (data.debit == 0) { | 
				
			|||
                                data.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.debit = data.debit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.credit == 0) { | 
				
			|||
                                data.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.credit = data.credit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.balance == 0) { | 
				
			|||
                                data.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.balance = data.balance.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
 | 
				
			|||
                        } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    }); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td .pl-table-div').remove(); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul').after( | 
				
			|||
                        QWeb.render('SubSectionPl', { | 
				
			|||
                            count: datas[0], | 
				
			|||
                            offset: datas[1], | 
				
			|||
                            account_data: datas[2], | 
				
			|||
                        })) | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul li:first a').css({ | 
				
			|||
                        'background-color': '#00ede8', | 
				
			|||
                        'font-weight': 'bold', | 
				
			|||
                    }); | 
				
			|||
                }) | 
				
			|||
            } | 
				
			|||
        }, | 
				
			|||
        view_move: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var context = {}; | 
				
			|||
            var redirect_to_document = function(res_model, res_id, view_id) { | 
				
			|||
 | 
				
			|||
                var action = { | 
				
			|||
                    type: 'ir.actions.act_window', | 
				
			|||
                    view_type: 'form', | 
				
			|||
                    view_mode: 'form', | 
				
			|||
                    res_model: res_model, | 
				
			|||
                    views: [ | 
				
			|||
                        [view_id || false, 'form'] | 
				
			|||
                    ], | 
				
			|||
                    res_id: res_id, | 
				
			|||
                    target: 'current', | 
				
			|||
                    context: context, | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }; | 
				
			|||
            rpc.query({ | 
				
			|||
                    model: 'account.move', | 
				
			|||
                    method: 'search_read', | 
				
			|||
                    domain: [ | 
				
			|||
                        ['id', '=', $(event.currentTarget).data('move-id')] | 
				
			|||
                    ], | 
				
			|||
                    fields: ['id'], | 
				
			|||
                    limit: 1, | 
				
			|||
                }) | 
				
			|||
                .then(function(record) { | 
				
			|||
                    if (record.length > 0) { | 
				
			|||
                        redirect_to_document('account.move', record[0].id); | 
				
			|||
                    } else { | 
				
			|||
                        redirect_to_document('account.move', $(event.currentTarget).data('move-id')); | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
    }); | 
				
			|||
 | 
				
			|||
    core.action_registry.add('dynamic.pl', PartnerLedger); | 
				
			|||
 | 
				
			|||
}); | 
				
			|||
@ -1,526 +0,0 @@ | 
				
			|||
odoo.define('dynamic_financial_report.profit_loss', function(require) { | 
				
			|||
    'use strict'; | 
				
			|||
    var AbstractAction = require('web.AbstractAction'); | 
				
			|||
    var core = require('web.core'); | 
				
			|||
    var field_utils = require('web.field_utils'); | 
				
			|||
    var rpc = require('web.rpc'); | 
				
			|||
    var session = require('web.session'); | 
				
			|||
    var utils = require('web.utils'); | 
				
			|||
    var QWeb = core.qweb; | 
				
			|||
    var _t = core._t; | 
				
			|||
 | 
				
			|||
    var ProfitAndLoss = AbstractAction.extend({ | 
				
			|||
        template: 'ProfitAndLoss', | 
				
			|||
        events: { | 
				
			|||
            'click .pal-line': 'get_move_lines', | 
				
			|||
            'click .view-move': 'view_move', | 
				
			|||
            'click #filter_apply_button': 'apply_filter', | 
				
			|||
            'click #pdf': 'print_pdf', | 
				
			|||
            'click #xlsx': 'print_xlsx', | 
				
			|||
            'click .open-gl': 'get_gl', | 
				
			|||
        }, | 
				
			|||
        init: function(view, code) { | 
				
			|||
            this._super(view, code); | 
				
			|||
            this.wizard = code.context.wizard | null; | 
				
			|||
            this.session = session; | 
				
			|||
        }, | 
				
			|||
        start: function() { | 
				
			|||
            var self = this; | 
				
			|||
            self.initial_render = true; | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.balance.sheet', | 
				
			|||
                method: 'create', | 
				
			|||
                args: [{ | 
				
			|||
 | 
				
			|||
                }] | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.wizard = res; | 
				
			|||
                self.sheet_view(self.initial_render); | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
            apply_filter: function(event) { | 
				
			|||
 | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
 | 
				
			|||
            self.initial_render = false; | 
				
			|||
            var output = {}; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var account_ids = []; | 
				
			|||
            var account_text = []; | 
				
			|||
            var account_res = document.getElementById("acc_res") | 
				
			|||
            var account_list = $(".account").select2('data') | 
				
			|||
            for (var i = 0; i < account_list.length; i++) { | 
				
			|||
 | 
				
			|||
                if(account_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    account_ids.push(parseInt(account_list[i].id)) | 
				
			|||
                    if(account_text.includes(account_list[i].text) === false){ | 
				
			|||
                        account_text.push(account_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
                    account_res.value = account_text | 
				
			|||
                    account_res.innerHTML=account_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (account_list.length == 0){ | 
				
			|||
               account_res.value = "" | 
				
			|||
                    account_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.account_ids = account_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
             var journal_ids = []; | 
				
			|||
            var journal_text = []; | 
				
			|||
            var journal_res = document.getElementById("journal_res") | 
				
			|||
            var journal_list = $(".journal").select2('data') | 
				
			|||
            for (var i = 0; i < journal_list.length; i++) { | 
				
			|||
 | 
				
			|||
                if(journal_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    journal_ids.push(parseInt(journal_list[i].id)) | 
				
			|||
                    if(journal_text.includes(journal_list[i].text) === false){ | 
				
			|||
                        journal_text.push(journal_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    journal_res.value = journal_text | 
				
			|||
                    journal_res.innerHTML=journal_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (journal_list.length == 0){ | 
				
			|||
               journal_res.value = "" | 
				
			|||
                    journal_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.journal_ids = journal_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            var account_tag_ids = []; | 
				
			|||
            var account_tag_text = []; | 
				
			|||
            var account_tag_res = document.getElementById("acc_tag_res") | 
				
			|||
            var account_tag_list = $(".account-tag").select2('data') | 
				
			|||
            for (var i = 0; i < account_tag_list.length; i++) { | 
				
			|||
                if(account_tag_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    account_tag_ids.push(parseInt(account_tag_list[i].id)) | 
				
			|||
                    if(account_tag_text.includes(account_tag_list[i].text) === false){ | 
				
			|||
                        account_tag_text.push(account_tag_list[i].text) | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    account_tag_res.value = account_tag_text | 
				
			|||
                    account_tag_res.innerHTML=account_tag_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (account_tag_list.length == 0){ | 
				
			|||
               account_tag_res.value = "" | 
				
			|||
                    account_tag_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.account_tag_ids = account_tag_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
               var analytic_ids = []; | 
				
			|||
            var analytic_text = []; | 
				
			|||
            var span_res = document.getElementById("analic_res") | 
				
			|||
            var analytic_list = $(".analytic").select2('data') | 
				
			|||
            for (var i = 0; i < analytic_list.length; i++) { | 
				
			|||
                if(analytic_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    analytic_ids.push(parseInt(analytic_list[i].id)) | 
				
			|||
                    if(analytic_text.includes(analytic_list[i].text) === false){ | 
				
			|||
                        analytic_text.push(analytic_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    span_res.value = analytic_text | 
				
			|||
                    span_res.innerHTML=span_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (analytic_list.length == 0){ | 
				
			|||
               span_res.value = "" | 
				
			|||
                    span_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.analytic_ids = analytic_ids | 
				
			|||
 | 
				
			|||
            output.analytic_tag_ids = analytic_tag_ids | 
				
			|||
 | 
				
			|||
            var analytic_tag_ids = []; | 
				
			|||
            var analytic_tag_text = []; | 
				
			|||
            var analytic_tag_res = document.getElementById("analic_tag_res") | 
				
			|||
            var analytic_tag_list = $(".analytic-tag").select2('data') | 
				
			|||
            for (var i = 0; i < analytic_tag_list.length; i++) { | 
				
			|||
                if(analytic_tag_list[i].element[0].selected === true){ | 
				
			|||
 | 
				
			|||
                    analytic_tag_ids.push(parseInt(analytic_tag_list[i].id)) | 
				
			|||
                    if(analytic_tag_text.includes(analytic_tag_list[i].text) === false){ | 
				
			|||
                        analytic_tag_text.push(analytic_tag_list[i].text) | 
				
			|||
 | 
				
			|||
                    } | 
				
			|||
 | 
				
			|||
                    analytic_tag_res.value = analytic_tag_text | 
				
			|||
                    analytic_tag_res.innerHTML=analytic_tag_res.value; | 
				
			|||
                } | 
				
			|||
            } | 
				
			|||
            if (analytic_tag_list.length == 0){ | 
				
			|||
               analytic_tag_res.value = "" | 
				
			|||
                    analytic_tag_res.innerHTML=""; | 
				
			|||
 | 
				
			|||
            } | 
				
			|||
            output.analytic_tag_ids = analytic_tag_ids | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            if ($("#date_from").val()) { | 
				
			|||
                var dateObject = $("#date_from").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_from = dateString; | 
				
			|||
            } | 
				
			|||
            if ($("#date_to").val()) { | 
				
			|||
                var dateObject = $("#date_to").datepicker("getDate"); | 
				
			|||
                var dateString = $.datepicker.formatDate("yy-mm-dd", dateObject); | 
				
			|||
                output.date_to = dateString; | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
            if ($(".entries").length) { | 
				
			|||
            var post_res = document.getElementById("post_res") | 
				
			|||
 | 
				
			|||
            output.entries = $(".entries")[1].value | 
				
			|||
            post_res.value = $(".entries")[1].value | 
				
			|||
                    post_res.innerHTML=post_res.value; | 
				
			|||
              if ($(".entries")[1].value == "") { | 
				
			|||
              post_res.innerHTML="all"; | 
				
			|||
 | 
				
			|||
              } | 
				
			|||
            } | 
				
			|||
 | 
				
			|||
            output.include_details = true; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.balance.sheet', | 
				
			|||
                method: 'write', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], output | 
				
			|||
                ], | 
				
			|||
            }).then(function(res) { | 
				
			|||
                self.sheet_view(self.initial_render); | 
				
			|||
 | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        get_gl: function(e) { | 
				
			|||
            var self = this; | 
				
			|||
            var account_id = $(e.target).attr('data-account-id'); | 
				
			|||
            var options = { | 
				
			|||
                account_ids: [account_id], | 
				
			|||
            } | 
				
			|||
                var action = { | 
				
			|||
                    type: 'ir.actions.client', | 
				
			|||
                    name: 'GL View', | 
				
			|||
                    tag: 'dynamic.gl', | 
				
			|||
                    target: 'new', | 
				
			|||
 | 
				
			|||
                    domain: [['account_ids','=', account_id]], | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                } | 
				
			|||
                return this.do_action(action); | 
				
			|||
 | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
        print_pdf: function(e) { | 
				
			|||
            e.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var action_title = self._title | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.balance.sheet', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], action_title | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
 | 
				
			|||
                var action = { | 
				
			|||
                    'type': 'ir.actions.report', | 
				
			|||
                    'report_type': 'qweb-pdf', | 
				
			|||
                    'report_name': 'dynamic_financial_report.balance_sheet', | 
				
			|||
                    'report_file': 'dynamic_financial_report.balance_sheet', | 
				
			|||
                    'data': { | 
				
			|||
                        'report_data': data, | 
				
			|||
                        'report_name': 'Profit and Loss' | 
				
			|||
                    }, | 
				
			|||
                    'context': { | 
				
			|||
                        'active_model': 'dynamic.balance.sheet', | 
				
			|||
                        'landscape': 1, | 
				
			|||
                        'js_report': true | 
				
			|||
                    }, | 
				
			|||
                    'display_name': 'Profit and Loss', | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        print_xlsx: function() { | 
				
			|||
            var self = this; | 
				
			|||
            var action_title = self._title | 
				
			|||
            self._rpc({ | 
				
			|||
                model: 'dynamic.balance.sheet', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard],action_title | 
				
			|||
                ], | 
				
			|||
            }).then(function(data) { | 
				
			|||
 | 
				
			|||
                var action = { | 
				
			|||
                       'type': 'ir_actions_xlsx_download', | 
				
			|||
                        'data': { | 
				
			|||
                             'model': 'dynamic.balance.sheet', | 
				
			|||
                             'options': 'Profit and Loss', | 
				
			|||
                             'output_format': 'xlsx', | 
				
			|||
                             'report_data': JSON.stringify(data[0]), | 
				
			|||
                             'report_name': 'Profit and Loss', | 
				
			|||
                             'dfr_data':JSON.stringify(data[2]), | 
				
			|||
                        }, | 
				
			|||
                    }; | 
				
			|||
 | 
				
			|||
                    return self.do_action(action); | 
				
			|||
                }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        sheet_view: function(initial_render = true) { | 
				
			|||
            var self = this; | 
				
			|||
            var action_title = self._title | 
				
			|||
            var node = self.$('.container-pal-main'); | 
				
			|||
            var last; | 
				
			|||
            while (last = node.lastChild) node.removeChild(last); | 
				
			|||
            rpc.query({ | 
				
			|||
                model: 'dynamic.balance.sheet', | 
				
			|||
                method: 'get_data', | 
				
			|||
                args: [ | 
				
			|||
                    [self.wizard], action_title | 
				
			|||
                ], | 
				
			|||
            }).then(function(datas) { | 
				
			|||
                self.filter_data = datas[0] | 
				
			|||
 | 
				
			|||
                self.account_data = datas[1] | 
				
			|||
 | 
				
			|||
                _.each(self.account_data, function(account) { | 
				
			|||
                    var currency_format = { | 
				
			|||
                        currency_id: account.company_currency_id, | 
				
			|||
                        position: account.company_currency_position, | 
				
			|||
                        symbol: account.company_currency_symbol, | 
				
			|||
                        noSymbol: true, | 
				
			|||
                    }; | 
				
			|||
                    if (currency_format.position == "before") { | 
				
			|||
 | 
				
			|||
                         if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = currency_format.symbol + ' ' + account.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = currency_format.symbol + ' ' + account.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = currency_format.symbol + ' ' + account.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } else { | 
				
			|||
 | 
				
			|||
                        if (account.debit == 0) { | 
				
			|||
                                account.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.debit = account.debit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.credit == 0) { | 
				
			|||
                                account.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                account.credit = account.credit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (account.balance == 0) { | 
				
			|||
                                account.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                account.balance = account.balance.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
 | 
				
			|||
                if (initial_render) { | 
				
			|||
                    self.$('.pal-filter').html(QWeb.render('FilterSectionPAL', { | 
				
			|||
                        filter_data: datas[0], | 
				
			|||
                    })); | 
				
			|||
 | 
				
			|||
                    self.$el.find('.journal').select2({ | 
				
			|||
                        placeholder: 'Select Journal...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.account').select2({ | 
				
			|||
                        placeholder: 'Select Account...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.account-tag').select2({ | 
				
			|||
                        placeholder: 'Select Account Tag...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.analytic-tag').select2({ | 
				
			|||
                        placeholder: 'Select Analytic Tag...', | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.analytic').select2({ | 
				
			|||
                        placeholder: 'Select Analytic...', | 
				
			|||
                    }); | 
				
			|||
 | 
				
			|||
                    self.$el.find('#date_from').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('#date_to').datepicker({ | 
				
			|||
                        dateFormat: 'dd-mm-yy' | 
				
			|||
                    }); | 
				
			|||
                    self.$el.find('.entries').select2({ | 
				
			|||
                        placeholder: 'Select Moves', | 
				
			|||
                    }); | 
				
			|||
                } | 
				
			|||
                self.$('.container-pal-main').html(QWeb.render('ProfitAndLossData', { | 
				
			|||
                    account_data: datas[1], | 
				
			|||
                    report_lines: datas[2] | 
				
			|||
                })); | 
				
			|||
            }); | 
				
			|||
        }, | 
				
			|||
        pal_lines_by_page: function(offset, account_id) { | 
				
			|||
            var self = this; | 
				
			|||
            return rpc.query({ | 
				
			|||
                model: 'dynamic.balance.sheet', | 
				
			|||
                method: 'bs_move_lines', | 
				
			|||
                args: [self.wizard, offset, account_id], | 
				
			|||
            }) | 
				
			|||
        }, | 
				
			|||
        get_move_lines: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var account_id = $(event.currentTarget).data('account-id'); | 
				
			|||
            var offset = 0; | 
				
			|||
            var td = $(event.currentTarget).next('tr').find('td'); | 
				
			|||
            if (td.length == 1) { | 
				
			|||
                self.pal_lines_by_page(offset, account_id).then(function(datas) { | 
				
			|||
                    _.each(datas[2], function(data) { | 
				
			|||
                        var currency_format = { | 
				
			|||
                            currency_id: data.company_currency_id, | 
				
			|||
                            position: data.company_currency_position, | 
				
			|||
                            symbol: data.company_currency_symbol, | 
				
			|||
                            noSymbol: true, | 
				
			|||
                        }; | 
				
			|||
                        if (currency_format.position == "before") { | 
				
			|||
                            if (data.debit == 0) { | 
				
			|||
                                data.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.debit = currency_format.symbol + ' ' + data.debit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.credit == 0) { | 
				
			|||
                                data.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.credit = currency_format.symbol + ' ' + data.credit.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.balance == 0) { | 
				
			|||
                                data.balance = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.balance = currency_format.symbol + ' ' + data.balance.toFixed(2) + ' '; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                        } else { | 
				
			|||
                            if (data.debit == 0) { | 
				
			|||
                                data.debit = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.debit = data.debit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.credit == 0) { | 
				
			|||
                                data.credit = ' - ' | 
				
			|||
 | 
				
			|||
                            } else { | 
				
			|||
                                data.credit = data.credit.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
                            if (data.balance == 0) { | 
				
			|||
                                data.balance = ' - ' | 
				
			|||
                            } else { | 
				
			|||
                                data.balance = data.balance.toFixed(2) + ' ' + currency_id.symbol; | 
				
			|||
 | 
				
			|||
                            } | 
				
			|||
 | 
				
			|||
                        } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    }); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td .pal-table-div').remove(); | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul').after( | 
				
			|||
                        QWeb.render('SubSectionPAL', { | 
				
			|||
                            count: datas[0], | 
				
			|||
                            offset: datas[1], | 
				
			|||
                            account_data: datas[2], | 
				
			|||
                        })) | 
				
			|||
                    $(event.currentTarget).next('tr').find('td ul li:first a').css({ | 
				
			|||
                        'background-color': '#00ede8', | 
				
			|||
                        'font-weight': 'bold', | 
				
			|||
                    }); | 
				
			|||
                }) | 
				
			|||
            } | 
				
			|||
        }, | 
				
			|||
        view_move: function(event) { | 
				
			|||
            event.preventDefault(); | 
				
			|||
            var self = this; | 
				
			|||
            var context = {}; | 
				
			|||
            var redirect_to_document = function(res_model, res_id, view_id) { | 
				
			|||
                var action = { | 
				
			|||
                    type: 'ir.actions.act_window', | 
				
			|||
                    view_type: 'form', | 
				
			|||
                    view_mode: 'form', | 
				
			|||
                    res_model: res_model, | 
				
			|||
                    views: [ | 
				
			|||
                        [view_id || false, 'form'] | 
				
			|||
                    ], | 
				
			|||
                    res_id: res_id, | 
				
			|||
                    target: 'current', | 
				
			|||
                    context: context, | 
				
			|||
                }; | 
				
			|||
                return self.do_action(action); | 
				
			|||
            }; | 
				
			|||
            rpc.query({ | 
				
			|||
                    model: 'account.move', | 
				
			|||
                    method: 'search_read', | 
				
			|||
                    domain: [ | 
				
			|||
                        ['id', '=', $(event.currentTarget).data('move-id')] | 
				
			|||
                    ], | 
				
			|||
                    fields: ['id'], | 
				
			|||
                    limit: 1, | 
				
			|||
                }) | 
				
			|||
                .then(function(record) { | 
				
			|||
                    if (record.length > 0) { | 
				
			|||
                        redirect_to_document('account.move', record[0].id); | 
				
			|||
                    } else { | 
				
			|||
                        redirect_to_document('account.move', $(event.currentTarget).data('move-id')); | 
				
			|||
                    } | 
				
			|||
                }); | 
				
			|||
        }, | 
				
			|||
 | 
				
			|||
    }); | 
				
			|||
    core.action_registry.add('dynamic.pal', ProfitAndLoss); | 
				
			|||
 | 
				
			|||
}); | 
				
			|||
@ -1,377 +0,0 @@ | 
				
			|||
 | 
				
			|||
.gl-breadcrumb { | 
				
			|||
    font-size: 18px; | 
				
			|||
} | 
				
			|||
.amt{ | 
				
			|||
text-align: right; | 
				
			|||
 | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.amd{ | 
				
			|||
text-align: right; | 
				
			|||
width: 400px !important; | 
				
			|||
 | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.py_cntrl_right{ | 
				
			|||
    max-width: 50%; | 
				
			|||
    max-height: 50px; | 
				
			|||
 | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.gl-breadcrumb li { | 
				
			|||
    display: inline-block; | 
				
			|||
    max-width: 100%; | 
				
			|||
    white-space: nowrap; | 
				
			|||
    overflow: hidden; | 
				
			|||
    text-overflow: ellipsis; | 
				
			|||
    vertical-align: top; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.py-control-div { | 
				
			|||
    display: flex; | 
				
			|||
    justify-content: space-between; | 
				
			|||
    min-height: 30px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.py-btn-primary{ | 
				
			|||
    color: #FFFFFF; | 
				
			|||
    background-color: #00A09D; | 
				
			|||
    border-color: #00A09D; | 
				
			|||
    border-radius: 0px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.py-btn-secondary{ | 
				
			|||
    color: #FFFFFF; | 
				
			|||
    background-color: #00A0AD; | 
				
			|||
    border-color: #00A09D; | 
				
			|||
    border-radius: 3px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.py-search-buttons{ | 
				
			|||
    display: block; | 
				
			|||
    margin: auto 0px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.py-search-btn-date, | 
				
			|||
.py-search-date-filter, | 
				
			|||
.py-search-journals, | 
				
			|||
.py-search-partners, | 
				
			|||
.py-search-entries, | 
				
			|||
.py-search-accounts, | 
				
			|||
.py-search-accounts-tag, | 
				
			|||
.py-search-analytics, | 
				
			|||
.py-search-analytic-tag, | 
				
			|||
.py-search-extra{ | 
				
			|||
    white-space: nowrap; | 
				
			|||
    display: inline-block; | 
				
			|||
    cursor: pointer; | 
				
			|||
    user-select: none; | 
				
			|||
    position: relative; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.dropdown-item{ | 
				
			|||
    display: block; | 
				
			|||
    width: 100%; | 
				
			|||
    clear: both; | 
				
			|||
    font-weight: 400; | 
				
			|||
    color: rgb(102, 102, 102); | 
				
			|||
    text-align: inherit; | 
				
			|||
    white-space: nowrap; | 
				
			|||
    background-color: transparent; | 
				
			|||
    padding: 0.25rem 1.5rem; | 
				
			|||
    border-width: 0px; | 
				
			|||
    border-style: initial; | 
				
			|||
    border-color: initial; | 
				
			|||
    border-image: initial; | 
				
			|||
    position: relative; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.tl-breadcrumb { | 
				
			|||
    font-size: 18px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.tl-breadcrumb li { | 
				
			|||
    display: inline-block; | 
				
			|||
    max-width: 100%; | 
				
			|||
    white-space: nowrap; | 
				
			|||
    overflow: hidden; | 
				
			|||
    text-overflow: ellipsis; | 
				
			|||
    vertical-align: top; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.py-search-btn-date, | 
				
			|||
.py-search-date-filter, | 
				
			|||
.py-search-journals, | 
				
			|||
.py-search-partners, | 
				
			|||
.py-search-accounts, | 
				
			|||
.py-search-entries, | 
				
			|||
.py-search-accounts-tag, | 
				
			|||
.py-search-analytics, | 
				
			|||
.py-search-analytic-tag, | 
				
			|||
.py-search-extra{ | 
				
			|||
    white-space: nowrap; | 
				
			|||
    display: inline-block; | 
				
			|||
    cursor: pointer; | 
				
			|||
    user-select: none; | 
				
			|||
    position: relative; | 
				
			|||
} | 
				
			|||
.bs-section-first{ | 
				
			|||
    padding: 5px; | 
				
			|||
    padding-top: 5px; | 
				
			|||
    padding-left: 15px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.bs-section{ | 
				
			|||
    padding: 5px; | 
				
			|||
    padding-top: 25px; | 
				
			|||
    padding-left: 15px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.bs-sub-section{ | 
				
			|||
    padding-top: 25px; | 
				
			|||
} | 
				
			|||
.pl-breadcrumb { | 
				
			|||
    font-size: 18px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.pl-breadcrumb li { | 
				
			|||
    display: inline-block; | 
				
			|||
    max-width: 100%; | 
				
			|||
    white-space: nowrap; | 
				
			|||
    overflow: hidden; | 
				
			|||
    text-overflow: ellipsis; | 
				
			|||
    vertical-align: top; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.py-search-btn-date, | 
				
			|||
.py-search-date-filter, | 
				
			|||
.py-search-journals, | 
				
			|||
.py-search-partners, | 
				
			|||
.py-search-categories, | 
				
			|||
.py-search-reconciled, | 
				
			|||
.py-search-accounts, | 
				
			|||
.py-search-entries, | 
				
			|||
.py-search-accounts-tag, | 
				
			|||
.py-search-analytics, | 
				
			|||
.py-search-analytic-tag, | 
				
			|||
.py-search-extra{ | 
				
			|||
    white-space: nowrap; | 
				
			|||
    display: inline-block; | 
				
			|||
    cursor: pointer; | 
				
			|||
    user-select: none; | 
				
			|||
    position: relative; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.al-breadcrumb { | 
				
			|||
    font-size: 18px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.al-breadcrumb li { | 
				
			|||
    display: inline-block; | 
				
			|||
    max-width: 100%; | 
				
			|||
    white-space: nowrap; | 
				
			|||
    overflow: hidden; | 
				
			|||
    text-overflow: ellipsis; | 
				
			|||
    vertical-align: top; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.py-search-btn-date, | 
				
			|||
.py-search-date-filter, | 
				
			|||
.py-search-journals, | 
				
			|||
.py-search-partners, | 
				
			|||
.py-search-accounts, | 
				
			|||
.py-search-partner-type, | 
				
			|||
.py-search-analytics, | 
				
			|||
.py-search-partner-tag, | 
				
			|||
.py-search-entries, | 
				
			|||
.py-search-extra{ | 
				
			|||
    white-space: nowrap; | 
				
			|||
    display: inline-block; | 
				
			|||
    cursor: pointer; | 
				
			|||
    user-select: none; | 
				
			|||
    position: relative; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.cf-breadcrumb { | 
				
			|||
    font-size: 18px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.cf-breadcrumb li { | 
				
			|||
    display: inline-block; | 
				
			|||
    max-width: 100%; | 
				
			|||
    white-space: nowrap; | 
				
			|||
    overflow: hidden; | 
				
			|||
    text-overflow: ellipsis; | 
				
			|||
    vertical-align: top; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.py-search-btn-date, | 
				
			|||
.py-search-date-filter, | 
				
			|||
.py-search-journals, | 
				
			|||
.py-search-partners, | 
				
			|||
.py-search-categories, | 
				
			|||
.py-search-reconciled, | 
				
			|||
.py-search-accounts, | 
				
			|||
.py-search-accounts-tag, | 
				
			|||
.py-search-analytics, | 
				
			|||
.py-search-analytic-tag, | 
				
			|||
.py-search-extra{ | 
				
			|||
    white-space: nowrap; | 
				
			|||
    display: inline-block; | 
				
			|||
    cursor: pointer; | 
				
			|||
    user-select: none; | 
				
			|||
    position: relative; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.main { | 
				
			|||
    border: 1px solid #efefef; | 
				
			|||
    margin: 50px; | 
				
			|||
    border-radius: 17px; | 
				
			|||
    background: #fff; | 
				
			|||
    padding: 2% 0 5%; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.thead { | 
				
			|||
    border-bottom: 2px solid #bfbfbf; | 
				
			|||
    background: #e8e8e8; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.thead tr { | 
				
			|||
    height: 38px; | 
				
			|||
    width: 100%; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.thead tr th { | 
				
			|||
    border-bottom: 1px solid #e6e6e6; | 
				
			|||
    font-weight:bold; | 
				
			|||
    font-size:15px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.header { | 
				
			|||
    margin-bottom: 50px; | 
				
			|||
    text-align: center; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.child_col1 { | 
				
			|||
    width: 8%; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.parent-highlight { | 
				
			|||
    background: #f5f5f5; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.parent-line { | 
				
			|||
    background-image: linear-gradient(to bottom, #fcfcfc, #dedede); | 
				
			|||
    cursor: pointer; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.parent-line:hover { | 
				
			|||
    background-image: linear-gradient(to bottom, #fcfcfc, #cacaca); | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.child_col2 { | 
				
			|||
    width: 10%; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.child_col3 { | 
				
			|||
    width: 10%; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.child_col4 { | 
				
			|||
    width: 10%; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.categ td { | 
				
			|||
    padding: 7px !important; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.filter_options { | 
				
			|||
    border-bottom: 1px solid; | 
				
			|||
    border-radius: 10px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.entry_type { | 
				
			|||
    margin: 20px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.report_header { | 
				
			|||
    text-align: center; | 
				
			|||
    border-bottom: 1px solid #efefef; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.row_color { | 
				
			|||
    background-color: #e4e4e4; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.main_report { | 
				
			|||
    border: 1px solid #efefef; | 
				
			|||
    margin: 50px; | 
				
			|||
    border-radius: 17px; | 
				
			|||
    background: #fff; | 
				
			|||
    padding: 2% 0 5%; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.child-class td { | 
				
			|||
    font-size: 12px !important; | 
				
			|||
    cursor: pointer; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.child-row { | 
				
			|||
    border-bottom: 1px solid #cacaca; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.child-row:hover { | 
				
			|||
    background-color: #f5f5f5; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.bs-breadcrumb { | 
				
			|||
    font-size: 18px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.bs-breadcrumb li { | 
				
			|||
    display: inline-block; | 
				
			|||
    max-width: 100%; | 
				
			|||
    white-space: nowrap; | 
				
			|||
    overflow: hidden; | 
				
			|||
    text-overflow: ellipsis; | 
				
			|||
    vertical-align: top; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.pal-breadcrumb { | 
				
			|||
    font-size: 18px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.pal-breadcrumb li { | 
				
			|||
    display: inline-block; | 
				
			|||
    max-width: 100%; | 
				
			|||
    white-space: nowrap; | 
				
			|||
    overflow: hidden; | 
				
			|||
    text-overflow: ellipsis; | 
				
			|||
    vertical-align: top; | 
				
			|||
} | 
				
			|||
.db-breadcrumb { | 
				
			|||
    font-size: 18px; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.db-breadcrumb li { | 
				
			|||
    display: inline-block; | 
				
			|||
    max-width: 100%; | 
				
			|||
    white-space: nowrap; | 
				
			|||
    overflow: hidden; | 
				
			|||
    text-overflow: ellipsis; | 
				
			|||
    vertical-align: top; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
.py-search-btn-date, | 
				
			|||
.py-search-date-filter, | 
				
			|||
.py-search-journals, | 
				
			|||
.py-search-entries, | 
				
			|||
.py-search-accounts, | 
				
			|||
.py-search-extra{ | 
				
			|||
    white-space: nowrap; | 
				
			|||
    display: inline-block; | 
				
			|||
    cursor: pointer; | 
				
			|||
    user-select: none; | 
				
			|||
    position: relative; | 
				
			|||
} | 
				
			|||
@ -1,292 +0,0 @@ | 
				
			|||
<templates xml:space="preserve"> | 
				
			|||
	<t t-name="AgeingPartner"> | 
				
			|||
		<div class="container-al"> | 
				
			|||
			<div> | 
				
			|||
				<div class="al-filter"></div> | 
				
			|||
			</div> | 
				
			|||
			<div class="container-al-data"> | 
				
			|||
				<div class="container-al-main"/> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="AgeingPartnerData"> | 
				
			|||
		<div> | 
				
			|||
			<table cellspacing="0" width="100%"> | 
				
			|||
				<thead> | 
				
			|||
					<tr> | 
				
			|||
						<th colspan="2">Account</th> | 
				
			|||
						<th class="amt">Not Due</th> | 
				
			|||
						<th class="amt">0-20</th> | 
				
			|||
						<th class="amt">21-40</th> | 
				
			|||
						<th class="amt">41-60</th> | 
				
			|||
						<th class="amt">61-80</th> | 
				
			|||
						<th class="amt">81-100</th> | 
				
			|||
						<th class="amt">100+</th> | 
				
			|||
						<th class="amt">Total</th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
 | 
				
			|||
					<t t-foreach="account_data" t-as="account"> | 
				
			|||
 | 
				
			|||
						<t t-set="common_id" t-value=""/> | 
				
			|||
						<t t-if="account_data[account]['count']"> | 
				
			|||
							<tr style="border: 1.5px solid black;" class="al-line" | 
				
			|||
                                data-toggle="collapse" | 
				
			|||
                                t-att-data-account-id="account_data[account]['id']" | 
				
			|||
                                t-attf-data-target=".a{{account_data[account]['id']}}"> | 
				
			|||
								<td colspan="2" style="border: 0px solid black;"> | 
				
			|||
									<i class="fa fa-caret-down" role="img" aria-label="Unfolded" title="Unfolded"></i> | 
				
			|||
									<span> | 
				
			|||
										<t t-esc="account_data[account]['partner_name']"/> | 
				
			|||
									</span> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"  > | 
				
			|||
									<t t-raw="account_data[account]['Not']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt" > | 
				
			|||
									<t t-raw="account_data[account]['value_20']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt" > | 
				
			|||
									<t t-raw="account_data[account]['2140']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt" > | 
				
			|||
									<t t-raw="account_data[account]['4160']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt" > | 
				
			|||
									<t t-raw="account_data[account]['6180']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt" > | 
				
			|||
									<t t-raw="account_data[account]['81100']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt" > | 
				
			|||
									<t t-raw="account_data[account]['100']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt" > | 
				
			|||
									<t t-raw="account_data[account]['total']"/> | 
				
			|||
								</td> | 
				
			|||
<!--								<td class="amt"></td>--> | 
				
			|||
								<t t-set="common_id" t-value="'a'+account_data[account]['id']"/> | 
				
			|||
							</tr> | 
				
			|||
						</t> | 
				
			|||
						<tr t-attf-class="collapse a{{account_data[account]['id']}}"> | 
				
			|||
							<td colspan="10"> | 
				
			|||
								<ul> | 
				
			|||
									<t t-if="!account_data[account]['single_page']"> | 
				
			|||
										<t t-foreach="account_data[account]['pages']" t-as="i"> | 
				
			|||
											<t t-esc="i"/> | 
				
			|||
											<li> | 
				
			|||
												<a | 
				
			|||
                                                   t-att-data-page-number="i" | 
				
			|||
                                                   t-att-data-count="account_data[account]['count']" | 
				
			|||
                                                   t-att-data-account-id="account_data[account]['id']"> | 
				
			|||
													<t t-esc="i"/> | 
				
			|||
												</a> | 
				
			|||
											</li> | 
				
			|||
										</t> | 
				
			|||
									</t> | 
				
			|||
								</ul> | 
				
			|||
 | 
				
			|||
							</td> | 
				
			|||
						</tr> | 
				
			|||
					</t> | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="FilterSection-al"> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<ol class="al-breadcrumb"> | 
				
			|||
				<li>Partner Ageing</li> | 
				
			|||
			</ol> | 
				
			|||
		</div> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<div class="py-cntrl-left"> | 
				
			|||
				<div class="py-ctrl-buttons"> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="pdf" action="print_pdf" style="position: relative;">Pint (PDF)</button> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="xlsx" action="print_xlsx" style="position: relative;">Export (XLSX)</button> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
			<div class="py_cntrl_right"> | 
				
			|||
				<div class="py-search-buttons"> | 
				
			|||
					<button type="button" id="filter_apply_button" class="btn py-btn-secondary" action="apply_filter" style="position: relative;">Apply</button> | 
				
			|||
					<div class="py-search-btn-date"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | 
				
			|||
							<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span> | 
				
			|||
As On Date | 
				
			|||
						</a> | 
				
			|||
						<div class="dropdown-menu py-filters-menu" role="menu"> | 
				
			|||
							<div class="o_foldable_menu o_closed_menu o_account_report_search" data-filter="custom_filter_date"> | 
				
			|||
								<label class="custom-date" for="as_on_date">As On Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker10" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="as_on_date"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
							</div> | 
				
			|||
						</div> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-accounts"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Account Type: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu account" name="states[]" multiple="multiple"> | 
				
			|||
								<option value="receivable">Receivable Accounts Only</option> | 
				
			|||
								<option value="payable">Payable Accounts Only</option> | 
				
			|||
						</select> | 
				
			|||
						<span id="type_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-partner-type"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-filter"></span> | 
				
			|||
Partner Type: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu partner-type" name="states[]" multiple="multiple"> | 
				
			|||
								<option value="customer">Customer Only</option> | 
				
			|||
								<option value="supplier">Supplier Only</option> | 
				
			|||
						</select> | 
				
			|||
						<span id="partner_type_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-partners"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-users"></span> | 
				
			|||
Partners: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu partners" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.partners_list" t-as="partners"> | 
				
			|||
								<option t-attf-value="{{partners[0]}}"> | 
				
			|||
									<t t-esc="partners[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="partner_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-partner-tag"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-filter"></span> | 
				
			|||
Partner Tag: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu partner-tag" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.category_list" t-as="partner_tag"> | 
				
			|||
								<option t-attf-value="{{partner_tag[0]}}"> | 
				
			|||
									<t t-esc="partner_tag[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="category_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-targetmoves"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Target Moves: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu target-moves" name="states[]" > | 
				
			|||
							<option value="draft">All Entries</option> | 
				
			|||
							<option value="posted">Posted</option> | 
				
			|||
 | 
				
			|||
						</select> | 
				
			|||
						<span id="target_res"></span> | 
				
			|||
					</div> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="SubSection_al"> | 
				
			|||
		<div class="al-table-div"> | 
				
			|||
			<table class="table table-sm o_main_table" | 
				
			|||
                   style="border: 0px solid black;display compact;"> | 
				
			|||
				<thead> | 
				
			|||
					<tr style=""> | 
				
			|||
						<th>Entry Label</th> | 
				
			|||
						<th>Due Date</th> | 
				
			|||
						<th>Journal</th> | 
				
			|||
						<th>Account</th> | 
				
			|||
						<th class="text-right">Not Due</th> | 
				
			|||
						<th class="text-right">0-20</th> | 
				
			|||
						<th class="text-right">21-40</th> | 
				
			|||
						<th class="text-right">41-60</th> | 
				
			|||
						<th class="text-right">61-80</th> | 
				
			|||
						<th class="text-right">81-100</th> | 
				
			|||
						<th class="text-right" >100+</th> | 
				
			|||
 | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
					<t t-foreach="account_data" t-as="account_line"> | 
				
			|||
							<t t-set="style" t-value="'font-style: italic;'"/> | 
				
			|||
<!--					</t>--> | 
				
			|||
						<tr> | 
				
			|||
							<td> | 
				
			|||
								<t t-if="account_line.move_name"> | 
				
			|||
									<div class="dropdown dropdown-toggle"> | 
				
			|||
										<a data-toggle="dropdown" href="#"> | 
				
			|||
											<span class="caret"></span> | 
				
			|||
											<span data-id="17"> | 
				
			|||
												<t t-esc="account_line.move_name"/> | 
				
			|||
											</span> | 
				
			|||
										</a> | 
				
			|||
										<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> | 
				
			|||
											<li> | 
				
			|||
												<a class="view-move" tabindex="-1" href="#" | 
				
			|||
                                                   t-att-data-move-id="account_line.move_id"> | 
				
			|||
											View Source move | 
				
			|||
 | 
				
			|||
										</a> | 
				
			|||
											</li> | 
				
			|||
										</ul> | 
				
			|||
									</div> | 
				
			|||
								</t> | 
				
			|||
							</td> | 
				
			|||
							<td> | 
				
			|||
								<t t-esc="account_line.date_maturity"/> | 
				
			|||
							</td> | 
				
			|||
							<td> | 
				
			|||
								<t t-esc="account_line.journal_name"/> | 
				
			|||
							</td> | 
				
			|||
							<td > | 
				
			|||
								<span> | 
				
			|||
										<t t-esc="account_line.account_code"/> | 
				
			|||
                                        - | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
										<t t-esc="account_line.account_name"/> | 
				
			|||
									</span> | 
				
			|||
							</td> | 
				
			|||
							<td class="text-right" | 
				
			|||
> | 
				
			|||
								<t t-esc="account_line.range_0"/> | 
				
			|||
							</td> | 
				
			|||
							<td class="text-right" | 
				
			|||
> | 
				
			|||
								<t t-esc="account_line.range_1"/> | 
				
			|||
							</td> | 
				
			|||
							<td class="text-right" | 
				
			|||
> | 
				
			|||
								<t t-esc="account_line.range_2"/> | 
				
			|||
							</td> | 
				
			|||
							<td class="text-right" | 
				
			|||
> | 
				
			|||
								<t t-esc="account_line.range_3"/> | 
				
			|||
							</td> | 
				
			|||
							<td class="text-right" | 
				
			|||
> | 
				
			|||
								<t t-esc="account_line.range_4"/> | 
				
			|||
							</td> | 
				
			|||
							<td class="text-right" | 
				
			|||
> | 
				
			|||
								<t t-esc="account_line.range_5"/> | 
				
			|||
							</td> | 
				
			|||
							<td class="text-right" | 
				
			|||
> | 
				
			|||
								<t t-esc="account_line.range_6"/> | 
				
			|||
							</td> | 
				
			|||
						</tr> | 
				
			|||
					</t> | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
</templates> | 
				
			|||
@ -1,282 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="UTF-8"?> | 
				
			|||
<templates xml:space="preserve"> | 
				
			|||
	<t t-name="BankBook"> | 
				
			|||
		<div class="container-bb"> | 
				
			|||
			<div> | 
				
			|||
				<div class="bb-filter"></div> | 
				
			|||
			</div> | 
				
			|||
			<div class="container-bb-data"> | 
				
			|||
				<div class="container-bb-main"></div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="BankBookData"> | 
				
			|||
		<div> | 
				
			|||
			<table cellspacing="0" width="100%"> | 
				
			|||
				<thead> | 
				
			|||
					<tr> | 
				
			|||
						<th colspan="6">Account</th> | 
				
			|||
						<th class="amt">Debit</th> | 
				
			|||
						<th class="amt">Credit</th> | 
				
			|||
						<th class="amt">Balance</th> | 
				
			|||
						<th></th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
					<t t-foreach="account_data" t-as="account"> | 
				
			|||
						<t t-set="common_id" t-value=""/> | 
				
			|||
						<t t-if="account_data[account]['count']"> | 
				
			|||
							<tr style="border: 1.5px solid black;" class="bb-line" | 
				
			|||
                                data-toggle="collapse" | 
				
			|||
                                t-att-data-account-id="account_data[account]['id']" | 
				
			|||
                                t-attf-data-target=".a{{account_data[account]['id']}}"> | 
				
			|||
								<td colspan="6" style="border: 0px solid black;"> | 
				
			|||
									<i class="fa fa-caret-down" role="img" aria-label="Unfolded" title="Unfolded"></i> | 
				
			|||
									<span> | 
				
			|||
										<t t-esc="account_data[account]['code']"/> | 
				
			|||
                                        - | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
										<t t-esc="account_data[account]['name']"/> | 
				
			|||
									</span> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"> | 
				
			|||
									<t t-raw="account_data[account]['debit']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"> | 
				
			|||
									<t t-raw="account_data[account]['credit']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"> | 
				
			|||
									<t t-raw="account_data[account]['balance']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"></td> | 
				
			|||
								<t t-set="common_id" t-value="'a'+account_data[account]['id']"/> | 
				
			|||
							</tr> | 
				
			|||
						</t> | 
				
			|||
						<tr t-attf-class="collapse a{{account_data[account]['id']}}"> | 
				
			|||
							<td colspan="10"> | 
				
			|||
								<ul> | 
				
			|||
									<t t-if="!account_data[account]['single_page']"> | 
				
			|||
										<t t-foreach="account_data[account]['pages']" t-as="i"> | 
				
			|||
											<li> | 
				
			|||
												<a | 
				
			|||
                                                   t-att-data-page-number="i" | 
				
			|||
                                                   t-att-data-count="account_data[account]['count']" | 
				
			|||
                                                   t-att-data-account-id="account_data[account]['id']"> | 
				
			|||
													<t t-esc="i"/> | 
				
			|||
												</a> | 
				
			|||
											</li> | 
				
			|||
										</t> | 
				
			|||
									</t> | 
				
			|||
								</ul> | 
				
			|||
							</td> | 
				
			|||
						</tr> | 
				
			|||
					</t> | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="FilterSectionBB"> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<ol class="gl-breadcrumb"> | 
				
			|||
				<li>Bank Book</li> | 
				
			|||
			</ol> | 
				
			|||
		</div> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<div class="py-cntrl-left"> | 
				
			|||
				<div class="py-ctrl-buttons"> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="pdf" action="print_pdf" style="position: relative;">Print (PDF)</button> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="xlsx" action="print_xlsx" style="position: relative;">Export (XLSX)</button> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
			<div class="py_cntrl_right"> | 
				
			|||
				<div class="py-search-buttons"> | 
				
			|||
					<button type="button" id="filter_apply_button" class="btn py-btn-secondary" action="apply_filter" style="position: relative;">Apply</button> | 
				
			|||
					<div class="py-search-btn-date"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | 
				
			|||
							<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span> | 
				
			|||
Custom | 
				
			|||
						</a> | 
				
			|||
						<div class="dropdown-menu py-filters-menu" role="menu"> | 
				
			|||
							<div class="o_foldable_menu o_closed_menu o_account_report_search" data-filter="custom_filter_date"> | 
				
			|||
								<label class="custom-date" for="date_from">Start Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker10" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_from"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
								<label class="custom-date" for="date_to">End Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker11" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_to"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
							</div> | 
				
			|||
						</div> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-journals"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Journals: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu journal" name="states[]" multiple="multiple"> | 
				
			|||
							<b role="menuitem" class="dropdown-item-text"> | 
				
			|||
								<t t-esc="filter_data.company_name"/> | 
				
			|||
							</b> | 
				
			|||
							<div role="separator" class="dropdown-divider"></div> | 
				
			|||
							<t t-foreach="filter_data.journals_list" t-as="journal"> | 
				
			|||
								<option t-attf-value="{{journal[0]}}"> | 
				
			|||
									<t t-esc="journal[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="journal_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-accounts"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Accounts: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu account" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.accounts_list" t-as="account"> | 
				
			|||
								<option t-attf-value="{{account[0]}}"> | 
				
			|||
									<t t-esc="account[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="acc_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-accounts-tag"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Account Tags: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu account-tag" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.account_tag_list" t-as="account_tag"> | 
				
			|||
								<option t-attf-value="{{account_tag[0]}}"> | 
				
			|||
									<t t-esc="account_tag[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="acc_tag_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-analytics"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Analytic: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu analytic" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.analytics_list" t-as="analytic"> | 
				
			|||
								<option t-attf-value="{{analytic[0]}}"> | 
				
			|||
									<t t-esc="analytic[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="analic_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-analytic-tag"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Analytic Tags: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu analytic-tag" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.analytic_tag_list" t-as="analytic_tag"> | 
				
			|||
								<option t-attf-value="{{analytic_tag[0]}}"> | 
				
			|||
									<t t-esc="analytic_tag[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="analic_tag_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-entries"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-filter"></span> | 
				
			|||
Options: | 
				
			|||
						</a> | 
				
			|||
						<select id="entries" class="dropdown-menu py-filters-menu entries"> | 
				
			|||
								<option value="all">All Entries </option> | 
				
			|||
								<option value="posted">Posted Entries</option> | 
				
			|||
 | 
				
			|||
						</select> | 
				
			|||
						<span id="post_res"></span> | 
				
			|||
					</div> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="SubSectionBB"> | 
				
			|||
		<div class="bb-table-div"> | 
				
			|||
			<table class="table table-sm o_main_table" | 
				
			|||
                   style="border: 0px solid black;display compact;"> | 
				
			|||
				<thead> | 
				
			|||
					<tr style=""> | 
				
			|||
						<th>Date</th> | 
				
			|||
						<th>JRNL</th> | 
				
			|||
						<th>Partner</th> | 
				
			|||
						<th>Move</th> | 
				
			|||
						<th>Entry Label</th> | 
				
			|||
						<th class="amt">Debit</th> | 
				
			|||
						<th class="amt">Credit</th> | 
				
			|||
						<th class="amt">Balance</th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
					<t t-foreach="account_data" t-as="account_line"> | 
				
			|||
						<t t-set="style" t-value="''"/> | 
				
			|||
						<t t-if="account_line.move_name == 'Initial Balance'"> | 
				
			|||
							<t t-set="style" t-value="'font-style: italic;'"/></t> | 
				
			|||
						<t t-if="account_line.move_name == 'Ending Balance'"> | 
				
			|||
							<t t-set="style" t-value="'font-style: italic;'"/></t> | 
				
			|||
						<tr> | 
				
			|||
							<td> | 
				
			|||
								<t t-if="account_line.ldate"> | 
				
			|||
									<div class="dropdown dropdown-toggle"> | 
				
			|||
										<a data-toggle="dropdown" href="#"> | 
				
			|||
											<span class="caret"></span> | 
				
			|||
											<span data-id="17"> | 
				
			|||
												<t t-esc="account_line.ldate"/> | 
				
			|||
											</span> | 
				
			|||
										</a> | 
				
			|||
										<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> | 
				
			|||
											<li> | 
				
			|||
												<a class="view-move" tabindex="-1" href="#" | 
				
			|||
                                                   t-att-data-move-id="account_line.move_id"> | 
				
			|||
											View Source move | 
				
			|||
 | 
				
			|||
										</a> | 
				
			|||
											</li> | 
				
			|||
										</ul> | 
				
			|||
									</div> | 
				
			|||
								</t> | 
				
			|||
							</td> | 
				
			|||
							<td> | 
				
			|||
								<t t-esc="account_line.lcode"/> | 
				
			|||
							</td> | 
				
			|||
							<td> | 
				
			|||
								<t t-esc="account_line.partner_name"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style"> | 
				
			|||
								<t t-esc="account_line.move_name"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style"> | 
				
			|||
								<t t-esc="account_line.lname"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style" class="amt"> | 
				
			|||
								<t t-raw="account_line.debit"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style" class="amt"> | 
				
			|||
								<t t-raw="account_line.credit"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style" class="amt"> | 
				
			|||
								<t t-raw="account_line.balance"/> | 
				
			|||
							</td> | 
				
			|||
						</tr> | 
				
			|||
					</t> | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
</templates> | 
				
			|||
@ -1,246 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="UTF-8"?> | 
				
			|||
<templates xml:space="preserve"> | 
				
			|||
	<t t-name="BalanceSheet"> | 
				
			|||
		<div class="container-bs"> | 
				
			|||
			<div> | 
				
			|||
				<div class="bs-filter"></div> | 
				
			|||
			</div> | 
				
			|||
			<div class="container-bs-data"> | 
				
			|||
				<div class="container-bs-main"></div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="BalanceSheetData"> | 
				
			|||
		<div> | 
				
			|||
			<table cellspacing="0" width="100%"> | 
				
			|||
 | 
				
			|||
				<thead> | 
				
			|||
 | 
				
			|||
					<tr> | 
				
			|||
						<th colspan="6" style="padding-top: 5px;"> </th> | 
				
			|||
						<th style="text-align: right;padding-right: 50px; padding-top: 15px;">Debit</th> | 
				
			|||
						<th style="text-align: right;padding-right: 50px; padding-top: 15px;">Credit</th> | 
				
			|||
						<th style="text-align: right;padding-right: 50px; padding-top: 15px;">Balance</th> | 
				
			|||
						<th></th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
					<tr t-foreach="report_lines" t-as="a" style="border-bottom: double;"> | 
				
			|||
						<t t-if="a['level'] != 0"> | 
				
			|||
							<t t-if="a['code']"> | 
				
			|||
								<t t-foreach="account_data" t-as="account"> | 
				
			|||
									<t t-set="common_id" t-value=""/> | 
				
			|||
									<t t-if="account_data[account]['count']"> | 
				
			|||
										<t t-if="account_data[account]['code'] == a['code']"> | 
				
			|||
											<tr style="border-bottom: 1px solid black;" class="bs-line" | 
				
			|||
												data-toggle="collapse" | 
				
			|||
												t-att-data-account-id="account_data[account]['id']" | 
				
			|||
												t-attf-data-target=".a{{account_data[account]['id']}}"> | 
				
			|||
												<td colspan="6" style="border: 0px solid black;  padding-left: 50px;"> | 
				
			|||
													<span> | 
				
			|||
														<t t-esc="account_data[account]['code']"/> | 
				
			|||
														- | 
				
			|||
														<t t-esc="account_data[account]['name']"/> | 
				
			|||
													</span> | 
				
			|||
													<div class="py-search-btn-date"> | 
				
			|||
													<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | 
				
			|||
													</a> | 
				
			|||
														<div class="dropdown-menu " role="menu"> | 
				
			|||
															<div class="o_foldable_menu o_closed_menu " > | 
				
			|||
																<div class="form-group "> | 
				
			|||
																	<div class="" aria-atomic="true" id="" data-target-input=""> | 
				
			|||
																		<li role="presentation"> | 
				
			|||
																			<a role="menuitem" t-att-data-account-id="account_data[account]['id']" class="open-gl" >View General Ledger</a> | 
				
			|||
																		</li> | 
				
			|||
																	</div> | 
				
			|||
																</div> | 
				
			|||
 | 
				
			|||
															</div> | 
				
			|||
														</div> | 
				
			|||
													</div> | 
				
			|||
 | 
				
			|||
												</td> | 
				
			|||
 | 
				
			|||
												<td class="amt" style="text-align: right;padding-right: 50px;"> | 
				
			|||
													<t t-raw="account_data[account]['debit']"/> | 
				
			|||
												</td> | 
				
			|||
												<td class="amt" style="text-align: right;padding-right: 50px;"> | 
				
			|||
													<t t-raw="account_data[account]['credit']"/> | 
				
			|||
												</td> | 
				
			|||
												<td class="amt" style="text-align: right;padding-right: 50px;"> | 
				
			|||
													<t t-raw="account_data[account]['balance']"/> | 
				
			|||
												</td> | 
				
			|||
												<td class="amt"></td> | 
				
			|||
												<t t-set="common_id" t-value="'a'+account_data[account]['id']"/> | 
				
			|||
											</tr> | 
				
			|||
										</t> | 
				
			|||
									</t> | 
				
			|||
								</t> | 
				
			|||
 | 
				
			|||
							</t> | 
				
			|||
 | 
				
			|||
							<t t-else=""> | 
				
			|||
								<t t-set="style" t-value="'padding: 5px;padding-left: 25px;'"/> | 
				
			|||
								<t t-set="fr_head" t-value="'border-bottom: double;'"/> | 
				
			|||
								<t t-set="fr_padding" t-value="'padding-top: 5px; text-align: right;padding-right: 50px;'"/> | 
				
			|||
								<t t-if="a['level'] == 1"> | 
				
			|||
									<t t-set="style" t-value="'padding: 5px;padding-left: 15px;'"/> | 
				
			|||
								</t> | 
				
			|||
								<t t-if="a['level'] > 2"> | 
				
			|||
									<t t-set="style" t-value="'padding: 5px;padding-left: 50px;'"/> | 
				
			|||
									<t t-set="fr_head" t-value="'border-bottom: 1px solid black;'"/> | 
				
			|||
								</t> | 
				
			|||
								<t t-if="a['level'] < 3"> | 
				
			|||
									<t t-set="style" t-value="'padding: 5px;padding-left: 15px;padding-top: 25px;'"/> | 
				
			|||
									<t t-set="fr_padding" t-value="'padding-top: 25px; text-align: right;padding-right: 50px;'"/> | 
				
			|||
								</t> | 
				
			|||
								<tr t-att-style="fr_head"> | 
				
			|||
									<th colspan="6" t-att-style="style"> | 
				
			|||
										<t t-esc="a['name']"/> | 
				
			|||
									</th> | 
				
			|||
									<td t-att-style="fr_padding"><t t-esc="a['m_debit']"/></td> | 
				
			|||
									<td t-att-style="fr_padding"><t t-esc="a['m_credit']" t-att-style="style"/></td> | 
				
			|||
									<td t-att-style="fr_padding"><t t-esc="a['m_balance']" t-att-style="style"/></td> | 
				
			|||
								</tr> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
							</t> | 
				
			|||
						</t> | 
				
			|||
					</tr> | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="FilterSectionBS"> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<ol class="bs-breadcrumb"> | 
				
			|||
				<li>Balance Sheet</li> | 
				
			|||
			</ol> | 
				
			|||
		</div> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<div class="py-cntrl-left"> | 
				
			|||
				<div class="py-ctrl-buttons"> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="pdf" action="print_pdf" style="position: relative;">Print (PDF)</button> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="xlsx" action="print_xlsx" style="position: relative;">Export (XLSX)</button> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
			<div class="py_cntrl_right"> | 
				
			|||
				<div class="py-search-buttons"> | 
				
			|||
					<button type="button" id="filter_apply_button" class="btn py-btn-secondary" action="apply_filter" style="position: relative;">Apply</button> | 
				
			|||
					<div class="py-search-btn-date"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | 
				
			|||
							<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span> | 
				
			|||
Custom | 
				
			|||
						</a> | 
				
			|||
						<div class="dropdown-menu py-filters-menu" role="menu"> | 
				
			|||
							<div class="o_foldable_menu o_closed_menu o_account_report_search" data-filter="custom_filter_date"> | 
				
			|||
								<label class="custom-date" for="date_from">Start Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker10" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_from"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
								<label class="custom-date" for="date_to">End Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker11" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_to"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
							</div> | 
				
			|||
						</div> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-journals"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Journals: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu journal" name="states[]" multiple="multiple"> | 
				
			|||
							<b role="menuitem" class="dropdown-item-text"> | 
				
			|||
								<t t-esc="filter_data.company_name"/> | 
				
			|||
							</b> | 
				
			|||
							<div role="separator" class="dropdown-divider"></div> | 
				
			|||
							<t t-foreach="filter_data.journals_list" t-as="journal"> | 
				
			|||
								<option t-attf-value="{{journal[0]}}"> | 
				
			|||
									<t t-esc="journal[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="journal_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-accounts"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Accounts: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu account" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.accounts_list" t-as="account"> | 
				
			|||
								<option t-attf-value="{{account[0]}}"> | 
				
			|||
									<t t-esc="account[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="acc_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-accounts-tag"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Account Tags: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu account-tag" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.account_tag_list" t-as="account_tag"> | 
				
			|||
								<option t-attf-value="{{account_tag[0]}}"> | 
				
			|||
									<t t-esc="account_tag[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="acc_tag_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-analytics"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Analytic: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu analytic" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.analytics_list" t-as="analytic"> | 
				
			|||
								<option t-attf-value="{{analytic[0]}}"> | 
				
			|||
									<t t-esc="analytic[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="analic_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-analytic-tag"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Analytic Tags: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu analytic-tag" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.analytic_tag_list" t-as="analytic_tag"> | 
				
			|||
								<option t-attf-value="{{analytic_tag[0]}}"> | 
				
			|||
									<t t-esc="analytic_tag[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="analic_tag_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-entries"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-filter"></span> | 
				
			|||
Options: | 
				
			|||
						</a> | 
				
			|||
						<select id="entries" class="dropdown-menu py-filters-menu entries"> | 
				
			|||
								<option value="all">All Entries </option> | 
				
			|||
								<option value="posted">Posted Entries</option> | 
				
			|||
 | 
				
			|||
						</select> | 
				
			|||
						<span id="post_res"></span> | 
				
			|||
					</div> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
</templates> | 
				
			|||
@ -1,282 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="UTF-8"?> | 
				
			|||
<templates xml:space="preserve"> | 
				
			|||
	<t t-name="CashBook"> | 
				
			|||
		<div class="container-cb"> | 
				
			|||
			<div> | 
				
			|||
				<div class="cb-filter"></div> | 
				
			|||
			</div> | 
				
			|||
			<div class="container-cb-data"> | 
				
			|||
				<div class="container-cb-main"></div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="CashBookData"> | 
				
			|||
		<div> | 
				
			|||
			<table cellspacing="0" width="100%"> | 
				
			|||
				<thead> | 
				
			|||
					<tr> | 
				
			|||
						<th colspan="6">Account</th> | 
				
			|||
						<th class="amt">Debit</th> | 
				
			|||
						<th class="amt">Credit</th> | 
				
			|||
						<th class="amt">Balance</th> | 
				
			|||
						<th></th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
					<t t-foreach="account_data" t-as="account"> | 
				
			|||
						<t t-set="common_id" t-value=""/> | 
				
			|||
						<t t-if="account_data[account]['count']"> | 
				
			|||
							<tr style="border: 1.5px solid black;" class="cb-line" | 
				
			|||
                                data-toggle="collapse" | 
				
			|||
                                t-att-data-account-id="account_data[account]['id']" | 
				
			|||
                                t-attf-data-target=".a{{account_data[account]['id']}}"> | 
				
			|||
								<td colspan="6" style="border: 0px solid black;"> | 
				
			|||
									<i class="fa fa-caret-down" role="img" aria-label="Unfolded" title="Unfolded"></i> | 
				
			|||
									<span> | 
				
			|||
										<t t-esc="account_data[account]['code']"/> | 
				
			|||
                                        - | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
										<t t-esc="account_data[account]['name']"/> | 
				
			|||
									</span> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"> | 
				
			|||
									<t t-raw="account_data[account]['debit']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"> | 
				
			|||
									<t t-raw="account_data[account]['credit']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"> | 
				
			|||
									<t t-raw="account_data[account]['balance']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"></td> | 
				
			|||
								<t t-set="common_id" t-value="'a'+account_data[account]['id']"/> | 
				
			|||
							</tr> | 
				
			|||
						</t> | 
				
			|||
						<tr t-attf-class="collapse a{{account_data[account]['id']}}"> | 
				
			|||
							<td colspan="10"> | 
				
			|||
								<ul> | 
				
			|||
									<t t-if="!account_data[account]['single_page']"> | 
				
			|||
										<t t-foreach="account_data[account]['pages']" t-as="i"> | 
				
			|||
											<li> | 
				
			|||
												<a | 
				
			|||
                                                   t-att-data-page-number="i" | 
				
			|||
                                                   t-att-data-count="account_data[account]['count']" | 
				
			|||
                                                   t-att-data-account-id="account_data[account]['id']"> | 
				
			|||
													<t t-esc="i"/> | 
				
			|||
												</a> | 
				
			|||
											</li> | 
				
			|||
										</t> | 
				
			|||
									</t> | 
				
			|||
								</ul> | 
				
			|||
							</td> | 
				
			|||
						</tr> | 
				
			|||
					</t> | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="FilterSectionCB"> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<ol class="gl-breadcrumb"> | 
				
			|||
				<li>Cash Book</li> | 
				
			|||
			</ol> | 
				
			|||
		</div> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<div class="py-cntrl-left"> | 
				
			|||
				<div class="py-ctrl-buttons"> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="pdf" action="print_pdf" style="position: relative;">Print (PDF)</button> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="xlsx" action="print_xlsx" style="position: relative;">Export (XLSX)</button> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
			<div class="py_cntrl_right"> | 
				
			|||
				<div class="py-search-buttons"> | 
				
			|||
					<button type="button" id="filter_apply_button" class="btn py-btn-secondary" action="apply_filter" style="position: relative;">Apply</button> | 
				
			|||
					<div class="py-search-btn-date"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | 
				
			|||
							<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span> | 
				
			|||
Custom | 
				
			|||
						</a> | 
				
			|||
						<div class="dropdown-menu py-filters-menu" role="menu"> | 
				
			|||
							<div class="o_foldable_menu o_closed_menu o_account_report_search" data-filter="custom_filter_date"> | 
				
			|||
								<label class="custom-date" for="date_from">Start Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker10" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_from"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
								<label class="custom-date" for="date_to">End Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker11" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_to"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
							</div> | 
				
			|||
						</div> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-journals"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Journals: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu journal" name="states[]" multiple="multiple"> | 
				
			|||
							<b role="menuitem" class="dropdown-item-text"> | 
				
			|||
								<t t-esc="filter_data.company_name"/> | 
				
			|||
							</b> | 
				
			|||
							<div role="separator" class="dropdown-divider"></div> | 
				
			|||
							<t t-foreach="filter_data.journals_list" t-as="journal"> | 
				
			|||
								<option t-attf-value="{{journal[0]}}"> | 
				
			|||
									<t t-esc="journal[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="journal_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-accounts"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Accounts: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu account" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.accounts_list" t-as="account"> | 
				
			|||
								<option t-attf-value="{{account[0]}}"> | 
				
			|||
									<t t-esc="account[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="acc_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-accounts-tag"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Account Tags: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu account-tag" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.account_tag_list" t-as="account_tag"> | 
				
			|||
								<option t-attf-value="{{account_tag[0]}}"> | 
				
			|||
									<t t-esc="account_tag[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="acc_tag_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-analytics"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Analytic: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu analytic" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.analytics_list" t-as="analytic"> | 
				
			|||
								<option t-attf-value="{{analytic[0]}}"> | 
				
			|||
									<t t-esc="analytic[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="analic_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-analytic-tag"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Analytic Tags: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu analytic-tag" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.analytic_tag_list" t-as="analytic_tag"> | 
				
			|||
								<option t-attf-value="{{analytic_tag[0]}}"> | 
				
			|||
									<t t-esc="analytic_tag[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="analic_tag_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-entries"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-filter"></span> | 
				
			|||
Options: | 
				
			|||
						</a> | 
				
			|||
						<select id="entries" class="dropdown-menu py-filters-menu entries"> | 
				
			|||
								<option value="all">All Entries </option> | 
				
			|||
								<option value="posted">Posted Entries</option> | 
				
			|||
 | 
				
			|||
						</select> | 
				
			|||
						<span id="post_res"></span> | 
				
			|||
					</div> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="SubSectionCB"> | 
				
			|||
		<div class="cb-table-div"> | 
				
			|||
			<table class="table table-sm o_main_table" | 
				
			|||
                   style="border: 0px solid black;display compact;"> | 
				
			|||
				<thead> | 
				
			|||
					<tr style=""> | 
				
			|||
						<th>Date</th> | 
				
			|||
						<th>JRNL</th> | 
				
			|||
						<th>Partner</th> | 
				
			|||
						<th>Move</th> | 
				
			|||
						<th>Entry Label</th> | 
				
			|||
						<th class="amt">Debit</th> | 
				
			|||
						<th class="amt">Credit</th> | 
				
			|||
						<th class="amt">Balance</th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
					<t t-foreach="account_data" t-as="account_line"> | 
				
			|||
						<t t-set="style" t-value="''"/> | 
				
			|||
						<t t-if="account_line.move_name == 'Initial Balance'"> | 
				
			|||
							<t t-set="style" t-value="'font-style: italic;'"/></t> | 
				
			|||
						<t t-if="account_line.move_name == 'Ending Balance'"> | 
				
			|||
							<t t-set="style" t-value="'font-style: italic;'"/></t> | 
				
			|||
						<tr> | 
				
			|||
							<td> | 
				
			|||
								<t t-if="account_line.ldate"> | 
				
			|||
									<div class="dropdown dropdown-toggle"> | 
				
			|||
										<a data-toggle="dropdown" href="#"> | 
				
			|||
											<span class="caret"></span> | 
				
			|||
											<span data-id="17"> | 
				
			|||
												<t t-esc="account_line.ldate"/> | 
				
			|||
											</span> | 
				
			|||
										</a> | 
				
			|||
										<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> | 
				
			|||
											<li> | 
				
			|||
												<a class="view-move" tabindex="-1" href="#" | 
				
			|||
                                                   t-att-data-move-id="account_line.move_id"> | 
				
			|||
											View Source move | 
				
			|||
 | 
				
			|||
										</a> | 
				
			|||
											</li> | 
				
			|||
										</ul> | 
				
			|||
									</div> | 
				
			|||
								</t> | 
				
			|||
							</td> | 
				
			|||
							<td> | 
				
			|||
								<t t-esc="account_line.lcode"/> | 
				
			|||
							</td> | 
				
			|||
							<td> | 
				
			|||
								<t t-esc="account_line.partner_name"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style"> | 
				
			|||
								<t t-esc="account_line.move_name"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style"> | 
				
			|||
								<t t-esc="account_line.lname"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style" class="amt"> | 
				
			|||
								<t t-raw="account_line.debit"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style" class="amt"> | 
				
			|||
								<t t-raw="account_line.credit"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style" class="amt"> | 
				
			|||
								<t t-raw="account_line.balance"/> | 
				
			|||
							</td> | 
				
			|||
						</tr> | 
				
			|||
					</t> | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
</templates> | 
				
			|||
@ -1,306 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="UTF-8"?> | 
				
			|||
<templates xml:space="preserve"> | 
				
			|||
	<t t-name="CashFlow"> | 
				
			|||
		<div class="container-cf"> | 
				
			|||
			<div> | 
				
			|||
				<div class="cf-filter"></div> | 
				
			|||
			</div> | 
				
			|||
			<div class="container-cf-data"> | 
				
			|||
				<div class="container-cf-main"></div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="CashFlowData"> | 
				
			|||
		<div> | 
				
			|||
			<table cellspacing="0" width="100%"> | 
				
			|||
				<thead> | 
				
			|||
					<tr> | 
				
			|||
						<th colspan="6">Name</th> | 
				
			|||
						<th class="amd">Cash In</th> | 
				
			|||
						<th class="amd">Cash Out</th> | 
				
			|||
						<th class="amd">Balance</th> | 
				
			|||
 | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
					<t t-foreach="account_data" t-as="account"> | 
				
			|||
						<t t-set="common_id" t-value=""/> | 
				
			|||
						<t t-if="(level=='detailed' or level=='very' or level==false )"> | 
				
			|||
							<tr style="border: .5px solid black;" class="cf-line" | 
				
			|||
                                data-toggle="collapse" | 
				
			|||
                                t-att-data-account-id="account['id']" | 
				
			|||
                                t-attf-data-target=".a{{account['id']}}"> | 
				
			|||
 | 
				
			|||
								<td colspan="6" style="border: 0px solid black;"> | 
				
			|||
									<i class="fa fa-caret-down" role="img" aria-label="Unfolded" title="Unfolded"></i> | 
				
			|||
									<span> | 
				
			|||
										<t t-if="account['month_part']"> | 
				
			|||
										<t t-esc="account['month_part']"/> | 
				
			|||
										</t> | 
				
			|||
										<t t-esc="account['code']"/> | 
				
			|||
										<t t-esc="account['name']"/> | 
				
			|||
									</span> | 
				
			|||
								</td> | 
				
			|||
								<td class="amd"> | 
				
			|||
									<t t-raw="account['total_debit']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amd"> | 
				
			|||
									<t t-raw="account['total_credit']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amd"> | 
				
			|||
									<t t-raw="account['total_balance']"/> | 
				
			|||
								</td> | 
				
			|||
							</tr> | 
				
			|||
 | 
				
			|||
						</t> | 
				
			|||
					<t t-else=""> | 
				
			|||
 | 
				
			|||
							<tr style="border: 1.5px solid black;" class="" | 
				
			|||
                                data-toggle="collapse" | 
				
			|||
                                t-att-data-account-id="account['id']" | 
				
			|||
                                t-attf-data-target=".a{{account['id']}}"> | 
				
			|||
 | 
				
			|||
								<td colspan="6" style="border: 0px solid black;"> | 
				
			|||
									<span> | 
				
			|||
										<t t-if="account['month_part']"> | 
				
			|||
										<t t-esc="account['month_part']"/> | 
				
			|||
										</t> | 
				
			|||
										<t t-esc="account['code']"/> | 
				
			|||
 | 
				
			|||
										<t t-esc="account['name']"/> | 
				
			|||
									</span> | 
				
			|||
								</td> | 
				
			|||
								<td class="amd"> | 
				
			|||
									<t t-raw="account['total_debit']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amd"> | 
				
			|||
									<t t-raw="account['total_credit']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amd"> | 
				
			|||
									<t t-raw="account['total_balance']"/> | 
				
			|||
								</td> | 
				
			|||
							</tr> | 
				
			|||
						</t> | 
				
			|||
						<tr t-attf-class="collapse a{{account['id']}}"> | 
				
			|||
							<td colspan="10"> | 
				
			|||
								<ul> | 
				
			|||
 | 
				
			|||
								</ul> | 
				
			|||
							</td> | 
				
			|||
						</tr> | 
				
			|||
					</t> | 
				
			|||
				</tbody> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
 | 
				
			|||
	<t t-name="SubSectionCF"> | 
				
			|||
<!--		<div class="cf-table-div">--> | 
				
			|||
 | 
				
			|||
			<table cellspacing="0" width="100%"> | 
				
			|||
				<thead> | 
				
			|||
					<tr> | 
				
			|||
						<th colspan="6">Name</th> | 
				
			|||
						<th class="amd">Cash In</th> | 
				
			|||
						<th class="amd">Cash Out</th> | 
				
			|||
						<th class="amd">Balance</th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
					<t t-foreach="account_data" t-as="data"> | 
				
			|||
 | 
				
			|||
							<t t-if="data.id == line_id"> | 
				
			|||
								<t t-foreach="data.journal_lines" t-as="account_line"> | 
				
			|||
									<t t-set="style" t-value="'font-style: italic;'"/> | 
				
			|||
									<tr data-toggle="" | 
				
			|||
											t-att-data-account-id="data.id" | 
				
			|||
											t-attf-data-target=".a{{data.id}}"> | 
				
			|||
										<td colspan="6" style="border: 0px solid black;"> | 
				
			|||
											<t t-esc="account_line.name"/> | 
				
			|||
										</td> | 
				
			|||
										<t t-if="data_currency.company_currency_position == 'before'"> | 
				
			|||
										<td class="amd"> | 
				
			|||
											<t t-esc="data_currency.company_currency_symbol"/><t t-raw="account_line.total_debit"/> | 
				
			|||
										</td> | 
				
			|||
										<td class="amd"> | 
				
			|||
											<t t-esc="data_currency.company_currency_symbol"/><t t-raw="account_line.total_credit"/> | 
				
			|||
										</td> | 
				
			|||
										<td class="amd"> | 
				
			|||
											<t t-esc="data_currency.company_currency_symbol"/><t t-raw="account_line.balance"/> | 
				
			|||
										</td> | 
				
			|||
										</t> | 
				
			|||
										<t t-if="data_currency.company_currency_position == 'after'"> | 
				
			|||
										<td class="amd"> | 
				
			|||
											<t t-raw="account_line.total_debit"/><t t-esc="data_currency.company_currency_symbol"/> | 
				
			|||
										</td> | 
				
			|||
										<td class="amd"> | 
				
			|||
											<t t-raw="account_line.total_credit"/><t t-esc="data_currency.company_currency_symbol"/> | 
				
			|||
										</td> | 
				
			|||
										<td class="amd"> | 
				
			|||
											<t t-raw="account_line.balance"/><t t-esc="data_currency.company_currency_symbol"/> | 
				
			|||
										</td> | 
				
			|||
										</t> | 
				
			|||
									</tr> | 
				
			|||
								</t> | 
				
			|||
							</t> | 
				
			|||
						</t> | 
				
			|||
				</tbody> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
			</table> | 
				
			|||
 | 
				
			|||
<!--		</div>--> | 
				
			|||
	</t> | 
				
			|||
 | 
				
			|||
	<t t-name="ChildSubSectionCF"> | 
				
			|||
		<div class="c-cf-table-div"> | 
				
			|||
			<table cellspacing="1" width="100%"> | 
				
			|||
				<thead> | 
				
			|||
					<t t-foreach="account_data" t-as="acc_data"> | 
				
			|||
						<t t-if="acc_data.id == line_id"> | 
				
			|||
							<t t-foreach="acc_data.journal_lines" t-as="data"> | 
				
			|||
								<tr style=""> | 
				
			|||
									<th colspan="6"><t t-esc="data.name"/> </th> | 
				
			|||
									<t t-if="data_currency.company_currency_position == 'before'"> | 
				
			|||
									<th class="amd" style="left: 100px;"><t t-esc="data_currency.company_currency_symbol"/><t t-esc="data.total_debit"/></th> | 
				
			|||
									<th class="amd"><t t-esc="data_currency.company_currency_symbol"/><t t-esc="data.total_credit"/></th> | 
				
			|||
									<th class="amd"><t t-esc="data_currency.company_currency_symbol"/><t t-esc="data.total_balance"/></th> | 
				
			|||
									</t> | 
				
			|||
									<t t-if="data_currency.company_currency_position == 'after'"> | 
				
			|||
									<th class="amd" style="left: 100px;"><t t-esc="data.total_debit"/><t t-esc="data_currency.company_currency_symbol"/></th> | 
				
			|||
									<th class="amd"><t t-esc="data.total_credit"/><t t-esc="data_currency.company_currency_symbol"/></th> | 
				
			|||
									<th class="amd"><t t-esc="data.total_balance"/><t t-esc="data_currency.company_currency_symbol"/></th> | 
				
			|||
									</t> | 
				
			|||
 | 
				
			|||
								</tr> | 
				
			|||
 | 
				
			|||
							<t t-foreach="acc_data.move_lines" t-as="account_line"> | 
				
			|||
								<t t-if="account_line.j_id == data.id"> | 
				
			|||
								<tr> | 
				
			|||
 | 
				
			|||
							<td colspan="6"> | 
				
			|||
								<t t-esc="account_line.move_name"/> | 
				
			|||
							</td> | 
				
			|||
							<t t-if="data_currency.company_currency_position == 'before'"> | 
				
			|||
							<td class="amd"> | 
				
			|||
								<t t-esc="data_currency.company_currency_symbol"/> | 
				
			|||
								<t t-raw="account_line.total_debit"/> | 
				
			|||
							</td> | 
				
			|||
							<td class="amd"> | 
				
			|||
								<t t-esc="data_currency.company_currency_symbol"/> | 
				
			|||
								<t t-raw="account_line.total_credit"/> | 
				
			|||
							</td> | 
				
			|||
							<td class="amd"> | 
				
			|||
								<t t-esc="data_currency.company_currency_symbol"/> | 
				
			|||
								<t t-raw="account_line.balance"/> | 
				
			|||
							</td> | 
				
			|||
							</t> | 
				
			|||
							<t t-if="data_currency.company_currency_position == 'after'"> | 
				
			|||
							<td class="amd"> | 
				
			|||
								<t t-if="account_line.total_debit==0"/> | 
				
			|||
								<t t-esc="data_currency.company_currency_symbol"/> | 
				
			|||
							</td> | 
				
			|||
							<td class="amd"> | 
				
			|||
 | 
				
			|||
								<t t-raw="account_line.total_credit"/> | 
				
			|||
								<t t-esc="data_currency.company_currency_symbol"/> | 
				
			|||
							</td> | 
				
			|||
							<td class="amd"> | 
				
			|||
 | 
				
			|||
								<t t-raw="account_line.balance"/> | 
				
			|||
								<t t-esc="data_currency.company_currency_symbol"/> | 
				
			|||
							</td> | 
				
			|||
								</t> | 
				
			|||
								</tr> | 
				
			|||
								</t> | 
				
			|||
							</t> | 
				
			|||
 | 
				
			|||
							<tr t-attf-class="collapse a{{data.id}}"> | 
				
			|||
 | 
				
			|||
								<td colspan=""></td> | 
				
			|||
							</tr> | 
				
			|||
<!--						</t>--> | 
				
			|||
							</t> | 
				
			|||
						</t> | 
				
			|||
					</t> | 
				
			|||
				</thead> | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
		<t t-name="FilterSectionCF"> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<span class="cf-breadcrumb"> | 
				
			|||
				<li>Cash Flow Statement</li> | 
				
			|||
			</span> | 
				
			|||
		</div> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<div class="py-cntrl-left"> | 
				
			|||
				<div class="py-ctrl-buttons"> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="pdf" action="print_pdf" style="position: relative;">Print (PDF)</button> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="xlsx" action="print_xlsx" style="position: relative;">Export (XLSX)</button> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
			<div class="py_cntrl_right"> | 
				
			|||
				<div class="py-search-buttons"> | 
				
			|||
					<button type="button" id="filter_apply_button" class="btn py-btn-secondary" action="apply_filter" style="position: relative;">Apply</button> | 
				
			|||
					<div class="py-search-btn-date"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | 
				
			|||
							<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span> | 
				
			|||
Custom | 
				
			|||
						</a> | 
				
			|||
						<div class="dropdown-menu py-filters-menu" role="menu"> | 
				
			|||
							<div class="o_foldable_menu o_closed_menu o_account_report_search" data-filter="custom_filter_date"> | 
				
			|||
								<label class="custom-date" for="date_from">Start Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker10" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_from"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
								<label class="custom-date" for="date_to">End Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker11" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_to"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
							</div> | 
				
			|||
						</div> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-journals"> | 
				
			|||
 | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Target Moves: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu target-moves" name="states[]" > | 
				
			|||
							<option value="all">All Entries</option> | 
				
			|||
							<option value="posted">Posted</option> | 
				
			|||
 | 
				
			|||
						</select> | 
				
			|||
						<span id="target_res"> </span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-reconciled"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Level: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu level" id="level" name="states[]" multiple="multiple"> | 
				
			|||
							<option value="summary">Summary</option> | 
				
			|||
							<option value="consolidated">Consolidated</option> | 
				
			|||
							<option value="detailed">Detailed</option> | 
				
			|||
							<option value="very">Very Detailed</option> | 
				
			|||
						</select> | 
				
			|||
						<span id="level_res"> </span> | 
				
			|||
					</div> | 
				
			|||
 | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
</templates> | 
				
			|||
@ -1,239 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="UTF-8"?> | 
				
			|||
<templates xml:space="preserve"> | 
				
			|||
	<t t-name="DayBook"> | 
				
			|||
		<div class="container-db"> | 
				
			|||
			<div> | 
				
			|||
				<div class="db-filter"></div> | 
				
			|||
			</div> | 
				
			|||
            <div class="container-db-data"> | 
				
			|||
				<div class="container-db-main"></div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
    <t t-name="DayBookData"> | 
				
			|||
		<div> | 
				
			|||
			<table cellspacing="0" width="100%"> | 
				
			|||
				<thead> | 
				
			|||
					<tr> | 
				
			|||
						<th colspan="6">Date</th> | 
				
			|||
                        <th class="text-right" >Debit</th> | 
				
			|||
                        <th class="text-right">Credit</th> | 
				
			|||
                        <th class="text-right">Balance</th> | 
				
			|||
                        <th></th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
                <tbody> | 
				
			|||
					<t t-foreach="account_data" t-as="account"> | 
				
			|||
						<t t-set="common_id" t-value=""/> | 
				
			|||
                        <t t-if="account_data[account]['count']"> | 
				
			|||
							<tr style="border: 1.5px solid black;" class="db-line" | 
				
			|||
                                data-toggle="collapse" | 
				
			|||
                                t-att-data-account-id="account_data[account]['id']" | 
				
			|||
                                t-attf-data-target=".a{{account_data[account]['id']}}"> | 
				
			|||
								<td colspan="6" style="border: 0px solid black;"> | 
				
			|||
									<i class="fa fa-caret-down" role="img" aria-label="Unfolded" title="Unfolded"></i> | 
				
			|||
                                    <span> | 
				
			|||
                                        <t t-esc="account_data[account]['date']"/> | 
				
			|||
									</span> | 
				
			|||
								</td> | 
				
			|||
                                <td class="text-right" > | 
				
			|||
									<t t-raw="account_data[account]['debit']"/> | 
				
			|||
								</td> | 
				
			|||
                                <td class="text-right"> | 
				
			|||
									<t t-raw="account_data[account]['credit']"/> | 
				
			|||
								</td> | 
				
			|||
                                <td class="text-right"> | 
				
			|||
									<t t-raw="account_data[account]['balance']"/> | 
				
			|||
								</td> | 
				
			|||
                                <td class="amt"></td> | 
				
			|||
                                <t t-set="common_id" t-value="'a'+account_data[account]['id']"/> | 
				
			|||
							</tr> | 
				
			|||
						</t> | 
				
			|||
                        <tr t-attf-class="collapse a{{account_data[account]['id']}}"> | 
				
			|||
							<td colspan="10"> | 
				
			|||
								<ul> | 
				
			|||
									<t t-if="!account_data[account]['single_page']"> | 
				
			|||
										<t t-foreach="account_data[account]['pages']" t-as="i"> | 
				
			|||
											<li> | 
				
			|||
												<a | 
				
			|||
                                                        t-att-data-page-number="i" | 
				
			|||
                                                        t-att-data-count="account_data[account]['count']" | 
				
			|||
                                                        t-att-data-account-id="account_data[account]['id']"> | 
				
			|||
													<t t-esc="i"/> | 
				
			|||
												</a> | 
				
			|||
											</li> | 
				
			|||
										</t> | 
				
			|||
									</t> | 
				
			|||
								</ul> | 
				
			|||
							</td> | 
				
			|||
						</tr> | 
				
			|||
					</t> | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
    <t t-name="FilterSectiondb"> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<ol class="db-breadcrumb"> | 
				
			|||
				<li>Day Book</li> | 
				
			|||
			</ol> | 
				
			|||
		</div> | 
				
			|||
        <div class="py-control-div"> | 
				
			|||
			<div class="py-cntrl-left"> | 
				
			|||
				<div class="py-ctrl-buttons"> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="pdf" action="print_pdf" | 
				
			|||
                            style="position: relative;">Print (PDF)</button> | 
				
			|||
                    <button type="button" class="btn py-btn-primary" id="xlsx" action="print_xlsx" | 
				
			|||
                            style="position: relative;">Export (XLSX)</button> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
            <div class="py_cntrl_right"> | 
				
			|||
				<div class="py-search-buttons"> | 
				
			|||
					<button type="button" id="filter_apply_button" class="btn py-btn-secondary" action="apply_filter" | 
				
			|||
                            style="position: relative;">Apply</button> | 
				
			|||
                    <div class="py-search-btn-date"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | 
				
			|||
							<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span> | 
				
			|||
                            Custom | 
				
			|||
						</a> | 
				
			|||
                        <div class="dropdown-menu py-filters-menu" role="menu"> | 
				
			|||
							<div class="o_foldable_menu o_closed_menu o_account_report_search" | 
				
			|||
                                 data-filter="custom_filter_date"> | 
				
			|||
								<label class="custom-date" for="date_from">Start Date :</label> | 
				
			|||
                                <div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker10" | 
				
			|||
                                         data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_from"></input> | 
				
			|||
                                        <span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
                                <label class="custom-date" for="date_to">End Date :</label> | 
				
			|||
                                <div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker11" | 
				
			|||
                                         data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_to"></input> | 
				
			|||
                                        <span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
							</div> | 
				
			|||
						</div> | 
				
			|||
					</div> | 
				
			|||
                    <div class="py-search-journals"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
                            Journals: | 
				
			|||
						</a> | 
				
			|||
                        <select class="dropdown-menu py-filters-menu journal" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.journals_list" t-as="journal"> | 
				
			|||
								<option t-attf-value="{{journal[0]}}"> | 
				
			|||
									<t t-esc="journal[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
                        <span id="journal_res"></span> | 
				
			|||
					</div> | 
				
			|||
                    <div class="py-search-accounts"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
                            Accounts: | 
				
			|||
						</a> | 
				
			|||
                        <select class="dropdown-menu py-filters-menu account" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.accounts_list" t-as="account"> | 
				
			|||
								<option t-attf-value="{{account[0]}}"> | 
				
			|||
									<t t-esc="account[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
                        <span id="account_res"></span> | 
				
			|||
					</div> | 
				
			|||
                    <div class="py-search-entries"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-filter"/> | 
				
			|||
                            Target Moves:				</a> | 
				
			|||
                        <select id="entries" | 
				
			|||
                                class="dropdown-menu py-filters-menu entries" | 
				
			|||
                                name="states[]"> | 
				
			|||
							<option value="all">All Entries </option> | 
				
			|||
                            <option value="posted">Posted Entries</option> | 
				
			|||
						</select> | 
				
			|||
                        <span id="target_res"></span> | 
				
			|||
					</div> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
    <t t-name="SubSectiondb"> | 
				
			|||
		<div class="db-table-div"> | 
				
			|||
			<table class="table table-sm o_main_table" | 
				
			|||
                   style="border: 0px solid black;display compact;"> | 
				
			|||
				<thead> | 
				
			|||
					<tr style=""> | 
				
			|||
						<th>Date</th> | 
				
			|||
                        <th>JRNL</th> | 
				
			|||
                        <th>Partner</th> | 
				
			|||
                        <th>Move</th> | 
				
			|||
                        <th>Entry Label</th> | 
				
			|||
                        <th class="text-right">Debit</th> | 
				
			|||
                        <th class="text-right">Credit</th> | 
				
			|||
                        <th class="text-right">Balance</th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
                <tbody> | 
				
			|||
					<t t-foreach="account_data" t-as="account_line"> | 
				
			|||
						<t t-set="style" t-value="''"/> | 
				
			|||
                        <t t-if="account_line.move_name == 'Initial Balance'"> | 
				
			|||
							<t t-set="style" t-value="'font-style: italic;'"/></t> | 
				
			|||
                        <t t-if="account_line.move_name == 'Ending Balance'"> | 
				
			|||
							<t t-set="style" t-value="'font-style: italic;'"/></t> | 
				
			|||
                        <t t-if="date_id == account_line.ldate"> | 
				
			|||
						<tr> | 
				
			|||
							<td> | 
				
			|||
								<t t-if="account_line.ldate"> | 
				
			|||
									<div class="dropdown dropdown-toggle"> | 
				
			|||
										<a data-toggle="dropdown" href="#"> | 
				
			|||
											<span class="caret"></span> | 
				
			|||
                                            <span data-id="17"> | 
				
			|||
												<t t-esc="account_line.ldate"/> | 
				
			|||
											</span> | 
				
			|||
										</a> | 
				
			|||
                                        <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> | 
				
			|||
											<li> | 
				
			|||
												<a class="view-move" tabindex="-1" href="#" | 
				
			|||
                                                   t-att-data-move-id="account_line.move_id"> | 
				
			|||
											View Source move | 
				
			|||
 | 
				
			|||
										</a> | 
				
			|||
											</li> | 
				
			|||
										</ul> | 
				
			|||
									</div> | 
				
			|||
								</t> | 
				
			|||
							</td> | 
				
			|||
                            <td> | 
				
			|||
								<t t-esc="account_line.lcode"/> | 
				
			|||
							</td> | 
				
			|||
                            <td> | 
				
			|||
								<t t-esc="account_line.partner_name"/> | 
				
			|||
							</td> | 
				
			|||
                            <td t-att-style="style"> | 
				
			|||
								<t t-esc="account_line.move_name"/> | 
				
			|||
							</td> | 
				
			|||
                            <td t-att-style="style" > | 
				
			|||
								<t t-esc="account_line.lname"/> | 
				
			|||
							</td> | 
				
			|||
                            <td t-att-style="style" class="text-right"> | 
				
			|||
								<t t-raw="account_line.debit"/> | 
				
			|||
							</td> | 
				
			|||
                            <td t-att-style="style" class="text-right"> | 
				
			|||
								<t t-raw="account_line.credit"/> | 
				
			|||
							</td> | 
				
			|||
                            <td t-att-style="style" class="text-right"> | 
				
			|||
								<t t-raw="account_line.balance"/> | 
				
			|||
							</td> | 
				
			|||
						</tr> | 
				
			|||
						</t> | 
				
			|||
					</t> | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
</templates> | 
				
			|||
@ -1,287 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="UTF-8"?> | 
				
			|||
<templates xml:space="preserve"> | 
				
			|||
	<t t-name="PartnerLedger"> | 
				
			|||
		<div class="container-pl"> | 
				
			|||
			<div> | 
				
			|||
				<div class="pl-filter"></div> | 
				
			|||
			</div> | 
				
			|||
			<div class="container-pl-data"> | 
				
			|||
				<div class="container-pl-main"></div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="PartnerLedgerData"> | 
				
			|||
		<div> | 
				
			|||
			<table cellspacing="0" width="100%"> | 
				
			|||
				<thead> | 
				
			|||
					<tr> | 
				
			|||
						<th colspan="6">Partner</th> | 
				
			|||
						<th class = "text-right">Debit</th> | 
				
			|||
						<th class = "text-right">Credit</th> | 
				
			|||
						<th class = "text-right">Balance</th> | 
				
			|||
						<th></th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
					<t t-foreach="account_data" t-as="account"> | 
				
			|||
						<t t-set="common_id" t-value=""/> | 
				
			|||
						<t t-if="account_data[account]['count']"> | 
				
			|||
							<tr style="border: 1.5px solid black;" class="pl-line" | 
				
			|||
                                data-toggle="collapse" | 
				
			|||
                                t-att-data-account-id="account_data[account]['id']" | 
				
			|||
                                t-attf-data-target=".a{{account_data[account]['id']}}"> | 
				
			|||
								<td colspan="6" style="border: 0px solid black;"> | 
				
			|||
									<i class="fa fa-caret-down" role="img" aria-label="Unfolded" title="Unfolded"></i> | 
				
			|||
									<span> | 
				
			|||
										<t t-esc="account_data[account]['name']"/> | 
				
			|||
									</span> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"> | 
				
			|||
									<t t-raw="account_data[account]['debit']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"> | 
				
			|||
									<t t-raw="account_data[account]['credit']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"> | 
				
			|||
									<t t-raw="account_data[account]['balance']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"></td> | 
				
			|||
								<t t-set="common_id" t-value="'a'+account_data[account]['id']"/> | 
				
			|||
							</tr> | 
				
			|||
						</t> | 
				
			|||
						<tr t-attf-class="collapse a{{account_data[account]['id']}}"> | 
				
			|||
							<td colspan="10"> | 
				
			|||
								<ul> | 
				
			|||
									<t t-if="!account_data[account]['single_page']"> | 
				
			|||
										<t t-foreach="account_data[account]['pages']" t-as="i"> | 
				
			|||
											<li> | 
				
			|||
												<a | 
				
			|||
                                                   t-att-data-page-number="i" | 
				
			|||
                                                   t-att-data-count="account_data[account]['count']" | 
				
			|||
                                                   t-att-data-account-id="account_data[account]['id']"> | 
				
			|||
													<t t-esc="i"/> | 
				
			|||
												</a> | 
				
			|||
											</li> | 
				
			|||
										</t> | 
				
			|||
									</t> | 
				
			|||
								</ul> | 
				
			|||
							</td> | 
				
			|||
						</tr> | 
				
			|||
					</t> | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="FilterSectionPl"> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<ol class="pl-breadcrumb"> | 
				
			|||
				<li>Partner Ledger</li> | 
				
			|||
			</ol> | 
				
			|||
		</div> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<div class="py-cntrl-left"> | 
				
			|||
				<div class="py-ctrl-buttons"> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="pdf" action="print_pdf" style="position: relative;">Print (PDF)</button> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="xlsx" action="print_xlsx" style="position: relative;">Export (XLSX)</button> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
			<div class="py_cntrl_right"> | 
				
			|||
				<div class="py-search-buttons"> | 
				
			|||
					<button type="button" id="filter_apply_button" class="btn py-btn-secondary" action="apply_filter" style="position: relative;">Apply</button> | 
				
			|||
					<div class="py-search-btn-date"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | 
				
			|||
							<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span> | 
				
			|||
Custom | 
				
			|||
						</a> | 
				
			|||
						<div class="dropdown-menu py-filters-menu" role="menu"> | 
				
			|||
							<div class="o_foldable_menu o_closed_menu o_account_report_search" data-filter="custom_filter_date"> | 
				
			|||
								<label class="custom-date" for="date_from">Start Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker10" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_from"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
								<label class="custom-date" for="date_to">End Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker11" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_to"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
							</div> | 
				
			|||
						</div> | 
				
			|||
					</div> | 
				
			|||
 | 
				
			|||
					<div class="py-search-journals"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Journals: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu journal" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.journals_list" t-as="journal"> | 
				
			|||
								<option t-attf-value="{{journal[0]}}"> | 
				
			|||
									<t t-esc="journal[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="journal_res"></span> | 
				
			|||
					</div> | 
				
			|||
 | 
				
			|||
					<div class="py-search-partners"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-users"></span> | 
				
			|||
Partners: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu partner" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.partners_list" t-as="partner"> | 
				
			|||
								<option t-attf-value="{{partner[0]}}"> | 
				
			|||
									<t t-esc="partner[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
												<span id="partner_res"></span> | 
				
			|||
 | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-reconciled"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Reconciliation Status: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu reconcile" name="states[]" multiple="multiple"> | 
				
			|||
							<option value="unreconciled">Unreconciled</option> | 
				
			|||
						</select> | 
				
			|||
																		<span id="reconciled_res"></span> | 
				
			|||
 | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-reconciled"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Acccount Type | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu type" name="states[]" multiple="multiple"> | 
				
			|||
							<option value="receivable">Receivable</option> | 
				
			|||
							<option value="payable">Payable</option> | 
				
			|||
						</select> | 
				
			|||
																		<span id="type_res"></span> | 
				
			|||
 | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-categories"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-filter"></span> | 
				
			|||
Partner tag: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu category" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.category_list" t-as="category"> | 
				
			|||
								<option t-attf-value="{{category[0]}}"> | 
				
			|||
									<t t-esc="category[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
												<span id="category_res"></span> | 
				
			|||
 | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-accounts"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Accounts: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu account" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.accounts_list" t-as="account"> | 
				
			|||
								<option t-attf-value="{{account[0]}}"> | 
				
			|||
									<t t-esc="account[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
												<span id="account_res"></span> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-targetmoves"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Target Moves: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu target-moves" name="states[]"> | 
				
			|||
							<option value="all_entries">All Entries</option> | 
				
			|||
							<option value="posted_only">Posted Entries</option> | 
				
			|||
						</select> | 
				
			|||
						<span id="target_res"></span> | 
				
			|||
					</div> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="SubSectionPl"> | 
				
			|||
		<div class="pl-table-div"> | 
				
			|||
			<table class="table table-sm o_main_table" | 
				
			|||
                   style="border: 0px solid black;display compact;"> | 
				
			|||
				<thead> | 
				
			|||
					<tr style=""> | 
				
			|||
						<th>Date</th> | 
				
			|||
						<th>JRNL</th> | 
				
			|||
						<th>Account</th> | 
				
			|||
						<th>Move</th> | 
				
			|||
						<th>Entry Label</th> | 
				
			|||
						<th class="text-right">Debit</th> | 
				
			|||
						<th class="text-right">Credit</th> | 
				
			|||
						<th class="text-right">Balance</th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
					<t t-foreach="account_data" t-as="account_line"> | 
				
			|||
						<t t-set="style" t-value="''"/> | 
				
			|||
						<t t-if="account_line.move_name == 'Initial Balance'"> | 
				
			|||
							<t t-set="style" t-value="'font-style: italic;'"/></t> | 
				
			|||
						<t t-if="account_line.move_name == 'Ending Balance'"> | 
				
			|||
							<t t-set="style" t-value="'font-style: italic;'"/></t> | 
				
			|||
						<tr> | 
				
			|||
							<td> | 
				
			|||
								<t t-if="account_line.ldate"> | 
				
			|||
									<div class="dropdown dropdown-toggle"> | 
				
			|||
										<a data-toggle="dropdown" href="#"> | 
				
			|||
											<span class="caret"></span> | 
				
			|||
											<span data-id="17"> | 
				
			|||
												<t t-esc="account_line.ldate"/> | 
				
			|||
											</span> | 
				
			|||
										</a> | 
				
			|||
										<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> | 
				
			|||
											<li> | 
				
			|||
												<a class="view-move" tabindex="-1" href="#" | 
				
			|||
                                                   t-att-data-move-id="account_line.move_id"> | 
				
			|||
											View Source move | 
				
			|||
 | 
				
			|||
										</a> | 
				
			|||
											</li> | 
				
			|||
										</ul> | 
				
			|||
									</div> | 
				
			|||
								</t> | 
				
			|||
							</td> | 
				
			|||
							<td> | 
				
			|||
								<t t-esc="account_line.lcode"/> | 
				
			|||
							</td> | 
				
			|||
							<td> | 
				
			|||
								<t t-esc="account_line.account_name"/>(<t t-esc="account_line.account_code"/>) | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style"> | 
				
			|||
								<t t-esc="account_line.move_name"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style"> | 
				
			|||
								<t t-esc="account_line.lname"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style" class="text-right" > | 
				
			|||
								<t t-raw="account_line.debit" style="text-align:right"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style" class="text-right"> | 
				
			|||
								<t t-raw="account_line.credit"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style" class="text-right"> | 
				
			|||
								<t t-raw="account_line.balance"/> | 
				
			|||
							</td> | 
				
			|||
						</tr> | 
				
			|||
					</t> | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
</templates> | 
				
			|||
@ -1,246 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="UTF-8"?> | 
				
			|||
<templates xml:space="preserve"> | 
				
			|||
	<t t-name="ProfitAndLoss"> | 
				
			|||
		<div class="container-pal"> | 
				
			|||
			<div> | 
				
			|||
				<div class="pal-filter"></div> | 
				
			|||
			</div> | 
				
			|||
			<div class="container-pal-data"> | 
				
			|||
				<div class="container-pal-main"></div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="ProfitAndLossData"> | 
				
			|||
		<div> | 
				
			|||
			<table cellspacing="0" width="100%"> | 
				
			|||
 | 
				
			|||
				<thead> | 
				
			|||
 | 
				
			|||
					<tr> | 
				
			|||
						<th colspan="6" style="padding-top: 5px;"> </th> | 
				
			|||
						<th style="text-align: right;padding-right: 50px; padding-top: 15px;">Debit</th> | 
				
			|||
						<th style="text-align: right;padding-right: 50px; padding-top: 15px;">Credit</th> | 
				
			|||
						<th style="text-align: right;padding-right: 50px; padding-top: 15px;">Balance</th> | 
				
			|||
						<th></th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
					<tr t-foreach="report_lines" t-as="a" style="border-bottom: double;"> | 
				
			|||
						<t t-if="a['level'] != 0"> | 
				
			|||
							<t t-if="a['code']"> | 
				
			|||
								<t t-foreach="account_data" t-as="account"> | 
				
			|||
									<t t-set="common_id" t-value=""/> | 
				
			|||
									<t t-if="account_data[account]['count']"> | 
				
			|||
										<t t-if="account_data[account]['code'] == a['code']"> | 
				
			|||
											<tr style="border-bottom: 1px solid black;" class="pal-line" | 
				
			|||
												data-toggle="collapse" | 
				
			|||
												t-att-data-account-id="account_data[account]['id']" | 
				
			|||
												t-attf-data-target=".a{{account_data[account]['id']}}"> | 
				
			|||
												<td colspan="6" style="border: 0px solid black;  padding-left: 50px;"> | 
				
			|||
													<span> | 
				
			|||
														<t t-esc="account_data[account]['code']"/> | 
				
			|||
														- | 
				
			|||
														<t t-esc="account_data[account]['name']"/> | 
				
			|||
													</span> | 
				
			|||
													<div class="py-search-btn-date"> | 
				
			|||
													<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | 
				
			|||
													</a> | 
				
			|||
														<div class="dropdown-menu " role="menu"> | 
				
			|||
															<div class="o_foldable_menu o_closed_menu " > | 
				
			|||
																<div class="form-group "> | 
				
			|||
																	<div class="" aria-atomic="true" id="" data-target-input=""> | 
				
			|||
																		<li role="presentation"> | 
				
			|||
																			<a role="menuitem" t-att-data-account-id="account_data[account]['id']" class="open-gl" >View General Ledger</a> | 
				
			|||
																		</li> | 
				
			|||
																	</div> | 
				
			|||
																</div> | 
				
			|||
 | 
				
			|||
															</div> | 
				
			|||
														</div> | 
				
			|||
													</div> | 
				
			|||
 | 
				
			|||
												</td> | 
				
			|||
 | 
				
			|||
												<td class="amt" style="text-align: right;padding-right: 50px;"> | 
				
			|||
													<t t-raw="account_data[account]['debit']"/> | 
				
			|||
												</td> | 
				
			|||
												<td class="amt" style="text-align: right;padding-right: 50px;"> | 
				
			|||
													<t t-raw="account_data[account]['credit']"/> | 
				
			|||
												</td> | 
				
			|||
												<td class="amt" style="text-align: right;padding-right: 50px;"> | 
				
			|||
													<t t-raw="account_data[account]['balance']"/> | 
				
			|||
												</td> | 
				
			|||
												<td class="amt"></td> | 
				
			|||
												<t t-set="common_id" t-value="'a'+account_data[account]['id']"/> | 
				
			|||
											</tr> | 
				
			|||
										</t> | 
				
			|||
									</t> | 
				
			|||
								</t> | 
				
			|||
 | 
				
			|||
							</t> | 
				
			|||
 | 
				
			|||
							<t t-else=""> | 
				
			|||
								<t t-set="style" t-value="'padding: 5px;padding-left: 25px;'"/> | 
				
			|||
								<t t-set="fr_head" t-value="'border-bottom: double;'"/> | 
				
			|||
								<t t-set="fr_padding" t-value="'padding-top: 5px; text-align: right;padding-right: 50px;'"/> | 
				
			|||
								<t t-if="a['level'] == 1"> | 
				
			|||
									<t t-set="style" t-value="'padding: 5px;padding-left: 15px;'"/> | 
				
			|||
								</t> | 
				
			|||
								<t t-if="a['level'] > 2"> | 
				
			|||
									<t t-set="style" t-value="'padding: 5px;padding-left: 50px;'"/> | 
				
			|||
									<t t-set="fr_head" t-value="'border-bottom: 1px solid black;'"/> | 
				
			|||
								</t> | 
				
			|||
								<t t-if="a['level'] < 3"> | 
				
			|||
									<t t-set="style" t-value="'padding: 5px;padding-left: 15px;padding-top: 25px;'"/> | 
				
			|||
									<t t-set="fr_padding" t-value="'padding-top: 25px; text-align: right;padding-right: 50px;'"/> | 
				
			|||
								</t> | 
				
			|||
								<tr t-att-style="fr_head"> | 
				
			|||
									<th colspan="6" t-att-style="style"> | 
				
			|||
										<t t-esc="a['name']"/> | 
				
			|||
									</th> | 
				
			|||
									<td t-att-style="fr_padding"><t t-esc="a['m_debit']"/></td> | 
				
			|||
									<td t-att-style="fr_padding"><t t-esc="a['m_credit']" t-att-style="style"/></td> | 
				
			|||
									<td t-att-style="fr_padding"><t t-esc="a['m_balance']" t-att-style="style"/></td> | 
				
			|||
								</tr> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
							</t> | 
				
			|||
						</t> | 
				
			|||
					</tr> | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="FilterSectionPAL"> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<ol class="pal-breadcrumb"> | 
				
			|||
				<li>Profit and Loss Report</li> | 
				
			|||
			</ol> | 
				
			|||
		</div> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<div class="py-cntrl-left"> | 
				
			|||
				<div class="py-ctrl-buttons"> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="pdf" action="print_pdf" style="position: relative;">Print (PDF)</button> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="xlsx" action="print_xlsx" style="position: relative;">Export (XLSX)</button> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
			<div class="py_cntrl_right"> | 
				
			|||
				<div class="py-search-buttons"> | 
				
			|||
					<button type="button" id="filter_apply_button" class="btn py-btn-secondary" action="apply_filter" style="position: relative;">Apply</button> | 
				
			|||
					<div class="py-search-btn-date"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | 
				
			|||
							<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span> | 
				
			|||
Custom | 
				
			|||
						</a> | 
				
			|||
						<div class="dropdown-menu py-filters-menu" role="menu"> | 
				
			|||
							<div class="o_foldable_menu o_closed_menu o_account_report_search" data-filter="custom_filter_date"> | 
				
			|||
								<label class="custom-date" for="date_from">Start Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker10" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_from"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
								<label class="custom-date" for="date_to">End Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker11" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_to"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
							</div> | 
				
			|||
						</div> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-journals"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Journals: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu journal" name="states[]" multiple="multiple"> | 
				
			|||
							<b role="menuitem" class="dropdown-item-text"> | 
				
			|||
								<t t-esc="filter_data.company_name"/> | 
				
			|||
							</b> | 
				
			|||
							<div role="separator" class="dropdown-divider"></div> | 
				
			|||
							<t t-foreach="filter_data.journals_list" t-as="journal"> | 
				
			|||
								<option t-attf-value="{{journal[0]}}"> | 
				
			|||
									<t t-esc="journal[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="journal_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-accounts"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Accounts: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu account" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.accounts_list" t-as="account"> | 
				
			|||
								<option t-attf-value="{{account[0]}}"> | 
				
			|||
									<t t-esc="account[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="acc_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-accounts-tag"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Account Tags: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu account-tag" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.account_tag_list" t-as="account_tag"> | 
				
			|||
								<option t-attf-value="{{account_tag[0]}}"> | 
				
			|||
									<t t-esc="account_tag[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="acc_tag_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-analytics"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Analytic: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu analytic" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.analytics_list" t-as="analytic"> | 
				
			|||
								<option t-attf-value="{{analytic[0]}}"> | 
				
			|||
									<t t-esc="analytic[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="analic_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-analytic-tag"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Analytic Tags: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu analytic-tag" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.analytic_tag_list" t-as="analytic_tag"> | 
				
			|||
								<option t-attf-value="{{analytic_tag[0]}}"> | 
				
			|||
									<t t-esc="analytic_tag[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="analic_tag_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-entries"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-filter"></span> | 
				
			|||
Options: | 
				
			|||
						</a> | 
				
			|||
						<select id="entries" class="dropdown-menu py-filters-menu entries"> | 
				
			|||
								<option value="all">All Entries </option> | 
				
			|||
								<option value="posted">Posted Entries</option> | 
				
			|||
 | 
				
			|||
						</select> | 
				
			|||
						<span id="post_res"></span> | 
				
			|||
					</div> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
</templates> | 
				
			|||
@ -1,190 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="UTF-8"?> | 
				
			|||
<templates xml:space="preserve"> | 
				
			|||
	<t t-name="TrialBalance"> | 
				
			|||
		<div class="container-tb"> | 
				
			|||
			<div> | 
				
			|||
				<div class="tb-filter"></div> | 
				
			|||
			</div> | 
				
			|||
			<div class="container-tb-data"> | 
				
			|||
				<div class="container-tb-main"></div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
    <t t-name="TrialBalanceData"> | 
				
			|||
		<div> | 
				
			|||
			<table cellspacing="0" width="100%"> | 
				
			|||
				<thead> | 
				
			|||
					<tr> | 
				
			|||
 | 
				
			|||
						<th colspan="6">Account</th> | 
				
			|||
						<t t-if="filter['date_from']"> | 
				
			|||
							<th class="amt">Initial Debit</th> | 
				
			|||
							<th class="amt">Initial Credit</th> | 
				
			|||
 | 
				
			|||
						</t> | 
				
			|||
						<th class="amt">Debit</th> | 
				
			|||
						<th class="amt">Credit</th> | 
				
			|||
						<th></th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
					<t t-foreach="account_data" t-as="account"> | 
				
			|||
						<t t-set="common_id" t-value=""/> | 
				
			|||
						<t t-if="account_data[account]['count']"> | 
				
			|||
							<tr style="border: 1.5px solid black;" class="gl-line" | 
				
			|||
                                data-toggle="collapse" | 
				
			|||
                                t-att-data-account-id="account_data[account]['id']" | 
				
			|||
                                t-attf-data-target=".a{{account_data[account]['id']}}"> | 
				
			|||
								<td colspan="6" style="border: 0px solid black;"> | 
				
			|||
									<span> | 
				
			|||
										<t t-esc="account_data[account]['code']"/> | 
				
			|||
                                        - | 
				
			|||
										<t t-esc="account_data[account]['name']"/> | 
				
			|||
									</span> | 
				
			|||
									<div class="py-search-btn-date"> | 
				
			|||
									<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | 
				
			|||
									</a> | 
				
			|||
										<div class="dropdown-menu " role="menu"> | 
				
			|||
											<div class="o_foldable_menu o_closed_menu " > | 
				
			|||
												<div class="form-group "> | 
				
			|||
													<div class="" aria-atomic="true" id="" data-target-input=""> | 
				
			|||
														<li role="presentation"> | 
				
			|||
															<a role="menuitem" t-att-data-account-id="account_data[account]['id']" class="open-gl" >View General Ledger</a> | 
				
			|||
														</li> | 
				
			|||
													</div> | 
				
			|||
												</div> | 
				
			|||
 | 
				
			|||
											</div> | 
				
			|||
										</div> | 
				
			|||
									</div> | 
				
			|||
								</td> | 
				
			|||
								<t t-if="filter['date_from']"> | 
				
			|||
									<t t-foreach="account_data[account]['lines']" t-as="line"> | 
				
			|||
										<t t-if="(line['initial_bal'] == true and line['move_name'] == 'Initial Balance')"> | 
				
			|||
											<td class="amt"> | 
				
			|||
												<t t-raw="line['debit']"/> | 
				
			|||
											</td> | 
				
			|||
											<td class="amt"> | 
				
			|||
												<t t-raw="line['credit']"/> | 
				
			|||
											</td> | 
				
			|||
										</t> | 
				
			|||
									</t> | 
				
			|||
								</t> | 
				
			|||
								<td class="amt"> | 
				
			|||
									<t t-raw="account_data[account]['debit']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"> | 
				
			|||
									<t t-raw="account_data[account]['credit']"/> | 
				
			|||
								</td> | 
				
			|||
 | 
				
			|||
								<t t-set="common_id" t-value="'a'+account_data[account]['id']"/> | 
				
			|||
							</tr> | 
				
			|||
						</t> | 
				
			|||
					</t> | 
				
			|||
							<td colspan="6" style="" class=""><strong>Total</strong></td> | 
				
			|||
							<t t-if="filter['date_from']"> | 
				
			|||
 | 
				
			|||
							<td class="amt" style=""><strong></strong></td> | 
				
			|||
							<td class="amt" style=""><strong></strong></td> | 
				
			|||
							</t> | 
				
			|||
							<td class="amt" style=""><strong><t t-esc="total_b['debit']"/></strong></td> | 
				
			|||
							<td class="amt" style=""><strong><t t-esc="total_b['credit']"/></strong></td> | 
				
			|||
 | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="FilterSectionTB"> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<ol class="tl-breadcrumb"> | 
				
			|||
				<li>Trial Balance</li> | 
				
			|||
			</ol> | 
				
			|||
		</div> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<div class="py-cntrl-left"> | 
				
			|||
				<div class="py-ctrl-buttons"> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="pdf" style="position: relative;">Print (PDF)</button> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="xlsx" style="position: relative;">Export (XLSX)</button> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
			<div class="py_cntrl_right"> | 
				
			|||
				<div class="py-search-buttons"> | 
				
			|||
					<button type="button" id="filter_apply_button" class="btn py-btn-secondary" style="position: relative;">Apply</button> | 
				
			|||
					<div class="py-search-btn-date"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | 
				
			|||
							<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span> | 
				
			|||
Date Range | 
				
			|||
						</a> | 
				
			|||
						<div class="dropdown-menu py-filters-menu" role="menu"> | 
				
			|||
							<div class="o_foldable_menu o_closed_menu o_account_report_search" data-filter="custom_filter_date"> | 
				
			|||
								<label class="custom-date" for="date_from">Start Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker10" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_from"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
								<label class="custom-date" for="date_to">End Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker11" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_to"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
							</div> | 
				
			|||
						</div> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-journals"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Journals: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu journal" name="states[]" multiple="multiple"> | 
				
			|||
							<b role="menuitem" class="dropdown-item-text"> | 
				
			|||
								<t t-esc="filter_data.company_name"/> | 
				
			|||
							</b> | 
				
			|||
							<div role="separator" class="dropdown-divider"></div> | 
				
			|||
							<t t-foreach="filter_data.journals_list" t-as="journal"> | 
				
			|||
								<option t-attf-value="{{journal[0]}}"> | 
				
			|||
									<t t-esc="journal[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="journal_res"></span> | 
				
			|||
					</div> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
					<div class="py-search-analytics"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Analytic: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu analytic" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.analytics_list" t-as="analytic"> | 
				
			|||
								<option t-attf-value="{{analytic[0]}}"> | 
				
			|||
									<t t-esc="analytic[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="analic_res"></span> | 
				
			|||
					</div> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
					<div class="py-search-entries"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-filter"></span> | 
				
			|||
Options: | 
				
			|||
						</a> | 
				
			|||
						<select id="entries" class="dropdown-menu py-filters-menu entries" name="states[]"> | 
				
			|||
								<option value="all">All Entries </option> | 
				
			|||
								<option value="posted">Posted Entries</option> | 
				
			|||
						</select> | 
				
			|||
						<span id="post_res"></span> | 
				
			|||
					</div> | 
				
			|||
 | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
</templates> | 
				
			|||
@ -1,282 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="UTF-8"?> | 
				
			|||
<templates xml:space="preserve"> | 
				
			|||
	<t t-name="GeneralLedger"> | 
				
			|||
		<div class="container-gl"> | 
				
			|||
			<div> | 
				
			|||
				<div class="gl-filter"></div> | 
				
			|||
			</div> | 
				
			|||
			<div class="container-gl-data"> | 
				
			|||
				<div class="container-gl-main"></div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="GeneralLedgerData"> | 
				
			|||
		<div> | 
				
			|||
			<table cellspacing="0" width="100%"> | 
				
			|||
				<thead> | 
				
			|||
					<tr> | 
				
			|||
						<th colspan="6">Account</th> | 
				
			|||
						<th class="amt">Debit</th> | 
				
			|||
						<th class="amt">Credit</th> | 
				
			|||
						<th class="amt">Balance</th> | 
				
			|||
						<th></th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
					<t t-foreach="account_data" t-as="account"> | 
				
			|||
						<t t-set="common_id" t-value=""/> | 
				
			|||
						<t t-if="account_data[account]['count']"> | 
				
			|||
							<tr style="border: 1.5px solid black;" class="gl-line" | 
				
			|||
                                data-toggle="collapse" | 
				
			|||
                                t-att-data-account-id="account_data[account]['id']" | 
				
			|||
                                t-attf-data-target=".a{{account_data[account]['id']}}"> | 
				
			|||
								<td colspan="6" style="border: 0px solid black;"> | 
				
			|||
									<i class="fa fa-caret-down" role="img" aria-label="Unfolded" title="Unfolded"></i> | 
				
			|||
									<span> | 
				
			|||
										<t t-esc="account_data[account]['code']"/> | 
				
			|||
                                        - | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
										<t t-esc="account_data[account]['name']"/> | 
				
			|||
									</span> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"> | 
				
			|||
									<t t-raw="account_data[account]['debit']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"> | 
				
			|||
									<t t-raw="account_data[account]['credit']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"> | 
				
			|||
									<t t-raw="account_data[account]['balance']"/> | 
				
			|||
								</td> | 
				
			|||
								<td class="amt"></td> | 
				
			|||
								<t t-set="common_id" t-value="'a'+account_data[account]['id']"/> | 
				
			|||
							</tr> | 
				
			|||
						</t> | 
				
			|||
						<tr t-attf-class="collapse a{{account_data[account]['id']}}"> | 
				
			|||
							<td colspan="10"> | 
				
			|||
								<ul> | 
				
			|||
									<t t-if="!account_data[account]['single_page']"> | 
				
			|||
										<t t-foreach="account_data[account]['pages']" t-as="i"> | 
				
			|||
											<li> | 
				
			|||
												<a | 
				
			|||
                                                   t-att-data-page-number="i" | 
				
			|||
                                                   t-att-data-count="account_data[account]['count']" | 
				
			|||
                                                   t-att-data-account-id="account_data[account]['id']"> | 
				
			|||
													<t t-esc="i"/> | 
				
			|||
												</a> | 
				
			|||
											</li> | 
				
			|||
										</t> | 
				
			|||
									</t> | 
				
			|||
								</ul> | 
				
			|||
							</td> | 
				
			|||
						</tr> | 
				
			|||
					</t> | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="FilterSection"> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<ol class="gl-breadcrumb"> | 
				
			|||
				<li>General Ledger</li> | 
				
			|||
			</ol> | 
				
			|||
		</div> | 
				
			|||
		<div class="py-control-div"> | 
				
			|||
			<div class="py-cntrl-left"> | 
				
			|||
				<div class="py-ctrl-buttons"> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="pdf" action="print_pdf" style="position: relative;">Print (PDF)</button> | 
				
			|||
					<button type="button" class="btn py-btn-primary" id="xlsx" action="print_xlsx" style="position: relative;">Export (XLSX)</button> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
			<div class="py_cntrl_right"> | 
				
			|||
				<div class="py-search-buttons"> | 
				
			|||
					<button type="button" id="filter_apply_button" class="btn py-btn-secondary" action="apply_filter" style="position: relative;">Apply</button> | 
				
			|||
					<div class="py-search-btn-date"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | 
				
			|||
							<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span> | 
				
			|||
Custom | 
				
			|||
						</a> | 
				
			|||
						<div class="dropdown-menu py-filters-menu" role="menu"> | 
				
			|||
							<div class="o_foldable_menu o_closed_menu o_account_report_search" data-filter="custom_filter_date"> | 
				
			|||
								<label class="custom-date" for="date_from">Start Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker10" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_from"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
								<label class="custom-date" for="date_to">End Date :</label> | 
				
			|||
								<div class="form-group custom-date"> | 
				
			|||
									<div class="o_datepicker" aria-atomic="true" id="datepicker11" data-target-input="nearest"> | 
				
			|||
										<input type="text" id="date_to"></input> | 
				
			|||
										<span class="o_datepicker_button"></span> | 
				
			|||
									</div> | 
				
			|||
								</div> | 
				
			|||
							</div> | 
				
			|||
						</div> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-journals"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Journals: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu journal" name="states[]" multiple="multiple"> | 
				
			|||
							<b role="menuitem" class="dropdown-item-text"> | 
				
			|||
								<t t-esc="filter_data.company_name"/> | 
				
			|||
							</b> | 
				
			|||
							<div role="separator" class="dropdown-divider"></div> | 
				
			|||
							<t t-foreach="filter_data.journals_list" t-as="journal"> | 
				
			|||
								<option t-attf-value="{{journal[0]}}"> | 
				
			|||
									<t t-esc="journal[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="journal_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-accounts"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Accounts: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu account" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.accounts_list" t-as="account"> | 
				
			|||
								<option t-attf-value="{{account[0]}}"> | 
				
			|||
									<t t-esc="account[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="acc_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-accounts-tag"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Account Tags: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu account-tag" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.account_tag_list" t-as="account_tag"> | 
				
			|||
								<option t-attf-value="{{account_tag[0]}}"> | 
				
			|||
									<t t-esc="account_tag[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="acc_tag_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-analytics"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Analytic: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu analytic" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.analytics_list" t-as="analytic"> | 
				
			|||
								<option t-attf-value="{{analytic[0]}}"> | 
				
			|||
									<t t-esc="analytic[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="analic_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-analytic-tag"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-book"></span> | 
				
			|||
Analytic Tags: | 
				
			|||
						</a> | 
				
			|||
						<select class="dropdown-menu py-filters-menu analytic-tag" name="states[]" multiple="multiple"> | 
				
			|||
							<t t-foreach="filter_data.analytic_tag_list" t-as="analytic_tag"> | 
				
			|||
								<option t-attf-value="{{analytic_tag[0]}}"> | 
				
			|||
									<t t-esc="analytic_tag[1]"/> | 
				
			|||
								</option> | 
				
			|||
							</t> | 
				
			|||
						</select> | 
				
			|||
						<span id="analic_tag_res"></span> | 
				
			|||
					</div> | 
				
			|||
					<div class="py-search-entries"> | 
				
			|||
						<a type="button" class="dropdown-toggle" data-toggle="dropdown"> | 
				
			|||
							<span class="fa fa-filter"></span> | 
				
			|||
Options: | 
				
			|||
						</a> | 
				
			|||
						<select id="entries" class="dropdown-menu py-filters-menu entries"> | 
				
			|||
								<option value="all">All Entries </option> | 
				
			|||
								<option value="posted">Posted Entries</option> | 
				
			|||
 | 
				
			|||
						</select> | 
				
			|||
						<span id="post_res"></span> | 
				
			|||
					</div> | 
				
			|||
				</div> | 
				
			|||
			</div> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
	<t t-name="SubSection"> | 
				
			|||
		<div class="gl-table-div"> | 
				
			|||
			<table class="table table-sm o_main_table" | 
				
			|||
                   style="border: 0px solid black;display compact;"> | 
				
			|||
				<thead> | 
				
			|||
					<tr style=""> | 
				
			|||
						<th>Date</th> | 
				
			|||
						<th>JRNL</th> | 
				
			|||
						<th>Partner</th> | 
				
			|||
						<th>Move</th> | 
				
			|||
						<th>Entry Label</th> | 
				
			|||
						<th class="amt">Debit</th> | 
				
			|||
						<th class="amt">Credit</th> | 
				
			|||
						<th class="amt">Balance</th> | 
				
			|||
					</tr> | 
				
			|||
				</thead> | 
				
			|||
				<tbody> | 
				
			|||
					<t t-foreach="account_data" t-as="account_line"> | 
				
			|||
						<t t-set="style" t-value="''"/> | 
				
			|||
						<t t-if="account_line.move_name == 'Initial Balance'"> | 
				
			|||
							<t t-set="style" t-value="'font-style: italic;'"/></t> | 
				
			|||
						<t t-if="account_line.move_name == 'Ending Balance'"> | 
				
			|||
							<t t-set="style" t-value="'font-style: italic;'"/></t> | 
				
			|||
						<tr> | 
				
			|||
							<td> | 
				
			|||
								<t t-if="account_line.ldate"> | 
				
			|||
									<div class="dropdown dropdown-toggle"> | 
				
			|||
										<a data-toggle="dropdown" href="#"> | 
				
			|||
											<span class="caret"></span> | 
				
			|||
											<span data-id="17"> | 
				
			|||
												<t t-esc="account_line.ldate"/> | 
				
			|||
											</span> | 
				
			|||
										</a> | 
				
			|||
										<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> | 
				
			|||
											<li> | 
				
			|||
												<a class="view-move" tabindex="-1" href="#" | 
				
			|||
                                                   t-att-data-move-id="account_line.move_id"> | 
				
			|||
											View Source move | 
				
			|||
 | 
				
			|||
										</a> | 
				
			|||
											</li> | 
				
			|||
										</ul> | 
				
			|||
									</div> | 
				
			|||
								</t> | 
				
			|||
							</td> | 
				
			|||
							<td> | 
				
			|||
								<t t-esc="account_line.lcode"/> | 
				
			|||
							</td> | 
				
			|||
							<td> | 
				
			|||
								<t t-esc="account_line.partner_name"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style"> | 
				
			|||
								<t t-esc="account_line.move_name"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style"> | 
				
			|||
								<t t-esc="account_line.lname"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style" class="amt"> | 
				
			|||
								<t t-raw="account_line.debit"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style" class="amt"> | 
				
			|||
								<t t-raw="account_line.credit"/> | 
				
			|||
							</td> | 
				
			|||
							<td t-att-style="style" class="amt"> | 
				
			|||
								<t t-raw="account_line.balance"/> | 
				
			|||
							</td> | 
				
			|||
						</tr> | 
				
			|||
					</t> | 
				
			|||
				</tbody> | 
				
			|||
			</table> | 
				
			|||
		</div> | 
				
			|||
	</t> | 
				
			|||
</templates> | 
				
			|||
@ -1,211 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
    <template id="ageing_partner"> | 
				
			|||
       <t t-call="web.html_container"> | 
				
			|||
            <t t-call="web.internal_layout"> | 
				
			|||
                <div class="page"> | 
				
			|||
                    <div class="oe_structure"/> | 
				
			|||
                    <h3><span t-esc="res_company.name"/>: Partner Ageing | 
				
			|||
                    </h3> | 
				
			|||
                    <br></br> | 
				
			|||
                    <div> | 
				
			|||
                        <div class="row mt32"> | 
				
			|||
                        <div class="col-3"> | 
				
			|||
                            <strong>As On Date:</strong> | 
				
			|||
                            <p t-esc="report_data[0]['as_on_date']"/> | 
				
			|||
                        </div> | 
				
			|||
                            <div class="col-3"> | 
				
			|||
                                <strong>Partners: </strong> | 
				
			|||
                                <t t-foreach="report_data[0]['partners']" | 
				
			|||
                                   t-as="data"> | 
				
			|||
                                    <t t-esc="data"/> | 
				
			|||
 | 
				
			|||
                                </t> | 
				
			|||
 | 
				
			|||
                            </div> | 
				
			|||
                            <div class="col-3"> | 
				
			|||
                                <strong>Partner Tag: </strong> | 
				
			|||
                                <t t-foreach="report_data[0]['categories']" | 
				
			|||
                                   t-as="data"> | 
				
			|||
                                    <t t-esc="data"/> | 
				
			|||
 | 
				
			|||
                                </t> | 
				
			|||
 | 
				
			|||
                            </div> | 
				
			|||
 | 
				
			|||
                    </div> | 
				
			|||
                        <br></br> | 
				
			|||
                     <div class="row mb32"> | 
				
			|||
                         <div class="col-3"> | 
				
			|||
                            <strong>Account Type:</strong> | 
				
			|||
                            <p t-esc="report_data[0]['type']"/> | 
				
			|||
                        </div> | 
				
			|||
                         <div class="col-3"> | 
				
			|||
                            <strong>Partner Type:</strong> | 
				
			|||
                            <p t-esc="report_data[0]['partner_type']"/> | 
				
			|||
                        </div> | 
				
			|||
                        <div class="col-3"> | 
				
			|||
                            <strong>Target Moves:</strong> | 
				
			|||
                            <p t-esc="report_data[0]['target_moves']"/> | 
				
			|||
                        </div> | 
				
			|||
                    </div> | 
				
			|||
 | 
				
			|||
                        <table  class="table table-sm table-reports"> | 
				
			|||
                            <thead> | 
				
			|||
                                <tr class="text-center"> | 
				
			|||
                                    <th style="text-align:left;" >Entry Label</th> | 
				
			|||
                                    <th style="text-align:left;"  >Due Date</th> | 
				
			|||
                                    <th style="text-align:left;" >Journal</th> | 
				
			|||
                                    <th style="text-align:left;" >Account</th> | 
				
			|||
                                    <th style="text-align:right;" colspan="1">Not Due</th> | 
				
			|||
                                    <th style="text-align:right;" colspan="1">0 - 20</th> | 
				
			|||
                                    <th style="text-align:right;" colspan="1">21 - 40</th> | 
				
			|||
                                    <th style="text-align:right;" colspan="1">41 - 60</th> | 
				
			|||
                                    <th style="text-align:right;" colspan="1">61 - 80</th> | 
				
			|||
                                    <th style="text-align:right;" colspan="2">81 - 100</th> | 
				
			|||
                                    <th style="text-align:right;" colspan="2">100 +</th> | 
				
			|||
                                </tr> | 
				
			|||
                            </thead> | 
				
			|||
                            <tbody> | 
				
			|||
                            <t t-foreach="account_data" t-as="line"> | 
				
			|||
                                <t t-if="account_data[line]['count']"> | 
				
			|||
 | 
				
			|||
                                    <tr style="border-bottom: 2px solid black;"> | 
				
			|||
 | 
				
			|||
                                        <td colspan="4"> | 
				
			|||
                                            <span style="color: white;" t-esc="'..'"/> | 
				
			|||
                                            <strong> | 
				
			|||
                                                <span t-esc="account_data[line]['partner_name']"/> | 
				
			|||
 | 
				
			|||
                                            </strong> | 
				
			|||
 | 
				
			|||
                                        </td> | 
				
			|||
                                         <td class="text-right"> | 
				
			|||
                                            <strong> | 
				
			|||
                                                 <span t-esc="account_data[line]['Not']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
 | 
				
			|||
                                            </strong> | 
				
			|||
 | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <strong> | 
				
			|||
                                                 <span t-esc="account_data[line]['value_20']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
 | 
				
			|||
                                            </strong> | 
				
			|||
 | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <strong> | 
				
			|||
                                                <span t-esc="account_data[line]['2140']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
 | 
				
			|||
                                            </strong> | 
				
			|||
 | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <strong> | 
				
			|||
                                                <span t-esc="account_data[line]['4160']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
 | 
				
			|||
                                            </strong> | 
				
			|||
 | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <strong> | 
				
			|||
                                                <span t-esc="account_data[line]['6180']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
 | 
				
			|||
                                            </strong> | 
				
			|||
 | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right" colspan="2"> | 
				
			|||
                                            <strong> | 
				
			|||
                                                <span t-esc="account_data[line]['81100']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
 | 
				
			|||
                                            </strong> | 
				
			|||
 | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <strong> | 
				
			|||
                                                <span t-esc="account_data[line]['100']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
 | 
				
			|||
                                            </strong> | 
				
			|||
 | 
				
			|||
                                        </td> | 
				
			|||
                                    </tr> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                                    <t t-foreach="account_data[line]['partner_move_lines'][2]" t-as="sub_line"> | 
				
			|||
 | 
				
			|||
                                            <tr> | 
				
			|||
                                                <td style="text-align:left;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('move_name')"/> | 
				
			|||
                                                </td > | 
				
			|||
                                                 <td style="text-align:left;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('date_maturity')"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                 <td style="text-align:left;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('journal_name')"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                 <td colspan="1" style="text-align:left;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('account_code')"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td colspan="1" style="text-align:right;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('range_0')" | 
				
			|||
                                                       t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td colspan="1" style="text-align:right;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('range_1')" | 
				
			|||
                                                    t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td colspan="1" style="text-align:right;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('range_2')" | 
				
			|||
                                                    t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td colspan="1" style="text-align:right;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('range_3')" | 
				
			|||
                                                    t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
 | 
				
			|||
                                                <td colspan="1" style="text-align:right;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('range_4')" | 
				
			|||
                                                    t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                 <td colspan="2" style="text-align:right;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('range_5')" | 
				
			|||
                                                    t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td colspan="2" style="text-align:right;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('range_5')" | 
				
			|||
                                                    t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                            </tr> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                                    </t> | 
				
			|||
                                </t> | 
				
			|||
 | 
				
			|||
                            </t> | 
				
			|||
                            </tbody> | 
				
			|||
                        </table> | 
				
			|||
                    </div> | 
				
			|||
                    <br></br> | 
				
			|||
                </div> | 
				
			|||
            </t> | 
				
			|||
        </t> | 
				
			|||
    </template> | 
				
			|||
 | 
				
			|||
    <report id="action_print_ageing_partner" | 
				
			|||
            model="dynamic.ageing.partner" | 
				
			|||
            report_type="qweb-pdf" | 
				
			|||
            menu="False" | 
				
			|||
            string="Partner Ageing" | 
				
			|||
            name="dynamic_financial_report.ageing_partner" | 
				
			|||
            file="dynamic_financial_report.ageing_partner" | 
				
			|||
    /> | 
				
			|||
 | 
				
			|||
</odoo> | 
				
			|||
@ -1,194 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
        <template id="dynamic_financial_report.bank_book"> | 
				
			|||
            <t t-call="web.html_container"> | 
				
			|||
                <t t-call="web.internal_layout"> | 
				
			|||
                    <div class="page"> | 
				
			|||
                        <div class="oe_structure"/> | 
				
			|||
                        <h3> | 
				
			|||
                            <span t-esc="res_company.name"/> | 
				
			|||
                            : Bank Book | 
				
			|||
                        </h3> | 
				
			|||
                        <div> | 
				
			|||
                            <span t-if="Filters.get('date_from')"> | 
				
			|||
                                <strong>From:</strong> | 
				
			|||
                                <t t-esc="Filters['date_from']"/> | 
				
			|||
                            </span> | 
				
			|||
                            <span t-if="Filters.get('date_to')"> | 
				
			|||
                                <strong>To:</strong> | 
				
			|||
                                <t t-esc="Filters['date_to']"/> | 
				
			|||
                            </span> | 
				
			|||
                            <div style="width:100%;"> | 
				
			|||
                                <div style="text-align:centre;" class="row"> | 
				
			|||
                                    <div class="col-2"> | 
				
			|||
                                        <strong>Journals:</strong> | 
				
			|||
                                        <t t-foreach="Filters['journals']" | 
				
			|||
                                           t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                    </div> | 
				
			|||
                                    <div class="col-2"> | 
				
			|||
                                        <strong>Analytic:</strong> | 
				
			|||
                                        <t t-foreach="Filters['analytics']" | 
				
			|||
                                           t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                    </div> | 
				
			|||
                                    <div class="col-2"> | 
				
			|||
                                        <strong>Analytic Tag:</strong> | 
				
			|||
                                        <t t-foreach="Filters['analytic_tags']" | 
				
			|||
                                           t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                    </div> | 
				
			|||
                                    <div class="col-2"> | 
				
			|||
                                        <strong>Accounts:</strong> | 
				
			|||
                                        <t t-foreach="Filters['accounts']" | 
				
			|||
                                           t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                    </div> | 
				
			|||
                                    <div class="col-2"> | 
				
			|||
                                        <strong>Account Tags:</strong> | 
				
			|||
                                        <t t-foreach="Filters['account_tags']" | 
				
			|||
                                           t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                    </div> | 
				
			|||
                                    <div class="col-2"> | 
				
			|||
                                        <strong>Entries:</strong> | 
				
			|||
                                        <!--                             <t t-foreach="Filters['journals']" t-as="ps"> --> | 
				
			|||
                                        <li> | 
				
			|||
                                            <t t-esc="Filters['entries']"/> | 
				
			|||
                                        </li> | 
				
			|||
                                        <!--                             </t> --> | 
				
			|||
                                    </div> | 
				
			|||
                                </div> | 
				
			|||
                            </div> | 
				
			|||
                            <br/> | 
				
			|||
                            <table> | 
				
			|||
                                <thead> | 
				
			|||
                                    <tr class="text-center"> | 
				
			|||
                                        <th style="text-align:left;">Date</th> | 
				
			|||
                                        <th style="text-align:left;">Journal | 
				
			|||
                                        </th> | 
				
			|||
                                        <th style="text-align:left;">Partner | 
				
			|||
                                        </th> | 
				
			|||
                                        <th style="text-align:left;">Move</th> | 
				
			|||
                                        <th style="text-align:left;">Reference | 
				
			|||
                                        </th> | 
				
			|||
                                        <th style="text-align:right;padding-bottom:10px;"> | 
				
			|||
                                            Debit | 
				
			|||
                                        </th> | 
				
			|||
                                        <th style="text-align:right">Credit</th> | 
				
			|||
                                        <th style="text-align:right">Balance | 
				
			|||
                                        </th> | 
				
			|||
                                    </tr> | 
				
			|||
                                </thead> | 
				
			|||
                                <t t-foreach="account_data" t-as="line"> | 
				
			|||
                                    <t t-if="account_data[line]['count']"> | 
				
			|||
                                        <tr> | 
				
			|||
                                            <td colspan="5"> | 
				
			|||
                                                <span style="color: white;" | 
				
			|||
                                                      t-esc="'..'"/> | 
				
			|||
                                                <span t-esc="account_data[line]['name']"/> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td class="text-right"> | 
				
			|||
                                                <span t-esc="account_data[line]['debit']" | 
				
			|||
                                                      t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td class="text-right"> | 
				
			|||
                                                <span t-esc="account_data[line]['credit']" | 
				
			|||
                                                      t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td class="text-right"> | 
				
			|||
                                                <span t-esc="account_data[line]['balance']" | 
				
			|||
                                                      t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                            </td> | 
				
			|||
                                        </tr> | 
				
			|||
                                        <t t-foreach="account_data[line]['lines']" | 
				
			|||
                                           t-as="sub_line"> | 
				
			|||
                                            <t t-if="sub_line['initial_bal']"> | 
				
			|||
                                                <tr> | 
				
			|||
                                                    <td colspan="5" | 
				
			|||
                                                        class="text-right"> | 
				
			|||
                                                        <span>Initial Balance | 
				
			|||
                                                        </span> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td class="text-right"> | 
				
			|||
                                                        <span t-esc="sub_line['debit']" | 
				
			|||
                                                              t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td class="text-right"> | 
				
			|||
                                                        <span t-esc="sub_line['credit']" | 
				
			|||
                                                              t-options="{'widgetaccount_data': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td class="text-right"> | 
				
			|||
                                                        <span t-esc="sub_line['balance']" | 
				
			|||
                                                              t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                </tr> | 
				
			|||
                                            </t> | 
				
			|||
                                            <t t-if="not sub_line['initial_bal'] and not sub_line['ending_bal']"> | 
				
			|||
                                                <tr> | 
				
			|||
                                                    <td> | 
				
			|||
                                                        <t t-esc="sub_line.get('ldate')" | 
				
			|||
                                                           t-options="{'widget': 'date'}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td> | 
				
			|||
                                                        <t t-esc="sub_line.get('lcode')"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td> | 
				
			|||
                                                        <t t-esc="sub_line.get('partner_name')"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td> | 
				
			|||
                                                        <t t-esc="sub_line.get('move_name')"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td style="width:30%;"> | 
				
			|||
                                                        <t t-esc="sub_line.get('lname')"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td class="text-right"> | 
				
			|||
                                                        <t t-esc="sub_line.get('debit')" | 
				
			|||
                                                           t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td class="text-right"> | 
				
			|||
                                                        <t t-esc="sub_line.get('credit')" | 
				
			|||
                                                           t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td class="text-right"> | 
				
			|||
                                                        <t t-esc="sub_line.get('balance')" | 
				
			|||
                                                           t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                </tr> | 
				
			|||
                                            </t> | 
				
			|||
 | 
				
			|||
                                        </t> | 
				
			|||
                                    </t> | 
				
			|||
                                </t> | 
				
			|||
                            </table> | 
				
			|||
                        </div> | 
				
			|||
                        <br/> | 
				
			|||
                    </div> | 
				
			|||
                </t> | 
				
			|||
            </t> | 
				
			|||
        </template> | 
				
			|||
    <report id="action_print_bank_book" | 
				
			|||
            model="dynamic.bank.book" | 
				
			|||
            report_type="qweb-pdf" | 
				
			|||
            menu="False" | 
				
			|||
            string="Bank Book" | 
				
			|||
            name="dynamic_financial_report.bank_book" | 
				
			|||
            file="dynamic_financial_report.bank_book" | 
				
			|||
    /> | 
				
			|||
 | 
				
			|||
</odoo> | 
				
			|||
@ -1,194 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
        <template id="dynamic_financial_report.cash_book"> | 
				
			|||
            <t t-call="web.html_container"> | 
				
			|||
                <t t-call="web.internal_layout"> | 
				
			|||
                    <div class="page"> | 
				
			|||
                        <div class="oe_structure"/> | 
				
			|||
                        <h3> | 
				
			|||
                            <span t-esc="res_company.name"/> | 
				
			|||
                            : Cash Book | 
				
			|||
                        </h3> | 
				
			|||
                        <div> | 
				
			|||
                            <span t-if="Filters.get('date_from')"> | 
				
			|||
                                <strong>From:</strong> | 
				
			|||
                                <t t-esc="Filters['date_from']"/> | 
				
			|||
                            </span> | 
				
			|||
                            <span t-if="Filters.get('date_to')"> | 
				
			|||
                                <strong>To:</strong> | 
				
			|||
                                <t t-esc="Filters['date_to']"/> | 
				
			|||
                            </span> | 
				
			|||
                            <div style="width:100%;"> | 
				
			|||
                                <div style="text-align:centre;" class="row"> | 
				
			|||
                                    <div class="col-2"> | 
				
			|||
                                        <strong>Journals:</strong> | 
				
			|||
                                        <t t-foreach="Filters['journals']" | 
				
			|||
                                           t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                    </div> | 
				
			|||
                                    <div class="col-2"> | 
				
			|||
                                        <strong>Analytic:</strong> | 
				
			|||
                                        <t t-foreach="Filters['analytics']" | 
				
			|||
                                           t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                    </div> | 
				
			|||
                                    <div class="col-2"> | 
				
			|||
                                        <strong>Analytic Tag:</strong> | 
				
			|||
                                        <t t-foreach="Filters['analytic_tags']" | 
				
			|||
                                           t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                    </div> | 
				
			|||
                                    <div class="col-2"> | 
				
			|||
                                        <strong>Accounts:</strong> | 
				
			|||
                                        <t t-foreach="Filters['accounts']" | 
				
			|||
                                           t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                    </div> | 
				
			|||
                                    <div class="col-2"> | 
				
			|||
                                        <strong>Account Tags:</strong> | 
				
			|||
                                        <t t-foreach="Filters['account_tags']" | 
				
			|||
                                           t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                    </div> | 
				
			|||
                                    <div class="col-2"> | 
				
			|||
                                        <strong>Entries:</strong> | 
				
			|||
                                        <!--                             <t t-foreach="Filters['journals']" t-as="ps"> --> | 
				
			|||
                                        <li> | 
				
			|||
                                            <t t-esc="Filters['entries']"/> | 
				
			|||
                                        </li> | 
				
			|||
                                        <!--                             </t> --> | 
				
			|||
                                    </div> | 
				
			|||
                                </div> | 
				
			|||
                            </div> | 
				
			|||
                            <br/> | 
				
			|||
                            <table> | 
				
			|||
                                <thead> | 
				
			|||
                                    <tr class="text-center"> | 
				
			|||
                                        <th style="text-align:left;">Date</th> | 
				
			|||
                                        <th style="text-align:left;">Journal | 
				
			|||
                                        </th> | 
				
			|||
                                        <th style="text-align:left;">Partner | 
				
			|||
                                        </th> | 
				
			|||
                                        <th style="text-align:left;">Move</th> | 
				
			|||
                                        <th style="text-align:left;">Reference | 
				
			|||
                                        </th> | 
				
			|||
                                        <th style="text-align:right;padding-bottom:10px;"> | 
				
			|||
                                            Debit | 
				
			|||
                                        </th> | 
				
			|||
                                        <th style="text-align:right">Credit</th> | 
				
			|||
                                        <th style="text-align:right">Balance | 
				
			|||
                                        </th> | 
				
			|||
                                    </tr> | 
				
			|||
                                </thead> | 
				
			|||
                                <t t-foreach="account_data" t-as="line"> | 
				
			|||
                                    <t t-if="account_data[line]['count']"> | 
				
			|||
                                        <tr> | 
				
			|||
                                            <td colspan="5"> | 
				
			|||
                                                <span style="color: white;" | 
				
			|||
                                                      t-esc="'..'"/> | 
				
			|||
                                                <span t-esc="account_data[line]['name']"/> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td class="text-right"> | 
				
			|||
                                                <span t-esc="account_data[line]['debit']" | 
				
			|||
                                                      t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td class="text-right"> | 
				
			|||
                                                <span t-esc="account_data[line]['credit']" | 
				
			|||
                                                      t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td class="text-right"> | 
				
			|||
                                                <span t-esc="account_data[line]['balance']" | 
				
			|||
                                                      t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                            </td> | 
				
			|||
                                        </tr> | 
				
			|||
                                        <t t-foreach="account_data[line]['lines']" | 
				
			|||
                                           t-as="sub_line"> | 
				
			|||
                                            <t t-if="sub_line['initial_bal']"> | 
				
			|||
                                                <tr> | 
				
			|||
                                                    <td colspan="5" | 
				
			|||
                                                        class="text-right"> | 
				
			|||
                                                        <span>Initial Balance | 
				
			|||
                                                        </span> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td class="text-right"> | 
				
			|||
                                                        <span t-esc="sub_line['debit']" | 
				
			|||
                                                              t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td class="text-right"> | 
				
			|||
                                                        <span t-esc="sub_line['credit']" | 
				
			|||
                                                              t-options="{'widgetaccount_data': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td class="text-right"> | 
				
			|||
                                                        <span t-esc="sub_line['balance']" | 
				
			|||
                                                              t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                </tr> | 
				
			|||
                                            </t> | 
				
			|||
                                            <t t-if="not sub_line['initial_bal'] and not sub_line['ending_bal']"> | 
				
			|||
                                                <tr> | 
				
			|||
                                                    <td> | 
				
			|||
                                                        <t t-esc="sub_line.get('ldate')" | 
				
			|||
                                                           t-options="{'widget': 'date'}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td> | 
				
			|||
                                                        <t t-esc="sub_line.get('lcode')"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td> | 
				
			|||
                                                        <t t-esc="sub_line.get('partner_name')"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td> | 
				
			|||
                                                        <t t-esc="sub_line.get('move_name')"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td style="width:30%;"> | 
				
			|||
                                                        <t t-esc="sub_line.get('lname')"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td class="text-right"> | 
				
			|||
                                                        <t t-esc="sub_line.get('debit')" | 
				
			|||
                                                           t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td class="text-right"> | 
				
			|||
                                                        <t t-esc="sub_line.get('credit')" | 
				
			|||
                                                           t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td class="text-right"> | 
				
			|||
                                                        <t t-esc="sub_line.get('balance')" | 
				
			|||
                                                           t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                </tr> | 
				
			|||
                                            </t> | 
				
			|||
                                        </t> | 
				
			|||
                                    </t> | 
				
			|||
                                </t> | 
				
			|||
                            </table> | 
				
			|||
                        </div> | 
				
			|||
                        <br/> | 
				
			|||
                    </div> | 
				
			|||
                </t> | 
				
			|||
            </t> | 
				
			|||
        </template> | 
				
			|||
 | 
				
			|||
        <report id="action_print_cash_book" | 
				
			|||
                model="dynamic.bank.book" | 
				
			|||
                report_type="qweb-pdf" | 
				
			|||
                menu="False" | 
				
			|||
                string="Cash Book" | 
				
			|||
                name="dynamic_financial_report.cash_book" | 
				
			|||
                file="dynamic_financial_report.cash_book" | 
				
			|||
        /> | 
				
			|||
 | 
				
			|||
    </odoo> | 
				
			|||
@ -1,254 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
    <template id="dynamic_financial_report.cash_flow"> | 
				
			|||
        <t t-call="web.html_container"> | 
				
			|||
            <t t-call="web.internal_layout"> | 
				
			|||
                <div style="font-size:12px" class="col-4"> | 
				
			|||
 | 
				
			|||
                    <b>Report Date :</b> | 
				
			|||
                   <span t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"/> | 
				
			|||
                    <span t-esc='today'/> | 
				
			|||
                    <br/> | 
				
			|||
                    <span  t-esc='logged_users'/> | 
				
			|||
                </div> | 
				
			|||
 | 
				
			|||
                <div class="page"> | 
				
			|||
                    <h4 style="padding-left:10px !important">Cash Flow statements</h4> | 
				
			|||
                    <div style="width:90%;margin:1px auto;font-size:12px" class="row mt32 mb32"> | 
				
			|||
 | 
				
			|||
                                <div class="col-4"> | 
				
			|||
                                <t t-if="report_data[0].get('target_moves')"> | 
				
			|||
                                    <p> | 
				
			|||
                                    <strong>Target Moves:</strong> | 
				
			|||
 | 
				
			|||
                                 <span t-esc="report_data[0]['target_moves']"/> | 
				
			|||
                                        <br/> | 
				
			|||
                                 <t t-if="report_data[1].get('levels')"> | 
				
			|||
                                        <strong>Level :</strong> | 
				
			|||
                                <span t-esc="report_data[1]['levels']"/> | 
				
			|||
                                 </t> | 
				
			|||
 | 
				
			|||
                            </p> | 
				
			|||
                                </t> | 
				
			|||
                        </div> | 
				
			|||
 | 
				
			|||
                        <div class="col-4"> | 
				
			|||
 | 
				
			|||
                            <p> | 
				
			|||
                                 <t t-if="report_data[0].get('date_from')"> | 
				
			|||
                                <strong>Date from :</strong> | 
				
			|||
                                <span t-esc="report_data[0].get('date_from')"/> | 
				
			|||
                                 </t> | 
				
			|||
                                <br/> | 
				
			|||
                                <t t-if="report_data[0].get('date_to')"> | 
				
			|||
                                <strong>Date to :</strong> | 
				
			|||
                                <span t-esc="report_data[0].get('date_to')"/> | 
				
			|||
                                </t> | 
				
			|||
                            </p> | 
				
			|||
 | 
				
			|||
                        </div> | 
				
			|||
 | 
				
			|||
                    </div> | 
				
			|||
                    <div> | 
				
			|||
 | 
				
			|||
                        <br></br> | 
				
			|||
                         <table style="width:90%;margin:2px auto;" class="table table-condensed"> | 
				
			|||
                        <thead> | 
				
			|||
                            <tr style="font-size:13px;  padding: 0.25rem !important;"> | 
				
			|||
                                <th>Name</th> | 
				
			|||
                                <th class="text-right">Cash In</th> | 
				
			|||
                                <th class="text-right">Cash Out</th> | 
				
			|||
                                <th class="text-right">Balance</th> | 
				
			|||
                            </tr> | 
				
			|||
                        </thead> | 
				
			|||
 | 
				
			|||
                        <tbody style="font-size:12px" t-foreach="account_data['fetched_data']" t-as="fetch"> | 
				
			|||
                            <tr t-if="account_data['levels' ] == 'summary'"> | 
				
			|||
                                <td> | 
				
			|||
                                    <span t-esc="fetch['month_part']"/> | 
				
			|||
 | 
				
			|||
                                </td> | 
				
			|||
                                <td class="text-right"> | 
				
			|||
                                    <span t-esc="fetch['total_debit']" | 
				
			|||
                                          t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                </td> | 
				
			|||
                                <td class="text-right"> | 
				
			|||
                                    <span t-esc="fetch['total_credit']" | 
				
			|||
                                          t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                </td> | 
				
			|||
                                <td class="text-right"> | 
				
			|||
                                    <span t-esc="fetch['total_balance']" | 
				
			|||
                                          t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                </td> | 
				
			|||
                            </tr> | 
				
			|||
 | 
				
			|||
                            <tr style="font-size:13px" t-if="account_data['levels' ] == 'consolidated'"> | 
				
			|||
                                <td> | 
				
			|||
                                    <span t-esc="fetch['name']"/> | 
				
			|||
                                </td> | 
				
			|||
                                <td class="text-right"> | 
				
			|||
                                    <span t-esc="fetch['total_debit']" | 
				
			|||
                                          t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                </td> | 
				
			|||
                                <td class="text-right"> | 
				
			|||
                                    <span t-esc="fetch['total_credit']" | 
				
			|||
                                          t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                </td> | 
				
			|||
                                <td class="text-right"> | 
				
			|||
                                    <span t-esc="fetch['total_balance']" | 
				
			|||
                                          t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                </td> | 
				
			|||
                            </tr> | 
				
			|||
                        </tbody> | 
				
			|||
 | 
				
			|||
                        <tbody style="font-size:12px" t-if="account_data['levels' ] == 'detailed' " t-foreach="account_data['journal_res']" t-as="res"> | 
				
			|||
                            <tr t-if="fet['name'] == res['account']" t-foreach="account_data['fetched_data']" t-as="fet"> | 
				
			|||
                                <td> | 
				
			|||
                                    <strong> | 
				
			|||
                                        <span t-esc="fet['code']"/> | 
				
			|||
                                        <span t-esc="fet['name']"/> | 
				
			|||
                                    </strong> | 
				
			|||
                                </td> | 
				
			|||
                                <td class="text-right"> | 
				
			|||
                                    <strong> | 
				
			|||
                                        <span t-esc="fet['total_debit']" | 
				
			|||
                                              t-options="{'widget': 'monetary', | 
				
			|||
                                                  'display_currency': res_company.currency_id}"/> | 
				
			|||
                                    </strong> | 
				
			|||
                                </td> | 
				
			|||
                                <td class="text-right"> | 
				
			|||
                                    <strong> | 
				
			|||
                                        <span t-esc="fet['total_credit']" | 
				
			|||
                                              t-options="{'widget': 'monetary', | 
				
			|||
                                                   'display_currency': res_company.currency_id}"/> | 
				
			|||
                                    </strong> | 
				
			|||
                                </td> | 
				
			|||
                                <td class="text-right"> | 
				
			|||
                                    <strong> | 
				
			|||
                                        <span t-esc="fet['total_debit'] - fet['total_credit']" | 
				
			|||
                                              t-options="{'widget': 'monetary', | 
				
			|||
                                                   'display_currency': res_company.currency_id}"/> | 
				
			|||
                                    </strong> | 
				
			|||
                                </td> | 
				
			|||
                                <tr t-foreach="res['journal_lines']" t-as="mov"> | 
				
			|||
                                    <td style="padding-left:50px !important" class="text-left"> | 
				
			|||
                                        <span t-esc="mov['name']"/> | 
				
			|||
                                    </td> | 
				
			|||
                                    <td class="text-right"> | 
				
			|||
                                        <span t-esc="mov['total_debit']" | 
				
			|||
                                              t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                    </td> | 
				
			|||
                                    <td class="text-right"> | 
				
			|||
                                        <span t-esc="mov['total_credit']" | 
				
			|||
                                              t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                    </td> | 
				
			|||
                                    <td class="text-right"> | 
				
			|||
                                        <span t-esc="mov['total_debit'] - mov['total_credit']" | 
				
			|||
                                              t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                    </td> | 
				
			|||
                                </tr> | 
				
			|||
                            </tr> | 
				
			|||
                        </tbody> | 
				
			|||
                        <tbody style="font-size:12px" t-if="account_data['levels' ] == 'very' or account_data['levels' ] ==false " t-foreach="account_data['account_res']" t-as="res"> | 
				
			|||
                            <tr t-if="fet['name'] == res['account']" t-foreach="account_data['fetched_data']" t-as="fet"> | 
				
			|||
                                <td> | 
				
			|||
                                    <strong> | 
				
			|||
                                        <span t-esc="fet['code']"/> | 
				
			|||
                                        <span t-esc="fet['name']"/> | 
				
			|||
                                    </strong> | 
				
			|||
                                </td> | 
				
			|||
                                <td class="text-right"> | 
				
			|||
                                    <strong> | 
				
			|||
                                        <span t-esc="fet['total_debit']" | 
				
			|||
                                              t-options="{'widget': 'monetary', | 
				
			|||
                                                  'display_currency': res_company.currency_id}"/> | 
				
			|||
                                    </strong> | 
				
			|||
                                </td> | 
				
			|||
                                <td class="text-right"> | 
				
			|||
                                    <strong> | 
				
			|||
                                        <span t-esc="fet['total_credit']" | 
				
			|||
                                              t-options="{'widget': 'monetary', | 
				
			|||
                                                   'display_currency': res_company.currency_id}"/> | 
				
			|||
                                    </strong> | 
				
			|||
                                </td> | 
				
			|||
                                <td class="text-right"> | 
				
			|||
                                    <strong> | 
				
			|||
                                        <span t-esc="fet['total_debit'] - fet['total_credit']" | 
				
			|||
                                              t-options="{'widget': 'monetary', | 
				
			|||
                                                   'display_currency': res_company.currency_id}"/> | 
				
			|||
                                    </strong> | 
				
			|||
                                </td> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                                <tr t-if="line['account_name'] == res['account']" | 
				
			|||
                                    t-foreach="res['journal_lines']" t-as="line"> | 
				
			|||
                                    <td style="padding-left:20px !important" class="text-left"> | 
				
			|||
                                        <span t-esc="line['name']"/> | 
				
			|||
                                    </td> | 
				
			|||
                                    <td class="text-right"> | 
				
			|||
                                        <span t-esc="line['total_debit']" | 
				
			|||
                                              t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                    </td> | 
				
			|||
                                    <td class="text-right"> | 
				
			|||
                                        <span t-esc="line['total_credit']" | 
				
			|||
                                              t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                    </td> | 
				
			|||
                                    <td class="text-right"> | 
				
			|||
                                        <span t-esc="line['total_debit'] - line['total_credit']" | 
				
			|||
                                              t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                    </td> | 
				
			|||
                                    <tr t-if="mov['name'] == line['name']" t-foreach="res['move_lines']" | 
				
			|||
                                        t-as="mov"> | 
				
			|||
                                        <td style="padding-left:50px !important" class="text-left"> | 
				
			|||
                                            <span t-esc="mov['move_name']"/> | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <span t-esc="mov['total_debit']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <span t-esc="mov['total_credit']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <span t-esc="mov['total_debit'] - mov['total_credit']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', | 
				
			|||
                                               'display_currency': res_company.currency_id}"/> | 
				
			|||
                                        </td> | 
				
			|||
                                    </tr> | 
				
			|||
                                </tr> | 
				
			|||
                            </tr> | 
				
			|||
 | 
				
			|||
                        </tbody> | 
				
			|||
 | 
				
			|||
                    </table> | 
				
			|||
                    </div> | 
				
			|||
                    <br></br> | 
				
			|||
                </div> | 
				
			|||
            </t> | 
				
			|||
        </t> | 
				
			|||
    </template> | 
				
			|||
 | 
				
			|||
    <report id="action_print_cash_flow" | 
				
			|||
            model="dynamic.cash.flow" | 
				
			|||
            report_type="qweb-pdf" | 
				
			|||
            menu="False" | 
				
			|||
            string="Cash Flow" | 
				
			|||
            name="dynamic_financial_report.cash_flow" | 
				
			|||
            file="dynamic_financial_report.cash_flow" | 
				
			|||
    > </report> | 
				
			|||
</odoo> | 
				
			|||
@ -1,169 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
    <template id="dynamic_financial_report.dynamic_day_book"> | 
				
			|||
       <t t-call="web.html_container"> | 
				
			|||
            <t t-call="web.internal_layout"> | 
				
			|||
                <div class="page"> | 
				
			|||
                    <div class="oe_structure"/> | 
				
			|||
                    <h3><span t-esc="res_company.name"/>: Day Book | 
				
			|||
                    </h3> | 
				
			|||
                    <br></br> | 
				
			|||
                    <div> | 
				
			|||
                        <div class="row mt32"> | 
				
			|||
                             <div class="col-3"> | 
				
			|||
                            <span t-if="Filters.get('date_from')"> | 
				
			|||
                                <strong>From:</strong> | 
				
			|||
                                <t t-esc="report_data[0]['date_from']"/> | 
				
			|||
                            </span> | 
				
			|||
                             </div> | 
				
			|||
                             <div class="col-3"> | 
				
			|||
                            <span t-if="Filters.get('date_to')"> | 
				
			|||
                                <strong>To:</strong> | 
				
			|||
                                <t t-esc="report_data[0]['date_to']"/> | 
				
			|||
                            </span> | 
				
			|||
                             </div> | 
				
			|||
                        </div> | 
				
			|||
                        <br></br> | 
				
			|||
                        <div class="row mb32"> | 
				
			|||
                            <div class="col-3"> | 
				
			|||
                                <strong>Journals: </strong> | 
				
			|||
                                <t t-foreach="report_data[0]['journals']" | 
				
			|||
                                   t-as="data"> | 
				
			|||
                                    <t t-esc="data"/> | 
				
			|||
 | 
				
			|||
                                </t> | 
				
			|||
                            </div> | 
				
			|||
                             <div class="col-3"> | 
				
			|||
                                <strong>Account: </strong> | 
				
			|||
                                <t t-foreach="report_data[0]['accounts']" | 
				
			|||
                                   t-as="data"> | 
				
			|||
                                    <t t-esc="data"/> | 
				
			|||
                                </t> | 
				
			|||
                            </div> | 
				
			|||
                         <div class="col-3"> | 
				
			|||
                            <strong>Target Moves:</strong> | 
				
			|||
                            <p t-esc="report_data[0]['entries']"/> | 
				
			|||
                        </div> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    </div> | 
				
			|||
 | 
				
			|||
                        <table  class="table table-sm table-reports"> | 
				
			|||
                            <thead> | 
				
			|||
                                <tr class="text-center"> | 
				
			|||
                                    <th style="text-align:left;" >Date</th> | 
				
			|||
                                    <th style="text-align:left;"  >JRNL</th> | 
				
			|||
                                    <th style="text-align:left;" >Partner</th> | 
				
			|||
 | 
				
			|||
                                    <th style="text-align:left;" >Move</th> | 
				
			|||
                                     <th style="text-align:left;" >Entry Label</th> | 
				
			|||
 | 
				
			|||
                                    <th style="text-align:right;" colspan="1">Debit</th> | 
				
			|||
                                    <th style="text-align:right;" colspan="2">Credit</th> | 
				
			|||
                                    <th style="text-align:right;" colspan="2">Balance</th> | 
				
			|||
                                </tr> | 
				
			|||
                            </thead> | 
				
			|||
                            <tbody> | 
				
			|||
                            <t t-foreach="account_data" t-as="line"> | 
				
			|||
                                <t t-if="account_data[line]['count']"> | 
				
			|||
 | 
				
			|||
                                    <tr style="border-bottom: 2px solid black;"> | 
				
			|||
 | 
				
			|||
                                        <td colspan="4"> | 
				
			|||
                                            <span style="color: white;" t-esc="'..'"/> | 
				
			|||
                                            <strong> | 
				
			|||
                                                <span t-esc="account_data[line]['date']"/> | 
				
			|||
 | 
				
			|||
                                            </strong> | 
				
			|||
 | 
				
			|||
                                        </td> | 
				
			|||
                                         <td class="text-right" colspan="2"> | 
				
			|||
                                            <strong> | 
				
			|||
                                                 <span t-esc="account_data[line]['debit']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
 | 
				
			|||
                                            </strong> | 
				
			|||
 | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right" colspan="2"> | 
				
			|||
                                            <strong> | 
				
			|||
                                                 <span t-esc="account_data[line]['credit']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
 | 
				
			|||
                                            </strong> | 
				
			|||
 | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right" colspan="2"> | 
				
			|||
                                            <strong> | 
				
			|||
                                                <span t-esc="account_data[line]['balance']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
 | 
				
			|||
                                            </strong> | 
				
			|||
 | 
				
			|||
                                        </td> | 
				
			|||
 | 
				
			|||
                                    </tr> | 
				
			|||
                                    <br></br> | 
				
			|||
<!--                                </t>--> | 
				
			|||
                                    <t t-foreach="lines[2]" t-as="sub_line"> | 
				
			|||
                                        <t t-if="sub_line['ldate'] == account_data[line]['date']"> | 
				
			|||
 | 
				
			|||
                                            <tr> | 
				
			|||
                                                <td style="text-align:left;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('ldate')"/> | 
				
			|||
                                                </td > | 
				
			|||
                                                <td  style="text-align:left;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('lcode')"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                 <td style="text-align:left;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('partner_name')"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                 <td style="text-align:left;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('move_name')"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                 <td colspan="1" style="text-align:left;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('lname')"/> | 
				
			|||
                                                </td> | 
				
			|||
<!-- | 
				
			|||
                                               ">–>--> | 
				
			|||
 | 
				
			|||
                                                <td colspan="1" style="text-align:right;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('debit')" | 
				
			|||
                                                    t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                 <td colspan="2" style="text-align:right;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('credit')" | 
				
			|||
                                                    t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td colspan="2" style="text-align:right;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('balance')" | 
				
			|||
                                                    t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                            </tr> | 
				
			|||
 | 
				
			|||
                                        </t> | 
				
			|||
                                    </t> | 
				
			|||
                                </t> | 
				
			|||
                            </t> | 
				
			|||
                            </tbody> | 
				
			|||
                        </table> | 
				
			|||
                    </div> | 
				
			|||
                    <br></br> | 
				
			|||
                </div> | 
				
			|||
            </t> | 
				
			|||
        </t> | 
				
			|||
    </template> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    <report id="action_print_day_book" | 
				
			|||
            model="dynamic.day.book" | 
				
			|||
            report_type="qweb-pdf" | 
				
			|||
            menu="False" | 
				
			|||
            string="Day Book" | 
				
			|||
            name="dynamic_financial_report.dynamic_day_book" | 
				
			|||
            file="dynamic_financial_report.dynamic_day_book" | 
				
			|||
    /> | 
				
			|||
 | 
				
			|||
</odoo> | 
				
			|||
@ -1,179 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
    <template id="dynamic_financial_report.balance_sheet"> | 
				
			|||
        <t t-call="web.html_container"> | 
				
			|||
            <t t-call="web.internal_layout"> | 
				
			|||
                <t t-set="data_report_margin_top" t-value="12"/> | 
				
			|||
                <t t-set="data_report_header_spacing" t-value="9"/> | 
				
			|||
                <t t-set="data_report_dpi" t-value="110"/> | 
				
			|||
                <div class="page"> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    <h3><span t-esc="res_company.name"/>: <span t-esc="report_name"/> | 
				
			|||
                    </h3> | 
				
			|||
 | 
				
			|||
                    <div> | 
				
			|||
 | 
				
			|||
                    <span t-if="Filters.get('date_from')"> | 
				
			|||
                    <strong> From:</strong> | 
				
			|||
                    <t t-esc="Filters['date_from']"/> | 
				
			|||
                    </span> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    <span t-if="Filters.get('date_to')"> | 
				
			|||
                    <strong>To:</strong> | 
				
			|||
                    <t t-esc="Filters['date_to']"/> | 
				
			|||
                    </span> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    <div style="width:100%;"> | 
				
			|||
                        <div style="text-align:centre;" class="row"> | 
				
			|||
 | 
				
			|||
                                <div class="col-2"> | 
				
			|||
                                    <strong>Journals:</strong> | 
				
			|||
                                    <t t-foreach="Filters['journals']" t-as="ps"> | 
				
			|||
                                        <li> | 
				
			|||
                                            <t t-esc="ps"/> | 
				
			|||
                                        </li> | 
				
			|||
                                    </t> | 
				
			|||
                                </div> | 
				
			|||
                                <div class="col-2"> | 
				
			|||
                                    <strong>Analytic:</strong> | 
				
			|||
                                    <t t-foreach="Filters['analytics']" t-as="ps"> | 
				
			|||
                                        <li> | 
				
			|||
                                            <t t-esc="ps"/> | 
				
			|||
                                        </li> | 
				
			|||
                                    </t> | 
				
			|||
                                </div> | 
				
			|||
 | 
				
			|||
                                 <div class="col-2"> | 
				
			|||
                                        <strong>Analytic Tag:</strong> | 
				
			|||
                                        <t t-foreach="Filters['analytic_tags']" t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                </div> | 
				
			|||
                                <div class="col-2"> | 
				
			|||
                                        <strong>Accounts:</strong> | 
				
			|||
                                        <t t-foreach="Filters['accounts']" t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                </div> | 
				
			|||
                                <div class="col-2"> | 
				
			|||
                                        <strong>Account Tags:</strong> | 
				
			|||
                                        <t t-foreach="Filters['account_tags']" t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                </div> | 
				
			|||
 | 
				
			|||
                                <div class="col-2"> | 
				
			|||
                                    <strong>Entries:</strong> | 
				
			|||
                                        <li> | 
				
			|||
                                            <t t-esc="Filters['entries']"/> | 
				
			|||
                                        </li> | 
				
			|||
                                </div> | 
				
			|||
                        </div> | 
				
			|||
                    </div> | 
				
			|||
                    </div> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                        <br></br> | 
				
			|||
 | 
				
			|||
                    <table class="table table-sm table-reports"> | 
				
			|||
                        <thead> | 
				
			|||
                            <tr> | 
				
			|||
 | 
				
			|||
                                <th></th> | 
				
			|||
                                <th class="text-right">Debit</th> | 
				
			|||
                                <th class="text-right">Credit</th> | 
				
			|||
                                <th class="text-right">Balance</th> | 
				
			|||
                            </tr> | 
				
			|||
                        </thead> | 
				
			|||
                        <tbody> | 
				
			|||
                            <tr t-foreach="report_lines" t-as="a"> | 
				
			|||
 | 
				
			|||
                                <t t-if="a['level'] != 0"> | 
				
			|||
                                    <t t-if="a.get('level') > 2"> | 
				
			|||
                                            <t t-set="style" t-value="'font-weight: normal;'"/> | 
				
			|||
                                        </t> | 
				
			|||
                                        <t t-if="not a.get('level') > 2"> | 
				
			|||
                                            <t t-set="style" t-value="'font-weight: bold;'"/> | 
				
			|||
                                    </t> | 
				
			|||
                                    <t t-if="a.get('code')"> | 
				
			|||
                                       <t t-foreach="account_data" t-as="line"> | 
				
			|||
                                            <t t-if="account_data[line]['count']"> | 
				
			|||
                                                <t t-if="account_data[line]['code'] == a.get('code')"> | 
				
			|||
 | 
				
			|||
                                                    <tr> | 
				
			|||
 | 
				
			|||
                                                        <td> | 
				
			|||
                                                            <span style="color: white;" t-esc="'..' * a.get('level', 0) * 3"/> | 
				
			|||
                                                            <span t-att-style="style" t-esc="account_data[line]['name']"/> | 
				
			|||
                                                        </td> | 
				
			|||
                                                        <td class="text-right"> | 
				
			|||
                                                            <span t-esc="account_data[line]['debit']" | 
				
			|||
                                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                        </td> | 
				
			|||
                                                        <td class="text-right"> | 
				
			|||
                                                            <span t-esc="account_data[line]['credit']" | 
				
			|||
                                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                        </td> | 
				
			|||
                                                        <td class="text-right"> | 
				
			|||
                                                            <span t-esc="account_data[line]['balance']" | 
				
			|||
                                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                        </td> | 
				
			|||
                                                    </tr> | 
				
			|||
                                                </t> | 
				
			|||
 | 
				
			|||
                                            </t> | 
				
			|||
                                        </t> | 
				
			|||
                                    </t> | 
				
			|||
 | 
				
			|||
                                    <t t-else=""> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                                        <td> | 
				
			|||
                                            <span style="color: white;" t-esc="'..' * a.get('level', 0) * 3"/> | 
				
			|||
                                            <span t-att-style="style" t-esc="a.get('name')"/> | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right" style="white-space: text-nowrap;"> | 
				
			|||
                                            <span t-att-style="style" t-esc="a.get('debit')" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right" style="white-space: text-nowrap;"> | 
				
			|||
                                            <span t-att-style="style" t-esc="a.get('credit')" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right" style="white-space: text-nowrap;"> | 
				
			|||
                                            <span t-att-style="style" t-esc="a.get('balance')" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> | 
				
			|||
                                        </td> | 
				
			|||
                                    </t> | 
				
			|||
 | 
				
			|||
                                </t> | 
				
			|||
                            </tr> | 
				
			|||
                        </tbody> | 
				
			|||
                    </table> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                </div> | 
				
			|||
            </t> | 
				
			|||
        </t> | 
				
			|||
    </template> | 
				
			|||
 | 
				
			|||
    <record id="action_print_balance_sheet" model="ir.actions.report"> | 
				
			|||
            <field name="name">Financial Report</field> | 
				
			|||
            <field name="model">dynamic.balance.sheet</field> | 
				
			|||
            <field name="report_type">qweb-pdf</field> | 
				
			|||
            <field name="report_name">dynamic_financial_report.balance_sheet</field> | 
				
			|||
            <field name="report_file">dynamic_financial_report.balance_sheet</field> | 
				
			|||
    </record> | 
				
			|||
 | 
				
			|||
</odoo> | 
				
			|||
@ -1,60 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
    <menuitem id="account_dynamic_report" sequence="15" | 
				
			|||
              name="Dynamic Reports" parent="account.menu_finance_reports"/> | 
				
			|||
 | 
				
			|||
    <record id="ins_general_ledger_wizard_view" model="ir.ui.view"> | 
				
			|||
        <field name="name">dynamic.general.ledger.view</field> | 
				
			|||
        <field name="model">dynamic.general.ledger</field> | 
				
			|||
        <field name="arch" type="xml"> | 
				
			|||
            <form> | 
				
			|||
                <group col="4"> | 
				
			|||
                    <field name="company_id" groups="base.group_multi_company"/> | 
				
			|||
                    <field name="date_from"/> | 
				
			|||
                    <field name="date_to"/> | 
				
			|||
                    <field name="include_details"/> | 
				
			|||
                </group> | 
				
			|||
 | 
				
			|||
                <group col="2"> | 
				
			|||
                    <field name="account_ids" widget="many2many_tags" | 
				
			|||
                           domain="[('company_id','=',company_id)]" | 
				
			|||
                           options="{'no_create_edit': True,'no_create': True, 'no_quick_create': True}"/> | 
				
			|||
                    <field name="account_tag_ids" widget="many2many_tags" | 
				
			|||
                           options="{'no_create_edit': True,'no_create': True, 'no_quick_create': True}"/> | 
				
			|||
                    <field name="journal_ids" widget="many2many_tags" | 
				
			|||
                           domain="[('company_id','=',company_id)]" | 
				
			|||
                           options="{'no_create_edit': True,'no_create': True, 'no_quick_create': True}"/> | 
				
			|||
                    <field name="analytic_ids" widget="many2many_tags" | 
				
			|||
                           domain="[('company_id','=',company_id)]" | 
				
			|||
                           options="{'no_create_edit': True,'no_create': True, 'no_quick_create': True}"/> | 
				
			|||
                    <field name="analytic_tag_ids" widget="many2many_tags" | 
				
			|||
                           domain="['|',('company_id','=',company_id),('company_id','=',False)]" | 
				
			|||
                           options="{'no_create_edit': True,'no_create': True, 'no_quick_create': True}"/> | 
				
			|||
                </group> | 
				
			|||
            </form> | 
				
			|||
        </field> | 
				
			|||
    </record> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    <record id="ins_trial_balance_wizard_view" model="ir.ui.view"> | 
				
			|||
        <field name="name">dynamic.trial.balance.view</field> | 
				
			|||
        <field name="model">dynamic.trial.balance</field> | 
				
			|||
        <field name="arch" type="xml"> | 
				
			|||
            <form> | 
				
			|||
                <group col="4"> | 
				
			|||
                    <field name="company_id" groups="base.group_multi_company"/> | 
				
			|||
                    <field name="date_from"/> | 
				
			|||
                    <field name="date_to"/> | 
				
			|||
                </group> | 
				
			|||
 | 
				
			|||
                <group col="2"> | 
				
			|||
                    <field name="analytic_ids" widget="many2many_tags" | 
				
			|||
                           domain="[('company_id','=',company_id)]" | 
				
			|||
                           options="{'no_create_edit': True,'no_create': True, 'no_quick_create': True}"/> | 
				
			|||
                </group> | 
				
			|||
            </form> | 
				
			|||
        </field> | 
				
			|||
    </record> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
</odoo> | 
				
			|||
@ -1,354 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
    <template id="dynamic_financial_report.general_ledger"> | 
				
			|||
        <t t-call="web.html_container"> | 
				
			|||
            <t t-call="web.internal_layout"> | 
				
			|||
                <div class="page"> | 
				
			|||
                    <div class="oe_structure"/> | 
				
			|||
                    <h3><span t-esc="res_company.name"/>: General ledger | 
				
			|||
                    </h3> | 
				
			|||
                    <div> | 
				
			|||
 | 
				
			|||
                    <span t-if="Filters.get('date_from')"> | 
				
			|||
                    <strong> From:</strong> | 
				
			|||
                    <t t-esc="Filters['date_from']"/> | 
				
			|||
                    </span> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    <span t-if="Filters.get('date_to')"> | 
				
			|||
                    <strong>To:</strong> | 
				
			|||
                    <t t-esc="Filters['date_to']"/> | 
				
			|||
                    </span> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    <div style="width:100%;"> | 
				
			|||
                        <div style="text-align:centre;" class="row"> | 
				
			|||
 | 
				
			|||
                                <div class="col-2"> | 
				
			|||
                                    <strong>Journals:</strong> | 
				
			|||
                                    <t t-foreach="Filters['journals']" t-as="ps"> | 
				
			|||
                                        <li> | 
				
			|||
                                            <t t-esc="ps"/> | 
				
			|||
                                        </li> | 
				
			|||
                                    </t> | 
				
			|||
                                </div> | 
				
			|||
                                <div class="col-2"> | 
				
			|||
                                    <strong>Analytic:</strong> | 
				
			|||
                                    <t t-foreach="Filters['analytics']" t-as="ps"> | 
				
			|||
                                        <li> | 
				
			|||
                                            <t t-esc="ps"/> | 
				
			|||
                                        </li> | 
				
			|||
                                    </t> | 
				
			|||
                                </div> | 
				
			|||
 | 
				
			|||
                                 <div class="col-2"> | 
				
			|||
                                        <strong>Analytic Tag:</strong> | 
				
			|||
                                        <t t-foreach="Filters['analytic_tags']" t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                </div> | 
				
			|||
                                <div class="col-2"> | 
				
			|||
                                        <strong>Accounts:</strong> | 
				
			|||
                                        <t t-foreach="Filters['accounts']" t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                </div> | 
				
			|||
                                <div class="col-2"> | 
				
			|||
                                        <strong>Account Tags:</strong> | 
				
			|||
                                        <t t-foreach="Filters['account_tags']" t-as="ps"> | 
				
			|||
                                            <li> | 
				
			|||
                                                <t t-esc="ps"/> | 
				
			|||
                                            </li> | 
				
			|||
                                        </t> | 
				
			|||
                                </div> | 
				
			|||
 | 
				
			|||
                                <div class="col-2"> | 
				
			|||
                                    <strong>Entries:</strong> | 
				
			|||
        <!--                            <t t-foreach="Filters['journals']" t-as="ps">--> | 
				
			|||
                                        <li> | 
				
			|||
                                            <t t-esc="Filters['entries']"/> | 
				
			|||
                                        </li> | 
				
			|||
        <!--                            </t>--> | 
				
			|||
                                </div> | 
				
			|||
                        </div> | 
				
			|||
                    </div> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                        <br></br> | 
				
			|||
                        <table> | 
				
			|||
                            <thead> | 
				
			|||
                                <tr class="text-center"> | 
				
			|||
                                    <th style="text-align:left;">Date</th> | 
				
			|||
                                    <th style="text-align:left;">Journal</th> | 
				
			|||
                                    <th style="text-align:left;">Partner</th> | 
				
			|||
                                    <th style="text-align:left;">Move</th> | 
				
			|||
                                    <th style="text-align:left;">Reference</th> | 
				
			|||
                                    <th style="text-align:right;padding-bottom:10px;">Debit</th> | 
				
			|||
                                    <th style="text-align:right">Credit</th> | 
				
			|||
                                    <th style="text-align:right">Balance</th> | 
				
			|||
                                </tr> | 
				
			|||
                            </thead> | 
				
			|||
                            <t t-foreach="account_data" t-as="line"> | 
				
			|||
                                <t t-if="account_data[line]['count']"> | 
				
			|||
 | 
				
			|||
                                    <tr> | 
				
			|||
 | 
				
			|||
                                        <td colspan="5"> | 
				
			|||
                                            <span style="color: white;" t-esc="'..'"/> | 
				
			|||
                                            <span t-esc="account_data[line]['name']"/> | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <span t-esc="account_data[line]['debit']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <span t-esc="account_data[line]['credit']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <span t-esc="account_data[line]['balance']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                        </td> | 
				
			|||
                                    </tr> | 
				
			|||
 | 
				
			|||
                                    <t t-foreach="account_data[line]['lines']" t-as="sub_line"> | 
				
			|||
                                        <t t-if="sub_line['initial_bal']"> | 
				
			|||
                                            <tr> | 
				
			|||
                                                <td colspan="5" class="text-right"> | 
				
			|||
                                                    <span>Initial Balance</span> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <span t-esc="sub_line['debit']" | 
				
			|||
                                                          t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <span t-esc="sub_line['credit']" | 
				
			|||
                                                          t-options="{'widgetaccount_data': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <span t-esc="sub_line['balance']" | 
				
			|||
                                                          t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                            </tr> | 
				
			|||
                                        </t> | 
				
			|||
                                        <t t-if="not sub_line['initial_bal'] and not sub_line['ending_bal']"> | 
				
			|||
                                            <tr> | 
				
			|||
                                                <td> | 
				
			|||
                                                    <t t-esc="sub_line.get('ldate')" t-options='{"widget": "date"}'/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td> | 
				
			|||
                                                    <t t-esc="sub_line.get('lcode')"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td> | 
				
			|||
                                                    <t t-esc="sub_line.get('partner_name')"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td> | 
				
			|||
                                                    <t t-esc="sub_line.get('move_name')"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td style="width:30%;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('lname')"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <t t-esc="sub_line.get('debit')" | 
				
			|||
                                                       t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <t t-esc="sub_line.get('credit')" | 
				
			|||
                                                       t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <t t-esc="sub_line.get('balance')" | 
				
			|||
                                                       t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                            </tr> | 
				
			|||
                                        </t> | 
				
			|||
                                        <t t-if="sub_line['ending_bal']"> | 
				
			|||
                                            <tr> | 
				
			|||
                                                <td colspan="5" class="text-right"> | 
				
			|||
                                                    <span>Ending Balance</span> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <span t-esc="sub_line['debit']" | 
				
			|||
                                                          t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <span t-esc="sub_line['credit']" | 
				
			|||
                                                          t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <span t-esc="sub_line['balance']" | 
				
			|||
                                                          t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                            </tr> | 
				
			|||
                                        </t> | 
				
			|||
                                    </t> | 
				
			|||
                                </t> | 
				
			|||
                            </t> | 
				
			|||
                        </table> | 
				
			|||
                    </div> | 
				
			|||
                    <br></br> | 
				
			|||
                </div> | 
				
			|||
            </t> | 
				
			|||
        </t> | 
				
			|||
    </template> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    <record id="action_print_general_ledger" model="ir.actions.report"> | 
				
			|||
        <field name="name">General Ledger</field> | 
				
			|||
        <field name="model">dynamic.general.ledger</field> | 
				
			|||
        <field name="report_type">qweb-pdf</field> | 
				
			|||
        <field name="report_name">dynamic_financial_report.general_ledger</field> | 
				
			|||
        <field name="report_file">dynamic_financial_report.general_ledger</field> | 
				
			|||
    </record> | 
				
			|||
 | 
				
			|||
    <template id="dynamic_financial_report.trial_balance"> | 
				
			|||
        <t t-call="web.html_container"> | 
				
			|||
            <t t-call="web.internal_layout"> | 
				
			|||
                <div class="page"> | 
				
			|||
                    <div class="oe_structure"/> | 
				
			|||
                    <h3 style="text-align:centre;left:50%;"><span t-esc="res_company.name"/>: Trial Balance | 
				
			|||
                    </h3> | 
				
			|||
 | 
				
			|||
                    <span t-if="Filters.get('date_from')"> | 
				
			|||
                    <strong> From:</strong> | 
				
			|||
                    <t t-esc="Filters['date_from']"/> | 
				
			|||
                    </span> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    <span t-if="Filters.get('date_to')"> | 
				
			|||
                    <strong>To:</strong> | 
				
			|||
                    <t t-esc="Filters['date_to']"/> | 
				
			|||
                    </span> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                    <div> | 
				
			|||
                        <div style="text-align:centre;left:50%;" class="row"> | 
				
			|||
 | 
				
			|||
                                <div class="col-3"> | 
				
			|||
                                    <strong>Journals:</strong> | 
				
			|||
                                    <t t-foreach="Filters['journals']" t-as="ps"> | 
				
			|||
                                        <li> | 
				
			|||
                                            <t t-esc="ps"/> | 
				
			|||
                                        </li> | 
				
			|||
                                    </t> | 
				
			|||
                                </div> | 
				
			|||
                                <div class="col-3"> | 
				
			|||
                                    <strong>Analytic:</strong> | 
				
			|||
                                    <t t-foreach="Filters['analytics']" t-as="ps"> | 
				
			|||
                                        <li> | 
				
			|||
                                            <t t-esc="ps"/> | 
				
			|||
                                        </li> | 
				
			|||
                                    </t> | 
				
			|||
                                </div> | 
				
			|||
                                <div class="col-3"> | 
				
			|||
                                    <strong>Entries:</strong> | 
				
			|||
        <!--                            <t t-foreach="Filters['journals']" t-as="ps">--> | 
				
			|||
                                        <li> | 
				
			|||
                                            <t t-esc="Filters['entries']"/> | 
				
			|||
                                        </li> | 
				
			|||
        <!--                            </t>--> | 
				
			|||
                                </div> | 
				
			|||
                        </div> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                        <br></br> | 
				
			|||
                        <table class="table table-sm table-reports"> | 
				
			|||
                            <thead> | 
				
			|||
                                <tr> | 
				
			|||
                                    <th style="text-align:left;">Code</th> | 
				
			|||
                                    <th colspan="5">Account</th> | 
				
			|||
                                    <t t-if="Filters.get('date_from')"> | 
				
			|||
                                        <th class="amt">Initial Debit</th> | 
				
			|||
                                        <th class="amt">Initial Credit</th> | 
				
			|||
 | 
				
			|||
                                    </t> | 
				
			|||
                                    <th class="text-right">Debit</th> | 
				
			|||
                                    <th class="text-right">Credit</th> | 
				
			|||
<!--                                    <th class="text-right">Balance</th>--> | 
				
			|||
                                </tr> | 
				
			|||
                            </thead> | 
				
			|||
                            <t t-foreach="account_data" t-as="line"> | 
				
			|||
                                <t t-if="account_data[line]['count']"> | 
				
			|||
 | 
				
			|||
                                    <tr> | 
				
			|||
 | 
				
			|||
                                        <td style="text-align:left;"> | 
				
			|||
                                            <span style="color: white;" t-esc="'..'"/> | 
				
			|||
                                            <span t-esc="account_data[line]['code']"/> | 
				
			|||
                                        </td> | 
				
			|||
                                        <td colspan="5"> | 
				
			|||
                                            <span style="color: white;" t-esc="'..'"/> | 
				
			|||
                                            <span t-esc="account_data[line]['name']"/> | 
				
			|||
                                        </td> | 
				
			|||
                                        <t t-if="Filters.get('date_from')"> | 
				
			|||
                                            <t t-foreach="account_data[line]['lines']" t-as="iline"> | 
				
			|||
                                                <t t-if="(iline['initial_bal'] == true and iline['move_name'] == 'Initial Balance')"> | 
				
			|||
                                                    <td class="amt"> | 
				
			|||
                                                        <t t-raw="iline['debit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                    </td> | 
				
			|||
                                                    <td class="amt"> | 
				
			|||
                                                        <t t-raw="iline['credit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                    </td> | 
				
			|||
 | 
				
			|||
                                                </t> | 
				
			|||
 | 
				
			|||
                                            </t> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                                        </t> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <span t-esc="account_data[line]['debit']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <span t-esc="account_data[line]['credit']" | 
				
			|||
                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                        </td> | 
				
			|||
<!--                                        <td class="text-right">--> | 
				
			|||
<!--                                            <span t-esc="account_data[line]['balance']"--> | 
				
			|||
<!--                                                  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>--> | 
				
			|||
<!--                                        </td>--> | 
				
			|||
                                    </tr> | 
				
			|||
                                </t> | 
				
			|||
                            </t> | 
				
			|||
                            <td colspan="6" style="border-bottom: 1px solid ;" class="amt"><strong>Total</strong></td> | 
				
			|||
                            <t t-if="Filters.get('date_from')"> | 
				
			|||
                                <td class="amt" style="border-bottom: 1px solid ;"><strong></strong></td> | 
				
			|||
                                <td class="amt" style="border-bottom: 1px solid ;"><strong></strong></td> | 
				
			|||
                            </t> | 
				
			|||
 | 
				
			|||
<!--						<t t-if="(credit > 0 || debit > 0 )">--> | 
				
			|||
							<td class="text-right" style="border-bottom: 1px solid ;"><strong><t t-esc="total['debit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></strong></td> | 
				
			|||
							<td class="text-right" style="border-bottom: 1px solid;"><strong><t t-esc="total['credit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></strong></td> | 
				
			|||
<!--						</t>--> | 
				
			|||
 | 
				
			|||
                        </table> | 
				
			|||
                    </div> | 
				
			|||
                    <br></br> | 
				
			|||
                </div> | 
				
			|||
            </t> | 
				
			|||
        </t> | 
				
			|||
    </template> | 
				
			|||
 | 
				
			|||
    <record id="action_print_trial_balance" model="ir.actions.report"> | 
				
			|||
            <field name="name">Trial Balance</field> | 
				
			|||
            <field name="model">dynamic.trial.balance</field> | 
				
			|||
            <field name="report_type">qweb-pdf</field> | 
				
			|||
            <field name="report_name">dynamic_financial_report.trial_balance</field> | 
				
			|||
            <field name="report_file">dynamic_financial_report.trial_balance</field> | 
				
			|||
    </record> | 
				
			|||
 | 
				
			|||
</odoo> | 
				
			|||
@ -1,70 +0,0 @@ | 
				
			|||
 | 
				
			|||
<odoo> | 
				
			|||
    <record id="action_dynamic_day_book" model="ir.actions.client"> | 
				
			|||
            <field name="name">Day Book</field> | 
				
			|||
            <field name="tag">dynamic.db</field> | 
				
			|||
        </record> | 
				
			|||
          <menuitem id="menu_day_book_report" sequence="60" action="action_dynamic_day_book" | 
				
			|||
              name="Day Book" parent="dynamic_financial_report.account_dynamic_report"/> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
     <record id="action_dynamic_cash_flow" model="ir.actions.client"> | 
				
			|||
            <field name="name">Cash Flow Statement Reports</field> | 
				
			|||
            <field name="tag">dynamic.cf</field> | 
				
			|||
 | 
				
			|||
        </record> | 
				
			|||
        <menuitem id="menu_cash_flow_report" sequence="60" action="action_dynamic_cash_flow" | 
				
			|||
              name="Cash Flow Satement" parent="dynamic_financial_report.account_dynamic_report"/> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    <record id="action_dynamic_bank_book" model="ir.actions.client"> | 
				
			|||
            <field name="name">Bank Book</field> | 
				
			|||
            <field name="tag">dynamic.bb</field> | 
				
			|||
        </record> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        <menuitem id="menu_bank_book_report" sequence="60" action="action_dynamic_bank_book" | 
				
			|||
                  name="Bank Book" parent="account_dynamic_report" groups="account.group_account_user"/> | 
				
			|||
 | 
				
			|||
            <record id="action_dynamic_cash_book" model="ir.actions.client"> | 
				
			|||
            <field name="name">Cash Book</field> | 
				
			|||
            <field name="tag">dynamic.cb</field> | 
				
			|||
        </record> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
        <menuitem id="menu_cash_book_report" sequence="60" action="action_dynamic_cash_book" | 
				
			|||
                  name="Cash Book" parent="account_dynamic_report" groups="account.group_account_user"/> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    <record id="base_accounting_kit.menu_Balance_report" model="ir.ui.menu"> | 
				
			|||
        <field name="active" eval="False"/> | 
				
			|||
    </record> | 
				
			|||
    <record id="base_accounting_kit.menu_general_ledger" model="ir.ui.menu"> | 
				
			|||
        <field name="active" eval="False"/> | 
				
			|||
    </record> | 
				
			|||
    <record id="base_accounting_kit.menu_aged_trial_balance" model="ir.ui.menu"> | 
				
			|||
        <field name="active" eval="False"/> | 
				
			|||
    </record> | 
				
			|||
    <record id="base_accounting_kit.menu_partner_ledger" model="ir.ui.menu"> | 
				
			|||
        <field name="active" eval="False"/> | 
				
			|||
    </record> | 
				
			|||
    <record id="base_accounting_kit._account_financial_reports_balance_sheet" model="ir.ui.menu"> | 
				
			|||
        <field name="active" eval="False"/> | 
				
			|||
    </record> | 
				
			|||
    <record id="base_accounting_kit.account_financial_reports_profit_loss" model="ir.ui.menu"> | 
				
			|||
        <field name="active" eval="False"/> | 
				
			|||
    </record> | 
				
			|||
        <record id="base_accounting_kit.account_reports_daily_reports" model="ir.ui.menu"> | 
				
			|||
        <field name="active" eval="False"/> | 
				
			|||
    </record> | 
				
			|||
    <record id="base_accounting_kit.menu_account_cash_flow_report" model="ir.ui.menu"> | 
				
			|||
        <field name="active" eval="False"/> | 
				
			|||
    </record> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
</odoo> | 
				
			|||
 | 
				
			|||
@ -1,24 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
    <data> | 
				
			|||
        <record id="action_dynamic_balance_sheet" model="ir.actions.client"> | 
				
			|||
            <field name="name">Balance Sheet Report</field> | 
				
			|||
            <field name="tag">dynamic.bs</field> | 
				
			|||
        </record> | 
				
			|||
 | 
				
			|||
        <record id="action_dynamic_profit_and_loss" model="ir.actions.client"> | 
				
			|||
            <field name="name">Profit and Loss Report</field> | 
				
			|||
            <field name="tag">dynamic.pal</field> | 
				
			|||
        </record> | 
				
			|||
 | 
				
			|||
        <menuitem id="account_dynamic_report" sequence="15" | 
				
			|||
              name="Dynamic Reports" parent="account.menu_finance_reports"/> | 
				
			|||
 | 
				
			|||
        <menuitem id="menu__balance_sheet_report" sequence="60" action="action_dynamic_balance_sheet" | 
				
			|||
                  name="Balance Sheet" parent="account_dynamic_report" groups="account.group_account_user"/> | 
				
			|||
 | 
				
			|||
        <menuitem id="menu_profit_and_loss_report" sequence="61" action="action_dynamic_profit_and_loss" | 
				
			|||
                name="Profit and Loss" parent="account_dynamic_report" groups="account.group_account_user"/> | 
				
			|||
 | 
				
			|||
    </data> | 
				
			|||
</odoo> | 
				
			|||
@ -1,203 +0,0 @@ | 
				
			|||
<?xml version="1.0" encoding="utf-8"?> | 
				
			|||
<odoo> | 
				
			|||
    <template id="partner_ledger"> | 
				
			|||
        <t t-call="web.html_container"> | 
				
			|||
            <t t-call="web.internal_layout"> | 
				
			|||
                <div class="page"> | 
				
			|||
                    <h3><span t-esc="res_company.name"/>: Partner Ledger</h3> | 
				
			|||
                    <br></br> | 
				
			|||
                        <div class="row mt32"> | 
				
			|||
                            <div class="col-2"> | 
				
			|||
                                <strong>Partners:</strong> | 
				
			|||
                                <t t-foreach="report_data[0]['partners']" | 
				
			|||
                                   t-as="data"> | 
				
			|||
                                    <t t-esc="data"/> | 
				
			|||
                                </t> | 
				
			|||
                            </div> | 
				
			|||
                            <div class="col-2"> | 
				
			|||
                                <strong>Journals:</strong> | 
				
			|||
                                <t t-foreach="report_data[0]['journals']" | 
				
			|||
                                   t-as="data"> | 
				
			|||
                                    <t t-esc="data"/> | 
				
			|||
                                </t> | 
				
			|||
                            </div> | 
				
			|||
                            <div class="col-2"> | 
				
			|||
                                <strong>Partners Tag:</strong> | 
				
			|||
                                <t t-foreach="report_data[0]['categories']" | 
				
			|||
                                   t-as="data"> | 
				
			|||
                                    <t t-esc="data"/> | 
				
			|||
                                </t> | 
				
			|||
                            </div> | 
				
			|||
                            <div class="col-2"> | 
				
			|||
                                <strong>Account Type :</strong> | 
				
			|||
                                <p t-esc="report_data[0]['type']"/> | 
				
			|||
                            </div> | 
				
			|||
                            <div class="col-2"> | 
				
			|||
                                <strong>Accounts:</strong> | 
				
			|||
                                <t t-foreach="report_data[0]['accounts']" | 
				
			|||
                                   t-as="data"> | 
				
			|||
                                    <t t-esc="data"/> | 
				
			|||
                                </t> | 
				
			|||
                            </div> | 
				
			|||
                            <div class="col-2"> | 
				
			|||
                                <strong>Target Moves:</strong> | 
				
			|||
                                <p t-esc="report_data[0]['target_moves']"/> | 
				
			|||
                            </div> | 
				
			|||
                        </div> | 
				
			|||
                    <div class="row mt32"> | 
				
			|||
                        <t t-if="report_data[0].get('date_from')"> | 
				
			|||
                                <div class="col-2"> | 
				
			|||
                                    <strong>From Date :</strong> | 
				
			|||
                                    <p t-esc="report_data[0]['date_from']"/> | 
				
			|||
                                </div> | 
				
			|||
                            </t> | 
				
			|||
                            <t t-if="report_data[0].get('date_to')"> | 
				
			|||
                                <div class="col-2"> | 
				
			|||
                                    <strong>To Date :</strong> | 
				
			|||
                                    <p t-esc="report_data[0]['date_to']"/> | 
				
			|||
                                </div> | 
				
			|||
                            </t> | 
				
			|||
                        <t t-if="report_data[0].get('reconciled')"> | 
				
			|||
                                <div class="col-2"> | 
				
			|||
                                    <strong>Reconciliation status :</strong> | 
				
			|||
                                    <p t-esc="report_data[0]['reconciled']"/> | 
				
			|||
                                </div> | 
				
			|||
                            </t> | 
				
			|||
                    </div> | 
				
			|||
10:27 | 
				
			|||
<t t-set="data_report_margin_top" t-value="0"/> | 
				
			|||
                        <table class="table table-sm table-reports" style="top:0px;"> | 
				
			|||
                            <thead> | 
				
			|||
                                <tr class="text-center"> | 
				
			|||
                                    <th style="text-align:left;">Date</th> | 
				
			|||
                                    <th style="text-align:left;">Journal</th> | 
				
			|||
                                    <th style="text-align:left;">Account</th> | 
				
			|||
                                    <th style="text-align:left;">Move</th> | 
				
			|||
                                    <th style="text-align:left;">Reference</th> | 
				
			|||
                                    <th style="text-align:right;">Debit</th> | 
				
			|||
                                    <th style="text-align:right;">Credit</th> | 
				
			|||
                                    <th style="text-align:right;">Balance</th> | 
				
			|||
                                </tr> | 
				
			|||
                            </thead> | 
				
			|||
                            <tbody> | 
				
			|||
                            <t t-foreach="account_data" t-as="line"> | 
				
			|||
                                <t t-if="account_data[line]['count']"> | 
				
			|||
                                    <tr style="border-bottom: 2px solid black;"> | 
				
			|||
                                        <td colspan="5"> | 
				
			|||
                                            <span style="color: white;" | 
				
			|||
                                                  t-esc="'..'"/> | 
				
			|||
                                            <strong> | 
				
			|||
                                                <span t-esc="account_data[line]['name']"/> | 
				
			|||
                                            </strong> | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <strong> | 
				
			|||
                                                <span t-esc="account_data[line]['debit']" | 
				
			|||
                                                      t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                            </strong> | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <strong> | 
				
			|||
                                                <span t-esc="account_data[line]['credit']" | 
				
			|||
                                                      t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                            </strong> | 
				
			|||
                                        </td> | 
				
			|||
                                        <td class="text-right"> | 
				
			|||
                                            <strong> | 
				
			|||
                                                <span t-esc="account_data[line]['balance']" | 
				
			|||
                                                      t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                            </strong> | 
				
			|||
                                        </td> | 
				
			|||
                                    </tr> | 
				
			|||
                                    <t t-foreach="account_data[line]['lines']" | 
				
			|||
                                       t-as="sub_line"> | 
				
			|||
                                        <t t-if="sub_line['initial_bal']"> | 
				
			|||
                                            <tr> | 
				
			|||
                                                <td colspan="5" | 
				
			|||
                                                    class="text-right"> | 
				
			|||
                                                    <span>Initial Balance</span> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <span t-esc="sub_line['debit']" | 
				
			|||
                                                          t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <span t-esc="sub_line['credit']" | 
				
			|||
                                                          t-options="{'widgetaccount_data': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <span t-esc="sub_line['balance']" | 
				
			|||
                                                          t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                            </tr> | 
				
			|||
                                        </t> | 
				
			|||
                                        <t t-if="not sub_line['initial_bal'] and not sub_line['ending_bal']"> | 
				
			|||
                                            <tr> | 
				
			|||
                                                <td> | 
				
			|||
                                                    <t t-esc="sub_line.get('ldate')" | 
				
			|||
                                                       t-options='{"widget": "date"}'/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td> | 
				
			|||
                                                    <t t-esc="sub_line.get('lcode')"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td> | 
				
			|||
                                                    <t t-esc="sub_line.get('account_code')"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td> | 
				
			|||
                                                    <t t-esc="sub_line.get('move_name')"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td style="width:30%;"> | 
				
			|||
                                                    <t t-esc="sub_line.get('lname')"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <t t-esc="sub_line.get('debit')" | 
				
			|||
                                                       t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <t t-esc="sub_line.get('credit')" | 
				
			|||
                                                       t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <t t-esc="sub_line.get('balance')" | 
				
			|||
                                                       t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                            </tr> | 
				
			|||
                                        </t> | 
				
			|||
                                        <t t-if="sub_line['ending_bal']"> | 
				
			|||
                                            <tr> | 
				
			|||
                                                <td colspan="5" | 
				
			|||
                                                    class="text-right"> | 
				
			|||
                                                    <span>Ending Balance</span> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <span t-esc="sub_line['debit']" | 
				
			|||
                                                          t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <span t-esc="sub_line['credit']" | 
				
			|||
                                                          t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                                <td class="text-right"> | 
				
			|||
                                                    <span t-esc="sub_line['balance']" | 
				
			|||
                                                          t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> | 
				
			|||
                                                </td> | 
				
			|||
                                            </tr> | 
				
			|||
                                        </t> | 
				
			|||
                                    </t> | 
				
			|||
                                </t> | 
				
			|||
                            </t> | 
				
			|||
                            </tbody> | 
				
			|||
                        </table> | 
				
			|||
                </div> | 
				
			|||
            </t> | 
				
			|||
        </t> | 
				
			|||
    </template> | 
				
			|||
    <report id="action_print_partner_ledger" | 
				
			|||
            model="dynamic.partner.ledger" | 
				
			|||
            report_type="qweb-pdf" | 
				
			|||
            menu="False" | 
				
			|||
            string="Partner Ledger" | 
				
			|||
            name="dynamic_financial_report.partner_ledger" | 
				
			|||
            file="dynamic_financial_report.partner_ledger" | 
				
			|||
    /> | 
				
			|||
</odoo> | 
				
			|||