refactor: introduce select fields in company and payment entry

This commit is contained in:
ruthra kumar
2025-01-09 20:02:59 +05:30
parent 00dadc1a89
commit 8b2c981fc3
4 changed files with 29 additions and 2 deletions

View File

@@ -21,6 +21,7 @@
"party_name", "party_name",
"book_advance_payments_in_separate_party_account", "book_advance_payments_in_separate_party_account",
"reconcile_on_advance_payment_date", "reconcile_on_advance_payment_date",
"advance_reconciliation_takes_effect_on",
"column_break_11", "column_break_11",
"bank_account", "bank_account",
"party_bank_account", "party_bank_account",
@@ -783,6 +784,14 @@
"options": "No\nYes", "options": "No\nYes",
"print_hide": 1, "print_hide": 1,
"search_index": 1 "search_index": 1
},
{
"default": "Oldest Of Invoice Or Advance",
"fetch_from": "company.reconciliation_takes_effect_on",
"fieldname": "advance_reconciliation_takes_effect_on",
"fieldtype": "Select",
"label": "Advance Reconciliation Takes Effect On",
"options": "Advance Payment Date\nOldest Of Invoice Or Advance\nReconciliation Date"
} }
], ],
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
@@ -796,7 +805,7 @@
"table_fieldname": "payment_entries" "table_fieldname": "payment_entries"
} }
], ],
"modified": "2024-11-07 11:19:19.320883", "modified": "2025-01-09 20:02:33.402163",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Payment Entry", "name": "Payment Entry",

View File

@@ -71,12 +71,16 @@ class PaymentEntry(AccountsController):
PaymentEntryReference, PaymentEntryReference,
) )
advance_reconciliation_takes_effect_on: DF.Literal[
"Advance Payment Date", "Oldest Of Invoice Or Advance", "Reconciliation Date"
]
amended_from: DF.Link | None amended_from: DF.Link | None
apply_tax_withholding_amount: DF.Check apply_tax_withholding_amount: DF.Check
auto_repeat: DF.Link | None auto_repeat: DF.Link | None
bank: DF.ReadOnly | None bank: DF.ReadOnly | None
bank_account: DF.Link | None bank_account: DF.Link | None
bank_account_no: DF.ReadOnly | None bank_account_no: DF.ReadOnly | None
base_in_words: DF.SmallText | None
base_paid_amount: DF.Currency base_paid_amount: DF.Currency
base_paid_amount_after_tax: DF.Currency base_paid_amount_after_tax: DF.Currency
base_received_amount: DF.Currency base_received_amount: DF.Currency
@@ -92,6 +96,8 @@ class PaymentEntry(AccountsController):
custom_remarks: DF.Check custom_remarks: DF.Check
deductions: DF.Table[PaymentEntryDeduction] deductions: DF.Table[PaymentEntryDeduction]
difference_amount: DF.Currency difference_amount: DF.Currency
in_words: DF.SmallText | None
is_opening: DF.Literal["No", "Yes"]
letter_head: DF.Link | None letter_head: DF.Link | None
mode_of_payment: DF.Link | None mode_of_payment: DF.Link | None
naming_series: DF.Literal["ACC-PAY-.YYYY.-"] naming_series: DF.Literal["ACC-PAY-.YYYY.-"]
@@ -119,6 +125,7 @@ class PaymentEntry(AccountsController):
purchase_taxes_and_charges_template: DF.Link | None purchase_taxes_and_charges_template: DF.Link | None
received_amount: DF.Currency received_amount: DF.Currency
received_amount_after_tax: DF.Currency received_amount_after_tax: DF.Currency
reconcile_on_advance_payment_date: DF.Check
reference_date: DF.Date | None reference_date: DF.Date | None
reference_no: DF.Data | None reference_no: DF.Data | None
references: DF.Table[PaymentEntryReference] references: DF.Table[PaymentEntryReference]

View File

@@ -75,6 +75,7 @@
"advance_payments_section", "advance_payments_section",
"book_advance_payments_in_separate_party_account", "book_advance_payments_in_separate_party_account",
"reconcile_on_advance_payment_date", "reconcile_on_advance_payment_date",
"reconciliation_takes_effect_on",
"column_break_fwcf", "column_break_fwcf",
"default_advance_received_account", "default_advance_received_account",
"default_advance_paid_account", "default_advance_paid_account",
@@ -825,6 +826,13 @@
{ {
"fieldname": "column_break_dcdl", "fieldname": "column_break_dcdl",
"fieldtype": "Column Break" "fieldtype": "Column Break"
},
{
"default": "Oldest Of Invoice Or Advance",
"fieldname": "reconciliation_takes_effect_on",
"fieldtype": "Select",
"label": "Reconciliation Takes Effect On",
"options": "Advance Payment Date\nOldest Of Invoice Or Advance\nReconciliation Date"
} }
], ],
"icon": "fa fa-building", "icon": "fa fa-building",
@@ -832,7 +840,7 @@
"image_field": "company_logo", "image_field": "company_logo",
"is_tree": 1, "is_tree": 1,
"links": [], "links": [],
"modified": "2024-12-02 15:37:32.723176", "modified": "2025-01-09 20:01:14.818688",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Setup", "module": "Setup",
"name": "Company", "name": "Company",

View File

@@ -87,6 +87,9 @@ class Company(NestedSet):
payment_terms: DF.Link | None payment_terms: DF.Link | None
phone_no: DF.Data | None phone_no: DF.Data | None
reconcile_on_advance_payment_date: DF.Check reconcile_on_advance_payment_date: DF.Check
reconciliation_takes_effect_on: DF.Literal[
"Advance Payment Date", "Oldest Of Invoice Or Advance", "Reconciliation Date"
]
registration_details: DF.Code | None registration_details: DF.Code | None
rgt: DF.Int rgt: DF.Int
round_off_account: DF.Link | None round_off_account: DF.Link | None