mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-02 04:58:29 +00:00
[perpetual accounting] make gl entries relevant for different transactions
This commit is contained in:
@@ -72,18 +72,7 @@ cur_frm.fields_dict.receivables_group.get_query = function(doc) {
|
||||
}
|
||||
}
|
||||
|
||||
if (sys_defaults.auto_inventory_accounting) {
|
||||
cur_frm.fields_dict["stock_in_hand_account"].get_query = function(doc) {
|
||||
return {
|
||||
"filters": {
|
||||
"is_pl_account": "No",
|
||||
"debit_or_credit": "Debit",
|
||||
"company": doc.name,
|
||||
'group_or_ledger': "Ledger"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sys_defaults.perpetual_accounting) {
|
||||
cur_frm.fields_dict["stock_adjustment_account"].get_query = function(doc) {
|
||||
return {
|
||||
"filters": {
|
||||
@@ -108,10 +97,4 @@ if (sys_defaults.auto_inventory_accounting) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.fields_dict["stock_adjustment_cost_center"].get_query = function(doc) {
|
||||
return {
|
||||
"filters": {"company": doc.name}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-04-10 08:35:39",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-23 11:58:36",
|
||||
"modified": "2013-08-05 17:23:52",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -25,13 +25,20 @@
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"name": "__common__",
|
||||
"parent": "Company",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"read": 1
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "System Manager",
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocType",
|
||||
@@ -220,19 +227,9 @@
|
||||
{
|
||||
"depends_on": "eval:!doc.__islocal",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "auto_inventory_accounting_settings",
|
||||
"fieldname": "perpetual_accounting_settings",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Auto Inventory Accounting Settings",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"description": "This account will be used to maintain value of available stock",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "stock_in_hand_account",
|
||||
"fieldtype": "Link",
|
||||
"label": "Stock In Hand Account",
|
||||
"no_copy": 1,
|
||||
"options": "Account",
|
||||
"label": "Perpetual Accounting Settings",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
@@ -244,13 +241,6 @@
|
||||
"options": "Account",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "col_break23",
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "stock_adjustment_account",
|
||||
@@ -269,15 +259,6 @@
|
||||
"options": "Account",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "stock_adjustment_cost_center",
|
||||
"fieldtype": "Link",
|
||||
"label": "Stock Adjustment Cost Center",
|
||||
"no_copy": 1,
|
||||
"options": "Cost Center",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"description": "For reference only.",
|
||||
"doctype": "DocField",
|
||||
@@ -373,17 +354,6 @@
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"report": 1,
|
||||
"role": "System Manager",
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"role": "All"
|
||||
"doctype": "DocPerm"
|
||||
}
|
||||
]
|
||||
@@ -119,8 +119,8 @@ class DocType:
|
||||
})
|
||||
global_defaults.save()
|
||||
|
||||
webnotes.conn.set_value("Accounts Settings", None, "auto_inventory_accounting", 1)
|
||||
webnotes.conn.set_default("auto_inventory_accounting", 1)
|
||||
webnotes.conn.set_value("Accounts Settings", None, "perpetual_accounting", 1)
|
||||
webnotes.conn.set_default("perpetual_accounting", 1)
|
||||
|
||||
stock_settings = webnotes.bean("Stock Settings")
|
||||
stock_settings.doc.item_naming_by = "Item Code"
|
||||
|
||||
Reference in New Issue
Block a user