| ';
@@ -104,7 +104,7 @@ cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
d.charge_type = '';
}
validated = false;
- refresh_field('charge_type', d.name, 'other_charges');
+ refresh_field('charge_type', d.name, 'taxes');
cur_frm.cscript.row_id(doc, cdt, cdn);
cur_frm.cscript.rate(doc, cdt, cdn);
cur_frm.cscript.tax_amount(doc, cdt, cdn);
@@ -127,12 +127,12 @@ cur_frm.cscript.row_id = function(doc, cdt, cdn) {
}
}
validated = false;
- refresh_field('row_id', d.name, 'other_charges');
+ refresh_field('row_id', d.name, 'taxes');
}
/*---------------------- Get rate if account_head has account_type as TAX or CHARGEABLE-------------------------------------*/
-cur_frm.fields_dict['other_charges'].grid.get_field("account_head").get_query = function(doc,cdt,cdn) {
+cur_frm.fields_dict['taxes'].grid.get_field("account_head").get_query = function(doc,cdt,cdn) {
return{
query: "erpnext.controllers.queries.tax_account_query",
filters: {
@@ -142,7 +142,7 @@ cur_frm.fields_dict['other_charges'].grid.get_field("account_head").get_query =
}
}
-cur_frm.fields_dict['other_charges'].grid.get_field("cost_center").get_query = function(doc) {
+cur_frm.fields_dict['taxes'].grid.get_field("cost_center").get_query = function(doc) {
return{
'company': doc.company,
'group_or_ledger': "Ledger"
@@ -156,7 +156,7 @@ cur_frm.cscript.rate = function(doc, cdt, cdn) {
d.rate = '';
}
validated = false;
- refresh_field('rate', d.name, 'other_charges');
+ refresh_field('rate', d.name, 'taxes');
}
cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
@@ -170,5 +170,5 @@ cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
d.tax_amount = '';
}
validated = false;
- refresh_field('tax_amount', d.name, 'other_charges');
+ refresh_field('tax_amount', d.name, 'taxes');
};
diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py b/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py
index 8dd27592210..6ab5ab27456 100644
--- a/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py
+++ b/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py
@@ -14,4 +14,4 @@ class SalesTaxesandChargesMaster(Document):
(self.name, self.company))
# at least one territory
- self.validate_table_has_rows("valid_for_territories")
+ self.validate_table_has_rows("territories")
diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_master/test_records.json b/erpnext/accounts/doctype/sales_taxes_and_charges_master/test_records.json
index dda8a4aa8f5..dd9c595fe97 100644
--- a/erpnext/accounts/doctype/sales_taxes_and_charges_master/test_records.json
+++ b/erpnext/accounts/doctype/sales_taxes_and_charges_master/test_records.json
@@ -2,13 +2,13 @@
{
"company": "_Test Company",
"doctype": "Sales Taxes and Charges Master",
- "other_charges": [
+ "taxes": [
{
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": 6
},
{
@@ -16,20 +16,20 @@
"charge_type": "On Net Total",
"description": "Service Tax",
"doctype": "Sales Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": 6.36
}
],
"title": "_Test Sales Taxes and Charges Master",
- "valid_for_territories": [
+ "territories": [
{
"doctype": "Applicable Territory",
- "parentfield": "valid_for_territories",
+ "parentfield": "territories",
"territory": "All Territories"
},
{
"doctype": "Applicable Territory",
- "parentfield": "valid_for_territories",
+ "parentfield": "territories",
"territory": "_Test Territory Rest Of The World"
}
]
@@ -37,14 +37,14 @@
{
"company": "_Test Company",
"doctype": "Sales Taxes and Charges Master",
- "other_charges": [
+ "taxes": [
{
"account_head": "_Test Account Shipping Charges - _TC",
"charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges",
"doctype": "Sales Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": 100
},
{
@@ -53,7 +53,7 @@
"cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty",
"doctype": "Sales Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": 10
},
{
@@ -62,7 +62,7 @@
"cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty",
"doctype": "Sales Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": 12
},
{
@@ -71,7 +71,7 @@
"cost_center": "_Test Cost Center - _TC",
"description": "Education Cess",
"doctype": "Sales Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": 2,
"row_id": 3
},
@@ -81,7 +81,7 @@
"cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess",
"doctype": "Sales Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": 1,
"row_id": 3
},
@@ -91,7 +91,7 @@
"cost_center": "_Test Cost Center - _TC",
"description": "CST",
"doctype": "Sales Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": 2,
"row_id": 5
},
@@ -101,7 +101,7 @@
"cost_center": "_Test Cost Center - _TC",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": 12.5
},
{
@@ -110,16 +110,16 @@
"cost_center": "_Test Cost Center - _TC",
"description": "Discount",
"doctype": "Sales Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": -10,
"row_id": 7
}
],
"title": "_Test India Tax Master",
- "valid_for_territories": [
+ "territories": [
{
"doctype": "Applicable Territory",
- "parentfield": "valid_for_territories",
+ "parentfield": "territories",
"territory": "_Test Territory India"
}
]
@@ -127,13 +127,13 @@
{
"company": "_Test Company",
"doctype": "Sales Taxes and Charges Master",
- "other_charges": [
+ "taxes": [
{
"account_head": "_Test Account VAT - _TC",
"charge_type": "On Net Total",
"description": "VAT",
"doctype": "Sales Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": 12
},
{
@@ -141,15 +141,15 @@
"charge_type": "On Net Total",
"description": "Service Tax",
"doctype": "Sales Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": 4
}
],
"title": "_Test Sales Taxes and Charges Master - Rest of the World",
- "valid_for_territories": [
+ "territories": [
{
"doctype": "Applicable Territory",
- "parentfield": "valid_for_territories",
+ "parentfield": "territories",
"territory": "_Test Territory Rest Of The World"
}
]
diff --git a/erpnext/accounts/doctype/shipping_rule/shipping_rule.py b/erpnext/accounts/doctype/shipping_rule/shipping_rule.py
index f9f64e4677f..27f49daa2e5 100644
--- a/erpnext/accounts/doctype/shipping_rule/shipping_rule.py
+++ b/erpnext/accounts/doctype/shipping_rule/shipping_rule.py
@@ -17,7 +17,7 @@ class ManyBlankToValuesError(frappe.ValidationError): pass
class ShippingRule(Document):
def validate(self):
self.validate_value("calculate_based_on", "in", ["Net Total", "Net Weight"])
- self.shipping_rule_conditions = self.get("shipping_rule_conditions")
+ self.conditions = self.get("conditions")
self.validate_from_to_values()
self.sort_shipping_rule_conditions()
self.validate_overlapping_shipping_rule_conditions()
@@ -25,7 +25,7 @@ class ShippingRule(Document):
def validate_from_to_values(self):
zero_to_values = []
- for d in self.get("shipping_rule_conditions"):
+ for d in self.get("conditions"):
self.round_floats_in(d)
# values cannot be negative
@@ -44,8 +44,8 @@ class ShippingRule(Document):
def sort_shipping_rule_conditions(self):
"""Sort Shipping Rule Conditions based on increasing From Value"""
- self.shipping_rules_conditions = sorted(self.shipping_rule_conditions, key=lambda d: flt(d.from_value))
- for i, d in enumerate(self.shipping_rule_conditions):
+ self.shipping_rules_conditions = sorted(self.conditions, key=lambda d: flt(d.from_value))
+ for i, d in enumerate(self.conditions):
d.idx = i + 1
def validate_overlapping_shipping_rule_conditions(self):
@@ -60,9 +60,9 @@ class ShippingRule(Document):
return (not separate)
overlaps = []
- for i in xrange(0, len(self.shipping_rule_conditions)):
- for j in xrange(i+1, len(self.shipping_rule_conditions)):
- d1, d2 = self.shipping_rule_conditions[i], self.shipping_rule_conditions[j]
+ for i in xrange(0, len(self.conditions)):
+ for j in xrange(i+1, len(self.conditions)):
+ d1, d2 = self.conditions[i], self.conditions[j]
if d1.as_dict() != d2.as_dict():
# in our case, to_value can be zero, hence pass the from_value if so
range_a = (d1.from_value, d1.to_value or d1.from_value)
diff --git a/erpnext/accounts/doctype/shipping_rule/test_records.json b/erpnext/accounts/doctype/shipping_rule/test_records.json
index 5477c8f9573..96e7770d5ae 100644
--- a/erpnext/accounts/doctype/shipping_rule/test_records.json
+++ b/erpnext/accounts/doctype/shipping_rule/test_records.json
@@ -7,32 +7,32 @@
"doctype": "Shipping Rule",
"label": "_Test Shipping Rule",
"name": "_Test Shipping Rule",
- "shipping_rule_conditions": [
+ "conditions": [
{
"doctype": "Shipping Rule Condition",
"from_value": 0,
- "parentfield": "shipping_rule_conditions",
+ "parentfield": "conditions",
"shipping_amount": 50.0,
"to_value": 100
},
{
"doctype": "Shipping Rule Condition",
"from_value": 101,
- "parentfield": "shipping_rule_conditions",
+ "parentfield": "conditions",
"shipping_amount": 100.0,
"to_value": 200
},
{
"doctype": "Shipping Rule Condition",
"from_value": 201,
- "parentfield": "shipping_rule_conditions",
+ "parentfield": "conditions",
"shipping_amount": 0.0
}
],
- "valid_for_territories": [
+ "territories": [
{
"doctype": "Applicable Territory",
- "parentfield": "valid_for_territories",
+ "parentfield": "territories",
"territory": "_Test Territory"
}
]
@@ -45,32 +45,32 @@
"doctype": "Shipping Rule",
"label": "_Test Shipping Rule - India",
"name": "_Test Shipping Rule - India",
- "shipping_rule_conditions": [
+ "conditions": [
{
"doctype": "Shipping Rule Condition",
"from_value": 0,
- "parentfield": "shipping_rule_conditions",
+ "parentfield": "conditions",
"shipping_amount": 50.0,
"to_value": 100
},
{
"doctype": "Shipping Rule Condition",
"from_value": 101,
- "parentfield": "shipping_rule_conditions",
+ "parentfield": "conditions",
"shipping_amount": 100.0,
"to_value": 200
},
{
"doctype": "Shipping Rule Condition",
"from_value": 201,
- "parentfield": "shipping_rule_conditions",
+ "parentfield": "conditions",
"shipping_amount": 0.0
}
],
- "valid_for_territories": [
+ "territories": [
{
"doctype": "Applicable Territory",
- "parentfield": "valid_for_territories",
+ "parentfield": "territories",
"territory": "_Test Territory India"
}
]
@@ -83,32 +83,32 @@
"doctype": "Shipping Rule",
"label": "_Test Shipping Rule - Rest of the World",
"name": "_Test Shipping Rule - Rest of the World",
- "shipping_rule_conditions": [
+ "conditions": [
{
"doctype": "Shipping Rule Condition",
"from_value": 0,
- "parentfield": "shipping_rule_conditions",
+ "parentfield": "conditions",
"shipping_amount": 500.0,
"to_value": 1000
},
{
"doctype": "Shipping Rule Condition",
"from_value": 1001,
- "parentfield": "shipping_rule_conditions",
+ "parentfield": "conditions",
"shipping_amount": 1000.0,
"to_value": 2000
},
{
"doctype": "Shipping Rule Condition",
"from_value": 2001,
- "parentfield": "shipping_rule_conditions",
+ "parentfield": "conditions",
"shipping_amount": 1500.0
}
],
- "valid_for_territories": [
+ "territories": [
{
"doctype": "Applicable Territory",
- "parentfield": "valid_for_territories",
+ "parentfield": "territories",
"territory": "_Test Territory Rest Of The World"
}
]
diff --git a/erpnext/accounts/doctype/shipping_rule/test_shipping_rule.py b/erpnext/accounts/doctype/shipping_rule/test_shipping_rule.py
index d14bcd74478..bcb999312c1 100644
--- a/erpnext/accounts/doctype/shipping_rule/test_shipping_rule.py
+++ b/erpnext/accounts/doctype/shipping_rule/test_shipping_rule.py
@@ -11,13 +11,13 @@ class TestShippingRule(unittest.TestCase):
def test_from_greater_than_to(self):
shipping_rule = frappe.copy_doc(test_records[0])
shipping_rule.name = test_records[0].get('name')
- shipping_rule.get("shipping_rule_conditions")[0].from_value = 101
+ shipping_rule.get("conditions")[0].from_value = 101
self.assertRaises(FromGreaterThanToError, shipping_rule.insert)
def test_many_zero_to_values(self):
shipping_rule = frappe.copy_doc(test_records[0])
shipping_rule.name = test_records[0].get('name')
- shipping_rule.get("shipping_rule_conditions")[0].to_value = 0
+ shipping_rule.get("conditions")[0].to_value = 0
self.assertRaises(ManyBlankToValuesError, shipping_rule.insert)
def test_overlapping_conditions(self):
@@ -30,8 +30,8 @@ class TestShippingRule(unittest.TestCase):
]:
shipping_rule = frappe.copy_doc(test_records[0])
shipping_rule.name = test_records[0].get('name')
- shipping_rule.get("shipping_rule_conditions")[0].from_value = range_a[0]
- shipping_rule.get("shipping_rule_conditions")[0].to_value = range_a[1]
- shipping_rule.get("shipping_rule_conditions")[1].from_value = range_b[0]
- shipping_rule.get("shipping_rule_conditions")[1].to_value = range_b[1]
+ shipping_rule.get("conditions")[0].from_value = range_a[0]
+ shipping_rule.get("conditions")[0].to_value = range_a[1]
+ shipping_rule.get("conditions")[1].from_value = range_b[0]
+ shipping_rule.get("conditions")[1].to_value = range_b[1]
self.assertRaises(OverlappingConditionError, shipping_rule.insert)
diff --git a/erpnext/accounts/print_format/pos_invoice/pos_invoice.json b/erpnext/accounts/print_format/pos_invoice/pos_invoice.json
index 83174b6c299..51ac7cc541b 100644
--- a/erpnext/accounts/print_format/pos_invoice/pos_invoice.json
+++ b/erpnext/accounts/print_format/pos_invoice/pos_invoice.json
@@ -1,15 +1,15 @@
{
- "creation": "2011-12-21 11:08:55",
- "doc_type": "Sales Invoice",
- "docstatus": 0,
- "doctype": "Print Format",
- "html": "\n\n \n\t{{ doc.company }} \n\t{{ doc.select_print_heading or _(\"Invoice\") }} \n \n\n\t{{ _(\"Receipt No\") }}: {{ doc.name }} \n\t{{ _(\"Date\") }}: {{ doc.get_formatted(\"posting_date\") }} \n\t{{ _(\"Customer\") }}: {{ doc.customer_name }}\n \n\n \n\n\t\n\t\t\n\t\t\t| {{ _(\"Item\") }} | \n\t\t\t{{ _(\"Qty\") }} | \n\t\t\t{{ _(\"Rate\") }} | \n\t\t \n\t\n\t\n\t\t{%- for item in doc.entries -%}\n\t\t\n\t\t\t\n\t\t\t\t{{ item.item_code }}\n\t\t\t\t{%- if item.item_name != item.item_code -%}\n\t\t\t\t\t {{ item.item_name }}{%- endif -%}\n\t\t\t | \n\t\t\t{{ item.qty }} | \n\t\t\t{{ item.amount }} | \n\t\t \n\t\t{%- endfor -%}\n\t\n \n\n\t\n\t\t\n\t\t\t| \n\t\t\t\t{{ _(\"Net Total\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"net_total_export\") }}\n\t\t\t | \n\t\t \n\t\t{%- for row in doc.other_charges -%}\n\t\t{%- if not row.included_in_print_rate -%}\n\t\t\n\t\t\t| \n\t\t\t\t{{ row.description }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t | \n\t\t \n\t\t{%- endif -%}\n\t\t{%- endfor -%}\n\t\t{%- if doc.discount_amount -%}\n\t\t\n\t\t\t| \n\t\t\t\t{{ _(\"Discount\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"discount_amount\") }}\n\t\t\t | \n\t\t \n\t\t{%- endif -%}\n\t\t\n\t\t\t| \n\t\t\t\t{{ _(\"Grand Total\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"grand_total_export\") }}\n\t\t\t | \n\t\t \n\t\n \n{% if doc.get(\"other_charges\", filters={\"included_in_print_rate\": 1}) %}\n \nTaxes Included: \n\n\t\n\t\t{%- for row in doc.other_charges -%}\n\t\t{%- if row.included_in_print_rate -%}\n\t\t\n\t\t\t| \n\t\t\t\t{{ row.description }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t | \n\t\t \n\t\t{%- endif -%}\n\t\t{%- endfor -%}\n\t \n \n{%- endif -%}\n \n{{ doc.terms or \"\" }} \n{{ _(\"Thank you, please visit again.\") }} ",
- "idx": 1,
- "modified": "2014-07-22 02:08:26.603223",
- "modified_by": "Administrator",
- "module": "Accounts",
- "name": "POS Invoice",
- "owner": "Administrator",
- "print_format_type": "Server",
+ "creation": "2011-12-21 11:08:55",
+ "doc_type": "Sales Invoice",
+ "docstatus": 0,
+ "doctype": "Print Format",
+ "html": "\n\n\n\t{{ doc.company }} \n\t{{ doc.select_print_heading or _(\"Invoice\") }} \n \n\n\t{{ _(\"Receipt No\") }}: {{ doc.name }} \n\t{{ _(\"Date\") }}: {{ doc.get_formatted(\"posting_date\") }} \n\t{{ _(\"Customer\") }}: {{ doc.customer_name }}\n \n\n \n\n\t\n\t\t\n\t\t\t| {{ _(\"Item\") }} | \n\t\t\t{{ _(\"Qty\") }} | \n\t\t\t{{ _(\"Rate\") }} | \n\t\t \n\t\n\t\n\t\t{%- for item in doc.items -%}\n\t\t\n\t\t\t\n\t\t\t\t{{ item.item_code }}\n\t\t\t\t{%- if item.item_name != item.item_code -%}\n\t\t\t\t\t {{ item.item_name }}{%- endif -%}\n\t\t\t | \n\t\t\t{{ item.qty }} | \n\t\t\t{{ item.amount }} | \n\t\t \n\t\t{%- endfor -%}\n\t\n \n\n\t\n\t\t\n\t\t\t| \n\t\t\t\t{{ _(\"Net Total\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"net_total_export\") }}\n\t\t\t | \n\t\t \n\t\t{%- for row in doc.taxes -%}\n\t\t{%- if not row.included_in_print_rate -%}\n\t\t\n\t\t\t| \n\t\t\t\t{{ row.description }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t | \n\t\t \n\t\t{%- endif -%}\n\t\t{%- endfor -%}\n\t\t{%- if doc.discount_amount -%}\n\t\t\n\t\t\t| \n\t\t\t\t{{ _(\"Discount\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"discount_amount\") }}\n\t\t\t | \n\t\t \n\t\t{%- endif -%}\n\t\t\n\t\t\t| \n\t\t\t\t{{ _(\"Grand Total\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"grand_total_export\") }}\n\t\t\t | \n\t\t \n\t\n \n{% if doc.get(\"taxes\", filters={\"included_in_print_rate\": 1}) %}\n \nTaxes Included: \n\n\t\n\t\t{%- for row in doc.taxes -%}\n\t\t{%- if row.included_in_print_rate -%}\n\t\t\n\t\t\t| \n\t\t\t\t{{ row.description }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t | \n\t\t \n\t\t{%- endif -%}\n\t\t{%- endfor -%}\n\t \n \n{%- endif -%}\n \n{{ doc.terms or \"\" }} \n{{ _(\"Thank you, please visit again.\") }} ",
+ "idx": 1,
+ "modified": "2014-12-25 02:08:26.603223",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "POS Invoice",
+ "owner": "Administrator",
+ "print_format_type": "Server",
"standard": "Yes"
-}
\ No newline at end of file
+}
diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py
index dbf86e352dc..98dfdbb8422 100644
--- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py
+++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py
@@ -35,7 +35,7 @@ def get_entries(filters):
conditions = get_conditions(filters)
entries = frappe.db.sql("""select jv.name, jvd.account, jv.posting_date,
jv.clearance_date, jvd.against_account, jvd.debit, jvd.credit
- from `tabJournal Voucher Detail` jvd, `tabJournal Voucher` jv
+ from `tabJournal Entry Account` jvd, `tabJournal Voucher` jv
where jvd.parent = jv.name and jv.docstatus=1 %s
order by jv.name DESC""" % conditions, filters, as_list=1)
return entries
\ No newline at end of file
diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
index cbe5988c143..b55d9a42a00 100644
--- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
+++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
@@ -24,7 +24,7 @@ def execute(filters=None):
total_credit += flt(d[3])
amounts_not_reflected_in_system = frappe.db.sql("""select sum(ifnull(jvd.debit, 0) - ifnull(jvd.credit, 0))
- from `tabJournal Voucher Detail` jvd, `tabJournal Voucher` jv
+ from `tabJournal Entry Account` jvd, `tabJournal Voucher` jv
where jvd.parent = jv.name and jv.docstatus=1 and jvd.account=%s
and jv.posting_date > %s and jv.clearance_date <= %s and ifnull(jv.is_opening, 'No') = 'No'
""", (filters["account"], filters["report_date"], filters["report_date"]))
@@ -57,7 +57,7 @@ def get_entries(filters):
jv.posting_date, jv.name, jvd.debit, jvd.credit,
jvd.against_account, jv.cheque_no, jv.cheque_date, jv.clearance_date
from
- `tabJournal Voucher Detail` jvd, `tabJournal Voucher` jv
+ `tabJournal Entry Account` jvd, `tabJournal Voucher` jv
where jvd.parent = jv.name and jv.docstatus=1
and jvd.account = %(account)s and jv.posting_date <= %(report_date)s
and ifnull(jv.clearance_date, '4000-01-01') > %(report_date)s
diff --git a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py
index b1d74373fca..434cb864892 100644
--- a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py
+++ b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py
@@ -77,7 +77,7 @@ def get_entries(filters):
entries = frappe.db.sql("""select jv.name, jvd.account, jv.posting_date,
jvd.against_voucher, jvd.against_invoice, jvd.debit, jvd.credit,
jv.cheque_no, jv.cheque_date, jv.remark
- from `tabJournal Voucher Detail` jvd, `tabJournal Voucher` jv
+ from `tabJournal Entry Account` jvd, `tabJournal Voucher` jv
where jvd.parent = jv.name and jv.docstatus=1 %s order by jv.name DESC""" %
(conditions), tuple(party_accounts), as_dict=1)
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 2abc187dabb..eb0c86db725 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -163,7 +163,7 @@ def check_if_jv_modified(args):
check if jv is submitted
"""
ret = frappe.db.sql("""
- select t2.{dr_or_cr} from `tabJournal Voucher` t1, `tabJournal Voucher Detail` t2
+ select t2.{dr_or_cr} from `tabJournal Voucher` t1, `tabJournal Entry Account` t2
where t1.name = t2.parent and t2.account = %(account)s
and t2.party_type = %(party_type)s and t2.party = %(party)s
and ifnull(t2.against_voucher, '')=''
@@ -190,7 +190,7 @@ def update_against_doc(d, jv_obj):
if d['allocated_amt'] < d['unadjusted_amt']:
jvd = frappe.db.sql("""select cost_center, balance, against_account, is_advance
- from `tabJournal Voucher Detail` where name = %s""", d['voucher_detail_no'])
+ from `tabJournal Entry Account` where name = %s""", d['voucher_detail_no'])
# new entry with balance amount
ch = jv_obj.append("entries")
ch.account = d['account']
@@ -209,11 +209,11 @@ def update_against_doc(d, jv_obj):
jv_obj.save()
def remove_against_link_from_jv(ref_type, ref_no, against_field):
- linked_jv = frappe.db.sql_list("""select parent from `tabJournal Voucher Detail`
+ linked_jv = frappe.db.sql_list("""select parent from `tabJournal Entry Account`
where `%s`=%s and docstatus < 2""" % (against_field, "%s"), (ref_no))
if linked_jv:
- frappe.db.sql("""update `tabJournal Voucher Detail` set `%s`=null,
+ frappe.db.sql("""update `tabJournal Entry Account` set `%s`=null,
modified=%s, modified_by=%s
where `%s`=%s and docstatus < 2""" % (against_field, "%s", "%s", against_field, "%s"),
(now(), frappe.session.user, ref_no))
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index 2f7af7196dc..1b8c6354a7c 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -178,7 +178,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
calculate_taxes_and_totals: function() {
this._super();
- this.calculate_total_advance("Purchase Invoice", "advance_allocation_details");
+ this.calculate_total_advance("Purchase Invoice", "advances");
this.frm.refresh_fields();
},
@@ -368,9 +368,9 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
setup_field_label_map(["tax_amount", "total"], company_currency, this.other_fname);
}
- if(this.frm.fields_dict["advance_allocation_details"]) {
+ if(this.frm.fields_dict["advances"]) {
setup_field_label_map(["advance_amount", "allocated_amount"], company_currency,
- "advance_allocation_details");
+ "advances");
}
// toggle columns
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js
index e712995c558..a8d327a76bd 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.js
@@ -4,8 +4,8 @@
frappe.provide("erpnext.buying");
cur_frm.cscript.tname = "Purchase Order Item";
-cur_frm.cscript.fname = "po_details";
-cur_frm.cscript.other_fname = "other_charges";
+cur_frm.cscript.fname = "items";
+cur_frm.cscript.other_fname = "taxes";
{% include 'buying/doctype/purchase_common/purchase_common.js' %};
{% include 'accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js' %}
@@ -105,9 +105,9 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
this.get_terms();
},
- po_details_add: function(doc, cdt, cdn) {
+ items_add: function(doc, cdt, cdn) {
var row = frappe.get_doc(cdt, cdn);
- this.frm.script_manager.copy_from_first_row("po_details", row, ["schedule_date"]);
+ this.frm.script_manager.copy_from_first_row("items", row, ["schedule_date"]);
}
});
@@ -126,7 +126,7 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
}
}
-cur_frm.fields_dict['po_details'].grid.get_field('project_name').get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict['items'].grid.get_field('project_name').get_query = function(doc, cdt, cdn) {
return {
filters:[
['Project', 'status', 'not in', 'Completed, Cancelled']
@@ -134,7 +134,7 @@ cur_frm.fields_dict['po_details'].grid.get_field('project_name').get_query = fun
}
}
-cur_frm.fields_dict['po_details'].grid.get_field('bom').get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict['items'].grid.get_field('bom').get_query = function(doc, cdt, cdn) {
var d = locals[cdt][cdn]
return {
filters: [
@@ -188,7 +188,7 @@ cur_frm.pformat.indent_no = function(doc, cdt, cdn){
out ='';
- var cl = doc.po_details || [];
+ var cl = doc.items || [];
// outer table
var out=' | ';
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py
index 09f303f6aaa..245d46e6060 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.py
@@ -9,12 +9,12 @@ from frappe.model.mapper import get_mapped_doc
from erpnext.controllers.buying_controller import BuyingController
form_grid_templates = {
- "po_details": "templates/form_grid/item_grid.html"
+ "items": "templates/form_grid/item_grid.html"
}
class PurchaseOrder(BuyingController):
tname = 'Purchase Order Item'
- fname = 'po_details'
+ fname = 'items'
def __init__(self, arg1, arg2=None):
super(PurchaseOrder, self).__init__(arg1, arg2)
@@ -51,7 +51,7 @@ class PurchaseOrder(BuyingController):
self.validate_with_previous_doc()
self.validate_for_subcontracting()
self.validate_minimum_order_qty()
- self.create_raw_materials_supplied("po_raw_material_details")
+ self.create_raw_materials_supplied("supplied_items")
def validate_with_previous_doc(self):
super(PurchaseOrder, self).validate_with_previous_doc(self.tname, {
@@ -71,7 +71,7 @@ class PurchaseOrder(BuyingController):
itemwise_min_order_qty = frappe._dict(frappe.db.sql("select name, min_order_qty from tabItem"))
itemwise_qty = frappe._dict()
- for d in self.get("po_details"):
+ for d in self.get("items"):
itemwise_qty.setdefault(d.item_code, 0)
itemwise_qty[d.item_code] += flt(d.stock_qty)
@@ -80,7 +80,7 @@ class PurchaseOrder(BuyingController):
frappe.throw(_("Item #{0}: Ordered qty can not less than item's minimum order qty (defined in item master).").format(item_code))
def get_schedule_dates(self):
- for d in self.get('po_details'):
+ for d in self.get('items'):
if d.prevdoc_detail_docname and not d.schedule_date:
d.schedule_date = frappe.db.get_value("Material Request Item",
d.prevdoc_detail_docname, "schedule_date")
@@ -91,14 +91,14 @@ class PurchaseOrder(BuyingController):
# Check for Stopped status
def check_for_stopped_status(self, pc_obj):
check_list =[]
- for d in self.get('po_details'):
+ for d in self.get('items'):
if d.meta.get_field('prevdoc_docname') and d.prevdoc_docname and d.prevdoc_docname not in check_list:
check_list.append(d.prevdoc_docname)
pc_obj.check_for_stopped_status( d.prevdoc_doctype, d.prevdoc_docname)
def update_requested_qty(self):
material_request_map = {}
- for d in self.get("po_details"):
+ for d in self.get("items"):
if d.prevdoc_doctype and d.prevdoc_doctype == "Material Request" and d.prevdoc_detail_docname:
material_request_map.setdefault(d.prevdoc_docname, []).append(d.prevdoc_detail_docname)
@@ -128,7 +128,7 @@ class PurchaseOrder(BuyingController):
bin_doc.save()
item_wh_list = []
- for d in self.get("po_details"):
+ for d in self.get("items"):
if (not po_item_rows or d.name in po_item_rows) and [d.item_code, d.warehouse] not in item_wh_list \
and frappe.db.get_value("Item", d.item_code, "is_stock_item") == "Yes" and d.warehouse:
item_wh_list.append([d.item_code, d.warehouse])
diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py
index e67d320e743..9ff5c4446f0 100644
--- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py
@@ -23,7 +23,7 @@ class TestPurchaseOrder(unittest.TestCase):
pr.supplier_warehouse = "_Test Warehouse 1 - _TC"
pr.posting_date = "2013-05-12"
self.assertEquals(pr.doctype, "Purchase Receipt")
- self.assertEquals(len(pr.get("purchase_receipt_details")), len(test_records[0]["po_details"]))
+ self.assertEquals(len(pr.get("items")), len(test_records[0]["items"]))
pr.naming_series = "_T-Purchase Receipt-"
frappe.get_doc(pr).insert()
@@ -38,7 +38,7 @@ class TestPurchaseOrder(unittest.TestCase):
po = frappe.get_doc("Purchase Order", po.name)
po.is_subcontracted = "No"
- po.get("po_details")[0].item_code = "_Test Item"
+ po.get("items")[0].item_code = "_Test Item"
po.submit()
self.assertEquals(self._get_ordered_qty("_Test Item", "_Test Warehouse - _TC"), existing_ordered_qty + 10)
@@ -46,15 +46,15 @@ class TestPurchaseOrder(unittest.TestCase):
pr = make_purchase_receipt(po.name)
self.assertEquals(pr.doctype, "Purchase Receipt")
- self.assertEquals(len(pr.get("purchase_receipt_details", [])), len(test_records[0]["po_details"]))
+ self.assertEquals(len(pr.get("items", [])), len(test_records[0]["items"]))
pr.posting_date = "2013-05-12"
pr.naming_series = "_T-Purchase Receipt-"
- pr.purchase_receipt_details[0].qty = 4.0
+ pr.items[0].qty = 4.0
pr.insert()
pr.submit()
po.load_from_db()
- self.assertEquals(po.get("po_details")[0].received_qty, 4)
+ self.assertEquals(po.get("items")[0].received_qty, 4)
self.assertEquals(self._get_ordered_qty("_Test Item", "_Test Warehouse - _TC"), existing_ordered_qty + 6)
frappe.db.set_value('Item', '_Test Item', 'tolerance', 50)
@@ -62,19 +62,19 @@ class TestPurchaseOrder(unittest.TestCase):
pr1 = make_purchase_receipt(po.name)
pr1.naming_series = "_T-Purchase Receipt-"
pr1.posting_date = "2013-05-12"
- pr1.get("purchase_receipt_details")[0].qty = 8
+ pr1.get("items")[0].qty = 8
pr1.insert()
pr1.submit()
po.load_from_db()
- self.assertEquals(po.get("po_details")[0].received_qty, 12)
+ self.assertEquals(po.get("items")[0].received_qty, 12)
self.assertEquals(self._get_ordered_qty("_Test Item", "_Test Warehouse - _TC"), existing_ordered_qty)
pr1.load_from_db()
pr1.cancel()
po.load_from_db()
- self.assertEquals(po.get("po_details")[0].received_qty, 4)
+ self.assertEquals(po.get("items")[0].received_qty, 4)
self.assertEquals(self._get_ordered_qty("_Test Item", "_Test Warehouse - _TC"), existing_ordered_qty + 6)
def test_make_purchase_invoice(self):
@@ -90,7 +90,7 @@ class TestPurchaseOrder(unittest.TestCase):
pi = make_purchase_invoice(po.name)
self.assertEquals(pi.doctype, "Purchase Invoice")
- self.assertEquals(len(pi.get("entries", [])), len(test_records[0]["po_details"]))
+ self.assertEquals(len(pi.get("entries", [])), len(test_records[0]["items"]))
pi.credit_to = "_Test Payable - _TC"
pi.posting_date = "2013-05-12"
@@ -100,7 +100,7 @@ class TestPurchaseOrder(unittest.TestCase):
def test_subcontracting(self):
po = frappe.copy_doc(test_records[0])
po.insert()
- self.assertEquals(len(po.get("po_raw_material_details")), 2)
+ self.assertEquals(len(po.get("supplied_items")), 2)
def test_warehouse_company_validation(self):
from erpnext.stock.utils import InvalidWarehouseCompany
@@ -112,7 +112,7 @@ class TestPurchaseOrder(unittest.TestCase):
def test_uom_integer_validation(self):
from erpnext.utilities.transaction_base import UOMMustBeIntegerError
po = frappe.copy_doc(test_records[0])
- po.get("po_details")[0].qty = 3.4
+ po.get("items")[0].qty = 3.4
self.assertRaises(UOMMustBeIntegerError, po.insert)
def test_recurring_order(self):
diff --git a/erpnext/buying/doctype/purchase_order/test_records.json b/erpnext/buying/doctype/purchase_order/test_records.json
index 6b89bdc3dec..2b329af0e3e 100644
--- a/erpnext/buying/doctype/purchase_order/test_records.json
+++ b/erpnext/buying/doctype/purchase_order/test_records.json
@@ -12,7 +12,7 @@
"is_subcontracted": "Yes",
"naming_series": "_T-Purchase Order-",
"net_total": 5000.0,
- "po_details": [
+ "items": [
{
"base_amount": 5000.0,
"conversion_factor": 1.0,
@@ -20,7 +20,7 @@
"doctype": "Purchase Order Item",
"item_code": "_Test FG Item",
"item_name": "_Test FG Item",
- "parentfield": "po_details",
+ "parentfield": "items",
"qty": 10.0,
"rate": 500.0,
"schedule_date": "2013-03-01",
@@ -46,7 +46,7 @@
"is_subcontracted": "No",
"naming_series": "_T-Purchase Order-",
"net_total": 5000.0,
- "po_details": [
+ "items": [
{
"base_amount": 5000.0,
"conversion_factor": 1.0,
@@ -54,7 +54,7 @@
"doctype": "Purchase Order Item",
"item_code": "_Test Item",
"item_name": "_Test Item",
- "parentfield": "po_details",
+ "parentfield": "items",
"qty": 10.0,
"rate": 500.0,
"schedule_date": "2013-03-01",
diff --git a/erpnext/buying/doctype/quality_inspection/quality_inspection.py b/erpnext/buying/doctype/quality_inspection/quality_inspection.py
index 216d1657d04..a9b157c5e3a 100644
--- a/erpnext/buying/doctype/quality_inspection/quality_inspection.py
+++ b/erpnext/buying/doctype/quality_inspection/quality_inspection.py
@@ -9,7 +9,7 @@ from frappe.model.document import Document
class QualityInspection(Document):
def get_item_specification_details(self):
- self.set('qa_specification_details', [])
+ self.set('readings', [])
variant_of = frappe.db.get_query("Item", self.item_code, "variant_of")
if variant_of:
specification = frappe.db.sql("select specification, value from `tabItem Quality Inspection Parameter` \
@@ -18,7 +18,7 @@ class QualityInspection(Document):
specification = frappe.db.sql("select specification, value from `tabItem Quality Inspection Parameter` \
where parent = %s order by idx", self.item_code)
for d in specification:
- child = self.append('qa_specification_details', {})
+ child = self.append('readings', {})
child.specification = d[0]
child.value = d[1]
child.status = 'Accepted'
diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js
index e9b5812cd38..f233a7949fc 100644
--- a/erpnext/buying/doctype/supplier/supplier.js
+++ b/erpnext/buying/doctype/supplier/supplier.js
@@ -59,7 +59,7 @@ cur_frm.fields_dict['default_price_list'].get_query = function(doc, cdt, cdn) {
}
}
-cur_frm.fields_dict['party_accounts'].grid.get_field('account').get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict['accounts'].grid.get_field('account').get_query = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
return {
filters: {
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
index b9286a1c24a..72cef3b9205 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
@@ -3,8 +3,8 @@
// define defaults for purchase common
cur_frm.cscript.tname = "Supplier Quotation Item";
-cur_frm.cscript.fname = "quotation_items";
-cur_frm.cscript.other_fname = "other_charges";
+cur_frm.cscript.fname = "items";
+cur_frm.cscript.other_fname = "taxes";
// attach required files
{% include 'buying/doctype/purchase_common/purchase_common.js' %};
@@ -52,7 +52,7 @@ cur_frm.cscript.uom = function(doc, cdt, cdn) {
// no need to trigger updation of stock uom, as this field doesn't exist in supplier quotation
}
-cur_frm.fields_dict['quotation_items'].grid.get_field('project_name').get_query =
+cur_frm.fields_dict['items'].grid.get_field('project_name').get_query =
function(doc, cdt, cdn) {
return{
filters:[
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py
index d009bac241f..9eb8649cfc6 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py
@@ -8,12 +8,12 @@ from frappe.model.mapper import get_mapped_doc
from erpnext.controllers.buying_controller import BuyingController
form_grid_templates = {
- "quotation_items": "templates/form_grid/item_grid.html"
+ "items": "templates/form_grid/item_grid.html"
}
class SupplierQuotation(BuyingController):
tname = "Supplier Quotation Item"
- fname = "quotation_items"
+ fname = "items"
def validate(self):
super(SupplierQuotation, self).validate()
diff --git a/erpnext/buying/doctype/supplier_quotation/test_records.json b/erpnext/buying/doctype/supplier_quotation/test_records.json
index 90807d4674a..70e32fe9295 100644
--- a/erpnext/buying/doctype/supplier_quotation/test_records.json
+++ b/erpnext/buying/doctype/supplier_quotation/test_records.json
@@ -11,14 +11,14 @@
"is_subcontracted": "No",
"naming_series": "_T-Supplier Quotation-",
"net_total": 5000.0,
- "quotation_items": [
+ "items": [
{
"base_amount": 5000.0,
"description": "_Test FG Item",
"doctype": "Supplier Quotation Item",
"item_code": "_Test FG Item",
"item_name": "_Test FG Item",
- "parentfield": "quotation_items",
+ "parentfield": "items",
"qty": 10.0,
"rate": 500.0,
"uom": "_Test UOM",
diff --git a/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py b/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py
index 3f22fd50a48..af5db6033f8 100644
--- a/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py
+++ b/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py
@@ -21,11 +21,11 @@ class TestPurchaseOrder(unittest.TestCase):
po = make_purchase_order(sq.name)
self.assertEquals(po.doctype, "Purchase Order")
- self.assertEquals(len(po.get("po_details")), len(sq.get("quotation_items")))
+ self.assertEquals(len(po.get("items")), len(sq.get("items")))
po.naming_series = "_T-Purchase Order-"
- for doc in po.get("po_details"):
+ for doc in po.get("items"):
if doc.get("item_code"):
doc.set("schedule_date", "2013-04-12")
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 2cecdc03bc1..276e36addb6 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -145,8 +145,8 @@ class AccountsController(TransactionBase):
get_taxes_and_charges(tax_master_doctype, self.get(tax_master_field), tax_parentfield))
def set_other_charges(self):
- self.set("other_charges", [])
- self.set_taxes("other_charges", "taxes_and_charges")
+ self.set("taxes", [])
+ self.set_taxes("taxes", "taxes_and_charges")
def calculate_taxes_and_totals(self):
self.discount_amount_applied = False
@@ -394,7 +394,7 @@ class AccountsController(TransactionBase):
select
t1.name as jv_no, t1.remark, t2.{0} as amount, t2.name as jv_detail_no, `against_{1}` as against_order
from
- `tabJournal Voucher` t1, `tabJournal Voucher Detail` t2
+ `tabJournal Voucher` t1, `tabJournal Entry Account` t2
where
t1.name = t2.parent and t2.account = %s
and t2.party_type=%s and t2.party=%s
@@ -426,7 +426,7 @@ class AccountsController(TransactionBase):
account = self.get("debit_to" if self.doctype=="Sales Invoice" else "credit_to")
jv_against_order = frappe.db.sql("""select parent, %s as against_order
- from `tabJournal Voucher Detail`
+ from `tabJournal Entry Account`
where docstatus=1 and account=%s and ifnull(is_advance, 'No') = 'Yes'
and ifnull(against_sales_order, '') in (%s)
group by parent, against_sales_order""" %
@@ -501,7 +501,7 @@ class AccountsController(TransactionBase):
select
sum(ifnull({dr_or_cr}, 0))
from
- `tabJournal Voucher Detail`
+ `tabJournal Entry Account`
where
{against_field} = %s and docstatus = 1 and is_advance = "Yes" """.format(dr_or_cr=dr_or_cr, \
against_field=against_field), self.name)
diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py
index 0f7e2ba7b14..af6f728db1b 100644
--- a/erpnext/controllers/buying_controller.py
+++ b/erpnext/controllers/buying_controller.py
@@ -17,7 +17,7 @@ class BuyingController(StockController):
if hasattr(self, "fname"):
self.table_print_templates = {
self.fname: "templates/print_formats/includes/item_grid.html",
- "other_charges": "templates/print_formats/includes/taxes.html",
+ "taxes": "templates/print_formats/includes/taxes.html",
}
def get_feed(self):
@@ -46,7 +46,7 @@ class BuyingController(StockController):
self.set_missing_item_details()
if self.get("__islocal"):
- self.set_taxes("other_charges", "taxes_and_charges")
+ self.set_taxes("taxes", "taxes_and_charges")
def set_supplier_from_item_default(self):
if self.meta.get_field("supplier") and not self.supplier:
@@ -66,8 +66,8 @@ class BuyingController(StockController):
validate_warehouse_company(w, self.company)
def validate_stock_or_nonstock_items(self):
- if self.meta.get_field("other_charges") and not self.get_stock_items():
- tax_for_valuation = [d.account_head for d in self.get("other_charges")
+ if self.meta.get_field("taxes") and not self.get_stock_items():
+ tax_for_valuation = [d.account_head for d in self.get("taxes")
if d.category in ["Valuation", "Valuation and Total"]]
if tax_for_valuation:
frappe.throw(_("Tax Category can not be 'Valuation' or 'Valuation and Total' as all items are non-stock items"))
@@ -82,9 +82,9 @@ class BuyingController(StockController):
self.currency)
def calculate_taxes_and_totals(self):
- self.other_fname = "other_charges"
+ self.other_fname = "taxes"
super(BuyingController, self).calculate_taxes_and_totals()
- self.calculate_total_advance("Purchase Invoice", "advance_allocation_details")
+ self.calculate_total_advance("Purchase Invoice", "advances")
def calculate_item_values(self):
for item in self.item_doclist:
@@ -175,7 +175,7 @@ class BuyingController(StockController):
last_stock_item_idx = d.idx
total_valuation_amount = sum([flt(d.tax_amount) for d in
- self.get("other_charges")
+ self.get("taxes")
if d.category in ["Valuation", "Valuation and Total"]])
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index 7b4d03e0538..513507d8833 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -15,7 +15,7 @@ class SellingController(StockController):
if hasattr(self, "fname"):
self.table_print_templates = {
self.fname: "templates/print_formats/includes/item_grid.html",
- "other_charges": "templates/print_formats/includes/taxes.html",
+ "taxes": "templates/print_formats/includes/taxes.html",
}
def get_feed(self):
@@ -44,7 +44,7 @@ class SellingController(StockController):
self.set_missing_lead_customer_details()
self.set_price_list_and_item_details()
if self.get("__islocal"):
- self.set_taxes("other_charges", "taxes_and_charges")
+ self.set_taxes("taxes", "taxes_and_charges")
def set_missing_lead_customer_details(self):
if getattr(self, "customer", None):
@@ -73,7 +73,7 @@ class SellingController(StockController):
# shipping rule calculation based on item's net weight
shipping_amount = 0.0
- for condition in shipping_rule.get("shipping_rule_conditions"):
+ for condition in shipping_rule.get("conditions"):
if not condition.to_value or (flt(condition.from_value) <= value <= flt(condition.to_value)):
shipping_amount = condition.shipping_amount
break
@@ -85,28 +85,28 @@ class SellingController(StockController):
"cost_center": shipping_rule.cost_center
}
- existing_shipping_charge = self.get("other_charges", filters=shipping_charge)
+ existing_shipping_charge = self.get("taxes", filters=shipping_charge)
if existing_shipping_charge:
# take the last record found
existing_shipping_charge[-1].rate = shipping_amount
else:
shipping_charge["rate"] = shipping_amount
shipping_charge["description"] = shipping_rule.label
- self.append("other_charges", shipping_charge)
+ self.append("taxes", shipping_charge)
self.calculate_taxes_and_totals()
def remove_shipping_charge(self):
if self.shipping_rule:
shipping_rule = frappe.get_doc("Shipping Rule", self.shipping_rule)
- existing_shipping_charge = self.get("other_charges", {
+ existing_shipping_charge = self.get("taxes", {
"doctype": "Sales Taxes and Charges",
"charge_type": "Actual",
"account_head": shipping_rule.account,
"cost_center": shipping_rule.cost_center
})
if existing_shipping_charge:
- self.get("other_charges").remove(existing_shipping_charge[-1])
+ self.get("taxes").remove(existing_shipping_charge[-1])
self.calculate_taxes_and_totals()
def set_total_in_words(self):
@@ -124,11 +124,11 @@ class SellingController(StockController):
self.grand_total_export or self.rounded_total_export, self.currency)
def calculate_taxes_and_totals(self):
- self.other_fname = "other_charges"
+ self.other_fname = "taxes"
super(SellingController, self).calculate_taxes_and_totals()
- self.calculate_total_advance("Sales Invoice", "advance_adjustment_details")
+ self.calculate_total_advance("Sales Invoice", "advances")
self.calculate_commission()
self.calculate_contribution()
@@ -343,7 +343,7 @@ class SellingController(StockController):
reserved_qty_for_main_item = -flt(d.qty)
if self.has_sales_bom(d.item_code):
- for p in self.get("packing_details"):
+ for p in self.get("packed_items"):
if p.parent_detail_docname == d.name and p.parent_item == d.item_code:
# the packing details table's qty is already multiplied with parent's qty
il.append(frappe._dict({
diff --git a/erpnext/hr/doctype/appraisal/appraisal.js b/erpnext/hr/doctype/appraisal/appraisal.js
index 84ab964b93d..17e27090ac1 100644
--- a/erpnext/hr/doctype/appraisal/appraisal.js
+++ b/erpnext/hr/doctype/appraisal/appraisal.js
@@ -33,7 +33,7 @@ cur_frm.cscript.kra_template = function(doc, dt, dn) {
cur_frm.cscript.calculate_total_score = function(doc,cdt,cdn){
//return get_server_fields('calculate_total','','',doc,cdt,cdn,1);
- var val = doc.appraisal_details || [];
+ var val = doc.goals || [];
var total =0;
for(var i = 0; i 5) {
msgprint(__("Score must be less than or equal to 5"));
d.score = 0;
- refresh_field('score', d.name, 'appraisal_details');
+ refresh_field('score', d.name, 'goals');
}
total = flt(d.per_weightage*d.score)/100;
d.score_earned = total.toPrecision(2);
- refresh_field('score_earned', d.name, 'appraisal_details');
+ refresh_field('score_earned', d.name, 'goals');
}
else{
d.score_earned = 0;
- refresh_field('score_earned', d.name, 'appraisal_details');
+ refresh_field('score_earned', d.name, 'goals');
}
cur_frm.cscript.calculate_total(doc,cdt,cdn);
}
cur_frm.cscript.calculate_total = function(doc,cdt,cdn){
- var val = doc.appraisal_details || [];
+ var val = doc.goals || [];
var total =0;
for(var i = 0; i getdate(self.inst_date):
frappe.throw(_("Installation date cannot be before delivery date for Item {0}").format(d.item_code))
def check_item_table(self):
- if not(self.get('installed_item_details')):
+ if not(self.get('items')):
frappe.throw(_("Please pull items from Delivery Note"))
def on_update(self):
@@ -108,7 +108,7 @@ class InstallationNote(TransactionBase):
frappe.db.set(self, 'status', 'Submitted')
def on_cancel(self):
- for d in self.get('installed_item_details'):
+ for d in self.get('items'):
if d.serial_no:
d.serial_no = d.serial_no.replace(",", "\n")
for sr_no in d.serial_no.split("\n"):
diff --git a/erpnext/selling/doctype/opportunity/opportunity.js b/erpnext/selling/doctype/opportunity/opportunity.js
index b29c03ac0b4..41986d5d188 100644
--- a/erpnext/selling/doctype/opportunity/opportunity.js
+++ b/erpnext/selling/doctype/opportunity/opportunity.js
@@ -46,7 +46,7 @@ erpnext.selling.Opportunity = frappe.ui.form.Controller.extend({
else if(me.frm.doc.customer) return {filters: { customer: me.frm.doc.customer } };
});
- this.frm.set_query("item_code", "enquiry_details", function() {
+ this.frm.set_query("item_code", "items", function() {
return {
query: "erpnext.controllers.queries.item_query",
filters: me.frm.doc.enquiry_type === "Maintenance" ?
@@ -97,7 +97,7 @@ cur_frm.cscript.item_code = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if (d.item_code) {
return get_server_fields('get_item_details', d.item_code,
- 'enquiry_details', doc, cdt, cdn, 1);
+ 'items', doc, cdt, cdn, 1);
}
}
diff --git a/erpnext/selling/doctype/opportunity/opportunity.py b/erpnext/selling/doctype/opportunity/opportunity.py
index ba331f9052f..338d35d3b2c 100644
--- a/erpnext/selling/doctype/opportunity/opportunity.py
+++ b/erpnext/selling/doctype/opportunity/opportunity.py
@@ -78,7 +78,7 @@ class Opportunity(TransactionBase):
super(Opportunity, self).add_calendar_event(opts, force)
def validate_item_details(self):
- if not self.get('enquiry_details'):
+ if not self.get('items'):
frappe.throw(_("Items required"))
def validate_lead_cust(self):
diff --git a/erpnext/selling/doctype/opportunity/test_records.json b/erpnext/selling/doctype/opportunity/test_records.json
index 39709036358..dcda5d58fee 100644
--- a/erpnext/selling/doctype/opportunity/test_records.json
+++ b/erpnext/selling/doctype/opportunity/test_records.json
@@ -5,7 +5,7 @@
"enquiry_from": "Lead",
"enquiry_type": "Sales",
"lead": "_T-Lead-00001",
- "enquiry_details": [{
+ "items": [{
"item_name": "Test Item",
"description": "Some description"
}]
diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js
index 857a2591291..c9e7614e141 100644
--- a/erpnext/selling/doctype/quotation/quotation.js
+++ b/erpnext/selling/doctype/quotation/quotation.js
@@ -4,8 +4,8 @@
// Module CRM
// =====================================================================================
cur_frm.cscript.tname = "Quotation Item";
-cur_frm.cscript.fname = "quotation_details";
-cur_frm.cscript.other_fname = "other_charges";
+cur_frm.cscript.fname = "items";
+cur_frm.cscript.other_fname = "taxes";
cur_frm.cscript.sales_team_fname = "sales_team";
{% include 'selling/sales_common.js' %}
@@ -169,4 +169,4 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
cur_frm.cscript.send_sms = function() {
frappe.require("assets/erpnext/js/sms_manager.js");
var sms_man = new SMSManager(cur_frm.doc);
-}
\ No newline at end of file
+}
diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py
index f12f396abd8..43c31c69723 100644
--- a/erpnext/selling/doctype/quotation/quotation.py
+++ b/erpnext/selling/doctype/quotation/quotation.py
@@ -10,12 +10,12 @@ from frappe import _
from erpnext.controllers.selling_controller import SellingController
form_grid_templates = {
- "quotation_details": "templates/form_grid/item_grid.html"
+ "items": "templates/form_grid/item_grid.html"
}
class Quotation(SellingController):
tname = 'Quotation Item'
- fname = 'quotation_details'
+ fname = 'items'
def validate(self):
super(Quotation, self).validate()
@@ -30,7 +30,7 @@ class Quotation(SellingController):
def validate_for_items(self):
chk_dupl_itm = []
- for d in self.get('quotation_details'):
+ for d in self.get('items'):
if [cstr(d.item_code),cstr(d.description)] in chk_dupl_itm:
frappe.throw(_("Item {0} with same description entered twice").format(d.item_code))
else:
@@ -40,14 +40,14 @@ class Quotation(SellingController):
super(Quotation, self).validate_order_type()
if self.order_type in ['Maintenance', 'Service']:
- for d in self.get('quotation_details'):
+ for d in self.get('items'):
is_service_item = frappe.db.sql("select is_service_item from `tabItem` where name=%s", d.item_code)
is_service_item = is_service_item and is_service_item[0][0] or 'No'
if is_service_item == 'No':
frappe.throw(_("Item {0} must be Service Item").format(d.item_code))
else:
- for d in self.get('quotation_details'):
+ for d in self.get('items'):
is_sales_item = frappe.db.sql("select is_sales_item from `tabItem` where name=%s", d.item_code)
is_sales_item = is_sales_item and is_sales_item[0][0] or 'No'
@@ -62,7 +62,7 @@ class Quotation(SellingController):
self.quotation_to = "Lead"
def update_opportunity(self):
- for opportunity in list(set([d.prevdoc_docname for d in self.get("quotation_details")])):
+ for opportunity in list(set([d.prevdoc_docname for d in self.get("items")])):
if opportunity:
frappe.get_doc("Opportunity", opportunity).set_status(update=True)
@@ -75,7 +75,7 @@ class Quotation(SellingController):
frappe.throw(_("Cannot set as Lost as Sales Order is made."))
def check_item_table(self):
- if not self.get('quotation_details'):
+ if not self.get('items'):
frappe.throw(_("Please enter item details"))
def on_submit(self):
@@ -94,7 +94,7 @@ class Quotation(SellingController):
def print_other_charges(self,docname):
print_lst = []
- for d in self.get('other_charges'):
+ for d in self.get('taxes'):
lst1 = []
lst1.append(d.description)
lst1.append(d.total)
diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py
index 97d41107a0b..62ed7a87dcd 100644
--- a/erpnext/selling/doctype/quotation/test_quotation.py
+++ b/erpnext/selling/doctype/quotation/test_quotation.py
@@ -21,9 +21,9 @@ class TestQuotation(unittest.TestCase):
sales_order = make_sales_order(quotation.name)
self.assertEquals(sales_order.doctype, "Sales Order")
- self.assertEquals(len(sales_order.get("sales_order_details")), 1)
- self.assertEquals(sales_order.get("sales_order_details")[0].doctype, "Sales Order Item")
- self.assertEquals(sales_order.get("sales_order_details")[0].prevdoc_docname, quotation.name)
+ self.assertEquals(len(sales_order.get("items")), 1)
+ self.assertEquals(sales_order.get("items")[0].doctype, "Sales Order Item")
+ self.assertEquals(sales_order.get("items")[0].prevdoc_docname, quotation.name)
self.assertEquals(sales_order.customer, "_Test Customer")
sales_order.delivery_date = "2014-01-01"
diff --git a/erpnext/selling/doctype/quotation/test_records.json b/erpnext/selling/doctype/quotation/test_records.json
index 054144ebf4d..1dc4b07bccb 100644
--- a/erpnext/selling/doctype/quotation/test_records.json
+++ b/erpnext/selling/doctype/quotation/test_records.json
@@ -13,7 +13,7 @@
"order_type": "Sales",
"plc_conversion_rate": 1.0,
"price_list_currency": "INR",
- "quotation_details": [
+ "items": [
{
"base_amount": 1000.0,
"base_rate": 100.0,
@@ -21,7 +21,7 @@
"doctype": "Quotation Item",
"item_code": "_Test Item Home Desktop 100",
"item_name": "CPU",
- "parentfield": "quotation_details",
+ "parentfield": "items",
"qty": 10.0,
"rate": 100.0
}
diff --git a/erpnext/selling/doctype/sales_bom/sales_bom.js b/erpnext/selling/doctype/sales_bom/sales_bom.js
index 2e0e7493922..bbc5569fb77 100644
--- a/erpnext/selling/doctype/sales_bom/sales_bom.js
+++ b/erpnext/selling/doctype/sales_bom/sales_bom.js
@@ -15,6 +15,6 @@ cur_frm.fields_dict.new_item_code.query_description = __('Please select Item whe
cur_frm.cscript.item_code = function(doc, dt, dn) {
var d = locals[dt][dn];
if (d.item_code){
- return get_server_fields('get_item_details', d.item_code, 'sales_bom_items', doc ,dt, dn, 1);
+ return get_server_fields('get_item_details', d.item_code, 'items', doc ,dt, dn, 1);
}
}
diff --git a/erpnext/selling/doctype/sales_bom/test_records.json b/erpnext/selling/doctype/sales_bom/test_records.json
index beb8289f77e..a19bc1a2e43 100644
--- a/erpnext/selling/doctype/sales_bom/test_records.json
+++ b/erpnext/selling/doctype/sales_bom/test_records.json
@@ -2,17 +2,17 @@
{
"doctype": "Sales BOM",
"new_item_code": "_Test Sales BOM Item",
- "sales_bom_items": [
+ "items": [
{
"doctype": "Sales BOM Item",
"item_code": "_Test Item",
- "parentfield": "sales_bom_items",
+ "parentfield": "items",
"qty": 5.0
},
{
"doctype": "Sales BOM Item",
"item_code": "_Test Item Home Desktop 100",
- "parentfield": "sales_bom_items",
+ "parentfield": "items",
"qty": 2.0
}
]
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index 65b91f4bd78..eff37ca9111 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -4,8 +4,8 @@
// Module CRM
cur_frm.cscript.tname = "Sales Order Item";
-cur_frm.cscript.fname = "sales_order_details";
-cur_frm.cscript.other_fname = "other_charges";
+cur_frm.cscript.fname = "items";
+cur_frm.cscript.other_fname = "taxes";
cur_frm.cscript.sales_team_fname = "sales_team";
{% include 'selling/sales_common.js' %}
@@ -198,4 +198,4 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
cur_frm.cscript.send_sms = function() {
frappe.require("assets/erpnext/js/sms_manager.js");
var sms_man = new SMSManager(cur_frm.doc);
-};
\ No newline at end of file
+};
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index 3ee119d4382..e0254fa992d 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -11,12 +11,12 @@ from frappe.model.mapper import get_mapped_doc
from erpnext.controllers.selling_controller import SellingController
form_grid_templates = {
- "sales_order_details": "templates/form_grid/item_grid.html"
+ "items": "templates/form_grid/item_grid.html"
}
class SalesOrder(SellingController):
tname = 'Sales Order Item'
- fname = 'sales_order_details'
+ fname = 'items'
person_tname = 'Target Detail'
partner_tname = 'Partner Target Detail'
territory_tname = 'Territory Target Detail'
@@ -42,7 +42,7 @@ class SalesOrder(SellingController):
def validate_for_items(self):
check_list, flag = [], 0
chk_dupl_itm = []
- for d in self.get('sales_order_details'):
+ for d in self.get('items'):
e = [d.item_code, d.description, d.warehouse, d.prevdoc_docname or '']
f = [d.item_code, d.description]
@@ -68,7 +68,7 @@ class SalesOrder(SellingController):
d.projected_qty = tot_avail_qty and flt(tot_avail_qty[0][0]) or 0
def validate_sales_mntc_quotation(self):
- for d in self.get('sales_order_details'):
+ for d in self.get('items'):
if d.prevdoc_docname:
res = frappe.db.sql("select name from `tabQuotation` where name=%s and order_type = %s", (d.prevdoc_docname, self.order_type))
if not res:
@@ -104,7 +104,7 @@ class SalesOrder(SellingController):
self.validate_warehouse()
from erpnext.stock.doctype.packed_item.packed_item import make_packing_list
- make_packing_list(self,'sales_order_details')
+ make_packing_list(self,'items')
self.validate_with_previous_doc()
diff --git a/erpnext/selling/doctype/sales_order/test_records.json b/erpnext/selling/doctype/sales_order/test_records.json
index 8db9915c2d5..0154d321a95 100644
--- a/erpnext/selling/doctype/sales_order/test_records.json
+++ b/erpnext/selling/doctype/sales_order/test_records.json
@@ -16,7 +16,7 @@
"order_type": "Sales",
"plc_conversion_rate": 1.0,
"price_list_currency": "INR",
- "sales_order_details": [
+ "items": [
{
"base_amount": 1000.0,
"base_rate": 100.0,
@@ -24,7 +24,7 @@
"doctype": "Sales Order Item",
"item_code": "_Test Item Home Desktop 100",
"item_name": "CPU",
- "parentfield": "sales_order_details",
+ "parentfield": "items",
"qty": 10.0,
"rate": 100.0,
"warehouse": "_Test Warehouse - _TC"
diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py
index 775495ac5fc..11cc3afe4b2 100644
--- a/erpnext/selling/doctype/sales_order/test_sales_order.py
+++ b/erpnext/selling/doctype/sales_order/test_sales_order.py
@@ -24,7 +24,7 @@ class TestSalesOrder(unittest.TestCase):
mr = make_material_request(so.name)
self.assertEquals(mr.material_request_type, "Purchase")
- self.assertEquals(len(mr.get("indent_details")), len(sales_order.get("sales_order_details")))
+ self.assertEquals(len(mr.get("items")), len(sales_order.get("items")))
def test_make_delivery_note(self):
from erpnext.selling.doctype.sales_order.sales_order import make_delivery_note
@@ -37,7 +37,7 @@ class TestSalesOrder(unittest.TestCase):
dn = self.make_next_doc_testcase(so, "Delivery Note")
self.assertEquals(dn.doctype, "Delivery Note")
- self.assertEquals(len(dn.get("delivery_note_details")), len(so.get("sales_order_details")))
+ self.assertEquals(len(dn.get("items")), len(so.get("items")))
def test_make_sales_invoice(self):
from erpnext.selling.doctype.sales_order.sales_order import make_sales_invoice
@@ -50,7 +50,7 @@ class TestSalesOrder(unittest.TestCase):
si = self.make_next_doc_testcase(so, "Sales Invoice")
self.assertEquals(si.doctype, "Sales Invoice")
- self.assertEquals(len(si.get("entries")), len(so.get("sales_order_details")))
+ self.assertEquals(len(si.get("entries")), len(so.get("items")))
self.assertEquals(len(si.get("entries")), 1)
si.set("debit_to", "_Test Receivable - _TC")
@@ -66,7 +66,7 @@ class TestSalesOrder(unittest.TestCase):
dn = self.make_next_doc_testcase(so, "Delivery Note")
- dn.get("delivery_note_details")[0].qty = 6
+ dn.get("items")[0].qty = 6
dn.posting_date = "2013-10-10"
dn.insert()
@@ -75,7 +75,7 @@ class TestSalesOrder(unittest.TestCase):
sales_order = frappe.get_doc("Sales Order", so.name)
- self.assertEquals(sales_order.get("sales_order_details")[0].delivered_qty, 6)
+ self.assertEquals(sales_order.get("items")[0].delivered_qty, 6)
#Check delivered_qty after make_sales_invoice without update_stock checked
si1 = self.make_next_doc_testcase(sales_order, "Sales Invoice")
@@ -88,7 +88,7 @@ class TestSalesOrder(unittest.TestCase):
sales_order = frappe.get_doc("Sales Order", sales_order.name)
- self.assertEquals(sales_order.get("sales_order_details")[0].delivered_qty, 6)
+ self.assertEquals(sales_order.get("items")[0].delivered_qty, 6)
#Check delivered_qty after make_sales_invoice with update_stock checked
si2 = self.make_next_doc_testcase(sales_order, "Sales Invoice")
@@ -102,7 +102,7 @@ class TestSalesOrder(unittest.TestCase):
sales_order = frappe.get_doc("Sales Order", sales_order.name)
- self.assertEquals(sales_order.get("sales_order_details")[0].delivered_qty, 9)
+ self.assertEquals(sales_order.get("items")[0].delivered_qty, 9)
def make_next_doc_testcase(self, so, next_doc = None):
@@ -133,14 +133,14 @@ class TestSalesOrder(unittest.TestCase):
from erpnext.stock.doctype.delivery_note.test_delivery_note import test_records as dn_test_records
from erpnext.stock.doctype.delivery_note.test_delivery_note import _insert_purchase_receipt
- _insert_purchase_receipt(so.get("sales_order_details")[0].item_code)
+ _insert_purchase_receipt(so.get("items")[0].item_code)
dn = frappe.get_doc(frappe.copy_doc(dn_test_records[0]))
- dn.get("delivery_note_details")[0].item_code = so.get("sales_order_details")[0].item_code
- dn.get("delivery_note_details")[0].against_sales_order = so.name
- dn.get("delivery_note_details")[0].so_detail = so.get("sales_order_details")[0].name
+ dn.get("items")[0].item_code = so.get("items")[0].item_code
+ dn.get("items")[0].against_sales_order = so.name
+ dn.get("items")[0].so_detail = so.get("items")[0].name
if delivered_qty:
- dn.get("delivery_note_details")[0].qty = delivered_qty
+ dn.get("items")[0].qty = delivered_qty
dn.insert()
dn.submit()
return dn
@@ -161,21 +161,21 @@ class TestSalesOrder(unittest.TestCase):
def test_reserved_qty_for_so(self):
# reset bin
- so_item = test_records[0]["sales_order_details"][0].copy()
+ so_item = test_records[0]["items"][0].copy()
self.delete_bin(so_item["item_code"], so_item["warehouse"])
# submit
so = self.create_so()
- self.check_reserved_qty(so.get("sales_order_details")[0].item_code, so.get("sales_order_details")[0].warehouse, 10.0)
+ self.check_reserved_qty(so.get("items")[0].item_code, so.get("items")[0].warehouse, 10.0)
# cancel
so.cancel()
- self.check_reserved_qty(so.get("sales_order_details")[0].item_code, so.get("sales_order_details")[0].warehouse, 0.0)
+ self.check_reserved_qty(so.get("items")[0].item_code, so.get("items")[0].warehouse, 0.0)
def test_reserved_qty_for_partial_delivery(self):
# reset bin
- so_item = test_records[0]["sales_order_details"][0].copy()
+ so_item = test_records[0]["items"][0].copy()
self.delete_bin(so_item["item_code"], so_item["warehouse"])
# submit so
@@ -187,25 +187,25 @@ class TestSalesOrder(unittest.TestCase):
# submit dn
dn = self.create_dn_against_so(so)
- self.check_reserved_qty(so.get("sales_order_details")[0].item_code, so.get("sales_order_details")[0].warehouse, 5.0)
+ self.check_reserved_qty(so.get("items")[0].item_code, so.get("items")[0].warehouse, 5.0)
# stop so
so.load_from_db()
so.stop_sales_order()
- self.check_reserved_qty(so.get("sales_order_details")[0].item_code, so.get("sales_order_details")[0].warehouse, 0.0)
+ self.check_reserved_qty(so.get("items")[0].item_code, so.get("items")[0].warehouse, 0.0)
# unstop so
so.load_from_db()
so.unstop_sales_order()
- self.check_reserved_qty(so.get("sales_order_details")[0].item_code, so.get("sales_order_details")[0].warehouse, 5.0)
+ self.check_reserved_qty(so.get("items")[0].item_code, so.get("items")[0].warehouse, 5.0)
# cancel dn
dn.cancel()
- self.check_reserved_qty(so.get("sales_order_details")[0].item_code, so.get("sales_order_details")[0].warehouse, 10.0)
+ self.check_reserved_qty(so.get("items")[0].item_code, so.get("items")[0].warehouse, 10.0)
def test_reserved_qty_for_over_delivery(self):
# reset bin
- so_item = test_records[0]["sales_order_details"][0].copy()
+ so_item = test_records[0]["items"][0].copy()
self.delete_bin(so_item["item_code"], so_item["warehouse"])
# submit so
@@ -215,42 +215,42 @@ class TestSalesOrder(unittest.TestCase):
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1)
# set over-delivery tolerance
- frappe.db.set_value('Item', so.get("sales_order_details")[0].item_code, 'tolerance', 50)
+ frappe.db.set_value('Item', so.get("items")[0].item_code, 'tolerance', 50)
# submit dn
dn = self.create_dn_against_so(so, 15)
- self.check_reserved_qty(so.get("sales_order_details")[0].item_code, so.get("sales_order_details")[0].warehouse, 0.0)
+ self.check_reserved_qty(so.get("items")[0].item_code, so.get("items")[0].warehouse, 0.0)
# cancel dn
dn.cancel()
- self.check_reserved_qty(so.get("sales_order_details")[0].item_code, so.get("sales_order_details")[0].warehouse, 10.0)
+ self.check_reserved_qty(so.get("items")[0].item_code, so.get("items")[0].warehouse, 10.0)
def test_reserved_qty_for_so_with_packing_list(self):
from erpnext.selling.doctype.sales_bom.test_sales_bom import test_records as sbom_test_records
# change item in test so record
test_record = copy.deepcopy(test_records[0])
- test_record["sales_order_details"][0]["item_code"] = "_Test Sales BOM Item"
+ test_record["items"][0]["item_code"] = "_Test Sales BOM Item"
# reset bin
- self.delete_bin(sbom_test_records[0]["sales_bom_items"][0]["item_code"], test_record.get("sales_order_details")[0]["warehouse"])
- self.delete_bin(sbom_test_records[0]["sales_bom_items"][1]["item_code"], test_record.get("sales_order_details")[0]["warehouse"])
+ self.delete_bin(sbom_test_records[0]["items"][0]["item_code"], test_record.get("items")[0]["warehouse"])
+ self.delete_bin(sbom_test_records[0]["items"][1]["item_code"], test_record.get("items")[0]["warehouse"])
# submit
so = self.create_so(test_record)
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][0]["item_code"],
- so.get("sales_order_details")[0].warehouse, 50.0)
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][1]["item_code"],
- so.get("sales_order_details")[0].warehouse, 20.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][0]["item_code"],
+ so.get("items")[0].warehouse, 50.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][1]["item_code"],
+ so.get("items")[0].warehouse, 20.0)
# cancel
so.cancel()
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][0]["item_code"],
- so.get("sales_order_details")[0].warehouse, 0.0)
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][1]["item_code"],
- so.get("sales_order_details")[0].warehouse, 0.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][0]["item_code"],
+ so.get("items")[0].warehouse, 0.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][1]["item_code"],
+ so.get("items")[0].warehouse, 0.0)
def test_reserved_qty_for_partial_delivery_with_packing_list(self):
from erpnext.selling.doctype.sales_bom.test_sales_bom import test_records as sbom_test_records
@@ -258,11 +258,11 @@ class TestSalesOrder(unittest.TestCase):
# change item in test so record
test_record = frappe.copy_doc(test_records[0])
- test_record.get("sales_order_details")[0].item_code = "_Test Sales BOM Item"
+ test_record.get("items")[0].item_code = "_Test Sales BOM Item"
# reset bin
- self.delete_bin(sbom_test_records[0]["sales_bom_items"][0]["item_code"], test_record.get("sales_order_details")[0].warehouse)
- self.delete_bin(sbom_test_records[0]["sales_bom_items"][1]["item_code"], test_record.get("sales_order_details")[0].warehouse)
+ self.delete_bin(sbom_test_records[0]["items"][0]["item_code"], test_record.get("items")[0].warehouse)
+ self.delete_bin(sbom_test_records[0]["items"][1]["item_code"], test_record.get("items")[0].warehouse)
# submit
so = self.create_so(test_record)
@@ -273,45 +273,45 @@ class TestSalesOrder(unittest.TestCase):
# submit dn
dn = self.create_dn_against_so(so)
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][0]["item_code"],
- so.get("sales_order_details")[0].warehouse, 25.0)
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][1]["item_code"],
- so.get("sales_order_details")[0].warehouse, 10.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][0]["item_code"],
+ so.get("items")[0].warehouse, 25.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][1]["item_code"],
+ so.get("items")[0].warehouse, 10.0)
# stop so
so.load_from_db()
so.stop_sales_order()
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][0]["item_code"],
- so.get("sales_order_details")[0].warehouse, 0.0)
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][1]["item_code"],
- so.get("sales_order_details")[0].warehouse, 0.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][0]["item_code"],
+ so.get("items")[0].warehouse, 0.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][1]["item_code"],
+ so.get("items")[0].warehouse, 0.0)
# unstop so
so.load_from_db()
so.unstop_sales_order()
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][0]["item_code"],
- so.get("sales_order_details")[0].warehouse, 25.0)
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][1]["item_code"],
- so.get("sales_order_details")[0].warehouse, 10.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][0]["item_code"],
+ so.get("items")[0].warehouse, 25.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][1]["item_code"],
+ so.get("items")[0].warehouse, 10.0)
# cancel dn
dn.cancel()
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][0]["item_code"],
- so.get("sales_order_details")[0].warehouse, 50.0)
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][1]["item_code"],
- so.get("sales_order_details")[0].warehouse, 20.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][0]["item_code"],
+ so.get("items")[0].warehouse, 50.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][1]["item_code"],
+ so.get("items")[0].warehouse, 20.0)
def test_reserved_qty_for_over_delivery_with_packing_list(self):
from erpnext.selling.doctype.sales_bom.test_sales_bom import test_records as sbom_test_records
# change item in test so record
test_record = frappe.copy_doc(test_records[0])
- test_record.get("sales_order_details")[0].item_code = "_Test Sales BOM Item"
+ test_record.get("items")[0].item_code = "_Test Sales BOM Item"
# reset bin
- self.delete_bin(sbom_test_records[0]["sales_bom_items"][0]["item_code"], test_record.get("sales_order_details")[0].warehouse)
- self.delete_bin(sbom_test_records[0]["sales_bom_items"][1]["item_code"], test_record.get("sales_order_details")[0].warehouse)
+ self.delete_bin(sbom_test_records[0]["items"][0]["item_code"], test_record.get("items")[0].warehouse)
+ self.delete_bin(sbom_test_records[0]["items"][1]["item_code"], test_record.get("items")[0].warehouse)
# submit
so = self.create_so(test_record)
@@ -320,22 +320,22 @@ class TestSalesOrder(unittest.TestCase):
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1)
# set over-delivery tolerance
- frappe.db.set_value('Item', so.get("sales_order_details")[0].item_code, 'tolerance', 50)
+ frappe.db.set_value('Item', so.get("items")[0].item_code, 'tolerance', 50)
# submit dn
dn = self.create_dn_against_so(so, 15)
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][0]["item_code"],
- so.get("sales_order_details")[0].warehouse, 0.0)
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][1]["item_code"],
- so.get("sales_order_details")[0].warehouse, 0.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][0]["item_code"],
+ so.get("items")[0].warehouse, 0.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][1]["item_code"],
+ so.get("items")[0].warehouse, 0.0)
# cancel dn
dn.cancel()
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][0]["item_code"],
- so.get("sales_order_details")[0].warehouse, 50.0)
- self.check_reserved_qty(sbom_test_records[0]["sales_bom_items"][1]["item_code"],
- so.get("sales_order_details")[0].warehouse, 20.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][0]["item_code"],
+ so.get("items")[0].warehouse, 50.0)
+ self.check_reserved_qty(sbom_test_records[0]["items"][1]["item_code"],
+ so.get("items")[0].warehouse, 20.0)
def test_warehouse_user(self):
frappe.permissions.add_user_permission("Warehouse", "_Test Warehouse 1 - _TC", "test@example.com")
@@ -356,7 +356,7 @@ class TestSalesOrder(unittest.TestCase):
so.company = "_Test Company 1"
so.conversion_rate = 0.02
so.plc_conversion_rate = 0.02
- so.get("sales_order_details")[0].warehouse = "_Test Warehouse 2 - _TC1"
+ so.get("items")[0].warehouse = "_Test Warehouse 2 - _TC1"
self.assertRaises(frappe.PermissionError, so.insert)
frappe.set_user("test2@example.com")
@@ -371,11 +371,11 @@ class TestSalesOrder(unittest.TestCase):
from erpnext.selling.doctype.sales_order.sales_order import make_delivery_note
sales_order = frappe.copy_doc(test_records[0])
- sales_order.sales_order_details[0].qty = 5
+ sales_order.items[0].qty = 5
sales_order.insert()
sales_order.submit()
- _insert_purchase_receipt(sales_order.get("sales_order_details")[0].item_code)
+ _insert_purchase_receipt(sales_order.get("items")[0].item_code)
delivery_note = make_delivery_note(sales_order.name)
delivery_note.posting_date = sales_order.transaction_date
diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index 05a523cc2fd..6df14ea52bf 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -102,8 +102,8 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
this._super();
this.frm.toggle_display("customer_name",
(this.frm.doc.customer_name && this.frm.doc.customer_name!==this.frm.doc.customer));
- if(this.frm.fields_dict.packing_details) {
- var packing_list_exists = (this.frm.doc.packing_details || []).length;
+ if(this.frm.fields_dict.packed_items) {
+ var packing_list_exists = (this.frm.doc.packed_items || []).length;
this.frm.toggle_display("packing_list", packing_list_exists ? true : false);
}
},
@@ -241,7 +241,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
calculate_taxes_and_totals: function(update_paid_amount) {
this._super();
- this.calculate_total_advance("Sales Invoice", "advance_adjustment_details", update_paid_amount);
+ this.calculate_total_advance("Sales Invoice", "advances", update_paid_amount);
this.calculate_commission();
this.calculate_contribution();
@@ -477,7 +477,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
set_sales_bom_help: function(doc) {
if(!cur_frm.fields_dict.packing_list) return;
- if ((doc.packing_details || []).length) {
+ if ((doc.packed_items || []).length) {
$(cur_frm.fields_dict.packing_list.row.wrapper).toggle(true);
if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
@@ -560,17 +560,17 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
setup_field_label_map(["rate", "price_list_rate", "amount"],
this.frm.doc.currency, this.fname);
- setup_field_label_map(["tax_amount", "total"], company_currency, "other_charges");
+ setup_field_label_map(["tax_amount", "total"], company_currency, "taxes");
- if(this.frm.fields_dict["advance_allocation_details"]) {
+ if(this.frm.fields_dict["advances"]) {
setup_field_label_map(["advance_amount", "allocated_amount"], company_currency,
- "advance_allocation_details");
+ "advances");
}
// toggle columns
var item_grid = this.frm.fields_dict[this.fname].grid;
var show = (this.frm.doc.currency != company_currency) ||
- ((cur_frm.doc.other_charges || []).filter(
+ ((cur_frm.doc.taxes || []).filter(
function(d) { return d.included_in_print_rate===1}).length);
$.each(["base_rate", "base_price_list_rate", "base_amount"], function(i, fname) {
diff --git a/erpnext/setup/doctype/customer_group/customer_group.js b/erpnext/setup/doctype/customer_group/customer_group.js
index 902f4a6288d..da1d1b37f04 100644
--- a/erpnext/setup/doctype/customer_group/customer_group.js
+++ b/erpnext/setup/doctype/customer_group/customer_group.js
@@ -26,7 +26,7 @@ cur_frm.fields_dict['parent_customer_group'].get_query = function(doc,cdt,cdn) {
}
}
-cur_frm.fields_dict['party_accounts'].grid.get_field('account').get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict['accounts'].grid.get_field('account').get_query = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
return {
filters: {
diff --git a/erpnext/setup/doctype/customer_group/customer_group.json b/erpnext/setup/doctype/customer_group/customer_group.json
index 5e1ccab72aa..fc3a3d4e295 100644
--- a/erpnext/setup/doctype/customer_group/customer_group.json
+++ b/erpnext/setup/doctype/customer_group/customer_group.json
@@ -116,9 +116,9 @@
"permlevel": 0
},
{
- "fieldname": "party_accounts",
+ "fieldname": "accounts",
"fieldtype": "Table",
- "label": "Party Accounts",
+ "label": "Accounts",
"options": "Party Account",
"permlevel": 0
}
@@ -126,7 +126,7 @@
"icon": "icon-sitemap",
"idx": 1,
"in_create": 1,
- "modified": "2014-08-29 16:37:35.877256",
+ "modified": "2014-12-25 12:48:13.727656",
"modified_by": "Administrator",
"module": "Setup",
"name": "Customer Group",
@@ -191,5 +191,5 @@
}
],
"read_only": 1,
- "search_fields": "name,parent_customer_group"
+ "search_fields": "parent_customer_group"
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/item_group/item_group.json b/erpnext/setup/doctype/item_group/item_group.json
index af5a5c36e05..8aa3aa5eb62 100644
--- a/erpnext/setup/doctype/item_group/item_group.json
+++ b/erpnext/setup/doctype/item_group/item_group.json
@@ -1,5 +1,5 @@
{
- "allow_import": 1,
+ "allow_import": 1,
"allow_rename": 1,
"autoname": "field:item_group_name",
"creation": "2013-03-28 10:35:29",
@@ -134,9 +134,9 @@
},
{
"depends_on": "show_in_website",
- "fieldname": "item_website_specifications",
+ "fieldname": "website_specifications",
"fieldtype": "Table",
- "label": "Item Website Specifications",
+ "label": "Website Specifications",
"options": "Item Website Specification",
"permlevel": 0
},
@@ -190,7 +190,7 @@
"in_create": 1,
"issingle": 0,
"max_attachments": 3,
- "modified": "2014-08-20 17:48:34.489750",
+ "modified": "2014-12-25 12:33:43.359081",
"modified_by": "Administrator",
"module": "Setup",
"name": "Item Group",
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.js b/erpnext/setup/doctype/sales_partner/sales_partner.js
index 3a03bfe6411..09626602241 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.js
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.js
@@ -12,7 +12,7 @@ cur_frm.cscript.refresh = function(doc,dt,dn){
}
}
-cur_frm.fields_dict['partner_target_details'].grid.get_field("item_group").get_query = function(doc, dt, dn) {
+cur_frm.fields_dict['targets'].grid.get_field("item_group").get_query = function(doc, dt, dn) {
return{
filters:{ 'is_group': "No" }
}
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.json b/erpnext/setup/doctype/sales_partner/sales_partner.json
index 30ed9bc3914..98debb35f1f 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.json
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.json
@@ -124,7 +124,7 @@
"label": "Target Distribution",
"oldfieldname": "distribution_id",
"oldfieldtype": "Link",
- "options": "Budget Distribution",
+ "options": "Monthly Distribution",
"permlevel": 0
},
{
@@ -200,7 +200,7 @@
"icon": "icon-user",
"idx": 1,
"in_create": 0,
- "modified": "2014-12-24 16:45:13.652374",
+ "modified": "2014-12-25 15:37:44.884917",
"modified_by": "Administrator",
"module": "Setup",
"name": "Sales Partner",
diff --git a/erpnext/setup/doctype/sales_person/sales_person.js b/erpnext/setup/doctype/sales_person/sales_person.js
index b342485ee55..3a12c24ba09 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.js
+++ b/erpnext/setup/doctype/sales_person/sales_person.js
@@ -27,7 +27,7 @@ cur_frm.fields_dict['parent_sales_person'].get_query = function(doc, cdt, cdn) {
}
}
-cur_frm.fields_dict['target_details'].grid.get_field("item_group").get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict['targets'].grid.get_field("item_group").get_query = function(doc, cdt, cdn) {
return {
filters: { 'is_group': "No" }
}
diff --git a/erpnext/setup/doctype/sales_person/sales_person.json b/erpnext/setup/doctype/sales_person/sales_person.json
index e8431d8a394..a284b00312d 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.json
+++ b/erpnext/setup/doctype/sales_person/sales_person.json
@@ -126,7 +126,7 @@
"label": "Target Distribution",
"oldfieldname": "distribution_id",
"oldfieldtype": "Link",
- "options": "Budget Distribution",
+ "options": "Monthly Distribution",
"permlevel": 0,
"search_index": 0
},
@@ -143,7 +143,7 @@
"icon": "icon-user",
"idx": 1,
"in_create": 1,
- "modified": "2014-12-24 16:46:02.819886",
+ "modified": "2014-12-25 15:37:37.695495",
"modified_by": "Administrator",
"module": "Setup",
"name": "Sales Person",
diff --git a/erpnext/setup/doctype/sales_person/sales_person.py b/erpnext/setup/doctype/sales_person/sales_person.py
index f37b139d6cf..ce7b572fbe2 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.py
+++ b/erpnext/setup/doctype/sales_person/sales_person.py
@@ -11,7 +11,7 @@ class SalesPerson(NestedSet):
nsm_parent_field = 'parent_sales_person';
def validate(self):
- for d in self.get('target_details'):
+ for d in self.get('targets'):
if not flt(d.target_qty) and not flt(d.target_amount):
frappe.throw(_("Either target qty or target amount is mandatory."))
diff --git a/erpnext/setup/doctype/sms_settings/sms_settings.py b/erpnext/setup/doctype/sms_settings/sms_settings.py
index de1164118e7..a9b0bca5c86 100644
--- a/erpnext/setup/doctype/sms_settings/sms_settings.py
+++ b/erpnext/setup/doctype/sms_settings/sms_settings.py
@@ -71,7 +71,7 @@ def send_sms(receiver_list, msg, sender_name = ''):
def send_via_gateway(arg):
ss = frappe.get_doc('SMS Settings', 'SMS Settings')
args = {ss.message_parameter : arg.get('message')}
- for d in ss.get("static_parameter_details"):
+ for d in ss.get("static_parameters"):
args[d.parameter] = d.value
resp = []
diff --git a/erpnext/setup/doctype/supplier_type/supplier_type.js b/erpnext/setup/doctype/supplier_type/supplier_type.js
index f54edca92cb..e78de0a81f9 100644
--- a/erpnext/setup/doctype/supplier_type/supplier_type.js
+++ b/erpnext/setup/doctype/supplier_type/supplier_type.js
@@ -5,7 +5,7 @@ cur_frm.cscript.refresh = function(doc) {
cur_frm.set_intro(doc.__islocal ? "" : __("There is nothing to edit."))
}
-cur_frm.fields_dict['party_accounts'].grid.get_field('account').get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict['accounts'].grid.get_field('account').get_query = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
return {
filters: {
diff --git a/erpnext/setup/doctype/supplier_type/supplier_type.json b/erpnext/setup/doctype/supplier_type/supplier_type.json
index 51ffb2a24fb..827d9e6e77f 100644
--- a/erpnext/setup/doctype/supplier_type/supplier_type.json
+++ b/erpnext/setup/doctype/supplier_type/supplier_type.json
@@ -30,16 +30,16 @@
"permlevel": 0
},
{
- "fieldname": "party_accounts",
+ "fieldname": "accounts",
"fieldtype": "Table",
- "label": "Party Accounts",
+ "label": "Accounts",
"options": "Party Account",
"permlevel": 0
}
],
"icon": "icon-flag",
"idx": 1,
- "modified": "2014-08-29 16:38:22.219286",
+ "modified": "2014-12-25 12:48:28.195655",
"modified_by": "Administrator",
"module": "Setup",
"name": "Supplier Type",
diff --git a/erpnext/setup/doctype/territory/territory.js b/erpnext/setup/doctype/territory/territory.js
index f8706416626..935845a94c2 100644
--- a/erpnext/setup/doctype/territory/territory.js
+++ b/erpnext/setup/doctype/territory/territory.js
@@ -29,7 +29,7 @@ cur_frm.fields_dict['parent_territory'].get_query = function(doc,cdt,cdn) {
// ******************** ITEM Group ********************************
-cur_frm.fields_dict['target_details'].grid.get_field("item_group").get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict['targets'].grid.get_field("item_group").get_query = function(doc, cdt, cdn) {
return{
filters:{ 'is_group': "No"}
}
diff --git a/erpnext/setup/doctype/territory/territory.json b/erpnext/setup/doctype/territory/territory.json
index de5d4a442c8..6ba8fc67562 100644
--- a/erpnext/setup/doctype/territory/territory.json
+++ b/erpnext/setup/doctype/territory/territory.json
@@ -129,14 +129,14 @@
"label": "Target Distribution",
"oldfieldname": "distribution_id",
"oldfieldtype": "Link",
- "options": "Budget Distribution",
+ "options": "Monthly Distribution",
"permlevel": 0
}
],
"icon": "icon-map-marker",
"idx": 1,
"in_create": 1,
- "modified": "2014-12-24 16:46:36.782166",
+ "modified": "2014-12-25 15:37:31.563276",
"modified_by": "Administrator",
"module": "Setup",
"name": "Territory",
diff --git a/erpnext/setup/doctype/territory/territory.py b/erpnext/setup/doctype/territory/territory.py
index d1b8dda3366..8eb4dcef1a8 100644
--- a/erpnext/setup/doctype/territory/territory.py
+++ b/erpnext/setup/doctype/territory/territory.py
@@ -14,7 +14,7 @@ class Territory(NestedSet):
nsm_parent_field = 'parent_territory'
def validate(self):
- for d in self.get('target_details'):
+ for d in self.get('targets'):
if not flt(d.target_qty) and not flt(d.target_amount):
frappe.throw(_("Either target qty or target amount is mandatory"))
diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.py b/erpnext/setup/page/setup_wizard/setup_wizard.py
index 52b3f4b8490..60c245031a7 100644
--- a/erpnext/setup/page/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/page/setup_wizard/setup_wizard.py
@@ -153,7 +153,7 @@ def create_price_lists(args):
"buying": 1 if pl_type == "Buying" else 0,
"selling": 1 if pl_type == "Selling" else 0,
"currency": args["currency"],
- "valid_for_territories": [{
+ "territories": [{
"territory": get_root_of("Territory")
}]
}).insert()
diff --git a/erpnext/shopping_cart/__init__.py b/erpnext/shopping_cart/__init__.py
index 8660003cb87..ddee6dcbd79 100644
--- a/erpnext/shopping_cart/__init__.py
+++ b/erpnext/shopping_cart/__init__.py
@@ -42,18 +42,18 @@ def set_item_in_cart(item_code, qty, user=None):
validate_item(item_code)
quotation = get_quotation(user=user)
qty = flt(qty)
- quotation_item = quotation.get("quotation_details", {"item_code": item_code})
+ quotation_item = quotation.get("items", {"item_code": item_code})
if qty==0:
if quotation_item:
# remove
- quotation.get("quotation_details").remove(quotation_item[0])
+ quotation.get("items").remove(quotation_item[0])
else:
# add or update
if quotation_item:
quotation_item[0].qty = qty
else:
- quotation.append("quotation_details", {
+ quotation.append("items", {
"doctype": "Quotation Item",
"item_code": item_code,
"qty": qty
diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py
index 692f27dde08..3ee089c2275 100644
--- a/erpnext/shopping_cart/cart.py
+++ b/erpnext/shopping_cart/cart.py
@@ -14,7 +14,7 @@ class WebsitePriceListMissingError(frappe.ValidationError): pass
def set_cart_count(quotation=None):
if not quotation:
quotation = _get_cart_quotation()
- cart_count = cstr(len(quotation.get("quotation_details")))
+ cart_count = cstr(len(quotation.get("items")))
frappe.local.cookie_manager.set_cookie("cart_count", cart_count)
@frappe.whitelist()
@@ -50,7 +50,7 @@ def place_order():
from erpnext.selling.doctype.quotation.quotation import _make_sales_order
sales_order = frappe.get_doc(_make_sales_order(quotation.name, ignore_permissions=True))
- for item in sales_order.get("sales_order_details"):
+ for item in sales_order.get("items"):
item.reserved_warehouse = frappe.db.get_value("Item", item.item_code, "website_warehouse") or None
sales_order.ignore_permissions = True
@@ -66,15 +66,15 @@ def update_cart(item_code, qty, with_doc):
qty = flt(qty)
if qty == 0:
- quotation.set("quotation_details", quotation.get("quotation_details", {"item_code": ["!=", item_code]}))
- if not quotation.get("quotation_details") and \
+ quotation.set("items", quotation.get("items", {"item_code": ["!=", item_code]}))
+ if not quotation.get("items") and \
not quotation.get("__islocal"):
quotation.__delete = True
else:
- quotation_items = quotation.get("quotation_details", {"item_code": item_code})
+ quotation_items = quotation.get("items", {"item_code": item_code})
if not quotation_items:
- quotation.append("quotation_details", {
+ quotation.append("items", {
"doctype": "Quotation Item",
"item_code": item_code,
"qty": qty
@@ -134,13 +134,13 @@ def guess_territory():
def decorate_quotation_doc(quotation_doc):
doc = frappe._dict(quotation_doc.as_dict())
- for d in doc.get("quotation_details", []):
+ for d in doc.get("items", []):
d.update(frappe.db.get_value("Item", d["item_code"],
["website_image", "description", "page_name"], as_dict=True))
d["formatted_rate"] = fmt_money(d.get("rate"), currency=doc.currency)
d["formatted_amount"] = fmt_money(d.get("amount"), currency=doc.currency)
- for d in doc.get("other_charges", []):
+ for d in doc.get("taxes", []):
d["formatted_tax_amount"] = fmt_money(flt(d.get("tax_amount")) / doc.conversion_rate,
currency=doc.currency)
@@ -239,7 +239,7 @@ def set_price_list_and_rate(quotation, cart_settings, billing_territory):
# reset values
quotation.price_list_currency = quotation.currency = \
quotation.plc_conversion_rate = quotation.conversion_rate = None
- for item in quotation.get("quotation_details"):
+ for item in quotation.get("items"):
item.price_list_rate = item.discount_percentage = item.rate = item.amount = None
# refetch values
@@ -253,10 +253,10 @@ def set_taxes(quotation, cart_settings, billing_territory):
quotation.taxes_and_charges = cart_settings.get_tax_master(billing_territory)
# clear table
- quotation.set("other_charges", [])
+ quotation.set("taxes", [])
# append taxes
- quotation.append_taxes_from_master("other_charges", "taxes_and_charges")
+ quotation.append_taxes_from_master("taxes", "taxes_and_charges")
def get_lead_or_customer():
customer = frappe.db.get_value("Contact", {"email_id": frappe.session.user}, "customer")
diff --git a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py
index 48e31f65572..cdbe6c2365e 100644
--- a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py
+++ b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py
@@ -190,7 +190,7 @@ def set_price_list(quotation):
if previous_selling_price_list != quotation.selling_price_list:
quotation.price_list_currency = quotation.currency = quotation.plc_conversion_rate = quotation.conversion_rate = None
- for d in quotation.get("quotation_details"):
+ for d in quotation.get("items"):
d.price_list_rate = d.discount_percentage = d.rate = d.amount = None
quotation.set_price_list_and_item_details()
diff --git a/erpnext/shopping_cart/test_shopping_cart.py b/erpnext/shopping_cart/test_shopping_cart.py
index bbab3fda5c0..9d124b787a6 100644
--- a/erpnext/shopping_cart/test_shopping_cart.py
+++ b/erpnext/shopping_cart/test_shopping_cart.py
@@ -61,18 +61,18 @@ class TestShoppingCart(unittest.TestCase):
# add first item
set_item_in_cart("_Test Item", 1)
quotation = self.test_get_cart_lead()
- self.assertEquals(quotation.get("quotation_details")[0].item_code, "_Test Item")
- self.assertEquals(quotation.get("quotation_details")[0].qty, 1)
- self.assertEquals(quotation.get("quotation_details")[0].amount, 10)
+ self.assertEquals(quotation.get("items")[0].item_code, "_Test Item")
+ self.assertEquals(quotation.get("items")[0].qty, 1)
+ self.assertEquals(quotation.get("items")[0].amount, 10)
# add second item
set_item_in_cart("_Test Item 2", 1)
quotation = self.test_get_cart_lead()
- self.assertEquals(quotation.get("quotation_details")[1].item_code, "_Test Item 2")
- self.assertEquals(quotation.get("quotation_details")[1].qty, 1)
- self.assertEquals(quotation.get("quotation_details")[1].amount, 20)
+ self.assertEquals(quotation.get("items")[1].item_code, "_Test Item 2")
+ self.assertEquals(quotation.get("items")[1].qty, 1)
+ self.assertEquals(quotation.get("items")[1].amount, 20)
- self.assertEquals(len(quotation.get("quotation_details")), 2)
+ self.assertEquals(len(quotation.get("items")), 2)
def test_update_cart(self):
# first, add to cart
@@ -81,11 +81,11 @@ class TestShoppingCart(unittest.TestCase):
# update first item
set_item_in_cart("_Test Item", 5)
quotation = self.test_get_cart_lead()
- self.assertEquals(quotation.get("quotation_details")[0].item_code, "_Test Item")
- self.assertEquals(quotation.get("quotation_details")[0].qty, 5)
- self.assertEquals(quotation.get("quotation_details")[0].amount, 50)
+ self.assertEquals(quotation.get("items")[0].item_code, "_Test Item")
+ self.assertEquals(quotation.get("items")[0].qty, 5)
+ self.assertEquals(quotation.get("items")[0].amount, 50)
self.assertEquals(quotation.net_total, 70)
- self.assertEquals(len(quotation.get("quotation_details")), 2)
+ self.assertEquals(len(quotation.get("items")), 2)
def test_remove_from_cart(self):
# first, add to cart
@@ -94,17 +94,17 @@ class TestShoppingCart(unittest.TestCase):
# remove first item
set_item_in_cart("_Test Item", 0)
quotation = self.test_get_cart_lead()
- self.assertEquals(quotation.get("quotation_details")[0].item_code, "_Test Item 2")
- self.assertEquals(quotation.get("quotation_details")[0].qty, 1)
- self.assertEquals(quotation.get("quotation_details")[0].amount, 20)
+ self.assertEquals(quotation.get("items")[0].item_code, "_Test Item 2")
+ self.assertEquals(quotation.get("items")[0].qty, 1)
+ self.assertEquals(quotation.get("items")[0].amount, 20)
self.assertEquals(quotation.net_total, 20)
- self.assertEquals(len(quotation.get("quotation_details")), 1)
+ self.assertEquals(len(quotation.get("items")), 1)
# remove second item
set_item_in_cart("_Test Item 2", 0)
quotation = self.test_get_cart_lead()
self.assertEquals(quotation.net_total, 0)
- self.assertEquals(len(quotation.get("quotation_details")), 0)
+ self.assertEquals(len(quotation.get("items")), 0)
def test_set_billing_address(self):
return
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index 009ac4c7640..bc34bb0b2e2 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -3,8 +3,8 @@
// Module Material Management
cur_frm.cscript.tname = "Delivery Note Item";
-cur_frm.cscript.fname = "delivery_note_details";
-cur_frm.cscript.other_fname = "other_charges";
+cur_frm.cscript.fname = "items";
+cur_frm.cscript.other_fname = "taxes";
cur_frm.cscript.sales_team_fname = "sales_team";
{% include 'selling/sales_common.js' %};
@@ -20,7 +20,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
if(doc.__onload && !doc.__onload.billing_complete && doc.docstatus==1) {
// show Make Invoice button only if Delivery Note is not created from Sales Invoice
var from_sales_invoice = false;
- from_sales_invoice = cur_frm.doc.delivery_note_details.some(function(item) {
+ from_sales_invoice = cur_frm.doc.items.some(function(item) {
return item.against_sales_invoice ? true : false;
});
@@ -86,7 +86,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
this.get_terms();
},
- delivery_note_details_on_form_rendered: function(doc, grid_row) {
+ items_on_form_rendered: function(doc, grid_row) {
erpnext.setup_serial_no(grid_row)
}
@@ -167,7 +167,7 @@ cur_frm.pformat.sales_order_no= function(doc, cdt, cdn){
out ='';
- var cl = doc.delivery_note_details || [];
+ var cl = doc.items || [];
// outer table
var out=' | ';
@@ -214,7 +214,7 @@ if (sys_defaults.auto_accounting_for_stock) {
}
// expense account
- cur_frm.fields_dict['delivery_note_details'].grid.get_field('expense_account').get_query = function(doc) {
+ cur_frm.fields_dict['items'].grid.get_field('expense_account').get_query = function(doc) {
return {
filters: {
"report_type": "Profit and Loss",
@@ -236,7 +236,7 @@ if (sys_defaults.auto_accounting_for_stock) {
refresh_field(cur_frm.cscript.fname);
}
- cur_frm.fields_dict.delivery_note_details.grid.get_field("cost_center").get_query = function(doc) {
+ cur_frm.fields_dict.items.grid.get_field("cost_center").get_query = function(doc) {
return {
filters: {
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index 5d868d099d9..100a866712e 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -13,12 +13,12 @@ from erpnext.stock.utils import update_bin
from erpnext.controllers.selling_controller import SellingController
form_grid_templates = {
- "delivery_note_details": "templates/form_grid/item_grid.html"
+ "items": "templates/form_grid/item_grid.html"
}
class DeliveryNote(SellingController):
tname = 'Delivery Note Item'
- fname = 'delivery_note_details'
+ fname = 'items'
def __init__(self, arg1, arg2=None):
super(DeliveryNote, self).__init__(arg1, arg2)
@@ -57,7 +57,7 @@ class DeliveryNote(SellingController):
billed_qty = frappe.db.sql("""select sum(ifnull(qty, 0)) from `tabSales Invoice Item`
where docstatus=1 and delivery_note=%s""", self.name)
if billed_qty:
- total_qty = sum((item.qty for item in self.get("delivery_note_details")))
+ total_qty = sum((item.qty for item in self.get("items")))
self.get("__onload").billing_complete = (billed_qty[0][0] == total_qty)
def before_print(self):
@@ -82,7 +82,7 @@ class DeliveryNote(SellingController):
return "shipment" if self.docstatus==1 else None
def set_actual_qty(self):
- for d in self.get('delivery_note_details'):
+ for d in self.get('items'):
if d.item_code and d.warehouse:
actual_qty = frappe.db.sql("""select actual_qty from `tabBin`
where item_code = %s and warehouse = %s""", (d.item_code, d.warehouse))
@@ -91,7 +91,7 @@ class DeliveryNote(SellingController):
def so_required(self):
"""check in manage account if sales order required or not"""
if frappe.db.get_value("Selling Settings", None, 'so_required') == 'Yes':
- for d in self.get('delivery_note_details'):
+ for d in self.get('items'):
if not d.against_sales_order:
frappe.throw(_("Sales Order required for Item {0}").format(d.item_code))
@@ -110,7 +110,7 @@ class DeliveryNote(SellingController):
self.validate_with_previous_doc()
from erpnext.stock.doctype.packed_item.packed_item import make_packing_list
- make_packing_list(self, 'delivery_note_details')
+ make_packing_list(self, 'items')
self.update_current_stock()
@@ -118,7 +118,7 @@ class DeliveryNote(SellingController):
if not self.installation_status: self.installation_status = 'Not Installed'
def validate_with_previous_doc(self):
- items = self.get("delivery_note_details")
+ items = self.get("items")
for fn in (("Sales Order", "against_sales_order"), ("Sales Invoice", "against_sales_invoice")):
if filter(None, [getattr(d, fn[1], None) for d in items]):
@@ -150,7 +150,7 @@ class DeliveryNote(SellingController):
def validate_for_items(self):
check_list, chk_dupl_itm = [], []
- for d in self.get('delivery_note_details'):
+ for d in self.get('items'):
e = [d.item_code, d.description, d.warehouse, d.against_sales_order or d.against_sales_invoice, d.batch_no or '']
f = [d.item_code, d.description, d.against_sales_order or d.against_sales_invoice]
@@ -174,11 +174,11 @@ class DeliveryNote(SellingController):
def update_current_stock(self):
if self.get("_action") and self._action != "update_after_submit":
- for d in self.get('delivery_note_details'):
+ for d in self.get('items'):
d.actual_qty = frappe.db.get_value("Bin", {"item_code": d.item_code,
"warehouse": d.warehouse}, "actual_qty")
- for d in self.get('packing_details'):
+ for d in self.get('packed_items'):
bin_qty = frappe.db.get_value("Bin", {"item_code": d.item_code,
"warehouse": d.warehouse}, ["actual_qty", "projected_qty"], as_dict=True)
if bin_qty:
diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py
index d9ade7a69e9..8459e1e787f 100644
--- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py
@@ -11,10 +11,10 @@ from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import get_gl_
def _insert_purchase_receipt(item_code=None):
if not item_code:
- item_code = pr_test_records[0]["purchase_receipt_details"][0]["item_code"]
+ item_code = pr_test_records[0]["items"][0]["item_code"]
pr = frappe.copy_doc(pr_test_records[0])
- pr.get("purchase_receipt_details")[0].item_code = item_code
+ pr.get("items")[0].item_code = item_code
pr.insert()
pr.submit()
@@ -34,7 +34,7 @@ class TestDeliveryNote(unittest.TestCase):
dn.submit()
si = make_sales_invoice(dn.name)
- self.assertEquals(len(si.get("entries")), len(dn.get("delivery_note_details")))
+ self.assertEquals(len(si.get("entries")), len(dn.get("items")))
# modify amount
si.get("entries")[0].rate = 200
@@ -69,11 +69,11 @@ class TestDeliveryNote(unittest.TestCase):
_insert_purchase_receipt()
dn = frappe.copy_doc(test_records[0])
- dn.get("delivery_note_details")[0].expense_account = "Cost of Goods Sold - _TC"
- dn.get("delivery_note_details")[0].cost_center = "Main - _TC"
+ dn.get("items")[0].expense_account = "Cost of Goods Sold - _TC"
+ dn.get("items")[0].cost_center = "Main - _TC"
stock_in_hand_account = frappe.db.get_value("Account",
- {"warehouse": dn.get("delivery_note_details")[0].warehouse})
+ {"warehouse": dn.get("items")[0].warehouse})
from erpnext.accounts.utils import get_balance_on
prev_bal = get_balance_on(stock_in_hand_account, dn.posting_date)
@@ -97,8 +97,8 @@ class TestDeliveryNote(unittest.TestCase):
# back dated purchase receipt
pr = frappe.copy_doc(pr_test_records[0])
pr.posting_date = "2013-01-01"
- pr.get("purchase_receipt_details")[0].rate = 100
- pr.get("purchase_receipt_details")[0].base_amount = 100
+ pr.get("items")[0].rate = 100
+ pr.get("items")[0].base_amount = 100
pr.insert()
pr.submit()
@@ -124,11 +124,11 @@ class TestDeliveryNote(unittest.TestCase):
_insert_purchase_receipt("_Test Item Home Desktop 100")
dn = frappe.copy_doc(test_records[0])
- dn.get("delivery_note_details")[0].item_code = "_Test Sales BOM Item"
- dn.get("delivery_note_details")[0].qty = 1
+ dn.get("items")[0].item_code = "_Test Sales BOM Item"
+ dn.get("items")[0].qty = 1
stock_in_hand_account = frappe.db.get_value("Account",
- {"warehouse": dn.get("delivery_note_details")[0].warehouse})
+ {"warehouse": dn.get("items")[0].warehouse})
from erpnext.accounts.utils import get_balance_on
prev_bal = get_balance_on(stock_in_hand_account, dn.posting_date)
@@ -160,12 +160,12 @@ class TestDeliveryNote(unittest.TestCase):
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
se = make_serialized_item()
- serial_nos = get_serial_nos(se.get("mtn_details")[0].serial_no)
+ serial_nos = get_serial_nos(se.get("items")[0].serial_no)
dn = frappe.copy_doc(test_records[0])
- dn.get("delivery_note_details")[0].item_code = "_Test Serialized Item With Series"
- dn.get("delivery_note_details")[0].qty = 1
- dn.get("delivery_note_details")[0].serial_no = serial_nos[0]
+ dn.get("items")[0].item_code = "_Test Serialized Item With Series"
+ dn.get("items")[0].qty = 1
+ dn.get("items")[0].serial_no = serial_nos[0]
dn.insert()
dn.submit()
@@ -181,7 +181,7 @@ class TestDeliveryNote(unittest.TestCase):
dn = self.test_serialized()
dn.cancel()
- serial_nos = get_serial_nos(dn.get("delivery_note_details")[0].serial_no)
+ serial_nos = get_serial_nos(dn.get("items")[0].serial_no)
self.assertEquals(frappe.db.get_value("Serial No", serial_nos[0], "status"), "Available")
self.assertEquals(frappe.db.get_value("Serial No", serial_nos[0], "warehouse"), "_Test Warehouse - _TC")
@@ -193,16 +193,16 @@ class TestDeliveryNote(unittest.TestCase):
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_serialized_item
se = make_serialized_item()
- serial_nos = get_serial_nos(se.get("mtn_details")[0].serial_no)
+ serial_nos = get_serial_nos(se.get("items")[0].serial_no)
sr = frappe.get_doc("Serial No", serial_nos[0])
sr.status = "Not Available"
sr.save()
dn = frappe.copy_doc(test_records[0])
- dn.get("delivery_note_details")[0].item_code = "_Test Serialized Item With Series"
- dn.get("delivery_note_details")[0].qty = 1
- dn.get("delivery_note_details")[0].serial_no = serial_nos[0]
+ dn.get("items")[0].item_code = "_Test Serialized Item With Series"
+ dn.get("items")[0].qty = 1
+ dn.get("items")[0].serial_no = serial_nos[0]
dn.insert()
self.assertRaises(SerialNoStatusError, dn.submit)
diff --git a/erpnext/stock/doctype/delivery_note/test_records.json b/erpnext/stock/doctype/delivery_note/test_records.json
index 3127a080086..803e86469b1 100644
--- a/erpnext/stock/doctype/delivery_note/test_records.json
+++ b/erpnext/stock/doctype/delivery_note/test_records.json
@@ -5,7 +5,7 @@
"currency": "INR",
"customer": "_Test Customer",
"customer_name": "_Test Customer",
- "delivery_note_details": [
+ "items": [
{
"base_amount": 500.0,
"base_rate": 100.0,
@@ -15,7 +15,7 @@
"expense_account": "Cost of Goods Sold - _TC",
"item_code": "_Test Item",
"item_name": "_Test Item",
- "parentfield": "delivery_note_details",
+ "parentfield": "items",
"qty": 5.0,
"rate": 100.0,
"stock_uom": "_Test UOM",
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 096c1e8f947..9c2f9f55532 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -127,7 +127,7 @@ cur_frm.fields_dict['selling_cost_center'].get_query = function(doc) {
}
-cur_frm.fields_dict['item_tax'].grid.get_field("tax_type").get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict['taxes'].grid.get_field("tax_type").get_query = function(doc, cdt, cdn) {
return {
filters: [
['Account', 'account_type', 'in',
@@ -139,7 +139,7 @@ cur_frm.fields_dict['item_tax'].grid.get_field("tax_type").get_query = function(
cur_frm.cscript.tax_type = function(doc, cdt, cdn){
var d = locals[cdt][cdn];
- return get_server_fields('get_tax_rate', d.tax_type, 'item_tax', doc, cdt, cdn, 1);
+ return get_server_fields('get_tax_rate', d.tax_type, 'taxes', doc, cdt, cdn, 1);
}
cur_frm.fields_dict['item_group'].get_query = function(doc,cdt,cdn) {
@@ -178,11 +178,11 @@ cur_frm.cscript.validate = function(doc, cdt, cdn){
cur_frm.cscript.weight_to_validate(doc, cdt, cdn);
}
-cur_frm.fields_dict.item_customer_details.grid.get_field("customer_name").get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict.customer_item_codes.grid.get_field("customer_name").get_query = function(doc, cdt, cdn) {
return { query: "erpnext.controllers.queries.customer_query" }
}
-cur_frm.fields_dict.item_supplier_details.grid.get_field("supplier").get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict.supplier_item_codes.grid.get_field("supplier").get_query = function(doc, cdt, cdn) {
return { query: "erpnext.controllers.queries.supplier_query" }
}
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index 34d54284ba8..531ec568667 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -84,14 +84,14 @@ class Item(WebsiteGenerator):
raise_exception=WarehouseNotSet)
def add_default_uom_in_conversion_factor_table(self):
- uom_conv_list = [d.uom for d in self.get("uom_conversion_details")]
+ uom_conv_list = [d.uom for d in self.get("uoms")]
if self.stock_uom not in uom_conv_list:
- ch = self.append('uom_conversion_details', {})
+ ch = self.append('uoms', {})
ch.uom = self.stock_uom
ch.conversion_factor = 1
to_remove = []
- for d in self.get("uom_conversion_details"):
+ for d in self.get("uoms"):
if d.conversion_factor == 1 and d.uom != self.stock_uom:
to_remove.append(d)
@@ -136,13 +136,13 @@ class Item(WebsiteGenerator):
def validate_variants_are_unique(self):
if not self.has_variants:
- self.item_variants = []
+ self.variants = []
- if self.item_variants and self.variant_of:
+ if self.variants and self.variant_of:
frappe.throw(_("Item cannot be a variant of a variant"))
variants = []
- for d in self.item_variants:
+ for d in self.variants:
key = (d.item_attribute, d.item_attribute_value)
if key in variants:
frappe.throw(_("{0} {1} is entered more than once in Item Variants table").format(d.item_attribute,
@@ -181,14 +181,14 @@ class Item(WebsiteGenerator):
frappe.msgprint(_("Item Variants {0} deleted").format(", ".join(deleted)))
def get_variant_item_codes(self):
- if not self.item_variants:
+ if not self.variants:
return []
self.variant_attributes = {}
variant_dict = {}
variant_item_codes = []
- for d in self.item_variants:
+ for d in self.variants:
variant_dict.setdefault(d.item_attribute, []).append(d.item_attribute_value)
all_attributes = [d.name for d in frappe.get_all("Item Attribute", order_by = "priority asc")]
@@ -250,21 +250,21 @@ class Item(WebsiteGenerator):
template = frappe.get_doc("Item", self.variant_of)
# add item taxes from template
- for d in template.get("item_tax"):
- self.append("item_tax", {"tax_type": d.tax_type, "tax_rate": d.tax_rate})
+ for d in template.get("taxes"):
+ self.append("taxes", {"tax_type": d.tax_type, "tax_rate": d.tax_rate})
# copy re-order table if empty
- if not self.get("item_reorder"):
- for d in template.get("item_reorder"):
+ if not self.get("reorder_levels"):
+ for d in template.get("reorder_levels"):
n = {}
for k in ("warehouse", "warehouse_reorder_level",
"warehouse_reorder_qty", "material_request_type"):
n[k] = d.get(k)
- self.append("item_reorder", n)
+ self.append("reorder_levels", n)
def validate_conversion_factor(self):
check_list = []
- for d in self.get('uom_conversion_details'):
+ for d in self.get('uoms'):
if cstr(d.uom) in check_list:
frappe.throw(_("Unit of Measure {0} has been entered more than once in Conversion Factor Table").format(d.uom))
else:
@@ -302,14 +302,14 @@ class Item(WebsiteGenerator):
def fill_customer_code(self):
""" Append all the customer codes and insert into "customer_code" field of item table """
cust_code=[]
- for d in self.get('item_customer_details'):
+ for d in self.get('customer_item_codes'):
cust_code.append(d.ref_code)
self.customer_code=','.join(cust_code)
def check_item_tax(self):
"""Check whether Tax Rate is not entered twice for same Tax Type"""
check_list=[]
- for d in self.get('item_tax'):
+ for d in self.get('taxes'):
if d.tax_type:
account_type = frappe.db.get_value("Account", d.tax_type, "account_type")
@@ -344,15 +344,15 @@ class Item(WebsiteGenerator):
if cint(self.apply_warehouse_wise_reorder_level):
self.re_order_level, self.re_order_qty = 0, 0
else:
- self.set("item_reorder", [])
+ self.set("reorder_levels", [])
- if self.re_order_level or len(self.get("item_reorder", {"material_request_type": "Purchase"})):
+ if self.re_order_level or len(self.get("reorder_levels", {"material_request_type": "Purchase"})):
if not self.is_purchase_item:
frappe.throw(_("""To set reorder level, item must be a Purchase Item"""))
def validate_warehouse_for_reorder(self):
warehouse = []
- for i in self.get("item_reorder"):
+ for i in self.get("reorder_levels"):
if i.get("warehouse") and i.get("warehouse") not in warehouse:
warehouse += [i.get("warehouse")]
else:
@@ -426,11 +426,11 @@ class Item(WebsiteGenerator):
frappe.db.auto_commit_on_many_writes = 0
def copy_specification_from_item_group(self):
- self.set("item_website_specifications", [])
+ self.set("website_specifications", [])
if self.item_group:
for label, desc in frappe.db.get_values("Item Website Specification",
{"parent": self.item_group}, ["label", "description"]):
- row = self.append("item_website_specifications")
+ row = self.append("website_specifications")
row.label = label
row.description = desc
diff --git a/erpnext/stock/doctype/item/test_item.py b/erpnext/stock/doctype/item/test_item.py
index 55cd12f4a91..2d8bdd46bbc 100644
--- a/erpnext/stock/doctype/item/test_item.py
+++ b/erpnext/stock/doctype/item/test_item.py
@@ -24,7 +24,7 @@ class TestItem(unittest.TestCase):
def test_duplicate_variant(self):
item = frappe.copy_doc(test_records[11])
- item.append("item_variants", {"item_attribute": "Test Size", "item_attribute_value": "Small"})
+ item.append("variants", {"item_attribute": "Test Size", "item_attribute_value": "Small"})
self.assertRaises(DuplicateVariant, item.insert)
def test_template_cannot_have_stock(self):
@@ -32,7 +32,7 @@ class TestItem(unittest.TestCase):
se = frappe.new_doc("Stock Entry")
se.purpose = "Material Receipt"
- se.append("mtn_details", {
+ se.append("items", {
"item_code": item.name,
"t_warehouse": "Stores - _TC",
"qty": 1,
@@ -52,9 +52,9 @@ class TestItem(unittest.TestCase):
for v in variants:
self.assertTrue(frappe.db.get_value("Item", {"variant_of": item.name, "name": v}))
- item.append("item_variants", {"item_attribute": "Test Colour", "item_attribute_value": "Red"})
- item.append("item_variants", {"item_attribute": "Test Colour", "item_attribute_value": "Blue"})
- item.append("item_variants", {"item_attribute": "Test Colour", "item_attribute_value": "Green"})
+ item.append("variants", {"item_attribute": "Test Colour", "item_attribute_value": "Red"})
+ item.append("variants", {"item_attribute": "Test Colour", "item_attribute_value": "Blue"})
+ item.append("variants", {"item_attribute": "Test Colour", "item_attribute_value": "Green"})
self.assertEqual(item.get_variant_item_codes(), ['_Test Variant Item-S-R',
'_Test Variant Item-S-G', '_Test Variant Item-S-B',
@@ -71,7 +71,7 @@ class TestItem(unittest.TestCase):
se = frappe.new_doc("Stock Entry")
se.purpose = "Material Receipt"
- se.append("mtn_details", {
+ se.append("items", {
"item_code": item.name,
"t_warehouse": "Stores - _TC",
"qty": 1,
diff --git a/erpnext/stock/doctype/item/test_records.json b/erpnext/stock/doctype/item/test_records.json
index 7b6130c4e18..7d0f4b0e7e5 100644
--- a/erpnext/stock/doctype/item/test_records.json
+++ b/erpnext/stock/doctype/item/test_records.json
@@ -19,7 +19,7 @@
"item_group": "_Test Item Group",
"item_name": "_Test Item",
"apply_warehouse_wise_reorder_level": 1,
- "item_reorder": [
+ "reorder_levels": [
{
"material_request_type": "Purchase",
"warehouse": "_Test Warehouse - _TC",
@@ -74,10 +74,10 @@
"item_code": "_Test Item Home Desktop 100",
"item_group": "_Test Item Group Desktops",
"item_name": "_Test Item Home Desktop 100",
- "item_tax": [
+ "taxes": [
{
"doctype": "Item Tax",
- "parentfield": "item_tax",
+ "parentfield": "taxes",
"tax_rate": 10,
"tax_type": "_Test Account Excise Duty - _TC"
}
@@ -270,13 +270,13 @@
"item_name": "_Test Variant Item",
"stock_uom": "_Test UOM",
"has_variants": 1,
- "item_variants": [
+ "variants": [
{"item_attribute": "Test Size", "item_attribute_value": "Small"},
{"item_attribute": "Test Size", "item_attribute_value": "Medium"},
{"item_attribute": "Test Size", "item_attribute_value": "Large"}
],
"apply_warehouse_wise_reorder_level": 1,
- "item_reorder": [
+ "reorder_levels": [
{
"material_request_type": "Purchase",
"warehouse": "_Test Warehouse - _TC",
diff --git a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.js b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.js
index 042011a9911..c1847c507a0 100644
--- a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.js
+++ b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.js
@@ -8,7 +8,7 @@ frappe.require("assets/erpnext/js/controllers/stock_controller.js");
erpnext.stock.LandedCostVoucher = erpnext.stock.StockController.extend({
setup: function() {
var me = this;
- this.frm.fields_dict.landed_cost_purchase_receipts.grid.get_field('purchase_receipt').get_query =
+ this.frm.fields_dict.purchase_receipts.grid.get_field('purchase_receipt').get_query =
function() {
if(!me.frm.doc.company) msgprint(__("Please enter company first"));
return {
@@ -19,7 +19,7 @@ erpnext.stock.LandedCostVoucher = erpnext.stock.StockController.extend({
}
};
- this.frm.fields_dict.landed_cost_taxes_and_charges.grid.get_field('account').get_query = function() {
+ this.frm.fields_dict.taxes.grid.get_field('account').get_query = function() {
if(!me.frm.doc.company) msgprint(__("Please enter company first"));
return {
filters:[
@@ -67,7 +67,7 @@ erpnext.stock.LandedCostVoucher = erpnext.stock.StockController.extend({
get_items_from_purchase_receipts: function() {
var me = this;
- if(!this.frm.doc.landed_cost_purchase_receipts.length) {
+ if(!this.frm.doc.purchase_receipts.length) {
msgprint(__("Please enter Purchase Receipt first"));
} else {
return this.frm.call({
@@ -84,7 +84,7 @@ erpnext.stock.LandedCostVoucher = erpnext.stock.StockController.extend({
set_total_taxes_and_charges: function() {
total_taxes_and_charges = 0.0;
- $.each(this.frm.doc.landed_cost_taxes_and_charges, function(i, d) {
+ $.each(this.frm.doc.taxes, function(i, d) {
total_taxes_and_charges += flt(d.amount)
});
cur_frm.set_value("total_taxes_and_charges", total_taxes_and_charges);
@@ -92,16 +92,16 @@ erpnext.stock.LandedCostVoucher = erpnext.stock.StockController.extend({
set_applicable_charges_for_item: function() {
var me = this;
- if(this.frm.doc.landed_cost_taxes_and_charges.length) {
+ if(this.frm.doc.taxes.length) {
var total_item_cost = 0.0;
- $.each(this.frm.doc.landed_cost_items, function(i, d) {
+ $.each(this.frm.doc.items, function(i, d) {
total_item_cost += flt(d.amount)
});
- $.each(this.frm.doc.landed_cost_items, function(i, item) {
+ $.each(this.frm.doc.items, function(i, item) {
item.applicable_charges = flt(item.amount) * flt(me.frm.doc.total_taxes_and_charges) / flt(total_item_cost)
});
- refresh_field("landed_cost_items");
+ refresh_field("items");
}
}
diff --git a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json
index 682a16bfd13..aafc0df2b27 100644
--- a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json
+++ b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json
@@ -16,7 +16,7 @@
"reqd": 1
},
{
- "fieldname": "landed_cost_purchase_receipts",
+ "fieldname": "purchase_receipts",
"fieldtype": "Table",
"label": "Purchase Receipts",
"options": "Landed Cost Purchase Receipt",
@@ -29,7 +29,7 @@
"permlevel": 0
},
{
- "fieldname": "landed_cost_items",
+ "fieldname": "items",
"fieldtype": "Table",
"label": "Purchase Receipt Items",
"no_copy": 1,
@@ -38,7 +38,7 @@
"read_only": 0
},
{
- "fieldname": "landed_cost_taxes_and_charges",
+ "fieldname": "taxes",
"fieldtype": "Table",
"label": "Taxes and Charges",
"options": "Landed Cost Taxes and Charges",
@@ -73,7 +73,7 @@
],
"icon": "icon-usd",
"is_submittable": 1,
- "modified": "2014-09-01 12:05:46.834513",
+ "modified": "2014-12-25 12:36:24.982094",
"modified_by": "Administrator",
"module": "Stock",
"name": "Landed Cost Voucher",
diff --git a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py
index 3046c5e9211..f5b8b5f5856 100644
--- a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py
+++ b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py
@@ -12,8 +12,8 @@ from erpnext.stock.stock_ledger import get_previous_sle
class LandedCostVoucher(Document):
def get_items_from_purchase_receipts(self):
- self.set("landed_cost_items", [])
- for pr in self.get("landed_cost_purchase_receipts"):
+ self.set("items", [])
+ for pr in self.get("purchase_receipts"):
pr_items = frappe.db.sql("""select pr_item.item_code, pr_item.description,
pr_item.qty, pr_item.base_rate, pr_item.base_amount, pr_item.name
from `tabPurchase Receipt Item` pr_item where parent = %s
@@ -21,7 +21,7 @@ class LandedCostVoucher(Document):
pr.purchase_receipt, as_dict=True)
for d in pr_items:
- item = self.append("landed_cost_items")
+ item = self.append("items")
item.item_code = d.item_code
item.description = d.description
item.qty = d.qty
@@ -30,7 +30,7 @@ class LandedCostVoucher(Document):
item.purchase_receipt = pr.purchase_receipt
item.purchase_receipt_item = d.name
- if self.get("landed_cost_taxes_and_charges"):
+ if self.get("taxes"):
self.set_applicable_charges_for_item()
@@ -38,27 +38,27 @@ class LandedCostVoucher(Document):
self.check_mandatory()
self.validate_purchase_receipts()
self.set_total_taxes_and_charges()
- if not self.get("landed_cost_items"):
+ if not self.get("items"):
self.get_items_from_purchase_receipts()
else:
self.set_applicable_charges_for_item()
def check_mandatory(self):
- if not self.get("landed_cost_purchase_receipts"):
+ if not self.get("purchase_receipts"):
frappe.throw(_("Please enter Purchase Receipts"))
- if not self.get("landed_cost_taxes_and_charges"):
+ if not self.get("taxes"):
frappe.throw(_("Please enter Taxes and Charges"))
def validate_purchase_receipts(self):
purchase_receipts = []
- for d in self.get("landed_cost_purchase_receipts"):
+ for d in self.get("purchase_receipts"):
if frappe.db.get_value("Purchase Receipt", d.purchase_receipt, "docstatus") != 1:
frappe.throw(_("Purchase Receipt must be submitted"))
else:
purchase_receipts.append(d.purchase_receipt)
- for item in self.get("landed_cost_items"):
+ for item in self.get("items"):
if not item.purchase_receipt:
frappe.throw(_("Item must be added using 'Get Items from Purchase Receipts' button"))
elif item.purchase_receipt not in purchase_receipts:
@@ -66,12 +66,12 @@ class LandedCostVoucher(Document):
.format(item.idx, item.purchase_receipt))
def set_total_taxes_and_charges(self):
- self.total_taxes_and_charges = sum([flt(d.amount) for d in self.get("landed_cost_taxes_and_charges")])
+ self.total_taxes_and_charges = sum([flt(d.amount) for d in self.get("taxes")])
def set_applicable_charges_for_item(self):
- total_item_cost = sum([flt(d.amount) for d in self.get("landed_cost_items")])
+ total_item_cost = sum([flt(d.amount) for d in self.get("items")])
- for item in self.get("landed_cost_items"):
+ for item in self.get("items"):
item.applicable_charges = flt(item.amount) * flt(self.total_taxes_and_charges) / flt(total_item_cost)
def on_submit(self):
@@ -81,7 +81,7 @@ class LandedCostVoucher(Document):
self.update_landed_cost()
def update_landed_cost(self):
- purchase_receipts = list(set([d.purchase_receipt for d in self.get("landed_cost_items")]))
+ purchase_receipts = list(set([d.purchase_receipt for d in self.get("items")]))
for purchase_receipt in purchase_receipts:
pr = frappe.get_doc("Purchase Receipt", purchase_receipt)
@@ -89,7 +89,7 @@ class LandedCostVoucher(Document):
pr.set_landed_cost_voucher_amount()
# set valuation amount in pr item
- pr.update_valuation_rate("purchase_receipt_details")
+ pr.update_valuation_rate("items")
# save will update landed_cost_voucher_amount and voucher_amount in PR,
# as those fields are ellowed to edit after submit
diff --git a/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py b/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py
index d84d63c9130..4b0e23ce59a 100644
--- a/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py
+++ b/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py
@@ -34,8 +34,8 @@ class TestLandedCostVoucher(unittest.TestCase):
self.assertTrue(gl_entries)
- stock_in_hand_account = pr.get("purchase_receipt_details")[0].warehouse
- fixed_asset_account = pr.get("purchase_receipt_details")[1].warehouse
+ stock_in_hand_account = pr.get("items")[0].warehouse
+ fixed_asset_account = pr.get("items")[1].warehouse
expected_values = {
@@ -56,8 +56,8 @@ class TestLandedCostVoucher(unittest.TestCase):
frappe.db.sql("delete from `tabSerial No` where name in ('SN001', 'SN002', 'SN003', 'SN004', 'SN005')")
pr = frappe.copy_doc(pr_test_records[0])
- pr.purchase_receipt_details[0].item_code = "_Test Serialized Item"
- pr.purchase_receipt_details[0].serial_no = "SN001\nSN002\nSN003\nSN004\nSN005"
+ pr.items[0].item_code = "_Test Serialized Item"
+ pr.items[0].serial_no = "SN001\nSN002\nSN003\nSN004\nSN005"
pr.submit()
serial_no_rate = frappe.db.get_value("Serial No", "SN001", "purchase_rate")
@@ -76,13 +76,13 @@ class TestLandedCostVoucher(unittest.TestCase):
def submit_landed_cost_voucher(self, pr):
lcv = frappe.new_doc("Landed Cost Voucher")
lcv.company = "_Test Company"
- lcv.set("landed_cost_purchase_receipts", [{
+ lcv.set("purchase_receipts", [{
"purchase_receipt": pr.name,
"supplier": pr.supplier,
"posting_date": pr.posting_date,
"grand_total": pr.grand_total
}])
- lcv.set("landed_cost_taxes_and_charges", [{
+ lcv.set("taxes", [{
"description": "Insurance Charges",
"account": "_Test Account Insurance Charges - _TC",
"amount": 50.0
diff --git a/erpnext/stock/doctype/landed_cost_voucher/test_records.json b/erpnext/stock/doctype/landed_cost_voucher/test_records.json
new file mode 100644
index 00000000000..4fc00179392
--- /dev/null
+++ b/erpnext/stock/doctype/landed_cost_voucher/test_records.json
@@ -0,0 +1,6 @@
+[
+ {
+ "doctype": "Landed Cost Voucher",
+ "name": "_Test Landed Cost Voucher 1"
+ }
+]
diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js
index 54c1d8f3af3..13df2e4ce45 100644
--- a/erpnext/stock/doctype/material_request/material_request.js
+++ b/erpnext/stock/doctype/material_request/material_request.js
@@ -2,7 +2,7 @@
// License: GNU General Public License v3. See license.txt
cur_frm.cscript.tname = "Material Request Item";
-cur_frm.cscript.fname = "indent_details";
+cur_frm.cscript.fname = "items";
{% include 'buying/doctype/purchase_common/purchase_common.js' %};
@@ -88,12 +88,12 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
schedule_date: function(doc, cdt, cdn) {
var val = locals[cdt][cdn].schedule_date;
if(val) {
- $.each((doc.indent_details || []), function(i, d) {
+ $.each((doc.items || []), function(i, d) {
if(!d.schedule_date) {
d.schedule_date = val;
}
});
- refresh_field("indent_details");
+ refresh_field("items");
}
},
@@ -117,7 +117,7 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
args: values,
callback: function(r) {
$.each(r.message, function(i, item) {
- var d = frappe.model.add_child(cur_frm.doc, "Material Request Item", "indent_details");
+ var d = frappe.model.add_child(cur_frm.doc, "Material Request Item", "items");
d.item_code = item.item_code;
d.description = item.description;
d.warehouse = item.default_warehouse;
@@ -125,7 +125,7 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
d.qty = item.qty;
});
d.hide();
- refresh_field("indent_details");
+ refresh_field("items");
}
});
});
diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py
index d43d027d568..d5e6c8f69aa 100644
--- a/erpnext/stock/doctype/material_request/material_request.py
+++ b/erpnext/stock/doctype/material_request/material_request.py
@@ -14,22 +14,22 @@ from frappe.model.mapper import get_mapped_doc
from erpnext.controllers.buying_controller import BuyingController
form_grid_templates = {
- "indent_details": "templates/form_grid/material_request_grid.html"
+ "items": "templates/form_grid/material_request_grid.html"
}
class MaterialRequest(BuyingController):
tname = 'Material Request Item'
- fname = 'indent_details'
+ fname = 'items'
def get_feed(self):
return _("{0}: {1}").format(self.status, self.material_request_type)
def check_if_already_pulled(self):
- pass#if self.[d.sales_order_no for d in self.get('indent_details')]
+ pass#if self.[d.sales_order_no for d in self.get('items')]
def validate_qty_against_so(self):
so_items = {} # Format --> {'SO/00001': {'Item/001': 120, 'Item/002': 24}}
- for d in self.get('indent_details'):
+ for d in self.get('items'):
if d.sales_order_no:
if not so_items.has_key(d.sales_order_no):
so_items[d.sales_order_no] = {d.item_code: flt(d.qty)}
@@ -55,7 +55,7 @@ class MaterialRequest(BuyingController):
frappe.throw(_("Material Request of maximum {0} can be made for Item {1} against Sales Order {2}").format(actual_so_qty - already_indented, item, so_no))
def validate_schedule_date(self):
- for d in self.get('indent_details'):
+ for d in self.get('items'):
if d.schedule_date and d.schedule_date < self.transaction_date:
frappe.throw(_("Expected Date cannot be before Material Request Date"))
@@ -115,7 +115,7 @@ class MaterialRequest(BuyingController):
if self.material_request_type == "Purchase":
return
- item_doclist = self.get("indent_details")
+ item_doclist = self.get("items")
if not mr_items:
mr_items = [d.name for d in item_doclist]
@@ -155,7 +155,7 @@ class MaterialRequest(BuyingController):
bin_doc.save()
item_wh_list = []
- for d in self.get("indent_details"):
+ for d in self.get("items"):
if (not mr_item_rows or d.name in mr_item_rows) and [d.item_code, d.warehouse] not in item_wh_list \
and frappe.db.get_value("Item", d.item_code, "is_stock_item") == "Yes" and d.warehouse:
item_wh_list.append([d.item_code, d.warehouse])
@@ -167,7 +167,7 @@ def update_completed_and_requested_qty(stock_entry, method):
if stock_entry.doctype == "Stock Entry":
material_request_map = {}
- for d in stock_entry.get("mtn_details"):
+ for d in stock_entry.get("items"):
if d.material_request:
material_request_map.setdefault(d.material_request, []).append(d.material_request_item)
@@ -221,14 +221,14 @@ def make_purchase_order_based_on_supplier(source_name, target_doc=None):
if isinstance(target_doc, basestring):
import json
target_doc = frappe.get_doc(json.loads(target_doc))
- target_doc.set("po_details", [])
+ target_doc.set("items", [])
material_requests, supplier_items = get_material_requests_based_on_supplier(source_name)
def postprocess(source, target_doc):
target_doc.supplier = source_name
set_missing_values(source, target_doc)
- target_doc.set("po_details", [d for d in target_doc.get("po_details")
+ target_doc.set("items", [d for d in target_doc.get("items")
if d.get("item_code") in supplier_items and d.get("qty") > 0])
return target_doc
diff --git a/erpnext/stock/doctype/material_request/test_material_request.py b/erpnext/stock/doctype/material_request/test_material_request.py
index 48eed27d821..6fe73fc85b5 100644
--- a/erpnext/stock/doctype/material_request/test_material_request.py
+++ b/erpnext/stock/doctype/material_request/test_material_request.py
@@ -25,7 +25,7 @@ class TestMaterialRequest(unittest.TestCase):
po = make_purchase_order(mr.name)
self.assertEquals(po.doctype, "Purchase Order")
- self.assertEquals(len(po.get("po_details")), len(mr.get("indent_details")))
+ self.assertEquals(len(po.get("items")), len(mr.get("items")))
def test_make_supplier_quotation(self):
from erpnext.stock.doctype.material_request.material_request import make_supplier_quotation
@@ -39,7 +39,7 @@ class TestMaterialRequest(unittest.TestCase):
sq = make_supplier_quotation(mr.name)
self.assertEquals(sq.doctype, "Supplier Quotation")
- self.assertEquals(len(sq.get("quotation_items")), len(mr.get("indent_details")))
+ self.assertEquals(len(sq.get("items")), len(mr.get("items")))
def test_make_stock_entry(self):
@@ -56,7 +56,7 @@ class TestMaterialRequest(unittest.TestCase):
se = make_stock_entry(mr.name)
self.assertEquals(se.doctype, "Stock Entry")
- self.assertEquals(len(se.get("mtn_details")), len(mr.get("indent_details")))
+ self.assertEquals(len(se.get("items")), len(mr.get("items")))
def _insert_stock_entry(self, qty1, qty2, warehouse = None ):
se = frappe.get_doc({
@@ -66,12 +66,12 @@ class TestMaterialRequest(unittest.TestCase):
"posting_time": "00:00:00",
"purpose": "Material Receipt",
"fiscal_year": "_Test Fiscal Year 2013",
- "mtn_details": [
+ "items": [
{
"conversion_factor": 1.0,
"doctype": "Stock Entry Detail",
"item_code": "_Test Item Home Desktop 100",
- "parentfield": "mtn_details",
+ "parentfield": "items",
"incoming_rate": 100,
"qty": qty1,
"stock_uom": "_Test UOM 1",
@@ -83,7 +83,7 @@ class TestMaterialRequest(unittest.TestCase):
"conversion_factor": 1.0,
"doctype": "Stock Entry Detail",
"item_code": "_Test Item Home Desktop 200",
- "parentfield": "mtn_details",
+ "parentfield": "items",
"incoming_rate": 100,
"qty": qty2,
"stock_uom": "_Test UOM 1",
@@ -107,18 +107,18 @@ class TestMaterialRequest(unittest.TestCase):
# check if per complete is None
self.assertEquals(mr.per_ordered, None)
- self.assertEquals(mr.get("indent_details")[0].ordered_qty, 0)
- self.assertEquals(mr.get("indent_details")[1].ordered_qty, 0)
+ self.assertEquals(mr.get("items")[0].ordered_qty, 0)
+ self.assertEquals(mr.get("items")[1].ordered_qty, 0)
# map a purchase order
from erpnext.stock.doctype.material_request.material_request import make_purchase_order
po_doc = make_purchase_order(mr.name)
po_doc.supplier = "_Test Supplier"
po_doc.transaction_date = "2013-07-07"
- po_doc.get("po_details")[0].qty = 27.0
- po_doc.get("po_details")[1].qty = 1.5
- po_doc.get("po_details")[0].schedule_date = "2013-07-09"
- po_doc.get("po_details")[1].schedule_date = "2013-07-09"
+ po_doc.get("items")[0].qty = 27.0
+ po_doc.get("items")[1].qty = 1.5
+ po_doc.get("items")[0].schedule_date = "2013-07-09"
+ po_doc.get("items")[1].schedule_date = "2013-07-09"
# check for stopped status of Material Request
@@ -140,8 +140,8 @@ class TestMaterialRequest(unittest.TestCase):
# check if per complete is as expected
mr.load_from_db()
self.assertEquals(mr.per_ordered, 50)
- self.assertEquals(mr.get("indent_details")[0].ordered_qty, 27.0)
- self.assertEquals(mr.get("indent_details")[1].ordered_qty, 1.5)
+ self.assertEquals(mr.get("items")[0].ordered_qty, 27.0)
+ self.assertEquals(mr.get("items")[1].ordered_qty, 1.5)
current_requested_qty_item1 = self._get_requested_qty("_Test Item Home Desktop 100", "_Test Warehouse - _TC")
current_requested_qty_item2 = self._get_requested_qty("_Test Item Home Desktop 200", "_Test Warehouse - _TC")
@@ -153,8 +153,8 @@ class TestMaterialRequest(unittest.TestCase):
# check if per complete is as expected
mr.load_from_db()
self.assertEquals(mr.per_ordered, None)
- self.assertEquals(mr.get("indent_details")[0].ordered_qty, None)
- self.assertEquals(mr.get("indent_details")[1].ordered_qty, None)
+ self.assertEquals(mr.get("items")[0].ordered_qty, None)
+ self.assertEquals(mr.get("items")[1].ordered_qty, None)
current_requested_qty_item1 = self._get_requested_qty("_Test Item Home Desktop 100", "_Test Warehouse - _TC")
current_requested_qty_item2 = self._get_requested_qty("_Test Item Home Desktop 200", "_Test Warehouse - _TC")
@@ -174,8 +174,8 @@ class TestMaterialRequest(unittest.TestCase):
# check if per complete is None
self.assertEquals(mr.per_ordered, None)
- self.assertEquals(mr.get("indent_details")[0].ordered_qty, 0)
- self.assertEquals(mr.get("indent_details")[1].ordered_qty, 0)
+ self.assertEquals(mr.get("items")[0].ordered_qty, 0)
+ self.assertEquals(mr.get("items")[1].ordered_qty, 0)
current_requested_qty_item1 = self._get_requested_qty("_Test Item Home Desktop 100", "_Test Warehouse - _TC")
current_requested_qty_item2 = self._get_requested_qty("_Test Item Home Desktop 200", "_Test Warehouse - _TC")
@@ -192,13 +192,13 @@ class TestMaterialRequest(unittest.TestCase):
"posting_time": "01:00",
"fiscal_year": "_Test Fiscal Year 2013",
})
- se_doc.get("mtn_details")[0].update({
+ se_doc.get("items")[0].update({
"qty": 27.0,
"transfer_qty": 27.0,
"s_warehouse": "_Test Warehouse 1 - _TC",
"incoming_rate": 1.0
})
- se_doc.get("mtn_details")[1].update({
+ se_doc.get("items")[1].update({
"qty": 1.5,
"transfer_qty": 1.5,
"s_warehouse": "_Test Warehouse 1 - _TC",
@@ -229,8 +229,8 @@ class TestMaterialRequest(unittest.TestCase):
# check if per complete is as expected
mr.load_from_db()
self.assertEquals(mr.per_ordered, 50)
- self.assertEquals(mr.get("indent_details")[0].ordered_qty, 27.0)
- self.assertEquals(mr.get("indent_details")[1].ordered_qty, 1.5)
+ self.assertEquals(mr.get("items")[0].ordered_qty, 27.0)
+ self.assertEquals(mr.get("items")[1].ordered_qty, 1.5)
current_requested_qty_item1 = self._get_requested_qty("_Test Item Home Desktop 100", "_Test Warehouse - _TC")
current_requested_qty_item2 = self._get_requested_qty("_Test Item Home Desktop 200", "_Test Warehouse - _TC")
@@ -242,8 +242,8 @@ class TestMaterialRequest(unittest.TestCase):
se.cancel()
mr.load_from_db()
self.assertEquals(mr.per_ordered, 0)
- self.assertEquals(mr.get("indent_details")[0].ordered_qty, 0)
- self.assertEquals(mr.get("indent_details")[1].ordered_qty, 0)
+ self.assertEquals(mr.get("items")[0].ordered_qty, 0)
+ self.assertEquals(mr.get("items")[1].ordered_qty, 0)
current_requested_qty_item1 = self._get_requested_qty("_Test Item Home Desktop 100", "_Test Warehouse - _TC")
current_requested_qty_item2 = self._get_requested_qty("_Test Item Home Desktop 200", "_Test Warehouse - _TC")
@@ -263,8 +263,8 @@ class TestMaterialRequest(unittest.TestCase):
# check if per complete is None
self.assertEquals(mr.per_ordered, None)
- self.assertEquals(mr.get("indent_details")[0].ordered_qty, 0)
- self.assertEquals(mr.get("indent_details")[1].ordered_qty, 0)
+ self.assertEquals(mr.get("items")[0].ordered_qty, 0)
+ self.assertEquals(mr.get("items")[1].ordered_qty, 0)
# map a stock entry
from erpnext.stock.doctype.material_request.material_request import make_stock_entry
@@ -275,13 +275,13 @@ class TestMaterialRequest(unittest.TestCase):
"posting_time": "00:00",
"fiscal_year": "_Test Fiscal Year 2013",
})
- se_doc.get("mtn_details")[0].update({
+ se_doc.get("items")[0].update({
"qty": 60.0,
"transfer_qty": 60.0,
"s_warehouse": "_Test Warehouse 1 - _TC",
"incoming_rate": 1.0
})
- se_doc.get("mtn_details")[1].update({
+ se_doc.get("items")[1].update({
"qty": 3.0,
"transfer_qty": 3.0,
"s_warehouse": "_Test Warehouse 1 - _TC",
@@ -307,8 +307,8 @@ class TestMaterialRequest(unittest.TestCase):
mr.load_from_db()
self.assertEquals(mr.per_ordered, 100)
- self.assertEquals(mr.get("indent_details")[0].ordered_qty, 60.0)
- self.assertEquals(mr.get("indent_details")[1].ordered_qty, 3.0)
+ self.assertEquals(mr.get("items")[0].ordered_qty, 60.0)
+ self.assertEquals(mr.get("items")[1].ordered_qty, 3.0)
current_requested_qty_item1 = self._get_requested_qty("_Test Item Home Desktop 100", "_Test Warehouse - _TC")
current_requested_qty_item2 = self._get_requested_qty("_Test Item Home Desktop 200", "_Test Warehouse - _TC")
@@ -320,8 +320,8 @@ class TestMaterialRequest(unittest.TestCase):
se.cancel()
mr.load_from_db()
self.assertEquals(mr.per_ordered, 0)
- self.assertEquals(mr.get("indent_details")[0].ordered_qty, 0)
- self.assertEquals(mr.get("indent_details")[1].ordered_qty, 0)
+ self.assertEquals(mr.get("items")[0].ordered_qty, 0)
+ self.assertEquals(mr.get("items")[1].ordered_qty, 0)
current_requested_qty_item1 = self._get_requested_qty("_Test Item Home Desktop 100", "_Test Warehouse - _TC")
current_requested_qty_item2 = self._get_requested_qty("_Test Item Home Desktop 200", "_Test Warehouse - _TC")
@@ -345,14 +345,14 @@ class TestMaterialRequest(unittest.TestCase):
"posting_time": "00:00",
"fiscal_year": "_Test Fiscal Year 2013",
})
- se_doc.get("mtn_details")[0].update({
+ se_doc.get("items")[0].update({
"qty": 60.0,
"transfer_qty": 60.0,
"s_warehouse": "_Test Warehouse - _TC",
"t_warehouse": "_Test Warehouse 1 - _TC",
"incoming_rate": 1.0
})
- se_doc.get("mtn_details")[1].update({
+ se_doc.get("items")[1].update({
"qty": 3.0,
"transfer_qty": 3.0,
"s_warehouse": "_Test Warehouse 1 - _TC",
@@ -372,7 +372,7 @@ class TestMaterialRequest(unittest.TestCase):
# map a stock entry
from erpnext.stock.doctype.material_request.material_request import make_stock_entry
se_doc = make_stock_entry(mr.name)
- self.assertEquals(se_doc.get("mtn_details")[0].s_warehouse, "_Test Warehouse - _TC")
+ self.assertEquals(se_doc.get("items")[0].s_warehouse, "_Test Warehouse - _TC")
def test_warehouse_company_validation(self):
from erpnext.stock.utils import InvalidWarehouseCompany
@@ -397,7 +397,7 @@ class TestMaterialRequest(unittest.TestCase):
se = make_stock_entry(mr.name)
self.assertEquals(se.doctype, "Stock Entry")
- self.assertEquals(len(se.get("mtn_details")), len(mr.get("indent_details")))
+ self.assertEquals(len(se.get("items")), len(mr.get("items")))
def test_completed_qty_for_issue(self):
def _get_requested_qty():
@@ -422,14 +422,14 @@ class TestMaterialRequest(unittest.TestCase):
se_doc = make_stock_entry(mr.name)
se_doc.fiscal_year = "_Test Fiscal Year 2014"
- se_doc.get("mtn_details")[0].qty = 60.0
+ se_doc.get("items")[0].qty = 60.0
se_doc.insert()
se_doc.submit()
# check if per complete is as expected
mr.load_from_db()
- self.assertEquals(mr.get("indent_details")[0].ordered_qty, 60.0)
- self.assertEquals(mr.get("indent_details")[1].ordered_qty, 3.0)
+ self.assertEquals(mr.get("items")[0].ordered_qty, 60.0)
+ self.assertEquals(mr.get("items")[1].ordered_qty, 3.0)
#testing bin requested qty after issuing stock against material request
self.assertEquals(_get_requested_qty(), existing_requested_qty)
diff --git a/erpnext/stock/doctype/material_request/test_records.json b/erpnext/stock/doctype/material_request/test_records.json
index 0337ac273d5..152d1443a34 100644
--- a/erpnext/stock/doctype/material_request/test_records.json
+++ b/erpnext/stock/doctype/material_request/test_records.json
@@ -3,13 +3,13 @@
"company": "_Test Company",
"doctype": "Material Request",
"fiscal_year": "_Test Fiscal Year 2013",
- "indent_details": [
+ "items": [
{
"description": "_Test Item Home Desktop 100",
"doctype": "Material Request Item",
"item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100",
- "parentfield": "indent_details",
+ "parentfield": "items",
"qty": 54.0,
"schedule_date": "2013-02-18",
"uom": "_Test UOM 1",
@@ -20,7 +20,7 @@
"doctype": "Material Request Item",
"item_code": "_Test Item Home Desktop 200",
"item_name": "_Test Item Home Desktop 200",
- "parentfield": "indent_details",
+ "parentfield": "items",
"qty": 3.0,
"schedule_date": "2013-02-19",
"uom": "_Test UOM 1",
diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py
index 9263907da12..4db77e0767e 100644
--- a/erpnext/stock/doctype/packed_item/packed_item.py
+++ b/erpnext/stock/doctype/packed_item/packed_item.py
@@ -33,13 +33,13 @@ def update_packing_list_item(obj, packing_item_code, qty, warehouse, line, packi
# check if exists
exists = 0
- for d in obj.get("packing_details"):
+ for d in obj.get("packed_items"):
if d.parent_item == line.item_code and d.item_code == packing_item_code and d.parent_detail_docname == line.name:
pi, exists = d, 1
break
if not exists:
- pi = obj.append('packing_details', {})
+ pi = obj.append('packed_items', {})
pi.parent_item = line.item_code
pi.item_code = packing_item_code
@@ -80,7 +80,7 @@ def make_packing_list(obj, item_table_fieldname):
def cleanup_packing_list(obj, parent_items):
"""Remove all those child items which are no longer present in main item table"""
delete_list = []
- for d in obj.get("packing_details"):
+ for d in obj.get("packed_items"):
if [d.parent_item, d.parent_detail_docname] not in parent_items:
# mark for deletion from doclist
delete_list.append(d)
@@ -88,8 +88,8 @@ def cleanup_packing_list(obj, parent_items):
if not delete_list:
return obj
- packing_details = obj.get("packing_details")
- obj.set("packing_details", [])
- for d in packing_details:
+ packed_items = obj.get("packed_items")
+ obj.set("packed_items", [])
+ for d in packed_items:
if d not in delete_list:
- obj.append("packing_details", d)
+ obj.append("packed_items", d)
diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.js b/erpnext/stock/doctype/packing_slip/packing_slip.js
index 9788290a1bd..ff02e84b720 100644
--- a/erpnext/stock/doctype/packing_slip/packing_slip.js
+++ b/erpnext/stock/doctype/packing_slip/packing_slip.js
@@ -8,7 +8,7 @@ cur_frm.fields_dict['delivery_note'].get_query = function(doc, cdt, cdn) {
}
-cur_frm.fields_dict['item_details'].grid.get_field('item_code').get_query =
+cur_frm.fields_dict['items'].grid.get_field('item_code').get_query =
function(doc, cdt, cdn) {
return {
query: "erpnext.stock.doctype.packing_slip.packing_slip.item_details",
@@ -59,7 +59,7 @@ cur_frm.cscript.validate_case_nos = function(doc) {
cur_frm.cscript.validate_calculate_item_details = function(doc) {
doc = locals[doc.doctype][doc.name];
- var ps_detail = doc.item_details || [];
+ var ps_detail = doc.items || [];
cur_frm.cscript.validate_duplicate_items(doc, ps_detail);
cur_frm.cscript.calc_net_total_pkg(doc, ps_detail);
diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.py b/erpnext/stock/doctype/packing_slip/packing_slip.py
index bd79835d58a..7385aae89a7 100644
--- a/erpnext/stock/doctype/packing_slip/packing_slip.py
+++ b/erpnext/stock/doctype/packing_slip/packing_slip.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+items# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
@@ -35,7 +35,7 @@ class PackingSlip(Document):
frappe.throw(_("Delivery Note {0} must not be submitted").format(self.delivery_note))
def validate_items_mandatory(self):
- rows = [d.item_code for d in self.get("item_details")]
+ rows = [d.item_code for d in self.get("items")]
if not rows:
frappe.msgprint(_("No Items to pack"), raise_exception=1)
@@ -86,7 +86,7 @@ class PackingSlip(Document):
* No. of Cases of this packing slip
"""
- rows = [d.item_code for d in self.get("item_details")]
+ rows = [d.item_code for d in self.get("items")]
condition = ""
if rows:
@@ -104,7 +104,7 @@ class PackingSlip(Document):
group by item_code""" % ("%s", condition),
tuple([self.delivery_note] + rows), as_dict=1)
- ps_item_qty = dict([[d.item_code, d.qty] for d in self.get("item_details")])
+ ps_item_qty = dict([[d.item_code, d.qty] for d in self.get("items")])
no_of_cases = cint(self.to_case_no) - cint(self.from_case_no) + 1
return res, ps_item_qty, no_of_cases
@@ -127,7 +127,7 @@ class PackingSlip(Document):
if not self.from_case_no:
self.from_case_no = self.get_recommended_case_no()
- for d in self.get("item_details"):
+ for d in self.get("items"):
res = frappe.db.get_value("Item", d.item_code,
["net_weight", "weight_uom"], as_dict=True)
@@ -146,12 +146,12 @@ class PackingSlip(Document):
return cint(recommended_case_no[0][0]) + 1
def get_items(self):
- self.set("item_details", [])
+ self.set("items", [])
dn_details = self.get_details_for_packing()[0]
for item in dn_details:
if flt(item.qty) > flt(item.packed_qty):
- ch = self.append('item_details', {})
+ ch = self.append('items', {})
ch.item_code = item.item_code
ch.item_name = item.item_name
ch.stock_uom = item.stock_uom
diff --git a/erpnext/stock/doctype/price_list/price_list.py b/erpnext/stock/doctype/price_list/price_list.py
index a4ff25044b1..5f468695b85 100644
--- a/erpnext/stock/doctype/price_list/price_list.py
+++ b/erpnext/stock/doctype/price_list/price_list.py
@@ -15,11 +15,11 @@ class PriceList(Document):
try:
# at least one territory
- self.validate_table_has_rows("valid_for_territories")
+ self.validate_table_has_rows("territories")
except frappe.EmptyTableError:
# if no territory, set default territory
if frappe.defaults.get_user_default("territory"):
- self.append("valid_for_territories", {
+ self.append("territories", {
"doctype": "Applicable Territory",
"territory": frappe.defaults.get_user_default("territory")
})
diff --git a/erpnext/stock/doctype/price_list/test_records.json b/erpnext/stock/doctype/price_list/test_records.json
index 86d650cb2a8..d91f8872db1 100644
--- a/erpnext/stock/doctype/price_list/test_records.json
+++ b/erpnext/stock/doctype/price_list/test_records.json
@@ -6,10 +6,10 @@
"enabled": 1,
"price_list_name": "_Test Price List",
"selling": 1,
- "valid_for_territories": [
+ "territories": [
{
"doctype": "Applicable Territory",
- "parentfield": "valid_for_territories",
+ "parentfield": "territories",
"territory": "All Territories"
}
]
@@ -21,10 +21,10 @@
"enabled": 1,
"price_list_name": "_Test Price List 2",
"selling": 1,
- "valid_for_territories": [
+ "territories": [
{
"doctype": "Applicable Territory",
- "parentfield": "valid_for_territories",
+ "parentfield": "territories",
"territory": "_Test Territory Rest Of The World"
}
]
@@ -36,10 +36,10 @@
"enabled": 1,
"price_list_name": "_Test Price List India",
"selling": 1,
- "valid_for_territories": [
+ "territories": [
{
"doctype": "Applicable Territory",
- "parentfield": "valid_for_territories",
+ "parentfield": "territories",
"territory": "_Test Territory India"
}
]
@@ -51,15 +51,15 @@
"enabled": 1,
"price_list_name": "_Test Price List Rest of the World",
"selling": 1,
- "valid_for_territories": [
+ "territories": [
{
"doctype": "Applicable Territory",
- "parentfield": "valid_for_territories",
+ "parentfield": "territories",
"territory": "_Test Territory Rest Of The World"
},
{
"doctype": "Applicable Territory",
- "parentfield": "valid_for_territories",
+ "parentfield": "territories",
"territory": "_Test Territory United States"
}
]
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index fc2d1b30f39..616f66ae59d 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -2,8 +2,8 @@
// License: GNU General Public License v3. See license.txt
cur_frm.cscript.tname = "Purchase Receipt Item";
-cur_frm.cscript.fname = "purchase_receipt_details";
-cur_frm.cscript.other_fname = "other_charges";
+cur_frm.cscript.fname = "items";
+cur_frm.cscript.other_fname = "taxes";
{% include 'buying/doctype/purchase_common/purchase_common.js' %};
{% include 'accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js' %}
@@ -119,7 +119,7 @@ cur_frm.cscript.new_contact = function() {
loaddoc('Contact', tn);
}
-cur_frm.fields_dict['purchase_receipt_details'].grid.get_field('project_name').get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict['items'].grid.get_field('project_name').get_query = function(doc, cdt, cdn) {
return {
filters: [
['Project', 'status', 'not in', 'Completed, Cancelled']
@@ -127,7 +127,7 @@ cur_frm.fields_dict['purchase_receipt_details'].grid.get_field('project_name').g
}
}
-cur_frm.fields_dict['purchase_receipt_details'].grid.get_field('batch_no').get_query= function(doc, cdt, cdn) {
+cur_frm.fields_dict['items'].grid.get_field('batch_no').get_query= function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(d.item_code) {
return {
@@ -153,7 +153,7 @@ cur_frm.fields_dict['select_print_heading'].get_query = function(doc, cdt, cdn)
}
}
-cur_frm.fields_dict.purchase_receipt_details.grid.get_field("qa_no").get_query = function(doc) {
+cur_frm.fields_dict.items.grid.get_field("qa_no").get_query = function(doc) {
return {
filters: {
'docstatus': 1
@@ -161,7 +161,7 @@ cur_frm.fields_dict.purchase_receipt_details.grid.get_field("qa_no").get_query =
}
}
-cur_frm.fields_dict['purchase_receipt_details'].grid.get_field('bom').get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict['items'].grid.get_field('bom').get_query = function(doc, cdt, cdn) {
var d = locals[cdt][cdn]
return {
filters: [
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
index f38ee5d5deb..7013cee307c 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -12,12 +12,12 @@ import frappe.defaults
from erpnext.controllers.buying_controller import BuyingController
form_grid_templates = {
- "purchase_receipt_details": "templates/form_grid/item_grid.html"
+ "items": "templates/form_grid/item_grid.html"
}
class PurchaseReceipt(BuyingController):
tname = 'Purchase Receipt Item'
- fname = 'purchase_receipt_details'
+ fname = 'items'
def __init__(self, arg1, arg2=None):
super(PurchaseReceipt, self).__init__(arg1, arg2)
@@ -38,7 +38,7 @@ class PurchaseReceipt(BuyingController):
billed_qty = frappe.db.sql("""select sum(ifnull(qty, 0)) from `tabPurchase Invoice Item`
where purchase_receipt=%s and docstatus=1""", self.name)
if billed_qty:
- total_qty = sum((item.qty for item in self.get("purchase_receipt_details")))
+ total_qty = sum((item.qty for item in self.get("items")))
self.get("__onload").billing_complete = (billed_qty[0][0] == total_qty)
def validate(self):
@@ -65,19 +65,19 @@ class PurchaseReceipt(BuyingController):
# sub-contracting
self.validate_for_subcontracting()
- self.create_raw_materials_supplied("pr_raw_material_details")
+ self.create_raw_materials_supplied("supplied_items")
self.set_landed_cost_voucher_amount()
- self.update_valuation_rate("purchase_receipt_details")
+ self.update_valuation_rate("items")
def set_landed_cost_voucher_amount(self):
- for d in self.get("purchase_receipt_details"):
+ for d in self.get("items"):
lc_voucher_amount = frappe.db.sql("""select sum(ifnull(applicable_charges, 0))
from `tabLanded Cost Item`
where docstatus = 1 and purchase_receipt_item = %s""", d.name)
d.landed_cost_voucher_amount = lc_voucher_amount[0][0] if lc_voucher_amount else 0.0
def validate_rejected_warehouse(self):
- for d in self.get("purchase_receipt_details"):
+ for d in self.get("items"):
if flt(d.rejected_qty) and not d.rejected_warehouse:
d.rejected_warehouse = self.rejected_warehouse
if not d.rejected_warehouse:
@@ -85,7 +85,7 @@ class PurchaseReceipt(BuyingController):
# validate accepted and rejected qty
def validate_accepted_rejected_qty(self):
- for d in self.get("purchase_receipt_details"):
+ for d in self.get("items"):
if not flt(d.received_qty) and flt(d.qty):
d.received_qty = flt(d.qty) - flt(d.rejected_qty)
@@ -125,7 +125,7 @@ class PurchaseReceipt(BuyingController):
def po_required(self):
if frappe.db.get_value("Buying Settings", None, "po_required") == 'Yes':
- for d in self.get('purchase_receipt_details'):
+ for d in self.get('items'):
if not d.prevdoc_docname:
frappe.throw(_("Purchase Order number required for Item {0}").format(d.item_code))
@@ -133,7 +133,7 @@ class PurchaseReceipt(BuyingController):
sl_entries = []
stock_items = self.get_stock_items()
- for d in self.get('purchase_receipt_details'):
+ for d in self.get('items'):
if d.item_code in stock_items and d.warehouse:
pr_qty = flt(d.qty) * flt(d.conversion_factor)
@@ -157,7 +157,7 @@ class PurchaseReceipt(BuyingController):
def update_ordered_qty(self):
po_map = {}
- for d in self.get("purchase_receipt_details"):
+ for d in self.get("items"):
if d.prevdoc_doctype and d.prevdoc_doctype == "Purchase Order" and d.prevdoc_detail_docname:
po_map.setdefault(d.prevdoc_docname, []).append(d.prevdoc_detail_docname)
@@ -183,7 +183,7 @@ class PurchaseReceipt(BuyingController):
return po_qty, po_warehouse
def bk_flush_supp_wh(self, sl_entries):
- for d in self.get('pr_raw_material_details'):
+ for d in self.get('supplied_items'):
# negative quantity is passed as raw material qty has to be decreased
# when PR is submitted and it has to be increased when PR is cancelled
sl_entries.append(self.get_sl_entries(d, {
@@ -194,7 +194,7 @@ class PurchaseReceipt(BuyingController):
}))
def validate_inspection(self):
- for d in self.get('purchase_receipt_details'): #Enter inspection date for all items that require inspection
+ for d in self.get('items'): #Enter inspection date for all items that require inspection
ins_reqd = frappe.db.sql("select inspection_required from `tabItem` where name = %s",
(d.item_code,), as_dict = 1)
ins_reqd = ins_reqd and ins_reqd[0]['inspection_required'] or 'No'
@@ -204,7 +204,7 @@ class PurchaseReceipt(BuyingController):
# Check for Stopped status
def check_for_stopped_status(self, pc_obj):
check_list =[]
- for d in self.get('purchase_receipt_details'):
+ for d in self.get('items'):
if d.meta.get_field('prevdoc_docname') and d.prevdoc_docname and d.prevdoc_docname not in check_list:
check_list.append(d.prevdoc_docname)
pc_obj.check_for_stopped_status( d.prevdoc_doctype, d.prevdoc_docname)
@@ -226,7 +226,7 @@ class PurchaseReceipt(BuyingController):
self.update_stock_ledger()
from erpnext.stock.doctype.serial_no.serial_no import update_serial_nos_after_submit
- update_serial_nos_after_submit(self, "purchase_receipt_details")
+ update_serial_nos_after_submit(self, "items")
purchase_controller.update_last_purchase_rate(self, 1)
@@ -266,7 +266,7 @@ class PurchaseReceipt(BuyingController):
self.make_gl_entries_on_cancel()
def get_current_stock(self):
- for d in self.get('pr_raw_material_details'):
+ for d in self.get('supplied_items'):
if self.supplier_warehouse:
bin = frappe.db.sql("select actual_qty from `tabBin` where item_code = %s and warehouse = %s", (d.rm_item_code, self.supplier_warehouse), as_dict = 1)
d.current_stock = bin and flt(bin[0]['actual_qty']) or 0
@@ -284,7 +284,7 @@ class PurchaseReceipt(BuyingController):
warehouse_with_no_account = []
negative_expense_to_be_booked = 0.0
stock_items = self.get_stock_items()
- for d in self.get("purchase_receipt_details"):
+ for d in self.get("items"):
if d.item_code in stock_items and flt(d.valuation_rate) and flt(d.qty):
if warehouse_account.get(d.warehouse):
@@ -335,7 +335,7 @@ class PurchaseReceipt(BuyingController):
# Cost center-wise amount breakup for other charges included for valuation
valuation_tax = {}
- for tax in self.get("other_charges"):
+ for tax in self.get("taxes"):
if tax.category in ("Valuation", "Valuation and Total") and flt(tax.tax_amount):
if not tax.cost_center:
frappe.throw(_("Cost Center is required in row {0} in Taxes table for type {1}").format(tax.idx, _(tax.category)))
diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
index 1a6a375afc8..fc40299895e 100644
--- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
@@ -24,7 +24,7 @@ class TestPurchaseReceipt(unittest.TestCase):
pi = make_purchase_invoice(pr.name)
self.assertEquals(pi.doctype, "Purchase Invoice")
- self.assertEquals(len(pi.get("entries")), len(pr.get("purchase_receipt_details")))
+ self.assertEquals(len(pi.get("entries")), len(pr.get("items")))
# modify rate
pi.get("entries")[0].rate = 200
@@ -64,9 +64,9 @@ class TestPurchaseReceipt(unittest.TestCase):
self.assertTrue(gl_entries)
stock_in_hand_account = frappe.db.get_value("Account",
- {"warehouse": pr.get("purchase_receipt_details")[0].warehouse})
+ {"warehouse": pr.get("items")[0].warehouse})
fixed_asset_account = frappe.db.get_value("Account",
- {"warehouse": pr.get("purchase_receipt_details")[1].warehouse})
+ {"warehouse": pr.get("items")[1].warehouse})
expected_values = {
stock_in_hand_account: [375.0, 0.0],
@@ -94,19 +94,19 @@ class TestPurchaseReceipt(unittest.TestCase):
pr.run_method("calculate_taxes_and_totals")
pr.insert()
- self.assertEquals(len(pr.get("pr_raw_material_details")), 2)
- self.assertEquals(pr.get("purchase_receipt_details")[0].rm_supp_cost, 20750.0)
+ self.assertEquals(len(pr.get("supplied_items")), 2)
+ self.assertEquals(pr.get("items")[0].rm_supp_cost, 20750.0)
def test_serial_no_supplier(self):
pr = frappe.copy_doc(test_records[0])
- pr.get("purchase_receipt_details")[0].item_code = "_Test Serialized Item With Series"
- pr.get("purchase_receipt_details")[0].qty = 1
- pr.get("purchase_receipt_details")[0].received_qty = 1
+ pr.get("items")[0].item_code = "_Test Serialized Item With Series"
+ pr.get("items")[0].qty = 1
+ pr.get("items")[0].received_qty = 1
pr.insert()
pr.submit()
- self.assertEquals(frappe.db.get_value("Serial No", pr.get("purchase_receipt_details")[0].serial_no,
+ self.assertEquals(frappe.db.get_value("Serial No", pr.get("items")[0].serial_no,
"supplier"), pr.supplier)
return pr
@@ -115,30 +115,30 @@ class TestPurchaseReceipt(unittest.TestCase):
pr = self.test_serial_no_supplier()
pr.cancel()
- self.assertFalse(frappe.db.get_value("Serial No", pr.get("purchase_receipt_details")[0].serial_no,
+ self.assertFalse(frappe.db.get_value("Serial No", pr.get("items")[0].serial_no,
"warehouse"))
def test_rejected_serial_no(self):
pr = frappe.copy_doc(test_records[0])
- pr.get("purchase_receipt_details")[0].item_code = "_Test Serialized Item With Series"
- pr.get("purchase_receipt_details")[0].qty = 3
- pr.get("purchase_receipt_details")[0].rejected_qty = 2
- pr.get("purchase_receipt_details")[0].received_qty = 5
- pr.get("purchase_receipt_details")[0].rejected_warehouse = "_Test Rejected Warehouse - _TC"
+ pr.get("items")[0].item_code = "_Test Serialized Item With Series"
+ pr.get("items")[0].qty = 3
+ pr.get("items")[0].rejected_qty = 2
+ pr.get("items")[0].received_qty = 5
+ pr.get("items")[0].rejected_warehouse = "_Test Rejected Warehouse - _TC"
pr.insert()
pr.submit()
- accepted_serial_nos = pr.get("purchase_receipt_details")[0].serial_no.split("\n")
+ accepted_serial_nos = pr.get("items")[0].serial_no.split("\n")
self.assertEquals(len(accepted_serial_nos), 3)
for serial_no in accepted_serial_nos:
self.assertEquals(frappe.db.get_value("Serial No", serial_no, "warehouse"),
- pr.get("purchase_receipt_details")[0].warehouse)
+ pr.get("items")[0].warehouse)
- rejected_serial_nos = pr.get("purchase_receipt_details")[0].rejected_serial_no.split("\n")
+ rejected_serial_nos = pr.get("items")[0].rejected_serial_no.split("\n")
self.assertEquals(len(rejected_serial_nos), 2)
for serial_no in rejected_serial_nos:
self.assertEquals(frappe.db.get_value("Serial No", serial_no, "warehouse"),
- pr.get("purchase_receipt_details")[0].rejected_warehouse)
+ pr.get("items")[0].rejected_warehouse)
def get_gl_entries(voucher_type, voucher_no):
return frappe.db.sql("""select account, debit, credit
diff --git a/erpnext/stock/doctype/purchase_receipt/test_records.json b/erpnext/stock/doctype/purchase_receipt/test_records.json
index 4b9b3aecf2a..47253ad72f1 100644
--- a/erpnext/stock/doctype/purchase_receipt/test_records.json
+++ b/erpnext/stock/doctype/purchase_receipt/test_records.json
@@ -9,7 +9,7 @@
"grand_total": 720.0,
"naming_series": "_T-Purchase Receipt-",
"net_total": 500.0,
- "other_charges": [
+ "taxes": [
{
"account_head": "_Test Account Shipping Charges - _TC",
"add_deduct_tax": "Add",
@@ -17,7 +17,7 @@
"charge_type": "Actual",
"description": "Shipping Charges",
"doctype": "Purchase Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": 100.0,
"tax_amount": 100.0,
"cost_center": "Main - _TC"
@@ -29,7 +29,7 @@
"charge_type": "Actual",
"description": "VAT",
"doctype": "Purchase Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": 120.0,
"tax_amount": 120.0,
"cost_center": "Main - _TC"
@@ -41,7 +41,7 @@
"charge_type": "Actual",
"description": "Customs Duty",
"doctype": "Purchase Taxes and Charges",
- "parentfield": "other_charges",
+ "parentfield": "taxes",
"rate": 150.0,
"tax_amount": 150.0,
"cost_center": "Main - _TC"
@@ -49,7 +49,7 @@
],
"posting_date": "2013-02-12",
"posting_time": "15:33:30",
- "purchase_receipt_details": [
+ "items": [
{
"base_amount": 250.0,
"conversion_factor": 1.0,
@@ -57,7 +57,7 @@
"doctype": "Purchase Receipt Item",
"item_code": "_Test Item",
"item_name": "_Test Item",
- "parentfield": "purchase_receipt_details",
+ "parentfield": "items",
"qty": 5.0,
"rate": 50.0,
"received_qty": 5.0,
@@ -74,7 +74,7 @@
"doctype": "Purchase Receipt Item",
"item_code": "_Test Item",
"item_name": "_Test Item",
- "parentfield": "purchase_receipt_details",
+ "parentfield": "items",
"qty": 5.0,
"rate": 50.0,
"received_qty": 5.0,
@@ -99,7 +99,7 @@
"net_total": 5000.0,
"posting_date": "2013-02-12",
"posting_time": "15:33:30",
- "purchase_receipt_details": [
+ "items": [
{
"base_amount": 5000.0,
"conversion_factor": 1.0,
@@ -107,7 +107,7 @@
"doctype": "Purchase Receipt Item",
"item_code": "_Test FG Item",
"item_name": "_Test FG Item",
- "parentfield": "purchase_receipt_details",
+ "parentfield": "items",
"qty": 10.0,
"rate": 500.0,
"received_qty": 10.0,
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index b5bd455b09c..b513442dc4f 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -1,7 +1,7 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt
cur_frm.cscript.tname = "Stock Entry Detail";
-cur_frm.cscript.fname = "mtn_details";
+cur_frm.cscript.fname = "items";
frappe.require("assets/erpnext/js/controllers/stock_controller.js");
frappe.require("assets/erpnext/js/utils.js");
@@ -24,7 +24,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
};
};
- this.frm.fields_dict.mtn_details.grid.get_field('item_code').get_query = function() {
+ this.frm.fields_dict.items.grid.get_field('item_code').get_query = function() {
if(in_list(["Sales Return", "Purchase Return"], me.frm.doc.purpose) &&
me.get_doctype_docname()) {
return {
@@ -43,7 +43,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
if(cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
this.frm.add_fetch("company", "stock_adjustment_account", "expense_account");
- this.frm.fields_dict.mtn_details.grid.get_field('expense_account').get_query =
+ this.frm.fields_dict.items.grid.get_field('expense_account').get_query =
function() {
return {
filters: {
@@ -108,7 +108,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
},
callback: function(r) {
if (!r.exc) {
- $.each(me.frm.doc.mtn_details || [], function(i, d) {
+ $.each(me.frm.doc.items || [], function(i, d) {
if(!d.expense_account) d.expense_account = r.message;
});
}
@@ -133,7 +133,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
doc: this.frm.doc,
method: "get_items",
callback: function(r) {
- if(!r.exc) refresh_field("mtn_details");
+ if(!r.exc) refresh_field("items");
}
});
}
@@ -142,7 +142,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
qty: function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
d.transfer_qty = flt(d.qty) * flt(d.conversion_factor);
- refresh_field('mtn_details');
+ refresh_field('items');
},
production_order: function() {
@@ -222,9 +222,9 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
}
},
- mtn_details_add: function(doc, cdt, cdn) {
+ items_add: function(doc, cdt, cdn) {
var row = frappe.get_doc(cdt, cdn);
- this.frm.script_manager.copy_from_first_row("mtn_details", row,
+ this.frm.script_manager.copy_from_first_row("items", row,
["expense_account", "cost_center"]);
if(!row.s_warehouse) row.s_warehouse = this.frm.doc.from_warehouse;
@@ -249,8 +249,8 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
},
set_warehouse_if_missing: function(fieldname, value, condition) {
- for (var i=0, l=(this.frm.doc.mtn_details || []).length; i flt(d.completed_qty):
frappe.throw(_("Row #{0}: Operation {1} is not completed for {2} qty of finished goods in Production Order # {3}. Please update operation status via Time Logs")
@@ -210,7 +210,7 @@ class StockEntry(StockController):
def validate_valuation_rate(self):
if self.purpose in ["Manufacture", "Repack"]:
valuation_at_source, valuation_at_target = 0, 0
- for d in self.get("mtn_details"):
+ for d in self.get("items"):
if d.s_warehouse and not d.t_warehouse:
valuation_at_source += flt(d.amount)
if d.t_warehouse and not d.s_warehouse:
@@ -220,7 +220,7 @@ class StockEntry(StockController):
frappe.throw(_("Total valuation for manufactured or repacked item(s) can not be less than total valuation of raw materials"))
def set_total_amount(self):
- self.total_amount = sum([flt(item.amount) for item in self.get("mtn_details")])
+ self.total_amount = sum([flt(item.amount) for item in self.get("items")])
def get_stock_and_rate(self, force=False):
"""get stock and incoming rate on posting date"""
@@ -232,7 +232,7 @@ class StockEntry(StockController):
allow_negative_stock = cint(frappe.db.get_value("Stock Settings", None, "allow_negative_stock"))
- for d in self.get('mtn_details'):
+ for d in self.get('items'):
d.transfer_qty = flt(d.transfer_qty)
args = frappe._dict({
@@ -264,8 +264,8 @@ class StockEntry(StockController):
# set incoming rate for fg item
if self.purpose in ("Manufacture", "Repack"):
- number_of_fg_items = len([t.t_warehouse for t in self.get("mtn_details") if t.t_warehouse])
- for d in self.get("mtn_details"):
+ number_of_fg_items = len([t.t_warehouse for t in self.get("items") if t.t_warehouse])
+ for d in self.get("items"):
if d.bom_no or (d.t_warehouse and number_of_fg_items == 1):
if not flt(d.incoming_rate) or force:
operation_cost_per_unit = self.get_operation_cost_per_unit(d.bom_no, d.qty)
@@ -278,7 +278,7 @@ class StockEntry(StockController):
if self.production_order:
pro_order = frappe.get_doc("Production Order", self.production_order)
- for d in pro_order.get("production_order_operations"):
+ for d in pro_order.get("operations"):
if flt(d.completed_qty):
operation_cost_per_unit += flt(d.actual_operating_cost) / flt(d.completed_qty)
else:
@@ -312,18 +312,18 @@ class StockEntry(StockController):
return incoming_rate
def validate_incoming_rate(self):
- for d in self.get('mtn_details'):
+ for d in self.get('items'):
if d.t_warehouse:
self.validate_value("incoming_rate", ">", 0, d, raise_exception=IncorrectValuationRateError)
def validate_bom(self):
- for d in self.get('mtn_details'):
+ for d in self.get('items'):
if d.bom_no:
validate_bom_no(d.item_code, d.bom_no)
def validate_finished_goods(self):
"""validation: finished good quantity should be same as manufacturing quantity"""
- for d in self.get('mtn_details'):
+ for d in self.get('items'):
if d.bom_no and flt(d.transfer_qty) != flt(self.fg_completed_qty):
frappe.throw(_("Quantity in row {0} ({1}) must be same as manufactured quantity {2}").format(d.idx, d.transfer_qty, self.fg_completed_qty))
@@ -353,7 +353,7 @@ class StockEntry(StockController):
stock_items = get_stock_items_for_return(ref.doc, ref.parentfields)
already_returned_item_qty = self.get_already_returned_item_qty(ref.fieldname)
- for item in self.get("mtn_details"):
+ for item in self.get("items"):
# validate if item exists in the ref doc and that it is a stock item
if item.item_code not in stock_items:
frappe.throw(_("Item {0} does not exist in {1} {2}").format(item.item_code, ref.doc.doctype, ref.doc.name),
@@ -379,7 +379,7 @@ class StockEntry(StockController):
def update_stock_ledger(self):
sl_entries = []
- for d in self.get('mtn_details'):
+ for d in self.get('items'):
if cstr(d.s_warehouse) and self.docstatus == 1:
sl_entries.append(self.get_sl_entries(d, {
"warehouse": cstr(d.s_warehouse),
@@ -489,7 +489,7 @@ class StockEntry(StockController):
return ret
def get_items(self):
- self.set('mtn_details', [])
+ self.set('items', [])
self.validate_production_order()
pro_obj = None
@@ -620,7 +620,7 @@ class StockEntry(StockController):
["default_expense_account", "cost_center"])[0]
for d in item_dict:
- se_child = self.append('mtn_details')
+ se_child = self.append('items')
se_child.s_warehouse = item_dict[d].get("from_warehouse")
se_child.t_warehouse = item_dict[d].get("to_warehouse")
se_child.item_code = cstr(d)
@@ -645,7 +645,7 @@ class StockEntry(StockController):
se_child.bom_no = bom_no
def validate_with_material_request(self):
- for item in self.get("mtn_details"):
+ for item in self.get("items"):
if item.material_request:
mreq_item = frappe.db.get_value("Material Request Item",
{"name": item.material_request_item, "parent": item.material_request},
@@ -798,11 +798,11 @@ def get_return_doc_and_details(args):
return_map = {
"Sales Return": {
# [Ref DocType, [Item tables' parentfields]]
- "delivery_note_no": ["Delivery Note", ["delivery_note_details", "packing_details"]],
- "sales_invoice_no": ["Sales Invoice", ["entries", "packing_details"]]
+ "delivery_note_no": ["Delivery Note", ["items", "packed_items"]],
+ "sales_invoice_no": ["Sales Invoice", ["entries", "packed_items"]]
},
"Purchase Return": {
- "purchase_receipt_no": ["Purchase Receipt", ["purchase_receipt_details"]]
+ "purchase_receipt_no": ["Purchase Receipt", ["items"]]
}
}
@@ -854,7 +854,7 @@ def make_return_jv_from_sales_invoice(se, ref):
# income account entries
children = []
- for se_item in se.get("mtn_details"):
+ for se_item in se.get("items"):
# find item in ref.doc
ref_item = ref.doc.get({"item_code": se_item.item_code})[0]
@@ -895,7 +895,7 @@ def make_return_jv_from_delivery_note(se, ref):
parent = {}
children = []
- for se_item in se.get("mtn_details"):
+ for se_item in se.get("items"):
for sales_invoice in invoices_against_delivery:
si = frappe.get_doc("Sales Invoice", sales_invoice)
@@ -957,7 +957,7 @@ def make_return_jv_from_purchase_receipt(se, ref):
parent = {}
children = []
- for se_item in se.get("mtn_details"):
+ for se_item in se.get("items"):
for purchase_invoice in invoice_against_receipt:
pi = frappe.get_doc("Purchase Invoice", purchase_invoice)
ref_item = pi.get({"item_code": se_item.item_code})
diff --git a/erpnext/stock/doctype/stock_entry/test_records.json b/erpnext/stock/doctype/stock_entry/test_records.json
index f743991eb77..10df737b4a3 100644
--- a/erpnext/stock/doctype/stock_entry/test_records.json
+++ b/erpnext/stock/doctype/stock_entry/test_records.json
@@ -3,7 +3,7 @@
"company": "_Test Company",
"doctype": "Stock Entry",
"fiscal_year": "_Test Fiscal Year 2013",
- "mtn_details": [
+ "items": [
{
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
@@ -11,7 +11,7 @@
"expense_account": "Stock Adjustment - _TC",
"incoming_rate": 100,
"item_code": "_Test Item",
- "parentfield": "mtn_details",
+ "parentfield": "items",
"qty": 50.0,
"stock_uom": "_Test UOM",
"t_warehouse": "_Test Warehouse - _TC",
@@ -27,7 +27,7 @@
"company": "_Test Company",
"doctype": "Stock Entry",
"fiscal_year": "_Test Fiscal Year 2013",
- "mtn_details": [
+ "items": [
{
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
@@ -35,7 +35,7 @@
"expense_account": "Stock Adjustment - _TC",
"incoming_rate": 100,
"item_code": "_Test Item",
- "parentfield": "mtn_details",
+ "parentfield": "items",
"qty": 40.0,
"s_warehouse": "_Test Warehouse - _TC",
"stock_uom": "_Test UOM",
@@ -51,7 +51,7 @@
"company": "_Test Company",
"doctype": "Stock Entry",
"fiscal_year": "_Test Fiscal Year 2013",
- "mtn_details": [
+ "items": [
{
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
@@ -59,7 +59,7 @@
"expense_account": "Stock Adjustment - _TC",
"incoming_rate": 100,
"item_code": "_Test Item",
- "parentfield": "mtn_details",
+ "parentfield": "items",
"qty": 45.0,
"s_warehouse": "_Test Warehouse - _TC",
"stock_uom": "_Test UOM",
@@ -76,7 +76,7 @@
"company": "_Test Company",
"doctype": "Stock Entry",
"fiscal_year": "_Test Fiscal Year 2013",
- "mtn_details": [
+ "items": [
{
"conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC",
@@ -84,7 +84,7 @@
"expense_account": "Stock Adjustment - _TC",
"incoming_rate": 100,
"item_code": "_Test Item",
- "parentfield": "mtn_details",
+ "parentfield": "items",
"qty": 50.0,
"s_warehouse": "_Test Warehouse - _TC",
"stock_uom": "_Test UOM",
@@ -98,7 +98,7 @@
"expense_account": "Stock Adjustment - _TC",
"incoming_rate": 5000,
"item_code": "_Test Item Home Desktop 100",
- "parentfield": "mtn_details",
+ "parentfield": "items",
"qty": 1,
"stock_uom": "_Test UOM",
"t_warehouse": "_Test Warehouse - _TC",
diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py
index cc539f6ef3d..f6125f5b84b 100644
--- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py
@@ -91,8 +91,8 @@ class TestStockEntry(unittest.TestCase):
"warehouse": warehouse}, "projected_qty") or 0
# update re-level qty so that it is more than projected_qty
- if projected_qty > template.item_reorder[0].warehouse_reorder_level:
- template.item_reorder[0].warehouse_reorder_level += projected_qty
+ if projected_qty > template.reorder_levels[0].warehouse_reorder_level:
+ template.reorder_levels[0].warehouse_reorder_level += projected_qty
template.save()
from erpnext.stock.reorder_item import reorder_item
@@ -102,7 +102,7 @@ class TestStockEntry(unittest.TestCase):
items = []
for mr in mr_list:
- for d in mr.indent_details:
+ for d in mr.items:
items.append(d.item_code)
self.assertTrue(item_code in items)
@@ -116,7 +116,7 @@ class TestStockEntry(unittest.TestCase):
mr.submit()
stock_in_hand_account = frappe.db.get_value("Account", {"account_type": "Warehouse",
- "warehouse": mr.get("mtn_details")[0].t_warehouse})
+ "warehouse": mr.get("items")[0].t_warehouse})
self.check_stock_ledger_entries("Stock Entry", mr.name,
[["_Test Item", "_Test Warehouse - _TC", 50.0]])
@@ -151,7 +151,7 @@ class TestStockEntry(unittest.TestCase):
[["_Test Item", "_Test Warehouse - _TC", -40.0]])
stock_in_hand_account = frappe.db.get_value("Account", {"account_type": "Warehouse",
- "warehouse": mi.get("mtn_details")[0].s_warehouse})
+ "warehouse": mi.get("items")[0].s_warehouse})
self.check_gl_entries("Stock Entry", mi.name,
sorted([
@@ -167,11 +167,11 @@ class TestStockEntry(unittest.TestCase):
self.assertFalse(frappe.db.sql("""select * from `tabGL Entry`
where voucher_type='Stock Entry' and voucher_no=%s""", mi.name))
- self.assertEquals(frappe.db.get_value("Bin", {"warehouse": mi.get("mtn_details")[0].s_warehouse,
- "item_code": mi.get("mtn_details")[0].item_code}, "actual_qty"), 50)
+ self.assertEquals(frappe.db.get_value("Bin", {"warehouse": mi.get("items")[0].s_warehouse,
+ "item_code": mi.get("items")[0].item_code}, "actual_qty"), 50)
- self.assertEquals(frappe.db.get_value("Bin", {"warehouse": mi.get("mtn_details")[0].s_warehouse,
- "item_code": mi.get("mtn_details")[0].item_code}, "stock_value"), 5000)
+ self.assertEquals(frappe.db.get_value("Bin", {"warehouse": mi.get("items")[0].s_warehouse,
+ "item_code": mi.get("items")[0].item_code}, "stock_value"), 5000)
def test_material_transfer_gl_entry(self):
self._clear_stock_account_balance()
@@ -187,10 +187,10 @@ class TestStockEntry(unittest.TestCase):
[["_Test Item", "_Test Warehouse - _TC", -45.0], ["_Test Item", "_Test Warehouse 1 - _TC", 45.0]])
stock_in_hand_account = frappe.db.get_value("Account", {"account_type": "Warehouse",
- "warehouse": mtn.get("mtn_details")[0].s_warehouse})
+ "warehouse": mtn.get("items")[0].s_warehouse})
fixed_asset_account = frappe.db.get_value("Account", {"account_type": "Warehouse",
- "warehouse": mtn.get("mtn_details")[0].t_warehouse})
+ "warehouse": mtn.get("items")[0].t_warehouse})
self.check_gl_entries("Stock Entry", mtn.name,
@@ -237,12 +237,12 @@ class TestStockEntry(unittest.TestCase):
self._insert_material_receipt()
repack = frappe.copy_doc(test_records[3])
- repack.get("mtn_details")[1].incoming_rate = 6000
+ repack.get("items")[1].incoming_rate = 6000
repack.insert()
repack.submit()
stock_in_hand_account = frappe.db.get_value("Account", {"account_type": "Warehouse",
- "warehouse": repack.get("mtn_details")[1].t_warehouse})
+ "warehouse": repack.get("items")[1].t_warehouse})
self.check_gl_entries("Stock Entry", repack.name,
sorted([
@@ -289,7 +289,7 @@ class TestStockEntry(unittest.TestCase):
se1.submit()
se2 = frappe.copy_doc(test_records[0])
- se2.get("mtn_details")[0].item_code = "_Test Item Home Desktop 100"
+ se2.get("items")[0].item_code = "_Test Item Home Desktop 100"
se2.insert()
se2.submit()
@@ -313,8 +313,8 @@ class TestStockEntry(unittest.TestCase):
se = frappe.copy_doc(test_records[0])
se.purpose = "Sales Return"
se.sales_invoice_no = si.name
- se.get("mtn_details")[0].qty = returned_qty
- se.get("mtn_details")[0].transfer_qty = returned_qty
+ se.get("items")[0].qty = returned_qty
+ se.get("items")[0].transfer_qty = returned_qty
self.assertRaises(NotUpdateStockError, se.insert)
self._insert_material_receipt()
@@ -342,9 +342,9 @@ class TestStockEntry(unittest.TestCase):
se.sales_invoice_no = si.name
se.posting_date = "2013-03-10"
se.fiscal_year = "_Test Fiscal Year 2013"
- se.get("mtn_details")[0].item_code = "_Test Item Home Desktop 200"
- se.get("mtn_details")[0].qty = returned_qty
- se.get("mtn_details")[0].transfer_qty = returned_qty
+ se.get("items")[0].item_code = "_Test Item Home Desktop 200"
+ se.get("items")[0].qty = returned_qty
+ se.get("items")[0].transfer_qty = returned_qty
# check if stock entry gets submitted
self.assertRaises(frappe.DoesNotExistError, se.insert)
@@ -355,8 +355,8 @@ class TestStockEntry(unittest.TestCase):
se.posting_date = "2013-03-10"
se.fiscal_year = "_Test Fiscal Year 2013"
se.sales_invoice_no = si.name
- se.get("mtn_details")[0].qty = returned_qty
- se.get("mtn_details")[0].transfer_qty = returned_qty
+ se.get("items")[0].qty = returned_qty
+ se.get("items")[0].transfer_qty = returned_qty
# in both cases item code remains _Test Item when returning
se.insert()
@@ -388,7 +388,7 @@ class TestStockEntry(unittest.TestCase):
actual_qty_0 = self._get_actual_qty()
# make a delivery note based on this invoice
dn = frappe.copy_doc(delivery_note_test_records[0])
- dn.get("delivery_note_details")[0].item_code = item_code
+ dn.get("items")[0].item_code = item_code
dn.insert()
dn.submit()
@@ -413,7 +413,7 @@ class TestStockEntry(unittest.TestCase):
se.delivery_note_no = dn.name
se.posting_date = "2013-03-10"
se.fiscal_year = "_Test Fiscal Year 2013"
- se.get("mtn_details")[0].qty = se.get("mtn_details")[0].transfer_qty = returned_qty
+ se.get("items")[0].qty = se.get("items")[0].transfer_qty = returned_qty
se.insert()
se.submit()
@@ -479,8 +479,8 @@ class TestStockEntry(unittest.TestCase):
actual_qty_0 = self._get_actual_qty()
so = frappe.copy_doc(sales_order_test_records[0])
- so.get("sales_order_details")[0].item_code = item_code
- so.get("sales_order_details")[0].qty = 5.0
+ so.get("items")[0].item_code = item_code
+ so.get("items")[0].qty = 5.0
so.insert()
so.submit()
@@ -508,7 +508,7 @@ class TestStockEntry(unittest.TestCase):
se.delivery_note_no = dn.name
se.posting_date = "2013-03-10"
se.fiscal_year = "_Test Fiscal Year 2013"
- se.get("mtn_details")[0].qty = se.get("mtn_details")[0].transfer_qty = returned_qty
+ se.get("items")[0].qty = se.get("items")[0].transfer_qty = returned_qty
se.insert()
se.submit()
@@ -546,7 +546,7 @@ class TestStockEntry(unittest.TestCase):
d.expense_account = "_Test Account Cost for Goods Sold - _TC"
d.cost_center = "_Test Cost Center - _TC"
- for d in pi.get("other_charges"):
+ for d in pi.get("taxes"):
d.cost_center = "_Test Cost Center - _TC"
pi.run_method("calculate_taxes_and_totals")
@@ -560,8 +560,8 @@ class TestStockEntry(unittest.TestCase):
se.purchase_receipt_no = pr.name
se.posting_date = "2013-03-01"
se.fiscal_year = "_Test Fiscal Year 2013"
- se.get("mtn_details")[0].qty = se.get("mtn_details")[0].transfer_qty = 5
- se.get("mtn_details")[0].s_warehouse = "_Test Warehouse - _TC"
+ se.get("items")[0].qty = se.get("items")[0].transfer_qty = 5
+ se.get("items")[0].s_warehouse = "_Test Warehouse - _TC"
se.insert()
se.submit()
@@ -586,8 +586,8 @@ class TestStockEntry(unittest.TestCase):
se.purchase_receipt_no = pr_docname
se.posting_date = "2013-03-01"
se.fiscal_year = "_Test Fiscal Year 2013"
- se.get("mtn_details")[0].qty = se.get("mtn_details")[0].transfer_qty = 6
- se.get("mtn_details")[0].s_warehouse = "_Test Warehouse - _TC"
+ se.get("items")[0].qty = se.get("items")[0].transfer_qty = 6
+ se.get("items")[0].s_warehouse = "_Test Warehouse - _TC"
self.assertRaises(StockOverReturnError, se.insert)
@@ -625,8 +625,8 @@ class TestStockEntry(unittest.TestCase):
# submit purchase receipt
po = frappe.copy_doc(purchase_order_test_records[0])
po.is_subcontracted = None
- po.get("po_details")[0].item_code = "_Test Item"
- po.get("po_details")[0].rate = 50
+ po.get("items")[0].item_code = "_Test Item"
+ po.get("items")[0].rate = 50
po.insert()
po.submit()
@@ -649,7 +649,7 @@ class TestStockEntry(unittest.TestCase):
for d in pi.get("entries"):
d.expense_account = "_Test Account Cost for Goods Sold - _TC"
d.cost_center = "_Test Cost Center - _TC"
- for d in pi.get("other_charges"):
+ for d in pi.get("taxes"):
d.cost_center = "_Test Cost Center - _TC"
pi.run_method("calculate_taxes_and_totals")
@@ -663,8 +663,8 @@ class TestStockEntry(unittest.TestCase):
se.purchase_receipt_no = pr.name
se.posting_date = "2013-03-01"
se.fiscal_year = "_Test Fiscal Year 2013"
- se.get("mtn_details")[0].qty = se.get("mtn_details")[0].transfer_qty = 5
- se.get("mtn_details")[0].s_warehouse = "_Test Warehouse - _TC"
+ se.get("items")[0].qty = se.get("items")[0].transfer_qty = 5
+ se.get("items")[0].s_warehouse = "_Test Warehouse - _TC"
se.insert()
se.submit()
@@ -686,43 +686,43 @@ class TestStockEntry(unittest.TestCase):
def test_serial_no_not_reqd(self):
se = frappe.copy_doc(test_records[0])
- se.get("mtn_details")[0].serial_no = "ABCD"
+ se.get("items")[0].serial_no = "ABCD"
se.insert()
self.assertRaises(SerialNoNotRequiredError, se.submit)
def test_serial_no_reqd(self):
se = frappe.copy_doc(test_records[0])
- se.get("mtn_details")[0].item_code = "_Test Serialized Item"
- se.get("mtn_details")[0].qty = 2
- se.get("mtn_details")[0].transfer_qty = 2
+ se.get("items")[0].item_code = "_Test Serialized Item"
+ se.get("items")[0].qty = 2
+ se.get("items")[0].transfer_qty = 2
se.insert()
self.assertRaises(SerialNoRequiredError, se.submit)
def test_serial_no_qty_more(self):
se = frappe.copy_doc(test_records[0])
- se.get("mtn_details")[0].item_code = "_Test Serialized Item"
- se.get("mtn_details")[0].qty = 2
- se.get("mtn_details")[0].serial_no = "ABCD\nEFGH\nXYZ"
- se.get("mtn_details")[0].transfer_qty = 2
+ se.get("items")[0].item_code = "_Test Serialized Item"
+ se.get("items")[0].qty = 2
+ se.get("items")[0].serial_no = "ABCD\nEFGH\nXYZ"
+ se.get("items")[0].transfer_qty = 2
se.insert()
self.assertRaises(SerialNoQtyError, se.submit)
def test_serial_no_qty_less(self):
se = frappe.copy_doc(test_records[0])
- se.get("mtn_details")[0].item_code = "_Test Serialized Item"
- se.get("mtn_details")[0].qty = 2
- se.get("mtn_details")[0].serial_no = "ABCD"
- se.get("mtn_details")[0].transfer_qty = 2
+ se.get("items")[0].item_code = "_Test Serialized Item"
+ se.get("items")[0].qty = 2
+ se.get("items")[0].serial_no = "ABCD"
+ se.get("items")[0].transfer_qty = 2
se.insert()
self.assertRaises(SerialNoQtyError, se.submit)
def test_serial_no_transfer_in(self):
self._clear_stock_account_balance()
se = frappe.copy_doc(test_records[0])
- se.get("mtn_details")[0].item_code = "_Test Serialized Item"
- se.get("mtn_details")[0].qty = 2
- se.get("mtn_details")[0].serial_no = "ABCD\nEFGH"
- se.get("mtn_details")[0].transfer_qty = 2
+ se.get("items")[0].item_code = "_Test Serialized Item"
+ se.get("items")[0].qty = 2
+ se.get("items")[0].serial_no = "ABCD\nEFGH"
+ se.get("items")[0].transfer_qty = 2
se.insert()
se.submit()
@@ -738,12 +738,12 @@ class TestStockEntry(unittest.TestCase):
make_serialized_item(target_warehouse="_Test Warehouse 1 - _TC")
se = frappe.copy_doc(test_records[0])
se.purpose = "Material Issue"
- se.get("mtn_details")[0].item_code = "_Test Serialized Item With Series"
- se.get("mtn_details")[0].qty = 2
- se.get("mtn_details")[0].s_warehouse = "_Test Warehouse 1 - _TC"
- se.get("mtn_details")[0].t_warehouse = None
- se.get("mtn_details")[0].serial_no = "ABCD\nEFGH"
- se.get("mtn_details")[0].transfer_qty = 2
+ se.get("items")[0].item_code = "_Test Serialized Item With Series"
+ se.get("items")[0].qty = 2
+ se.get("items")[0].s_warehouse = "_Test Warehouse 1 - _TC"
+ se.get("items")[0].t_warehouse = None
+ se.get("items")[0].serial_no = "ABCD\nEFGH"
+ se.get("items")[0].transfer_qty = 2
se.insert()
self.assertRaises(SerialNoNotExistsError, se.submit)
@@ -753,10 +753,10 @@ class TestStockEntry(unittest.TestCase):
se, serial_nos = self.test_serial_by_series()
se = frappe.copy_doc(test_records[0])
- se.get("mtn_details")[0].item_code = "_Test Serialized Item With Series"
- se.get("mtn_details")[0].qty = 1
- se.get("mtn_details")[0].serial_no = serial_nos[0]
- se.get("mtn_details")[0].transfer_qty = 1
+ se.get("items")[0].item_code = "_Test Serialized Item With Series"
+ se.get("items")[0].qty = 1
+ se.get("items")[0].serial_no = serial_nos[0]
+ se.get("items")[0].transfer_qty = 1
se.insert()
self.assertRaises(SerialNoDuplicateError, se.submit)
@@ -764,7 +764,7 @@ class TestStockEntry(unittest.TestCase):
self._clear_stock_account_balance()
se = make_serialized_item()
- serial_nos = get_serial_nos(se.get("mtn_details")[0].serial_no)
+ serial_nos = get_serial_nos(se.get("items")[0].serial_no)
self.assertTrue(frappe.db.exists("Serial No", serial_nos[0]))
self.assertTrue(frappe.db.exists("Serial No", serial_nos[1]))
@@ -777,28 +777,28 @@ class TestStockEntry(unittest.TestCase):
se = frappe.copy_doc(test_records[0])
se.purpose = "Material Transfer"
- se.get("mtn_details")[0].item_code = "_Test Serialized Item"
- se.get("mtn_details")[0].qty = 1
- se.get("mtn_details")[0].transfer_qty = 1
- se.get("mtn_details")[0].serial_no = serial_nos[0]
- se.get("mtn_details")[0].s_warehouse = "_Test Warehouse - _TC"
- se.get("mtn_details")[0].t_warehouse = "_Test Warehouse 1 - _TC"
+ se.get("items")[0].item_code = "_Test Serialized Item"
+ se.get("items")[0].qty = 1
+ se.get("items")[0].transfer_qty = 1
+ se.get("items")[0].serial_no = serial_nos[0]
+ se.get("items")[0].s_warehouse = "_Test Warehouse - _TC"
+ se.get("items")[0].t_warehouse = "_Test Warehouse 1 - _TC"
se.insert()
self.assertRaises(SerialNoItemError, se.submit)
def test_serial_move(self):
self._clear_stock_account_balance()
se = make_serialized_item()
- serial_no = get_serial_nos(se.get("mtn_details")[0].serial_no)[0]
+ serial_no = get_serial_nos(se.get("items")[0].serial_no)[0]
se = frappe.copy_doc(test_records[0])
se.purpose = "Material Transfer"
- se.get("mtn_details")[0].item_code = "_Test Serialized Item With Series"
- se.get("mtn_details")[0].qty = 1
- se.get("mtn_details")[0].transfer_qty = 1
- se.get("mtn_details")[0].serial_no = serial_no
- se.get("mtn_details")[0].s_warehouse = "_Test Warehouse - _TC"
- se.get("mtn_details")[0].t_warehouse = "_Test Warehouse 1 - _TC"
+ se.get("items")[0].item_code = "_Test Serialized Item With Series"
+ se.get("items")[0].qty = 1
+ se.get("items")[0].transfer_qty = 1
+ se.get("items")[0].serial_no = serial_no
+ se.get("items")[0].s_warehouse = "_Test Warehouse - _TC"
+ se.get("items")[0].t_warehouse = "_Test Warehouse 1 - _TC"
se.insert()
se.submit()
self.assertTrue(frappe.db.get_value("Serial No", serial_no, "warehouse"), "_Test Warehouse 1 - _TC")
@@ -811,16 +811,16 @@ class TestStockEntry(unittest.TestCase):
make_serialized_item(target_warehouse="_Test Warehouse 1 - _TC")
t = make_serialized_item()
- serial_nos = get_serial_nos(t.get("mtn_details")[0].serial_no)
+ serial_nos = get_serial_nos(t.get("items")[0].serial_no)
se = frappe.copy_doc(test_records[0])
se.purpose = "Material Transfer"
- se.get("mtn_details")[0].item_code = "_Test Serialized Item With Series"
- se.get("mtn_details")[0].qty = 1
- se.get("mtn_details")[0].transfer_qty = 1
- se.get("mtn_details")[0].serial_no = serial_nos[0]
- se.get("mtn_details")[0].s_warehouse = "_Test Warehouse 1 - _TC"
- se.get("mtn_details")[0].t_warehouse = "_Test Warehouse - _TC"
+ se.get("items")[0].item_code = "_Test Serialized Item With Series"
+ se.get("items")[0].qty = 1
+ se.get("items")[0].transfer_qty = 1
+ se.get("items")[0].serial_no = serial_nos[0]
+ se.get("items")[0].s_warehouse = "_Test Warehouse 1 - _TC"
+ se.get("items")[0].t_warehouse = "_Test Warehouse - _TC"
se.insert()
self.assertRaises(SerialNoWarehouseError, se.submit)
@@ -829,7 +829,7 @@ class TestStockEntry(unittest.TestCase):
se, serial_nos = self.test_serial_by_series()
se.cancel()
- serial_no = get_serial_nos(se.get("mtn_details")[0].serial_no)[0]
+ serial_no = get_serial_nos(se.get("items")[0].serial_no)[0]
self.assertFalse(frappe.db.get_value("Serial No", serial_no, "warehouse"))
def test_warehouse_company_validation(self):
@@ -841,7 +841,7 @@ class TestStockEntry(unittest.TestCase):
from erpnext.stock.utils import InvalidWarehouseCompany
st1 = frappe.copy_doc(test_records[0])
- st1.get("mtn_details")[0].t_warehouse="_Test Warehouse 2 - _TC1"
+ st1.get("items")[0].t_warehouse="_Test Warehouse 2 - _TC1"
st1.insert()
self.assertRaises(InvalidWarehouseCompany, st1.submit)
@@ -861,13 +861,13 @@ class TestStockEntry(unittest.TestCase):
frappe.set_user("test@example.com")
st1 = frappe.copy_doc(test_records[0])
st1.company = "_Test Company 1"
- st1.get("mtn_details")[0].t_warehouse="_Test Warehouse 2 - _TC1"
+ st1.get("items")[0].t_warehouse="_Test Warehouse 2 - _TC1"
self.assertRaises(frappe.PermissionError, st1.insert)
frappe.set_user("test2@example.com")
st1 = frappe.copy_doc(test_records[0])
st1.company = "_Test Company 1"
- st1.get("mtn_details")[0].t_warehouse="_Test Warehouse 2 - _TC1"
+ st1.get("items")[0].t_warehouse="_Test Warehouse 2 - _TC1"
st1.insert()
st1.submit()
@@ -922,9 +922,9 @@ class TestStockEntry(unittest.TestCase):
})
stock_entry.get_items()
- fg_rate = [d.amount for d in stock_entry.get("mtn_details") if d.item_code=="_Test FG Item 2"][0]
+ fg_rate = [d.amount for d in stock_entry.get("items") if d.item_code=="_Test FG Item 2"][0]
self.assertEqual(fg_rate, 1200.00)
- fg_rate = [d.amount for d in stock_entry.get("mtn_details") if d.item_code=="_Test Item"][0]
+ fg_rate = [d.amount for d in stock_entry.get("items") if d.item_code=="_Test Item"][0]
self.assertEqual(fg_rate, 100.00)
def test_variant_production_order(self):
@@ -948,17 +948,17 @@ class TestStockEntry(unittest.TestCase):
stock_entry = frappe.get_doc(make_stock_entry(production_order.name, "Manufacture", 1))
stock_entry.insert()
- self.assertTrue("_Test Variant Item-S" in [d.item_code for d in stock_entry.mtn_details])
+ self.assertTrue("_Test Variant Item-S" in [d.item_code for d in stock_entry.items])
def make_serialized_item(item_code=None, serial_no=None, target_warehouse=None):
se = frappe.copy_doc(test_records[0])
- se.get("mtn_details")[0].item_code = item_code or "_Test Serialized Item With Series"
- se.get("mtn_details")[0].serial_no = serial_no
- se.get("mtn_details")[0].qty = 2
- se.get("mtn_details")[0].transfer_qty = 2
+ se.get("items")[0].item_code = item_code or "_Test Serialized Item With Series"
+ se.get("items")[0].serial_no = serial_no
+ se.get("items")[0].qty = 2
+ se.get("items")[0].transfer_qty = 2
if target_warehouse:
- se.get("mtn_details")[0].t_warehouse = target_warehouse
+ se.get("items")[0].t_warehouse = target_warehouse
se.insert()
se.submit()
@@ -979,7 +979,7 @@ def make_stock_entry(**args):
else:
s.purpose = "Material Receipt"
s.company = args.company or "_Test Company"
- s.append("mtn_details", {
+ s.append("items", {
"item_code": args.item or args.item_code,
"s_warehouse": args.from_warehouse or args.source,
"t_warehouse": args.to_warehouse or args.target,
diff --git a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
index ed62d2fea7d..d36d756ae29 100644
--- a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
+++ b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
@@ -204,12 +204,12 @@ class TestStockReconciliation(unittest.TestCase):
"posting_time": "01:00",
"purpose": "Material Receipt",
"fiscal_year": "_Test Fiscal Year 2012",
- "mtn_details": [
+ "items": [
{
"conversion_factor": 1.0,
"doctype": "Stock Entry Detail",
"item_code": "_Test Item",
- "parentfield": "mtn_details",
+ "parentfield": "items",
"incoming_rate": 1000,
"qty": 20.0,
"stock_uom": "_Test UOM",
@@ -229,9 +229,9 @@ class TestStockReconciliation(unittest.TestCase):
pr1 = frappe.copy_doc(stock_entry)
pr1.posting_date = "2012-12-15"
pr1.posting_time = "02:00"
- pr1.get("mtn_details")[0].qty = 10
- pr1.get("mtn_details")[0].transfer_qty = 10
- pr1.get("mtn_details")[0].incoming_rate = 700
+ pr1.get("items")[0].qty = 10
+ pr1.get("items")[0].transfer_qty = 10
+ pr1.get("items")[0].incoming_rate = 700
pr1.insert()
pr1.submit()
@@ -239,11 +239,11 @@ class TestStockReconciliation(unittest.TestCase):
pr2.posting_date = "2012-12-25"
pr2.posting_time = "03:00"
pr2.purpose = "Material Issue"
- pr2.get("mtn_details")[0].s_warehouse = "_Test Warehouse - _TC"
- pr2.get("mtn_details")[0].t_warehouse = None
- pr2.get("mtn_details")[0].qty = 15
- pr2.get("mtn_details")[0].transfer_qty = 15
- pr2.get("mtn_details")[0].incoming_rate = 0
+ pr2.get("items")[0].s_warehouse = "_Test Warehouse - _TC"
+ pr2.get("items")[0].t_warehouse = None
+ pr2.get("items")[0].qty = 15
+ pr2.get("items")[0].transfer_qty = 15
+ pr2.get("items")[0].incoming_rate = 0
pr2.insert()
pr2.submit()
@@ -251,11 +251,11 @@ class TestStockReconciliation(unittest.TestCase):
pr3.posting_date = "2012-12-31"
pr3.posting_time = "08:00"
pr3.purpose = "Material Issue"
- pr3.get("mtn_details")[0].s_warehouse = "_Test Warehouse - _TC"
- pr3.get("mtn_details")[0].t_warehouse = None
- pr3.get("mtn_details")[0].qty = 20
- pr3.get("mtn_details")[0].transfer_qty = 20
- pr3.get("mtn_details")[0].incoming_rate = 0
+ pr3.get("items")[0].s_warehouse = "_Test Warehouse - _TC"
+ pr3.get("items")[0].t_warehouse = None
+ pr3.get("items")[0].qty = 20
+ pr3.get("items")[0].transfer_qty = 20
+ pr3.get("items")[0].incoming_rate = 0
pr3.insert()
pr3.submit()
@@ -264,9 +264,9 @@ class TestStockReconciliation(unittest.TestCase):
pr4.posting_date = "2013-01-05"
pr4.fiscal_year = "_Test Fiscal Year 2013"
pr4.posting_time = "07:00"
- pr4.get("mtn_details")[0].qty = 15
- pr4.get("mtn_details")[0].transfer_qty = 15
- pr4.get("mtn_details")[0].incoming_rate = 1200
+ pr4.get("items")[0].qty = 15
+ pr4.get("items")[0].transfer_qty = 15
+ pr4.get("items")[0].incoming_rate = 1200
pr4.insert()
pr4.submit()
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 5fe8b14b9cc..31860e0736d 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -154,7 +154,7 @@ def get_basic_details(args, item):
"cost_center": get_default_cost_center(args, item),
"batch_no": None,
"item_tax_rate": json.dumps(dict(([d.tax_type, d.tax_rate] for d in
- item.get("item_tax")))),
+ item.get("taxes")))),
"uom": item.stock_uom,
"min_order_qty": flt(item.min_order_qty) if args.parenttype == "Material Request" else "",
"conversion_factor": 1.0,
@@ -251,10 +251,10 @@ def validate_conversion_rate(args, meta):
def get_party_item_code(args, item_doc, out):
if args.transaction_type == "selling":
- customer_item_code = item_doc.get("item_customer_details", {"customer_name": args.customer})
+ customer_item_code = item_doc.get("customer_item_codes", {"customer_name": args.customer})
out.customer_item_code = customer_item_code[0].ref_code if customer_item_code else None
else:
- item_supplier = item_doc.get("item_supplier_details", {"supplier": args.supplier})
+ item_supplier = item_doc.get("supplier_item_codes", {"supplier": args.supplier})
out.supplier_part_no = item_supplier[0].supplier_part_no if item_supplier else None
def get_pos_settings_item_details(company, args, pos_settings=None):
diff --git a/erpnext/stock/reorder_item.py b/erpnext/stock/reorder_item.py
index e9294f8dc58..9f29f1fbf2b 100644
--- a/erpnext/stock/reorder_item.py
+++ b/erpnext/stock/reorder_item.py
@@ -51,11 +51,11 @@ def _reorder_item():
for item_code in item_warehouse_projected_qty:
item = frappe.get_doc("Item", item_code)
- if item.variant_of and not item.get("item_reorder"):
+ if item.variant_of and not item.get("reorder_levels"):
item.update_template_tables()
- if item.get("item_reorder"):
- for d in item.get("item_reorder"):
+ if item.get("reorder_levels"):
+ for d in item.get("reorder_levels"):
add_to_material_request(item_code, d.warehouse, d.warehouse_reorder_level,
d.warehouse_reorder_qty, d.material_request_type)
@@ -122,7 +122,7 @@ def create_material_request(material_requests):
for d in items:
d = frappe._dict(d)
item = frappe.get_doc("Item", d.item_code)
- mr.append("indent_details", {
+ mr.append("items", {
"doctype": "Material Request Item",
"item_code": d.item_code,
"schedule_date": add_days(nowdate(),cint(item.lead_time_days)),
@@ -169,7 +169,7 @@ def send_email_notification(mr_list):
for mr in mr_list:
msg += " " + mr.name + """
| Item Code | Warehouse | Qty | UOM | """
- for item in mr.get("indent_details"):
+ for item in mr.get("items"):
msg += "| " + item.item_code + " | " + item.warehouse + " | " + \
cstr(item.qty) + " | " + cstr(item.uom) + " | "
msg += " "
diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
index a31dfa6e584..cf5d1712b90 100644
--- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
+++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
@@ -100,7 +100,7 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
}
-cur_frm.fields_dict['item_maintenance_detail'].grid.get_field('item_code').get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict['items'].grid.get_field('item_code').get_query = function(doc, cdt, cdn) {
return {
filters:{ 'is_service_item': "Yes" }
}
@@ -110,7 +110,7 @@ cur_frm.cscript.item_code = function(doc, cdt, cdn) {
var fname = cur_frm.cscript.fname;
var d = locals[cdt][cdn];
if (d.item_code) {
- return get_server_fields('get_item_details', d.item_code, 'item_maintenance_detail',
+ return get_server_fields('get_item_details', d.item_code, 'items',
doc, cdt, cdn, 1);
}
}
@@ -119,7 +119,7 @@ cur_frm.cscript.generate_schedule = function(doc, cdt, cdn) {
if (!doc.__islocal) {
return $c('runserverobj', args={'method':'generate_schedule', 'docs':doc},
function(r, rt) {
- refresh_field('maintenance_schedule_detail');
+ refresh_field('schedules');
});
} else {
msgprint(__("Please save the document before generating maintenance schedule"));
diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.json b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.json
index a80c497e7d8..870912bb669 100644
--- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.json
+++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.json
@@ -94,7 +94,7 @@
"fieldname": "schedules",
"fieldtype": "Table",
"label": "Schedules",
- "oldfieldname": "maintenance_schedule_detail",
+ "oldfieldname": "schedules",
"oldfieldtype": "Table",
"options": "Maintenance Schedule Detail",
"permlevel": 0,
diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py
index a7396515292..349ff4b7bea 100644
--- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py
+++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py
@@ -22,16 +22,16 @@ class MaintenanceSchedule(TransactionBase):
return ret
def generate_schedule(self):
- self.set('maintenance_schedule_detail', [])
+ self.set('schedules', [])
frappe.db.sql("""delete from `tabMaintenance Schedule Detail`
where parent=%s""", (self.name))
count = 1
- for d in self.get('item_maintenance_detail'):
+ for d in self.get('items'):
self.validate_maintenance_detail()
s_list = []
s_list = self.create_schedule_list(d.start_date, d.end_date, d.no_of_visits, d.sales_person)
for i in range(d.no_of_visits):
- child = self.append('maintenance_schedule_detail')
+ child = self.append('schedules')
child.item_code = d.item_code
child.item_name = d.item_name
child.scheduled_date = s_list[i].strftime('%Y-%m-%d')
@@ -44,13 +44,13 @@ class MaintenanceSchedule(TransactionBase):
self.save()
def on_submit(self):
- if not self.get('maintenance_schedule_detail'):
+ if not self.get('schedules'):
throw(_("Please click on 'Generate Schedule' to get schedule"))
self.check_serial_no_added()
self.validate_schedule()
email_map = {}
- for d in self.get('item_maintenance_detail'):
+ for d in self.get('items'):
if d.serial_no:
serial_nos = get_valid_serial_nos(d.serial_no)
self.validate_serial_no(serial_nos, d.start_date)
@@ -133,7 +133,7 @@ class MaintenanceSchedule(TransactionBase):
return schedule_date
def validate_dates_with_periodicity(self):
- for d in self.get("item_maintenance_detail"):
+ for d in self.get("items"):
if d.start_date and d.end_date and d.periodicity and d.periodicity!="Random":
date_diff = (getdate(d.end_date) - getdate(d.start_date)).days + 1
days_in_period = {
@@ -150,10 +150,10 @@ class MaintenanceSchedule(TransactionBase):
.format(d.idx, d.periodicity, days_in_period[d.periodicity]))
def validate_maintenance_detail(self):
- if not self.get('item_maintenance_detail'):
+ if not self.get('items'):
throw(_("Please enter Maintaince Details first"))
- for d in self.get('item_maintenance_detail'):
+ for d in self.get('items'):
if not d.item_code:
throw(_("Please select item code"))
elif not d.start_date or not d.end_date:
@@ -167,7 +167,7 @@ class MaintenanceSchedule(TransactionBase):
throw(_("Start date should be less than end date for Item {0}").format(d.item_code))
def validate_sales_order(self):
- for d in self.get('item_maintenance_detail'):
+ for d in self.get('items'):
if d.prevdoc_docname:
chk = frappe.db.sql("""select ms.name from `tabMaintenance Schedule` ms,
`tabMaintenance Schedule Item` msi where msi.parent=ms.name and
@@ -210,11 +210,11 @@ class MaintenanceSchedule(TransactionBase):
def validate_schedule(self):
item_lst1 =[]
item_lst2 =[]
- for d in self.get('item_maintenance_detail'):
+ for d in self.get('items'):
if d.item_code not in item_lst1:
item_lst1.append(d.item_code)
- for m in self.get('maintenance_schedule_detail'):
+ for m in self.get('schedules'):
if m.item_code not in item_lst2:
item_lst2.append(m.item_code)
@@ -227,17 +227,17 @@ class MaintenanceSchedule(TransactionBase):
def check_serial_no_added(self):
serial_present =[]
- for d in self.get('item_maintenance_detail'):
+ for d in self.get('items'):
if d.serial_no:
serial_present.append(d.item_code)
- for m in self.get('maintenance_schedule_detail'):
+ for m in self.get('schedules'):
if serial_present:
if m.item_code in serial_present and not m.serial_no:
throw(_("Please click on 'Generate Schedule' to fetch Serial No added for Item {0}").format(m.item_code))
def on_cancel(self):
- for d in self.get('item_maintenance_detail'):
+ for d in self.get('items'):
if d.serial_no:
serial_nos = get_valid_serial_nos(d.serial_no)
self.update_amc_date(serial_nos)
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
index ffdcb3ea75b..675ecd38228 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
@@ -75,7 +75,7 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
}
}
-cur_frm.fields_dict['maintenance_visit_details'].grid.get_field('item_code').get_query = function(doc, cdt, cdn) {
+cur_frm.fields_dict['purposes'].grid.get_field('item_code').get_query = function(doc, cdt, cdn) {
return{
filters:{ 'is_service_item': "Yes"}
}
@@ -85,7 +85,7 @@ cur_frm.cscript.item_code = function(doc, cdt, cdn) {
var fname = cur_frm.cscript.fname;
var d = locals[cdt][cdn];
if (d.item_code) {
- return get_server_fields('get_item_details',d.item_code, 'maintenance_visit_details',doc,cdt,cdn,1);
+ return get_server_fields('get_item_details',d.item_code, 'purposes',doc,cdt,cdn,1);
}
}
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.py b/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
index ef2fb41a29e..fb425485661 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
@@ -15,7 +15,7 @@ class MaintenanceVisit(TransactionBase):
return frappe.db.get_value("Item", item_code, ["item_name", "description"], as_dict=1)
def validate_serial_no(self):
- for d in self.get('maintenance_visit_details'):
+ for d in self.get('purposes'):
if d.serial_no and not frappe.db.exists("Serial No", d.serial_no):
frappe.throw(_("Serial No {0} does not exist").format(d.serial_no))
@@ -23,7 +23,7 @@ class MaintenanceVisit(TransactionBase):
self.validate_serial_no()
def update_customer_issue(self, flag):
- for d in self.get('maintenance_visit_details'):
+ for d in self.get('purposes'):
if d.prevdoc_docname and d.prevdoc_doctype == 'Customer Issue' :
if flag==1:
mntc_date = self.mntc_date
@@ -53,7 +53,7 @@ class MaintenanceVisit(TransactionBase):
def check_if_last_visit(self):
"""check if last maintenance visit against same sales order/ customer issue"""
check_for_docname = None
- for d in self.get('maintenance_visit_details'):
+ for d in self.get('purposes'):
if d.prevdoc_docname:
check_for_docname = d.prevdoc_docname
#check_for_doctype = d.prevdoc_doctype
diff --git a/erpnext/templates/includes/cart.js b/erpnext/templates/includes/cart.js
index 90cfea59da7..fff0a329b47 100644
--- a/erpnext/templates/includes/cart.js
+++ b/erpnext/templates/includes/cart.js
@@ -53,7 +53,7 @@ $.extend(shopping_cart, {
var $cart_billing_address = $("#cart-billing-address").empty();
var $cart_shipping_address = $("#cart-shipping-address").empty();
- var no_items = $.map(doc.quotation_details || [],
+ var no_items = $.map(doc.items || [],
function(d) { return d.item_code || null;}).length===0;
if(no_items) {
shopping_cart.show_error("Empty :-(", frappe._("Go ahead and add something to your cart."));
@@ -65,11 +65,11 @@ $.extend(shopping_cart, {
var taxes_exist = false;
var shipping_rule_labels = $.map(out.shipping_rules || [], function(rule) { return rule[1]; });
- $.each(doc.quotation_details || [], function(i, d) {
+ $.each(doc.items || [], function(i, d) {
shopping_cart.render_item_row($cart_items, d);
});
- $.each(doc.other_charges || [], function(i, d) {
+ $.each(doc.taxes || [], function(i, d) {
if(out.shipping_rules && out.shipping_rules.length &&
shipping_rule_labels.indexOf(d.description)!==-1) {
shipping_rule_added = true;
diff --git a/erpnext/translations/ar.csv b/erpnext/translations/ar.csv
index 0090f9fb487..429c02ea8e4 100644
--- a/erpnext/translations/ar.csv
+++ b/erpnext/translations/ar.csv
@@ -1457,8 +1457,8 @@ Jobs Email Settings,إعدادات البريد الإلكتروني وظائف
Journal Entries,مجلة مقالات
Journal Entry,إدخال دفتر اليومية
Journal Voucher,مجلة قسيمة
-Journal Voucher Detail,مجلة قسيمة التفاصيل
-Journal Voucher Detail No,مجلة التفاصيل قسيمة لا
+Journal Entry Account,مجلة قسيمة التفاصيل
+Journal Entry Account No,مجلة التفاصيل قسيمة لا
Journal Voucher {0} does not have account {1} or already matched,مجلة قسيمة {0} لا يملك حساب {1} أو بالفعل المتطابقة
Journal Vouchers {0} are un-linked,مجلة قسائم {0} ترتبط الامم المتحدة و
Keep a track of communication related to this enquiry which will help for future reference.,الحفاظ على مسار الاتصالات المتعلقة بهذا التحقيق والتي سوف تساعد للرجوع إليها مستقبلا.
diff --git a/erpnext/translations/de.csv b/erpnext/translations/de.csv
index 3cf0a6ab91e..9c38ba097d0 100644
--- a/erpnext/translations/de.csv
+++ b/erpnext/translations/de.csv
@@ -1513,8 +1513,8 @@ Jobs Email Settings,Stellen-E-Mail-Einstellungen
Journal Entries,Journaleinträge
Journal Entry,Journaleintrag
Journal Voucher,Journal
-Journal Voucher Detail,Detailansicht Beleg
-Journal Voucher Detail No,Journalnummer
+Journal Entry Account,Detailansicht Beleg
+Journal Entry Account No,Journalnummer
Journal Voucher {0} does not have account {1} or already matched,Blatt Gutschein {0} ist nicht Konto haben {1} oder bereits abgestimmt
Journal Vouchers {0} are un-linked,Blatt Gutscheine {0} sind un -linked
"Keep Track of Sales Campaigns. Keep track of Leads, Quotations, Sales Order etc from Campaigns to gauge Return on Investment. ","Keep Track of Sales Campaigns. Keep track of Leads, Quotations, Sales Order etc from Campaigns to gauge Return on Investment. "
diff --git a/erpnext/translations/el.csv b/erpnext/translations/el.csv
index 1fa2d15ebfe..d43706c2756 100644
--- a/erpnext/translations/el.csv
+++ b/erpnext/translations/el.csv
@@ -1458,8 +1458,8 @@ Jobs Email Settings,Εργασία Ρυθμίσεις Email
Journal Entries,Εφημερίδα Καταχωρήσεις
Journal Entry,Journal Entry
Journal Voucher,Εφημερίδα Voucher
-Journal Voucher Detail,Εφημερίδα Λεπτομέρεια Voucher
-Journal Voucher Detail No,Εφημερίδα Λεπτομέρεια φύλλου αριθ.
+Journal Entry Account,Εφημερίδα Λεπτομέρεια Voucher
+Journal Entry Account No,Εφημερίδα Λεπτομέρεια φύλλου αριθ.
Journal Voucher {0} does not have account {1} or already matched,Εφημερίδα Voucher {0} δεν έχει λογαριασμό {1} ή έχουν ήδη συμφωνημένα
Journal Vouchers {0} are un-linked,Εφημερίδα Κουπόνια {0} είναι μη συνδεδεμένο
Keep a track of communication related to this enquiry which will help for future reference.,Κρατήστε ένα κομμάτι της επικοινωνίας που σχετίζονται με την έρευνα αυτή που θα βοηθήσει για μελλοντική αναφορά.
diff --git a/erpnext/translations/es.csv b/erpnext/translations/es.csv
index 452a643e6f0..3086b29eb4f 100644
--- a/erpnext/translations/es.csv
+++ b/erpnext/translations/es.csv
@@ -1461,8 +1461,8 @@ Jobs Email Settings,Trabajos Email
Journal Entries,entradas de diario
Journal Entry,Entrada de diario
Journal Voucher,Comprobante de Diario
-Journal Voucher Detail,Detalle del Asiento de Diario
-Journal Voucher Detail No,Detalle del Asiento de Diario No
+Journal Entry Account,Detalle del Asiento de Diario
+Journal Entry Account No,Detalle del Asiento de Diario No
Journal Voucher {0} does not have account {1} or already matched,Comprobante de Diario {0} no tiene cuenta {1} o ya emparejado
Journal Vouchers {0} are un-linked,Asientos de Diario {0} no están vinculados.
Keep a track of communication related to this enquiry which will help for future reference.,Mantenga un registro de la comunicación en relación con esta consulta que ayudará para futuras consultas.
diff --git a/erpnext/translations/fr.csv b/erpnext/translations/fr.csv
index 6ec65132581..804e5ce6091 100644
--- a/erpnext/translations/fr.csv
+++ b/erpnext/translations/fr.csv
@@ -1459,8 +1459,8 @@ Jobs Email Settings,Paramètres de messagerie Emploi
Journal Entries,Journal Entries
Journal Entry,Journal Entry
Journal Voucher,Bon Journal
-Journal Voucher Detail,Détail pièce de journal
-Journal Voucher Detail No,Détail Bon Journal No
+Journal Entry Account,Détail pièce de journal
+Journal Entry Account No,Détail Bon Journal No
Journal Voucher {0} does not have account {1} or already matched,Journal Bon {0} n'a pas encore compte {1} ou déjà identifié
Journal Vouchers {0} are un-linked,Date de livraison prévue ne peut pas être avant ventes Date de commande
Keep a track of communication related to this enquiry which will help for future reference.,Gardez une trace de la communication liée à cette enquête qui aidera pour référence future.
diff --git a/erpnext/translations/hi.csv b/erpnext/translations/hi.csv
index 68be3cd4a53..df43d8506f9 100644
--- a/erpnext/translations/hi.csv
+++ b/erpnext/translations/hi.csv
@@ -1458,8 +1458,8 @@ Jobs Email Settings,नौकरियां ईमेल सेटिंग
Journal Entries,जर्नल प्रविष्टियां
Journal Entry,जर्नल प्रविष्टि
Journal Voucher,जर्नल वाउचर
-Journal Voucher Detail,जर्नल वाउचर विस्तार
-Journal Voucher Detail No,जर्नल वाउचर विस्तार नहीं
+Journal Entry Account,जर्नल वाउचर विस्तार
+Journal Entry Account No,जर्नल वाउचर विस्तार नहीं
Journal Voucher {0} does not have account {1} or already matched,जर्नल वाउचर {0} खाता नहीं है {1} या पहले से ही मेल नहीं खाते
Journal Vouchers {0} are un-linked,जर्नल वाउचर {0} संयुक्त राष्ट्र से जुड़े हुए हैं
Keep a track of communication related to this enquiry which will help for future reference.,जांच है जो भविष्य में संदर्भ के लिए मदद करने के लिए संबंधित संचार का ट्रैक रखें.
diff --git a/erpnext/translations/hr.csv b/erpnext/translations/hr.csv
index a52d4f9cd8e..550eb0d094c 100644
--- a/erpnext/translations/hr.csv
+++ b/erpnext/translations/hr.csv
@@ -1458,8 +1458,8 @@ Jobs Email Settings,Poslovi Postavke e-pošte
Journal Entries,Časopis upisi
Journal Entry,Časopis Stupanje
Journal Voucher,Časopis bon
-Journal Voucher Detail,Časopis bon Detalj
-Journal Voucher Detail No,Časopis bon Detalj Ne
+Journal Entry Account,Časopis bon Detalj
+Journal Entry Account No,Časopis bon Detalj Ne
Journal Voucher {0} does not have account {1} or already matched,Časopis bon {0} nema račun {1} ili već usklađeni
Journal Vouchers {0} are un-linked,Časopis bon {0} su UN -linked
Keep a track of communication related to this enquiry which will help for future reference.,Držite pratiti komunikacije vezane uz ovaj upit koji će vam pomoći za buduću referencu.
diff --git a/erpnext/translations/id.csv b/erpnext/translations/id.csv
index eaf6e197d4d..658fa42e41a 100644
--- a/erpnext/translations/id.csv
+++ b/erpnext/translations/id.csv
@@ -1327,7 +1327,7 @@ Invoice Period From,Faktur Periode Dari
Invoice Period From and Invoice Period To dates mandatory for recurring invoice,Faktur Periode Dari dan Faktur Period Untuk tanggal wajib untuk berulang faktur
Invoice Period To,Periode Faktur Untuk
Invoice Type,Invoice Type
-Invoice/Journal Voucher Details,Invoice / Journal Voucher Detail
+Invoice/Journal Voucher Details,Invoice / Journal Entry Account
Invoiced Amount (Exculsive Tax),Faktur Jumlah (Pajak exculsive)
Is Active,Aktif
Is Advance,Apakah Muka
@@ -1458,8 +1458,8 @@ Jobs Email Settings,Pengaturan Jobs Email
Journal Entries,Entries Journal
Journal Entry,Jurnal Entri
Journal Voucher,Journal Voucher
-Journal Voucher Detail,Journal Voucher Detil
-Journal Voucher Detail No,Journal Voucher Detil ada
+Journal Entry Account,Journal Voucher Detil
+Journal Entry Account No,Journal Voucher Detil ada
Journal Voucher {0} does not have account {1} or already matched,Journal Voucher {0} tidak memiliki akun {1} atau sudah cocok
Journal Vouchers {0} are un-linked,Journal Voucher {0} yang un-linked
Keep a track of communication related to this enquiry which will help for future reference.,Menyimpan melacak komunikasi yang berkaitan dengan penyelidikan ini yang akan membantu untuk referensi di masa mendatang.
diff --git a/erpnext/translations/it.csv b/erpnext/translations/it.csv
index 0e02b0473eb..488423a1649 100644
--- a/erpnext/translations/it.csv
+++ b/erpnext/translations/it.csv
@@ -1458,8 +1458,8 @@ Jobs Email Settings,Impostazioni email Lavoro
Journal Entries,Prime note
Journal Entry,Journal Entry
Journal Voucher,Journal Voucher
-Journal Voucher Detail,Journal Voucher Detail
-Journal Voucher Detail No,Journal Voucher Detail No
+Journal Entry Account,Journal Entry Account
+Journal Entry Account No,Journal Entry Account No
Journal Voucher {0} does not have account {1} or already matched,Journal Voucher {0} non ha conto {1} o già abbinate
Journal Vouchers {0} are un-linked,Diario Buoni {0} sono non- linked
Keep a track of communication related to this enquiry which will help for future reference.,Tenere una traccia delle comunicazioni relative a questa indagine che contribuirà per riferimento futuro.
diff --git a/erpnext/translations/ja.csv b/erpnext/translations/ja.csv
index 3349c80269b..6585666c626 100644
--- a/erpnext/translations/ja.csv
+++ b/erpnext/translations/ja.csv
@@ -1460,8 +1460,8 @@ Jobs Email Settings,仕事のメール設定
Journal Entries,仕訳
Journal Entry,仕訳
Journal Voucher,伝票
-Journal Voucher Detail,伝票の詳細
-Journal Voucher Detail No,伝票の詳細番号
+Journal Entry Account,伝票の詳細
+Journal Entry Account No,伝票の詳細番号
Journal Voucher {0} does not have account {1} or already matched,伝票は{0}アカウントを持っていない{1}、またはすでに一致
Journal Vouchers {0} are un-linked,ジャーナルバウチャー{0}アンリンクされている
Keep a track of communication related to this enquiry which will help for future reference.,今後の参考のために役立ちます。この照会に関連した通信を追跡する。
diff --git a/erpnext/translations/kn.csv b/erpnext/translations/kn.csv
index 3da26a17094..b987788ec9c 100644
--- a/erpnext/translations/kn.csv
+++ b/erpnext/translations/kn.csv
@@ -1458,8 +1458,8 @@ Jobs Email Settings,ಕೆಲಸ ಇಮೇಲ್ ಸೆಟ್ಟಿಂಗ್
Journal Entries,ಜರ್ನಲ್ ನಮೂದುಗಳು
Journal Entry,ಜರ್ನಲ್ ಎಂಟ್ರಿ
Journal Voucher,ಜರ್ನಲ್ ಚೀಟಿ
-Journal Voucher Detail,ಜರ್ನಲ್ ಚೀಟಿ ವಿವರ
-Journal Voucher Detail No,ಜರ್ನಲ್ ಚೀಟಿ ವಿವರ ನಂ
+Journal Entry Account,ಜರ್ನಲ್ ಚೀಟಿ ವಿವರ
+Journal Entry Account No,ಜರ್ನಲ್ ಚೀಟಿ ವಿವರ ನಂ
Journal Voucher {0} does not have account {1} or already matched,ಜರ್ನಲ್ ಚೀಟಿ {0} {1} ಖಾತೆಯನ್ನು ಅಥವಾ ಈಗಾಗಲೇ ದಾಖಲೆಗಳುಸರಿಹೊಂದಿವೆ ಇಲ್ಲ
Journal Vouchers {0} are un-linked,ಜರ್ನಲ್ ರಶೀದಿ {0} UN- ಲಿಂಕ್
Keep a track of communication related to this enquiry which will help for future reference.,ಭವಿಷ್ಯದ ಉಲ್ಲೇಖಕ್ಕಾಗಿ ಸಹಾಯ whichwill ಈ ವಿಚಾರಣೆ ಸಂಬಂಧಿಸಿದ ಸಂವಹನದ ಒಂದು ಜಾಡನ್ನು ಇರಿಸಿ.
diff --git a/erpnext/translations/ko.csv b/erpnext/translations/ko.csv
index c0c201d6ad5..9a6dc52b5e5 100644
--- a/erpnext/translations/ko.csv
+++ b/erpnext/translations/ko.csv
@@ -1458,8 +1458,8 @@ Jobs Email Settings,채용 정보 이메일 설정
Journal Entries,저널 항목
Journal Entry,분개
Journal Voucher,분개장
-Journal Voucher Detail,분개장 세부 정보
-Journal Voucher Detail No,분개장 세부 사항 없음
+Journal Entry Account,분개장 세부 정보
+Journal Entry Account No,분개장 세부 사항 없음
Journal Voucher {0} does not have account {1} or already matched,분개장 {0} 계정이없는 {1} 또는 이미 일치
Journal Vouchers {0} are un-linked,분개장 {0} 않은 연결되어
Keep a track of communication related to this enquiry which will help for future reference.,향후 참조를 위해 도움이 될 것입니다이 문의와 관련된 통신을 확인합니다.
diff --git a/erpnext/translations/nl.csv b/erpnext/translations/nl.csv
index e5a9e1054e9..aed452ea539 100644
--- a/erpnext/translations/nl.csv
+++ b/erpnext/translations/nl.csv
@@ -1458,8 +1458,8 @@ Jobs Email Settings,Vacatures E-mailinstellingen
Journal Entries,Journaalposten
Journal Entry,Journal Entry
Journal Voucher,Journal Voucher
-Journal Voucher Detail,Journal Voucher Detail
-Journal Voucher Detail No,Journal Voucher Detail Geen
+Journal Entry Account,Journal Entry Account
+Journal Entry Account No,Journal Entry Account Geen
Journal Voucher {0} does not have account {1} or already matched,Journal Voucher {0} heeft geen rekening {1} of al geëvenaard
Journal Vouchers {0} are un-linked,Dagboek Vouchers {0} zijn niet- verbonden
Keep a track of communication related to this enquiry which will help for future reference.,Houd een spoor van communicatie met betrekking tot dit onderzoek dat zal helpen voor toekomstig gebruik.
diff --git a/erpnext/translations/pl.csv b/erpnext/translations/pl.csv
index bf0c0d315b7..0e956102dbd 100644
--- a/erpnext/translations/pl.csv
+++ b/erpnext/translations/pl.csv
@@ -1402,8 +1402,8 @@ Jobs Email Settings,Jobs Email Settings
Journal Entries,Journal Entries
Journal Entry,Journal Entry
Journal Voucher,Journal Voucher
-Journal Voucher Detail,Journal Voucher Detail
-Journal Voucher Detail No,Journal Voucher Detail No
+Journal Entry Account,Journal Entry Account
+Journal Entry Account No,Journal Entry Account No
Journal Voucher {0} does not have account {1} or already matched,Journal Voucher {0} does not have account {1} or already matched
Journal Vouchers {0} are un-linked,Journal Vouchers {0} are un-linked
Keep a track of communication related to this enquiry which will help for future reference.,Keep a track of communication related to this enquiry which will help for future reference.
diff --git a/erpnext/translations/pt-BR.csv b/erpnext/translations/pt-BR.csv
index 77968420af6..b6c64db60de 100644
--- a/erpnext/translations/pt-BR.csv
+++ b/erpnext/translations/pt-BR.csv
@@ -1490,8 +1490,8 @@ Jobs Email Settings,Configurações do e-mail de empregos
Journal Entries,Lançamentos do livro Diário
Journal Entry,Lançamento do livro Diário
Journal Voucher,Comprovante do livro Diário
-Journal Voucher Detail,Detalhe do Comprovante do livro Diário
-Journal Voucher Detail No,Nº do Detalhe do Comprovante do livro Diário
+Journal Entry Account,Detalhe do Comprovante do livro Diário
+Journal Entry Account No,Nº do Detalhe do Comprovante do livro Diário
Journal Voucher {0} does not have account {1} or already matched,Jornal Vale {0} não tem conta {1} ou já combinava
Journal Vouchers {0} are un-linked,Jornal Vouchers {0} são não- ligado
Keep a track of communication related to this enquiry which will help for future reference.,"Mantenha o controle de comunicações relacionadas a esta consulta, o que irá ajudar para futuras referências."
diff --git a/erpnext/translations/pt.csv b/erpnext/translations/pt.csv
index 3b2ae59e49f..501d4766a14 100644
--- a/erpnext/translations/pt.csv
+++ b/erpnext/translations/pt.csv
@@ -1458,8 +1458,8 @@ Jobs Email Settings,E-mail Configurações de empregos
Journal Entries,Jornal entradas
Journal Entry,Journal Entry
Journal Voucher,Vale Jornal
-Journal Voucher Detail,Jornal Detalhe Vale
-Journal Voucher Detail No,Jornal Detalhe folha no
+Journal Entry Account,Jornal Detalhe Vale
+Journal Entry Account No,Jornal Detalhe folha no
Journal Voucher {0} does not have account {1} or already matched,Jornal Vale {0} não tem conta {1} ou já combinava
Journal Vouchers {0} are un-linked,Jornal Vouchers {0} são não- ligado
Keep a track of communication related to this enquiry which will help for future reference.,Mantenha uma faixa de comunicação relacionada a este inquérito que irá ajudar para referência futura.
diff --git a/erpnext/translations/ro.csv b/erpnext/translations/ro.csv
index 5bd319d10f6..d3e2b7b81bc 100644
--- a/erpnext/translations/ro.csv
+++ b/erpnext/translations/ro.csv
@@ -1458,8 +1458,8 @@ Jobs Email Settings,Setări de locuri de muncă de e-mail
Journal Entries,Intrari in jurnal
Journal Entry,Jurnal de intrare
Journal Voucher,Jurnalul Voucher
-Journal Voucher Detail,Jurnalul Voucher Detaliu
-Journal Voucher Detail No,Jurnalul Voucher Detaliu Nu
+Journal Entry Account,Jurnalul Voucher Detaliu
+Journal Entry Account No,Jurnalul Voucher Detaliu Nu
Journal Voucher {0} does not have account {1} or already matched,Jurnalul Voucher {0} nu are cont {1} sau deja potrivire
Journal Vouchers {0} are un-linked,Jurnalul Tichete {0} sunt ne-legate de
Keep a track of communication related to this enquiry which will help for future reference.,"Păstra o pistă de comunicare legate de această anchetă, care va ajuta de referință pentru viitor."
diff --git a/erpnext/translations/ru.csv b/erpnext/translations/ru.csv
index e2b6fe7ea68..91102d2b633 100644
--- a/erpnext/translations/ru.csv
+++ b/erpnext/translations/ru.csv
@@ -1459,8 +1459,8 @@ Jobs Email Settings,Настройки Вакансии Email
Journal Entries,Записи в журнале
Journal Entry,Запись в дневнике
Journal Voucher,Журнал Ваучер
-Journal Voucher Detail,Журнал Ваучер Подробно
-Journal Voucher Detail No,Журнал Ваучер Подробно Нет
+Journal Entry Account,Журнал Ваучер Подробно
+Journal Entry Account No,Журнал Ваучер Подробно Нет
Journal Voucher {0} does not have account {1} or already matched,Журнал Ваучер {0} не имеет учетной записи {1} или уже согласованы
Journal Vouchers {0} are un-linked,Журнал Ваучеры {0} являются не-связаны
Keep a track of communication related to this enquiry which will help for future reference.,"Постоянно отслеживать коммуникации, связанные на этот запрос, который поможет в будущем."
diff --git a/erpnext/translations/sr.csv b/erpnext/translations/sr.csv
index fd0e50a5325..f39e98c3836 100644
--- a/erpnext/translations/sr.csv
+++ b/erpnext/translations/sr.csv
@@ -1458,8 +1458,8 @@ Jobs Email Settings,Послови Емаил подешавања
Journal Entries,Часопис Ентриес
Journal Entry,Јоурнал Ентри
Journal Voucher,Часопис ваучера
-Journal Voucher Detail,Часопис Ваучер Детаљ
-Journal Voucher Detail No,Часопис Ваучер Детаљ Нема
+Journal Entry Account,Часопис Ваучер Детаљ
+Journal Entry Account No,Часопис Ваучер Детаљ Нема
Journal Voucher {0} does not have account {1} or already matched,Часопис Ваучер {0} нема рачун {1} или већ упарен
Journal Vouchers {0} are un-linked,Журнал Ваучеры {0} являются не- связаны
Keep a track of communication related to this enquiry which will help for future reference.,Водите евиденцију о комуникацији у вези са овом истрагу која ће помоћи за будућу референцу.
diff --git a/erpnext/translations/ta.csv b/erpnext/translations/ta.csv
index d87d64ab65e..931353dc605 100644
--- a/erpnext/translations/ta.csv
+++ b/erpnext/translations/ta.csv
@@ -1458,8 +1458,8 @@ Jobs Email Settings,வேலைகள் மின்னஞ்சல் அம
Journal Entries,ஜர்னல் பதிவுகள்
Journal Entry,பத்திரிகை நுழைவு
Journal Voucher,பத்திரிகை வவுச்சர்
-Journal Voucher Detail,பத்திரிகை வவுச்சர் விரிவாக
-Journal Voucher Detail No,பத்திரிகை வவுச்சர் விரிவாக இல்லை
+Journal Entry Account,பத்திரிகை வவுச்சர் விரிவாக
+Journal Entry Account No,பத்திரிகை வவுச்சர் விரிவாக இல்லை
Journal Voucher {0} does not have account {1} or already matched,ஜர்னல் வவுச்சர் {0} கணக்கு இல்லை {1} அல்லது ஏற்கனவே பொருந்தியது
Journal Vouchers {0} are un-linked,ஜர்னல் கே {0} ஐ.நா. இணைக்கப்பட்ட
Keep a track of communication related to this enquiry which will help for future reference.,எதிர்கால உதவும் இந்த விசாரணை தொடர்பான தகவல் ஒரு கண்காணிக்க.
diff --git a/erpnext/translations/th.csv b/erpnext/translations/th.csv
index 4e1a1859bef..b1b0ebd66d6 100644
--- a/erpnext/translations/th.csv
+++ b/erpnext/translations/th.csv
@@ -1458,8 +1458,8 @@ Jobs Email Settings,งานการตั้งค่าอีเมล
Journal Entries,บันทึกรายการแบบรวม
Journal Entry,บันทึกรายการค้า
Journal Voucher,บัตรกำนัลวารสาร
-Journal Voucher Detail,รายละเอียดใบสำคัญรายวันทั่วไป
-Journal Voucher Detail No,รายละเอียดใบสำคัญรายวันทั่วไปไม่มี
+Journal Entry Account,รายละเอียดใบสำคัญรายวันทั่วไป
+Journal Entry Account No,รายละเอียดใบสำคัญรายวันทั่วไปไม่มี
Journal Voucher {0} does not have account {1} or already matched,ใบสำคัญรายวันทั่วไป {0} ไม่ได้มี บัญชี {1} หรือ การจับคู่ แล้ว
Journal Vouchers {0} are un-linked,ใบสำคัญรายวันทั่วไป {0} จะ ยกเลิกการ เชื่อมโยง
Keep a track of communication related to this enquiry which will help for future reference.,ติดตามของการสื่อสารที่เกี่ยวข้องกับการสืบสวนเรื่องนี้ซึ่งจะช่วยให้สำหรับการอ้างอิงในอนาคต
diff --git a/erpnext/translations/tr.csv b/erpnext/translations/tr.csv
index e3ed4463478..a2d444343e8 100644
--- a/erpnext/translations/tr.csv
+++ b/erpnext/translations/tr.csv
@@ -1458,8 +1458,8 @@ Jobs Email Settings,İş E-posta Ayarları
Journal Entries,Alacak/Borç Girişleri
Journal Entry,Alacak/Borç Girişleri
Journal Voucher,Alacak/Borç Çeki
-Journal Voucher Detail,Alacak/Borç Fiş Detay
-Journal Voucher Detail No,Alacak/Borç Fiş Detay No
+Journal Entry Account,Alacak/Borç Fiş Detay
+Journal Entry Account No,Alacak/Borç Fiş Detay No
Journal Voucher {0} does not have account {1} or already matched,Dergi Çeki {0} hesabı yok {1} ya da zaten eşleşti
Journal Vouchers {0} are un-linked,Dergi Fişler {0} un-bağlantılı
Keep a track of communication related to this enquiry which will help for future reference.,Gelecekte başvurulara yardımcı olmak için bu soruşturma ile ilgili bir iletişim takip edin.
diff --git a/erpnext/translations/vi.csv b/erpnext/translations/vi.csv
index 8a6de8c5415..0fb6f524b9d 100644
--- a/erpnext/translations/vi.csv
+++ b/erpnext/translations/vi.csv
@@ -1458,8 +1458,8 @@ Jobs Email Settings,Thiết lập việc làm Email
Journal Entries,Tạp chí Entries
Journal Entry,Tạp chí nhập
Journal Voucher,Tạp chí Voucher
-Journal Voucher Detail,Tạp chí Chứng từ chi tiết
-Journal Voucher Detail No,Tạp chí Chứng từ chi tiết Không
+Journal Entry Account,Tạp chí Chứng từ chi tiết
+Journal Entry Account No,Tạp chí Chứng từ chi tiết Không
Journal Voucher {0} does not have account {1} or already matched,Tạp chí Chứng từ {0} không có tài khoản {1} hoặc đã khớp
Journal Vouchers {0} are un-linked,Tạp chí Chứng từ {0} được bỏ liên kết
Keep a track of communication related to this enquiry which will help for future reference.,Giữ một ca khúc của truyền thông liên quan đến cuộc điều tra này sẽ giúp cho tài liệu tham khảo trong tương lai.
diff --git a/erpnext/translations/zh-cn.csv b/erpnext/translations/zh-cn.csv
index 36a4473be0d..de66f9046f3 100644
--- a/erpnext/translations/zh-cn.csv
+++ b/erpnext/translations/zh-cn.csv
@@ -1490,8 +1490,8 @@ Jobs Email Settings,乔布斯邮件设置
Journal Entries,日记帐分录
Journal Entry,日记帐分录
Journal Voucher,期刊券
-Journal Voucher Detail,日记帐凭证详细信息
-Journal Voucher Detail No,日记帐凭证详细说明暂无
+Journal Entry Account,日记帐凭证详细信息
+Journal Entry Account No,日记帐凭证详细说明暂无
Journal Voucher {0} does not have account {1} or already matched,记账凭单{0}没有帐号{1}或已经匹配
Journal Vouchers {0} are un-linked,日记帐凭单{0}被取消链接
Keep a track of communication related to this enquiry which will help for future reference.,保持跟踪的沟通与此相关的调查,这将有助于以供将来参考。
diff --git a/erpnext/translations/zh-tw.csv b/erpnext/translations/zh-tw.csv
index 609806b4176..92936a4e403 100644
--- a/erpnext/translations/zh-tw.csv
+++ b/erpnext/translations/zh-tw.csv
@@ -1490,8 +1490,8 @@ Jobs Email Settings,喬布斯郵件設置
Journal Entries,日記帳分錄
Journal Entry,日記帳分錄
Journal Voucher,期刊券
-Journal Voucher Detail,日記帳憑證詳細信息
-Journal Voucher Detail No,日記帳憑證詳細說明暫無
+Journal Entry Account,日記帳憑證詳細信息
+Journal Entry Account No,日記帳憑證詳細說明暫無
Journal Voucher {0} does not have account {1} or already matched,記賬憑單{0}沒有帳號{1}或已經匹配
Journal Vouchers {0} are un-linked,日記帳憑單{0}被取消鏈接
Keep a track of communication related to this enquiry which will help for future reference.,保持跟踪的溝通與此相關的調查,這將有助於以供將來參考。
diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py
index 4ba162790c4..8306eacb06d 100644
--- a/erpnext/utilities/transaction_base.py
+++ b/erpnext/utilities/transaction_base.py
@@ -48,7 +48,7 @@ class TransactionBase(StatusUpdater):
})
if frappe.db.exists("User", self.contact_by):
- event_doclist.append("event_individuals", {
+ event_doclist.append("users", {
"doctype": "Event User",
"person": self.contact_by
})
|
|
|