mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-26 01:58:31 +00:00
aii: patches and default values fetching
This commit is contained in:
@@ -323,7 +323,7 @@ cur_frm.fields_dict['delivery_note_details'].grid.get_field('expense_account').g
|
||||
}
|
||||
|
||||
// cost center
|
||||
cur_frm.fields_dict["delivery_note_details"].grid.get_field("cost_center").get_query = function(doc) {
|
||||
cur_frm.fields_dict.delivery_note_details.grid.get_field("cost_center").get_query = function(doc) {
|
||||
return {
|
||||
query: "accounts.utils.get_cost_center_list",
|
||||
filters: { company_name: doc.company}
|
||||
|
||||
@@ -85,8 +85,11 @@ class DocType(SellingController):
|
||||
obj = get_obj('Sales Common')
|
||||
for doc in self.doclist:
|
||||
if doc.fields.get('item_code'):
|
||||
arg = {'item_code':doc.fields.get('item_code'), 'income_account':doc.fields.get('income_account'),
|
||||
'cost_center': doc.fields.get('cost_center'), 'warehouse': doc.fields.get('warehouse')};
|
||||
arg = {
|
||||
'item_code':doc.fields.get('item_code'),
|
||||
'expense_account':doc.fields.get('expense_account'),
|
||||
'cost_center': doc.fields.get('cost_center'),
|
||||
'warehouse': doc.fields.get('warehouse')};
|
||||
ret = obj.get_item_defaults(arg)
|
||||
for r in ret:
|
||||
if not doc.fields.get(r):
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-03-07 11:42:59",
|
||||
"creation": "2013-03-25 11:55:16",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-03-22 18:43:10",
|
||||
"modified": "2013-03-25 15:43:04",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -253,14 +253,15 @@
|
||||
"no_copy": 1,
|
||||
"options": "Account",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"width": "120px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "purchase_cost_center",
|
||||
"fieldname": "cost_center",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"label": "Purchase Cost Center",
|
||||
"label": "Cost Center",
|
||||
"no_copy": 1,
|
||||
"options": "Cost Center",
|
||||
"print_hide": 1,
|
||||
|
||||
@@ -27,7 +27,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
|
||||
if (sys_defaults.auto_inventory_accounting && !this.frm.doc.expense_adjustment_account) {
|
||||
if (this.frm.doc.purpose == "Sales Return")
|
||||
account_for = "stock_delivered_but_not_billed";
|
||||
account_for = "stock_in_hand_account";
|
||||
else if (this.frm.doc.purpose == "Purchase Return")
|
||||
account_for = "stock_received_but_not_billed";
|
||||
else account_for = "stock_adjustment_account";
|
||||
|
||||
Reference in New Issue
Block a user