This commit is contained in:
gsinghpal
2026-03-13 12:38:28 -04:00
parent db4b9aa278
commit fc3c966484
2975 changed files with 1614 additions and 498 deletions

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates>
<t t-name="fusion_accounting.PartnerLedgerReportFilterExtraOptions" t-inherit="fusion_accounting.AccountReportFilterExtraOptions">
<xpath expr="//DropdownItem[contains(@class, 'filter_show_all_hook')]" position="after">
<DropdownItem
class="{ 'selected': controller.options.hide_account }"
onSelected="() => this.filterClicked({ optionKey: 'hide_account', reload: true})"
closingMode="'none'"
>
Hide Account
</DropdownItem>
<DropdownItem
class="{ 'selected': controller.options.hide_debit_credit }"
onSelected="() => this.filterClicked({ optionKey: 'hide_debit_credit', reload: true})"
closingMode="'none'"
>
Hide Debit/Credit
</DropdownItem>
</xpath>
</t>
</templates>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates>
<t t-name="fusion_accounting.PartnerLedgerFilters" t-inherit="fusion_accounting.AccountReportFiltersCustomizable">
<xpath expr="//div[@id='filter_extra_options']" position="replace">
<t t-call="fusion_accounting.PartnerLedgerReportFilterExtraOptions"/>
</xpath>
</t>
</templates>

View File

@@ -0,0 +1,29 @@
// Fusion Accounting - Partner Ledger Line Cell
// Copyright (C) 2026 Nexa Systems Inc.
import { AccountReport } from "@fusion_accounting/components/account_report/account_report";
import { AccountReportLineCell } from "@fusion_accounting/components/account_report/line_cell/line_cell";
const { DateTime } = luxon;
/**
* PartnerLedgerLineCell - Extended line cell for the partner ledger report.
* Adds due date awareness and overdue highlighting logic.
*/
export class PartnerLedgerLineCell extends AccountReportLineCell {
static template = "fusion_accounting.PartnerLedgerLineCell";
get cellClasses() {
let superCellClasses = super.cellClasses;
const cell = this.props.cell;
if (
cell.figure_type === 'date'
&& cell.expression_label == 'date_maturity'
&& cell.no_format
&& DateTime.fromISO(cell.no_format) < DateTime.now()
) {
superCellClasses += ' text-danger';
}
return superCellClasses;
}
}
AccountReport.registerCustomComponent(PartnerLedgerLineCell);

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates>
<t t-name="fusion_accounting.PartnerLedgerLineCell" t-inherit="fusion_accounting.AccountReportLineCell"/>
</templates>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates>
<t t-name="fusion_accounting.PartnerLedgerLineName" t-inherit="fusion_accounting.AccountReportLineNameCustomizable">
<xpath expr="//td[@data-id='line_name']" position="attributes">
<t t-if="props.line.unfoldable">
<attribute name="class" add="more" separator=" "/>
</t>
</xpath>
<xpath expr="//t[@data-id='line_buttons']" position="inside">
<t t-if="props.line.unfoldable">
<button
class="btn btn_action"
t-on-click="(ev) => controller.reportAction(ev, 'action_open_partner', { id: props.line.id })"
>
Partner
</button>
<button
class="btn btn_action"
t-on-click="(ev) => controller.reportAction(ev, 'open_journal_items', {
line_id: props.line.id,
view_ref: 'account.view_move_line_tree_grouped_partner',
})"
>
Journal Items
</button>
</t>
</xpath>
<xpath expr="//button[@data-id='btn_foldable']" position="after">
<t t-if="props.line.trust === 'good'">
<i class="fa fa-circle text-success partner_trust" title="Partner is good"/>
</t>
<t t-elif="props.line.trust === 'bad'">
<i class="fa fa-circle text-danger partner_trust" title="Partner is bad"/>
</t>
</xpath>
</t>
</templates>

View File

@@ -0,0 +1,3 @@
.account_report.partner_ledger {
.partner_trust { line-height: 20px }
}