-
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 pull request #29536 from nabinhait/cost-center-allocation
feat: Cost Center Allocation
- Loading branch information
Showing
23 changed files
with
593 additions
and
246 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
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.
19 changes: 19 additions & 0 deletions
19
erpnext/accounts/doctype/cost_center_allocation/cost_center_allocation.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,19 @@ | ||
// Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors | ||
// For license information, please see license.txt | ||
|
||
frappe.ui.form.on('Cost Center Allocation', { | ||
setup: function(frm) { | ||
let filters = {"is_group": 0}; | ||
if (frm.doc.company) { | ||
$.extend(filters, { | ||
"company": frm.doc.company | ||
}); | ||
} | ||
|
||
frm.set_query('main_cost_center', function() { | ||
return { | ||
filters: filters | ||
}; | ||
}); | ||
} | ||
}); |
128 changes: 128 additions & 0 deletions
128
erpnext/accounts/doctype/cost_center_allocation/cost_center_allocation.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,128 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"autoname": "CC-ALLOC-.#####", | ||
"creation": "2022-01-13 20:07:29.871109", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"main_cost_center", | ||
"company", | ||
"column_break_2", | ||
"valid_from", | ||
"section_break_5", | ||
"allocation_percentages", | ||
"amended_from" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "main_cost_center", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Main Cost Center", | ||
"options": "Cost Center", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"default": "Today", | ||
"fieldname": "valid_from", | ||
"fieldtype": "Date", | ||
"in_list_view": 1, | ||
"label": "Valid From", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "column_break_2", | ||
"fieldtype": "Column Break" | ||
}, | ||
{ | ||
"fieldname": "section_break_5", | ||
"fieldtype": "Section Break" | ||
}, | ||
{ | ||
"fetch_from": "main_cost_center.company", | ||
"fieldname": "company", | ||
"fieldtype": "Link", | ||
"label": "Company", | ||
"options": "Company", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "allocation_percentages", | ||
"fieldtype": "Table", | ||
"label": "Cost Center Allocation Percentages", | ||
"options": "Cost Center Allocation Percentage", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "amended_from", | ||
"fieldtype": "Link", | ||
"label": "Amended From", | ||
"no_copy": 1, | ||
"options": "Cost Center Allocation", | ||
"print_hide": 1, | ||
"read_only": 1 | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"is_submittable": 1, | ||
"links": [], | ||
"modified": "2022-01-31 11:47:12.086253", | ||
"modified_by": "Administrator", | ||
"module": "Accounts", | ||
"name": "Cost Center Allocation", | ||
"name_case": "UPPER CASE", | ||
"naming_rule": "Expression (old style)", | ||
"owner": "Administrator", | ||
"permissions": [ | ||
{ | ||
"amend": 1, | ||
"cancel": 1, | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "System Manager", | ||
"share": 1, | ||
"submit": 1, | ||
"write": 1 | ||
}, | ||
{ | ||
"amend": 1, | ||
"cancel": 1, | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "Accounts Manager", | ||
"share": 1, | ||
"submit": 1, | ||
"write": 1 | ||
}, | ||
{ | ||
"amend": 1, | ||
"cancel": 1, | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "Accounts User", | ||
"share": 1, | ||
"submit": 1, | ||
"write": 1 | ||
} | ||
], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
Oops, something went wrong.