feat: new banking module (#54720)

* feat: initial SPA setup for banking

* wip: bring over new banking module

* feat: added Espresso design tokens

* feat: button styles

* fix: add all ink colors

* wip: espresso design system changes

* feat: button and badge espresso components

* fix: button styling for reconcile

* feat: Espresso progress bar

* feat: Espresso toggle switch

* feat: Espresso tabs design

* fix: vertical tab support

* fix: button sizing across modals

* feat: Espresso style table layout

* feat: Espresso tooltip

* feat: Espresso elevations and checkbox

* feat: Dialog with Espresso styles

* feat: Espresso textarea

* fix: input styles

* fix: colors on bank picker

* fix: breadcrumb styling

* fix: bank picker styling

* feat: create doctypes and fields for bank reconciliation

* feat: APIs for banking

* fix: use date format parser

* fix: font styling to match Espresso

* wip: settings modal

* feat: settings dialog component

* fix: icons and invalid requests

* feat: preferences tab

* fix: adjust icon stroke width to 1.5

* feat: rule configuration in settings

* fix: remove sheet component

* feat: alert and error banner component

* feat: dropdown in Espresso

* feat: popover and select in Espresso

* fix: cleanup more styles

* fix: match size of link fields

* feat: command styling

* fix: remove unused style tokens

* fix: styles for global date picker dropdown

* fix: styles for match and reconcile

* feat: table Espresso component

* feat: remove all other design tokens

* fix: remove unused tokens

* fix: form elements

* fix: remove unused styles and fix filters in bank transaction list

* feat: fetch bank rec doctypes for filtering

* fix: record payment modal

* feat: support for dark mode switching

* fix: move bank logos to public folder

* feat: add support for RTL

* feat: support for RTL

* chore: send layout direction in dev boot

* fix: make checkbox work in RTL

* feat: dark mode support

* fix: dark mode style

* feat: bank logos in dark mode

* feat: dark mode bank logos

* chore: use dark mode bank logos everywhere

* chore: move rule evaluation to controller

* chore: add tests for bank transaction rules

* fix: move deps to fix actions errors

* fix: move tw-animate-css to deps

* fix: remove shadcn

* fix: do not open modal if no transactions selected

* fix: add translation strings

* feat: add banner on existing bank reconciliation tool

* feat: bank statement import

* fix: translations and layout directions

* fix: validation for transaction matching rule

* fix: styles

* fix: show conflicting transactions in alert

* fix: show help text for new banking module forms

* feat: show total debits and credits

* fix: dark mode colors in automatic config

* feat: add keyboard shortcuts help

* feat: added keyboard shortcut for settings

* fix: decrease size of progress bar

* chore: bump packages

* feat: add tests for statement import

* fix: settings dialog

* fix: show banner on small screens

* fix: show banner when no bank account set
This commit is contained in:
Nikhil Kothari
2026-05-09 23:14:58 +05:30
committed by GitHub
parent 332026fe5e
commit 6de5367f12
262 changed files with 39467 additions and 14 deletions

View File

@@ -0,0 +1,134 @@
export interface AccountsSettings {
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx: number
/** Enable Audit Trail : Check - In accordance with <a href="https://egazette.gov.in/WriteReadData/2021/226081.pdf" target="_blank" rel="noopener noreferrer"> MCA Notification dated 24-03-2021</a>, enabling this feature will ensure that each change made to the books of account gets recorded. Once enabled, this feature cannot be disabled. */
enable_audit_trail?: 0 | 1
/** Unlink Payment on Cancellation of Invoice : Check */
unlink_payment_on_cancellation_of_invoice?: 0 | 1
/** Unlink Advance Payment on Cancellation of Order : Check */
unlink_advance_payment_on_cancelation_of_order?: 0 | 1
/** Delete Accounting and Stock Ledger Entries on deletion of Transaction : Check */
delete_linked_ledger_entries?: 0 | 1
/** Enable Immutable Ledger : Check - On enabling this cancellation entries will be posted on the actual cancellation date and reports will consider cancelled entries as well */
enable_immutable_ledger?: 0 | 1
/** Check Supplier Invoice Number Uniqueness : Check - Enabling this ensures each Purchase Invoice has a unique value in Supplier Invoice No. field within a particular fiscal year */
check_supplier_invoice_uniqueness?: 0 | 1
/** Automatically Fetch Payment Terms from Order/Quotation : Check - Payment Terms from orders will be fetched into the invoices as is */
automatically_fetch_payment_terms?: 0 | 1
/** Enable Subscription : Check - Enable Subscription tracking in invoice */
enable_subscription?: 0 | 1
/** Enable Common Party Accounting : Check - Learn about <a href="https://docs.frappe.io/erpnext/user/manual/en/common_party_accounting" rel="noopener noreferrer">Common Party</a> */
enable_common_party_accounting?: 0 | 1
/** Allow multi-currency invoices against single party account : Check - Enabling this will allow creation of multi-currency invoices against single party account in company currency */
allow_multi_currency_invoices_against_single_party_account?: 0 | 1
/** Confirm before resetting posting date : Check - If enabled, user will be alerted before resetting posting date to current date in relevant transactions */
confirm_before_resetting_posting_date?: 0 | 1
/** Enable Accounting Dimensions : Check - Enable cost center, projects and other custom accounting dimensions */
enable_accounting_dimensions?: 0 | 1
/** Enable Discounts and Margin : Check - Apply discounts and margins on products */
enable_discounts_and_margin?: 0 | 1
/** Merge Similar Account Heads : Check - Rows with Same Account heads will be merged on Ledger */
merge_similar_account_heads?: 0 | 1
/** Book Deferred Entries Based On : Select - If "Months" is selected, a fixed amount will be booked as deferred revenue or expense for each month irrespective of the number of days in a month. It will be prorated if deferred revenue or expense is not booked for an entire month */
book_deferred_entries_based_on?: "Days" | "Months"
/** Automatically Process Deferred Accounting Entry : Check */
automatically_process_deferred_accounting_entry?: 0 | 1
/** Book Deferred Entries Via Journal Entry : Check - If this is unchecked, direct GL entries will be created to book deferred revenue or expense */
book_deferred_entries_via_journal_entry?: 0 | 1
/** Submit Journal Entries : Check - If this is unchecked Journal Entries will be saved in a Draft state and will have to be submitted manually */
submit_journal_entries?: 0 | 1
/** Determine Address Tax Category From : Select - Address used to determine Tax Category in transactions */
determine_address_tax_category_from?: "Billing Address" | "Shipping Address"
/** Automatically Add Taxes and Charges from Item Tax Template : Check - Overridden by India Compliance */
add_taxes_from_item_tax_template?: 0 | 1
/** Automatically Add Taxes from Taxes and Charges Template : Check - If no taxes are set, and Taxes and Charges Template is selected, the system will automatically apply the taxes from the chosen template. */
add_taxes_from_taxes_and_charges_template?: 0 | 1
/** Book Tax Loss on Early Payment Discount : Check - Split Early Payment Discount Loss into Income and Tax Loss */
book_tax_discount_loss?: 0 | 1
/** Round Tax Amount Row-wise : Check - Tax Amount will be rounded on a row(items) level */
round_row_wise_tax?: 0 | 1
/** Show Inclusive Tax in Print : Check */
show_inclusive_tax_in_print?: 0 | 1
/** Show Taxes as Table in Print : Check */
show_taxes_as_table_in_print?: 0 | 1
/** Show Payment Schedule in Print : Check */
show_payment_schedule_in_print?: 0 | 1
/** Maintain Same Rate Throughout Internal Transaction : Check */
maintain_same_internal_transaction_rate?: 0 | 1
/** Fetch Valuation Rate for Internal Transaction : Check */
fetch_valuation_rate_for_internal_transaction?: 0 | 1
/** Action if Same Rate is Not Maintained Throughout Internal Transaction : Select */
maintain_same_rate_action?: "Stop" | "Warn"
/** Role Allowed to Override Stop Action : Link - Role */
role_to_override_stop_action?: string
/** Allow Stale Exchange Rates : Check */
allow_stale?: 0 | 1
/** Allow Implicit Pegged Currency Conversion : Check - System will do an implicit conversion using the pegged currency. <br>
Ex: Instead of AED -&gt; INR, system will do AED -&gt; USD -&gt; INR using the pegged exchange rate of AED against USD. */
allow_pegged_currencies_exchange_rates?: 0 | 1
/** Stale Days : Int */
stale_days?: number
/** Auto Reconcile Payments : Check */
auto_reconcile_payments?: 0 | 1
/** Auto Reconciliation Job Trigger : Int - Interval should be between 1 to 59 MInutes */
auto_reconciliation_job_trigger?: number
/** Reconciliation Queue Size : Int - Documents Processed on each trigger. Queue Size should be between 5 and 100 */
reconciliation_queue_size?: number
/** Posting Date Inheritance for Exchange Gain / Loss : Select - Only applies for Normal Payments */
exchange_gain_loss_posting_date?: "Invoice" | "Payment" | "Reconciliation Date"
/** Enable Loyalty Point Program : Check */
enable_loyalty_point_program?: 0 | 1
/** Fetch Payment Schedule In Payment Request : Check */
fetch_payment_schedule_in_payment_request?: 0 | 1
/** Over Billing Allowance (%) : Currency - The percentage you are allowed to bill more against the amount ordered. For example, if the order value is $100 for an item and tolerance is set as 10%, then you are allowed to bill up to $110 */
over_billing_allowance?: number
/** Role Allowed to Over Bill : Link - Role - Users with this role are allowed to over bill above the allowance percentage */
role_allowed_to_over_bill?: string
/** Role allowed to bypass Credit Limit : Link - Role */
credit_controller?: string
/** Make Payment via Journal Entry : Check */
make_payment_via_journal_entry?: 0 | 1
/** Calculate daily depreciation using total days in depreciation period : Check - Enable this option to calculate daily depreciation by considering the total number of days in the entire depreciation period, (including leap years) while using daily pro-rata based depreciation */
calculate_depr_using_total_days?: 0 | 1
/** Book Asset Depreciation Entry Automatically : Check */
book_asset_depreciation_entry_automatically?: 0 | 1
/** Role to Notify on Depreciation Failure : Link - Role - Users with this role will be notified if the asset depreciation gets failed */
role_to_notify_on_depreciation_failure?: string
/** Ignore Account Closing Balance : Check - Financial reports will be generated using GL Entry doctypes (should be enabled if Period Closing Voucher is not posted for all years sequentially or missing) */
ignore_account_closing_balance?: 0 | 1
/** Use Legacy Controller For Period Closing Voucher : Check */
use_legacy_controller_for_pcv?: 0 | 1
/** General Ledger : Int - Truncates 'Remarks' column to set character length */
general_ledger_remarks_length?: number
/** Accounts Receivable/Payable : Int - Truncates 'Remarks' column to set character length */
receivable_payable_remarks_length?: number
/** Data Fetch Method : Select */
receivable_payable_fetch_method?: "Buffered Cursor" | "UnBuffered Cursor" | "Raw SQL"
/** Default Ageing Range : Data */
default_ageing_range?: string
/** Ignore Is Opening check for reporting : Check - Ignores legacy Is Opening field in GL Entry that allows adding opening balance post the system is in use while generating reports */
ignore_is_opening_check_for_reporting?: 0 | 1
/** Show Balances in Chart Of Accounts : Check */
show_balance_in_coa?: 0 | 1
/** Enable Automatic Party Matching : Check - Auto match and set the Party in Bank Transactions */
enable_party_matching?: 0 | 1
/** Enable Fuzzy Matching : Check - Approximately match the description/party name against parties */
enable_fuzzy_matching?: 0 | 1
/** Match transfers within 'N' days : Int - Number of days to consider for matching transfers across bank accounts */
transfer_match_days?: number
/** Automatically run rules on unreconciled transactions : Check - If enabled, rule matching algorithm will run every hour */
automatically_run_rules_on_unreconciled_transactions?: 0 | 1
/** Create in Draft Status : Check - Payment Requests made from Sales / Purchase Invoice will be put in Draft explicitly */
create_pr_in_draft_status?: 0 | 1
/** Use Legacy Budget Controller : Check */
use_legacy_budget_controller?: 0 | 1
}

View File

@@ -0,0 +1,41 @@
export interface AdvanceTaxesandCharges{
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Add Or Deduct : Select */
add_deduct_tax: "Add" | "Deduct"
/** Type : Select */
charge_type: "" | "Actual" | "On Paid Amount" | "On Previous Row Amount" | "On Previous Row Total"
/** Reference Row # : Data */
row_id?: string
/** Account Head : Link - Account */
account_head: string
/** Description : Small Text */
description: string
/** Considered In Paid Amount : Check */
included_in_paid_amount?: 0 | 1
/** Cost Center : Link - Cost Center */
cost_center?: string
/** Tax Rate : Float */
rate?: number
/** Account Currency : Link - Currency */
currency?: string
/** Amount : Currency */
tax_amount?: number
/** Total : Currency */
total?: number
/** Allocated Amount : Currency */
allocated_amount?: number
/** Amount (Company Currency) : Currency */
base_tax_amount?: number
/** Total (Company Currency) : Currency */
base_total?: number
}

View File

@@ -0,0 +1,49 @@
export interface BankAccount{
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Account Name : Data */
account_name: string
/** Company Account : Link - Account */
account?: string
/** Bank : Link - Bank */
bank: string
/** Account Type : Link - Bank Account Type */
account_type?: string
/** Account Subtype : Link - Bank Account Subtype */
account_subtype?: string
/** Disabled : Check */
disabled?: 0 | 1
/** Is Default Account : Check */
is_default?: 0 | 1
/** Is Company Account : Check - Setting the account as a Company Account is necessary for Bank Reconciliation */
is_company_account?: 0 | 1
/** Company : Link - Company */
company?: string
/** Party Type : Link - DocType */
party_type?: string
/** Party : Dynamic Link */
party?: string
/** IBAN : Data */
iban?: string
/** Branch Code : Data */
branch_code?: string
/** Bank Account No : Data */
bank_account_no?: string
/** Is Credit Card : Check */
is_credit_card?: 0 | 1
/** Integration ID : Data */
integration_id?: string
/** Last Integration Date : Date - Change this date manually to setup the next synchronization start date */
last_integration_date?: string
/** Mask : Data */
mask?: string
}

View File

@@ -0,0 +1,19 @@
export interface BankAccountBalance{
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Bank Account : Link - Bank Account */
bank_account: string
/** Date : Date */
date: string
/** Balance : Currency */
balance: number
}

View File

@@ -0,0 +1,50 @@
import { BankStatementImportLogColumnMap } from './BankStatementImportLogColumnMap'
export interface BankStatementImportLog{
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Bank Account : Link - Bank Account */
bank_account: string
/** File : Attach */
file: string
/** Status : Select */
status?: "Not Started" | "Completed"
/** Currency : Link - Currency */
currency?: string
/** Number of Transactions : Int */
number_of_transactions?: number
/** Start Date : Date */
start_date?: string
/** End Date : Date */
end_date?: string
/** Closing Balance : Currency */
closing_balance?: number
/** Total Debits : Currency */
total_debits?: number
/** Total Credits : Currency */
total_credits?: number
/** Total Debit Transactions : Int */
total_debit_transactions?: number
/** Total Credit Transactions : Int */
total_credit_transactions?: number
/** Detected Date Format : Data */
detected_date_format?: string
/** Detected Amount Format : Select */
detected_amount_format?: "Separate columns for withdrawal and deposit" | "Amount column has "CR"/"DR" values" | "Amount column has positive/negative values" | "Transaction type column has "CR"/"DR" values" | "Transaction type column has "Deposit"/"Withdrawal" values" | "Transaction type column has "C"/"D" values"
/** Detected Header Index : Int */
detected_header_index?: number
/** Detected Transaction Starting Index : Int */
detected_transaction_starting_index?: number
/** Detected Transaction Ending Index : Int */
detected_transaction_ending_index?: number
/** Column Mapping : Table - Bank Statement Import Log Column Map */
column_mapping?: BankStatementImportLogColumnMap[]
}

View File

@@ -0,0 +1,21 @@
export interface BankStatementImportLogColumnMap{
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Header Text : Data */
header_text: string
/** Index : Int */
index: number
/** Maps To : Select */
maps_to: "Do not import" | "Date" | "Withdrawal" | "Deposit" | "Amount" | "Description" | "Reference" | "Transaction Type" | "Debit/Credit" | "Balance" | "Included Fee" | "Excluded Fee" | "Party Name/Account Holder" | "Party Account No." | "Party IBAN"
/** Variable : Data */
variable?: string
}

View File

@@ -0,0 +1,64 @@
import { BankTransactionPayments } from './BankTransactionPayments'
export interface BankTransaction{
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Series : Select */
naming_series: "ACC-BTN-.YYYY.-"
/** Date : Date */
date?: string
/** Is Rule Evaluated : Check */
is_rule_evaluated?: 0 | 1
/** Matched Transaction Rule : Link - Bank Transaction Rule */
matched_transaction_rule?: string
/** Status : Select */
status?: "" | "Pending" | "Settled" | "Unreconciled" | "Reconciled" | "Cancelled"
/** Bank Account : Link - Bank Account */
bank_account?: string
/** Company : Link - Company */
company?: string
/** Amended From : Link - Bank Transaction */
amended_from?: string
/** Deposit : Currency */
deposit?: number
/** Withdrawal : Currency */
withdrawal?: number
/** Currency : Link - Currency */
currency?: string
/** Description : Small Text */
description?: string
/** Reference Number : Small Text */
reference_number?: string
/** Transaction ID : Data */
transaction_id?: string
/** Transaction Type : Data */
transaction_type?: string
/** Payment Entries : Table - Bank Transaction Payments */
payment_entries?: BankTransactionPayments[]
/** Allocated Amount : Currency */
allocated_amount?: number
/** Unallocated Amount : Currency */
unallocated_amount?: number
/** Party Type : Link - DocType */
party_type?: string
/** Party : Dynamic Link */
party?: string
/** Party Name/Account Holder (Bank Statement) : Data */
bank_party_name?: string
/** Party Account No. (Bank Statement) : Data */
bank_party_account_number?: string
/** Party IBAN (Bank Statement) : Data */
bank_party_iban?: string
/** Included Fee : Currency */
included_fee?: number
/** Excluded Fee : Currency - On save, the Excluded Fee will be converted to an Included Fee. */
excluded_fee?: number
}

View File

@@ -0,0 +1,23 @@
export interface BankTransactionPayments {
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Payment Document : Link - DocType */
payment_document: string
/** Payment Entry : Dynamic Link */
payment_entry: string
/** Allocated Amount : Currency */
allocated_amount: number
/** Clearance Date : Date */
clearance_date?: string
/** Reconciliation Type : Select */
reconciliation_type?: 'Matched' | 'Voucher Created'
}

View File

@@ -0,0 +1,43 @@
import { BankTransactionRuleDescriptionConditions } from './BankTransactionRuleDescriptionConditions'
import { BankTransactionRuleAccounts } from './BankTransactionRuleAccounts'
export interface BankTransactionRule{
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Rule Name : Data */
rule_name: string
/** Transaction Type : Select */
transaction_type: "Any" | "Withdrawal" | "Deposit"
/** Priority : Int */
priority: number
/** Min Amount : Currency */
min_amount?: number
/** Max Amount : Currency */
max_amount?: number
/** Rule Description : Small Text */
rule_description?: string
/** Company : Link - Company */
company: string
/** Description Rules : Table - Bank Transaction Rule Description Conditions */
description_rules: BankTransactionRuleDescriptionConditions[]
/** Classify As : Select */
classify_as: "Bank Entry" | "Payment Entry" | "Transfer"
/** Account : Link - Account */
account?: string
/** Bank Entry Type : Select */
bank_entry_type?: "Single Account" | "Multiple Accounts"
/** Party Type : Link - DocType */
party_type?: string
/** Party : Dynamic Link */
party?: string
/** Accounts : Table - Bank Transaction Rule Accounts */
accounts?: BankTransactionRuleAccounts[]
}

View File

@@ -0,0 +1,25 @@
export interface BankTransactionRuleAccounts{
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Account : Link - Account */
account: string
/** Party Type : Link - Party Type */
party_type?: string
/** Party : Dynamic Link */
party?: string
/** Debit : Data */
debit?: string
/** Credit : Data */
credit?: string
/** User Remark : Small Text */
user_remark?: string
}

View File

@@ -0,0 +1,17 @@
export interface BankTransactionRuleDescriptionConditions{
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Check : Select */
check: "Contains" | "Starts With" | "Ends With" | "Regex"
/** Value : Small Text */
value: string
}

View File

@@ -0,0 +1,96 @@
import { JournalEntryAccount } from './JournalEntryAccount'
export interface JournalEntry{
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Is System Generated : Check */
is_system_generated?: 0 | 1
/** Title : Data */
title?: string
/** Entry Type : Select */
voucher_type: "Journal Entry" | "Inter Company Journal Entry" | "Bank Entry" | "Cash Entry" | "Credit Card Entry" | "Debit Note" | "Credit Note" | "Contra Entry" | "Excise Entry" | "Write Off Entry" | "Opening Entry" | "Depreciation Entry" | "Exchange Rate Revaluation" | "Exchange Gain Or Loss" | "Deferred Revenue" | "Deferred Expense"
/** Series : Select */
naming_series: "ACC-JV-.YYYY.-"
/** Finance Book : Link - Finance Book */
finance_book?: string
/** Process Deferred Accounting : Link - Process Deferred Accounting */
process_deferred_accounting?: string
/** Reversal Of : Link - Journal Entry */
reversal_of?: string
/** Tax Withholding Category : Link - Tax Withholding Category */
tax_withholding_category?: string
/** From Template : Link - Journal Entry Template */
from_template?: string
/** Company : Link - Company */
company: string
/** Posting Date : Date */
posting_date: string
/** Apply Tax Withholding Amount : Check */
apply_tds?: 0 | 1
/** Accounting Entries : Table - Journal Entry Account */
accounts: JournalEntryAccount[]
/** Reference Number : Data */
cheque_no?: string
/** Reference Date : Date */
cheque_date?: string
/** User Remark : Small Text */
user_remark?: string
/** Total Debit : Currency */
total_debit?: number
/** Total Credit : Currency */
total_credit?: number
/** Difference (Dr - Cr) : Currency */
difference?: number
/** Multi Currency : Check */
multi_currency?: 0 | 1
/** Total Amount Currency : Link - Currency */
total_amount_currency?: string
/** Total Amount : Currency */
total_amount?: number
/** Total Amount in Words : Data */
total_amount_in_words?: string
/** Clearance Date : Date */
clearance_date?: string
/** Remark : Small Text */
remark?: string
/** Paid Loan : Data */
paid_loan?: string
/** Inter Company Journal Entry Reference : Link - Journal Entry */
inter_company_journal_entry_reference?: string
/** Bill No : Data */
bill_no?: string
/** Bill Date : Date */
bill_date?: string
/** Due Date : Date */
due_date?: string
/** Write Off Based On : Select */
write_off_based_on?: "Accounts Receivable" | "Accounts Payable"
/** Write Off Amount : Currency */
write_off_amount?: number
/** Pay To / Recd From : Data */
pay_to_recd_from?: string
/** Letter Head : Link - Letter Head */
letter_head?: string
/** Print Heading : Link - Print Heading */
select_print_heading?: string
/** Mode of Payment : Link - Mode of Payment */
mode_of_payment?: string
/** Payment Order : Link - Payment Order */
payment_order?: string
/** Is Opening : Select */
is_opening?: "No" | "Yes"
/** Stock Entry : Link - Stock Entry */
stock_entry?: string
/** Auto Repeat : Link - Auto Repeat */
auto_repeat?: string
/** Amended From : Link - Journal Entry */
amended_from?: string
}

View File

@@ -0,0 +1,53 @@
export interface JournalEntryAccount{
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Account : Link - Account */
account: string
/** Account Type : Data */
account_type?: string
/** Bank Account : Link - Bank Account */
bank_account?: string
/** Party Type : Link - DocType */
party_type?: string
/** Party : Dynamic Link */
party?: string
/** Cost Center : Link - Cost Center - If Income or Expense */
cost_center?: string
/** Project : Link - Project */
project?: string
/** Account Currency : Link - Currency */
account_currency?: string
/** Exchange Rate : Float */
exchange_rate?: number
/** Debit : Currency */
debit_in_account_currency?: number
/** Debit in Company Currency : Currency */
debit?: number
/** Credit : Currency */
credit_in_account_currency?: number
/** Credit in Company Currency : Currency */
credit?: number
/** Reference Type : Select */
reference_type?: "" | "Sales Invoice" | "Purchase Invoice" | "Journal Entry" | "Sales Order" | "Purchase Order" | "Expense Claim" | "Asset" | "Loan" | "Payroll Entry" | "Employee Advance" | "Exchange Rate Revaluation" | "Invoice Discounting" | "Fees" | "Full and Final Statement" | "Payment Entry"
/** Reference Name : Dynamic Link */
reference_name?: string
/** Reference Due Date : Date */
reference_due_date?: string
/** Reference Detail No : Data */
reference_detail_no?: string
/** Is Advance : Select */
is_advance?: "No" | "Yes"
/** User Remark : Small Text */
user_remark?: string
/** Against Account : Text */
against_account?: string
}

View File

@@ -0,0 +1,148 @@
import { PaymentEntryReference } from './PaymentEntryReference'
import { AdvanceTaxesandCharges } from './AdvanceTaxesandCharges'
import { PaymentEntryDeduction } from './PaymentEntryDeduction'
export interface PaymentEntry{
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Series : Select */
naming_series: "ACC-PAY-.YYYY.-"
/** Payment Type : Select */
payment_type: "Receive" | "Pay" | "Internal Transfer"
/** Payment Order Status : Select */
payment_order_status?: "Initiated" | "Payment Ordered"
/** Posting Date : Date */
posting_date: string
/** Company : Link - Company */
company: string
/** Mode of Payment : Link - Mode of Payment */
mode_of_payment?: string
/** Party Type : Link - DocType */
party_type?: string
/** Party : Dynamic Link */
party?: string
/** Party Name : Data */
party_name?: string
/** Book Advance Payments in Separate Party Account : Check */
book_advance_payments_in_separate_party_account?: 0 | 1
/** Reconcile on Advance Payment Date : Check */
reconcile_on_advance_payment_date?: 0 | 1
/** Company Bank Account : Link - Bank Account */
bank_account?: string
/** Party Bank Account : Link - Bank Account */
party_bank_account?: string
/** Contact : Link - Contact */
contact_person?: string
/** Email : Data */
contact_email?: string
/** Party Balance : Currency */
party_balance?: number
/** Account Paid From : Link - Account */
paid_from: string
/** Paid From Account Type : Data */
paid_from_account_type?: string
/** Account Currency (From) : Link - Currency */
paid_from_account_currency: string
/** Account Balance (From) : Currency */
paid_from_account_balance?: number
/** Account Paid To : Link - Account */
paid_to: string
/** Paid To Account Type : Data */
paid_to_account_type?: string
/** Account Currency (To) : Link - Currency */
paid_to_account_currency: string
/** Account Balance (To) : Currency */
paid_to_account_balance?: number
/** Paid Amount : Currency */
paid_amount: number
/** Paid Amount After Tax : Currency */
paid_amount_after_tax?: number
/** Source Exchange Rate : Float */
source_exchange_rate: number
/** Paid Amount (Company Currency) : Currency */
base_paid_amount: number
/** Paid Amount After Tax (Company Currency) : Currency */
base_paid_amount_after_tax?: number
/** Received Amount : Currency */
received_amount: number
/** Received Amount After Tax : Currency */
received_amount_after_tax?: number
/** Target Exchange Rate : Float */
target_exchange_rate: number
/** Received Amount (Company Currency) : Currency */
base_received_amount: number
/** Received Amount After Tax (Company Currency) : Currency */
base_received_amount_after_tax?: number
/** Payment References : Table - Payment Entry Reference */
references?: PaymentEntryReference[]
/** Total Allocated Amount : Currency */
total_allocated_amount?: number
/** Total Allocated Amount (Company Currency) : Currency */
base_total_allocated_amount?: number
/** Unallocated Amount : Currency */
unallocated_amount?: number
/** Difference Amount (Company Currency) : Currency */
difference_amount?: number
/** Purchase Taxes and Charges Template : Link - Purchase Taxes and Charges Template */
purchase_taxes_and_charges_template?: string
/** Sales Taxes and Charges Template : Link - Sales Taxes and Charges Template */
sales_taxes_and_charges_template?: string
/** Apply Tax Withholding Amount : Check */
apply_tax_withholding_amount?: 0 | 1
/** Tax Withholding Category : Link - Tax Withholding Category */
tax_withholding_category?: string
/** Advance Taxes and Charges : Table - Advance Taxes and Charges */
taxes?: AdvanceTaxesandCharges[]
/** Total Taxes and Charges (Company Currency) : Currency */
base_total_taxes_and_charges?: number
/** Total Taxes and Charges : Currency */
total_taxes_and_charges?: number
/** Payment Deductions or Loss : Table - Payment Entry Deduction */
deductions?: PaymentEntryDeduction[]
/** Cheque/Reference No : Data */
reference_no?: string
/** Cheque/Reference Date : Date */
reference_date?: string
/** Clearance Date : Date */
clearance_date?: string
/** Project : Link - Project */
project?: string
/** Cost Center : Link - Cost Center */
cost_center?: string
/** Status : Select */
status?: "" | "Draft" | "Submitted" | "Cancelled"
/** Custom Remarks : Check */
custom_remarks?: 0 | 1
/** Remarks : Small Text */
remarks?: string
/** In Words (Company Currency) : Small Text */
base_in_words?: string
/** Is Opening : Select */
is_opening?: "No" | "Yes"
/** Letter Head : Link - Letter Head */
letter_head?: string
/** Print Heading : Link - Print Heading */
print_heading?: string
/** Bank : Read Only */
bank?: string
/** Bank Account No : Read Only */
bank_account_no?: string
/** Payment Order : Link - Payment Order */
payment_order?: string
/** In Words : Small Text */
in_words?: string
/** Auto Repeat : Link - Auto Repeat */
auto_repeat?: string
/** Amended From : Link - Payment Entry */
amended_from?: string
/** Title : Data */
title?: string
}

View File

@@ -0,0 +1,23 @@
export interface PaymentEntryDeduction{
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Account : Link - Account */
account: string
/** Cost Center : Link - Cost Center */
cost_center: string
/** Amount (Company Currency) : Currency */
amount: number
/** Is Exchange Gain / Loss? : Check */
is_exchange_gain_loss?: 0 | 1
/** Description : Small Text */
description?: string
}

View File

@@ -0,0 +1,47 @@
export interface PaymentEntryReference{
name: string
creation: string
modified: string
owner: string
modified_by: string
docstatus: 0 | 1 | 2
parent?: string
parentfield?: string
parenttype?: string
idx?: number
/** Type : Link - DocType */
reference_doctype: string
/** Name : Dynamic Link */
reference_name: string
/** Due Date : Date */
due_date?: string
/** Supplier Invoice No : Data */
bill_no?: string
/** Payment Term : Link - Payment Term */
payment_term?: string
/** Payment Term Outstanding : Float */
payment_term_outstanding?: number
/** Account Type : Data */
account_type?: string
/** Payment Type : Data */
payment_type?: string
/** Reconcile Effect On : Date */
reconcile_effect_on?: string
/** Grand Total : Float */
total_amount?: number
/** Outstanding : Float */
outstanding_amount?: number
/** Allocated : Float */
allocated_amount?: number
/** Exchange Rate : Float */
exchange_rate?: number
/** Exchange Gain/Loss : Currency */
exchange_gain_loss?: number
/** Account : Link - Account */
account?: string
/** Payment Request : Link - Payment Request */
payment_request?: string
/** Payment Request Outstanding : Float */
payment_request_outstanding?: number
}

View File

@@ -0,0 +1,20 @@
export type Summary = {
value: number,
indicator?: "Red" | "Green" | "Blue",
label: string,
datatype: "Int" | "Float" | "Currency" | "Percent"
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export interface QueryReportReturnType<T = any> {
prepared_report: boolean,
report_summary: Summary[],
result: T[],
columns: unknown[],
add_total_row: boolean,
doc?: {
queued_at: string,
report_end_time: string,
}
}