Skip to content

Commit

Permalink
refactor: convert check to select on payment entry
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Jan 9, 2025
1 parent 53f7cc9 commit 7aed903
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
25 changes: 13 additions & 12 deletions erpnext/accounts/doctype/payment_entry/payment_entry.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"party",
"party_name",
"book_advance_payments_in_separate_party_account",
"reconcile_on_advance_payment_date",
"advance_payment_reconciliation_takes_effect_on",
"column_break_11",
"bank_account",
"party_bank_account",
Expand Down Expand Up @@ -764,16 +764,6 @@
"print_hide": 1,
"read_only": 1
},
{
"default": "0",
"fetch_from": "company.reconcile_on_advance_payment_date",
"fieldname": "reconcile_on_advance_payment_date",
"fieldtype": "Check",
"hidden": 1,
"label": "Reconcile on Advance Payment Date",
"no_copy": 1,
"read_only": 1
},
{
"default": "No",
"depends_on": "eval: doc.book_advance_payments_in_separate_party_account == 1",
Expand All @@ -783,6 +773,17 @@
"options": "No\nYes",
"print_hide": 1,
"search_index": 1
},
{
"default": "Oldest Of Invoice Or Advance",
"fetch_from": "company.reconciliation_takes_effect_on",
"fieldname": "advance_payment_reconciliation_takes_effect_on",
"fieldtype": "Select",
"hidden": 1,
"label": "Advance Payment Reconciliation Takes Effect On",
"no_copy": 1,
"options": "Advance Payment Date\nOldest Of Invoice Or Advance\nReconciliation Date",
"read_only": 1
}
],
"index_web_pages_for_search": 1,
Expand All @@ -796,7 +797,7 @@
"table_fieldname": "payment_entries"
}
],
"modified": "2024-11-07 11:19:19.320883",
"modified": "2025-01-09 14:09:54.692953",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",
Expand Down
6 changes: 6 additions & 0 deletions erpnext/accounts/doctype/payment_entry/payment_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,16 @@ class PaymentEntry(AccountsController):
PaymentEntryReference,
)

advance_payment_reconciliation_takes_effect_on: DF.Literal[
"Advance Payment Date", "Oldest Of Invoice Or Advance", "Reconciliation Date"
]
amended_from: DF.Link | None
apply_tax_withholding_amount: DF.Check
auto_repeat: DF.Link | None
bank: DF.ReadOnly | None
bank_account: DF.Link | None
bank_account_no: DF.ReadOnly | None
base_in_words: DF.SmallText | None
base_paid_amount: DF.Currency
base_paid_amount_after_tax: DF.Currency
base_received_amount: DF.Currency
Expand All @@ -92,6 +96,8 @@ class PaymentEntry(AccountsController):
custom_remarks: DF.Check
deductions: DF.Table[PaymentEntryDeduction]
difference_amount: DF.Currency
in_words: DF.SmallText | None
is_opening: DF.Literal["No", "Yes"]
letter_head: DF.Link | None
mode_of_payment: DF.Link | None
naming_series: DF.Literal["ACC-PAY-.YYYY.-"]
Expand Down

0 comments on commit 7aed903

Please sign in to comment.