-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix-salary-slip-bg-job
- Loading branch information
Showing
95 changed files
with
2,800 additions
and
1,683 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
erpnext/accounts/doctype/payment_ledger_entry/payment_ledger_entry.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors | ||
// For license information, please see license.txt | ||
|
||
frappe.ui.form.on('Payment Ledger Entry', { | ||
// refresh: function(frm) { | ||
|
||
// } | ||
}); |
180 changes: 180 additions & 0 deletions
180
erpnext/accounts/doctype/payment_ledger_entry/payment_ledger_entry.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"autoname": "format:PLE-{YY}-{MM}-{######}", | ||
"creation": "2022-05-09 19:35:03.334361", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"posting_date", | ||
"company", | ||
"account_type", | ||
"account", | ||
"party_type", | ||
"party", | ||
"due_date", | ||
"cost_center", | ||
"finance_book", | ||
"voucher_type", | ||
"voucher_no", | ||
"against_voucher_type", | ||
"against_voucher_no", | ||
"amount", | ||
"account_currency", | ||
"amount_in_account_currency", | ||
"delinked" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "posting_date", | ||
"fieldtype": "Date", | ||
"label": "Posting Date" | ||
}, | ||
{ | ||
"fieldname": "account_type", | ||
"fieldtype": "Select", | ||
"label": "Account Type", | ||
"options": "Receivable\nPayable" | ||
}, | ||
{ | ||
"fieldname": "account", | ||
"fieldtype": "Link", | ||
"label": "Account", | ||
"options": "Account" | ||
}, | ||
{ | ||
"fieldname": "party_type", | ||
"fieldtype": "Link", | ||
"label": "Party Type", | ||
"options": "DocType" | ||
}, | ||
{ | ||
"fieldname": "party", | ||
"fieldtype": "Dynamic Link", | ||
"label": "Party", | ||
"options": "party_type" | ||
}, | ||
{ | ||
"fieldname": "voucher_type", | ||
"fieldtype": "Link", | ||
"in_standard_filter": 1, | ||
"label": "Voucher Type", | ||
"options": "DocType" | ||
}, | ||
{ | ||
"fieldname": "voucher_no", | ||
"fieldtype": "Dynamic Link", | ||
"in_list_view": 1, | ||
"in_standard_filter": 1, | ||
"label": "Voucher No", | ||
"options": "voucher_type" | ||
}, | ||
{ | ||
"fieldname": "against_voucher_type", | ||
"fieldtype": "Link", | ||
"in_standard_filter": 1, | ||
"label": "Against Voucher Type", | ||
"options": "DocType" | ||
}, | ||
{ | ||
"fieldname": "against_voucher_no", | ||
"fieldtype": "Dynamic Link", | ||
"in_list_view": 1, | ||
"in_standard_filter": 1, | ||
"label": "Against Voucher No", | ||
"options": "against_voucher_type" | ||
}, | ||
{ | ||
"fieldname": "amount", | ||
"fieldtype": "Currency", | ||
"in_list_view": 1, | ||
"label": "Amount", | ||
"options": "Company:company:default_currency" | ||
}, | ||
{ | ||
"fieldname": "account_currency", | ||
"fieldtype": "Link", | ||
"label": "Currency", | ||
"options": "Currency" | ||
}, | ||
{ | ||
"fieldname": "amount_in_account_currency", | ||
"fieldtype": "Currency", | ||
"label": "Amount in Account Currency", | ||
"options": "account_currency" | ||
}, | ||
{ | ||
"default": "0", | ||
"fieldname": "delinked", | ||
"fieldtype": "Check", | ||
"in_list_view": 1, | ||
"label": "DeLinked" | ||
}, | ||
{ | ||
"fieldname": "company", | ||
"fieldtype": "Link", | ||
"label": "Company", | ||
"options": "Company" | ||
}, | ||
{ | ||
"fieldname": "cost_center", | ||
"fieldtype": "Link", | ||
"label": "Cost Center", | ||
"options": "Cost Center" | ||
}, | ||
{ | ||
"fieldname": "due_date", | ||
"fieldtype": "Date", | ||
"label": "Due Date" | ||
}, | ||
{ | ||
"fieldname": "finance_book", | ||
"fieldtype": "Link", | ||
"label": "Finance Book", | ||
"options": "Finance Book" | ||
} | ||
], | ||
"in_create": 1, | ||
"index_web_pages_for_search": 1, | ||
"links": [], | ||
"modified": "2022-05-19 18:04:44.609115", | ||
"modified_by": "Administrator", | ||
"module": "Accounts", | ||
"name": "Payment Ledger Entry", | ||
"naming_rule": "Expression", | ||
"owner": "Administrator", | ||
"permissions": [ | ||
{ | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "Accounts User", | ||
"share": 1 | ||
}, | ||
{ | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "Accounts Manager", | ||
"share": 1 | ||
}, | ||
{ | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "Auditor", | ||
"share": 1 | ||
} | ||
], | ||
"search_fields": "voucher_no, against_voucher_no", | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
22 changes: 22 additions & 0 deletions
22
erpnext/accounts/doctype/payment_ledger_entry/payment_ledger_entry.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors | ||
# For license information, please see license.txt | ||
|
||
|
||
import frappe | ||
from frappe import _ | ||
from frappe.model.document import Document | ||
|
||
|
||
class PaymentLedgerEntry(Document): | ||
def validate_account(self): | ||
valid_account = frappe.db.get_list( | ||
"Account", | ||
"name", | ||
filters={"name": self.account, "account_type": self.account_type, "company": self.company}, | ||
ignore_permissions=True, | ||
) | ||
if not valid_account: | ||
frappe.throw(_("{0} account is not of type {1}").format(self.account, self.account_type)) | ||
|
||
def validate(self): | ||
self.validate_account() |
Oops, something went wrong.