chore: Extract Expense Claim, FnF, Gratuity, Employee Advance related code from accounting

- Added hooks `advance_payment_doctypes`, `invoice_doctypes`, `period_closing_doctypes` for other apps to extend accounting functionality

- Removed `set_query` code from `journal_entry.js` and `payment_entry.js`

- removed `update_status_for_full_and_final_statement` trigger on JE submission/cancellation

- refactored `payment_entry.py`: split functions for validating reference doctypes for easy overriding, removed hrms references from `get_reference_details` and `get_payment_entry`

- removed dead code: functions `get_bill_no_and_update_amounts`, `get_total_amount_exchange_rate_base_on_currency`, `get_total_amount_exchange_rate_for_employee_advance`, `get_amounts_based_on_ref_doc`, `get_amounts_based_on_reference_doctype`
This commit is contained in:
Rucha Mahabal
2022-06-23 16:17:34 +05:30
parent f6fbcc99a3
commit 1ff0e4519f
6 changed files with 50 additions and 247 deletions

View File

@@ -472,6 +472,19 @@ payment_gateway_enabled = "erpnext.accounts.utils.create_payment_gateway_account
communication_doctypes = ["Customer", "Supplier"]
advance_payment_doctypes = ["Sales Order", "Purchase Order"]
invoice_doctypes = ["Sales Invoice", "Purchase Invoice"]
period_closing_doctypes = [
"Sales Invoice",
"Purchase Invoice",
"Journal Entry",
"Bank Clearance",
"Asset",
"Stock Entry",
]
accounting_dimension_doctypes = [
"GL Entry",
"Payment Ledger Entry",
@@ -479,12 +492,8 @@ accounting_dimension_doctypes = [
"Purchase Invoice",
"Payment Entry",
"Asset",
"Expense Claim",
"Expense Claim Detail",
"Expense Taxes and Charges",
"Stock Entry",
"Budget",
"Payroll Entry",
"Delivery Note",
"Sales Invoice Item",
"Purchase Invoice Item",