diff --git a/erpnext/__version__.py b/erpnext/__version__.py
index fd1e63edd7..8f56bbf2ea 100644
--- a/erpnext/__version__.py
+++ b/erpnext/__version__.py
@@ -1,2 +1,2 @@
from __future__ import unicode_literals
-__version__ = '6.17.0'
+__version__ = '6.18.0'
diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js
index a2eb714f33..703397e52a 100644
--- a/erpnext/accounts/doctype/account/account.js
+++ b/erpnext/accounts/doctype/account/account.js
@@ -48,13 +48,13 @@ cur_frm.cscript.account_type = function(doc, cdt, cdn) {
cur_frm.cscript.add_toolbar_buttons = function(doc) {
cur_frm.add_custom_button(__('Chart of Accounts'),
- function() { frappe.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
+ function() { frappe.set_route("Accounts Browser", "Account"); }, __("View"))
if (doc.is_group == 1) {
- cur_frm.add_custom_button(__('Convert to non-Group'),
+ cur_frm.add_custom_button(__('Group to Non-Group'),
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet', 'btn-default');
} else if (cint(doc.is_group) == 0) {
- cur_frm.add_custom_button(__('View Ledger'), function() {
+ cur_frm.add_custom_button(__('Ledger'), function() {
frappe.route_options = {
"account": doc.name,
"from_date": sys_defaults.year_start_date,
@@ -62,9 +62,9 @@ cur_frm.cscript.add_toolbar_buttons = function(doc) {
"company": doc.company
};
frappe.set_route("query-report", "General Ledger");
- }, "icon-table");
+ }, __("View"));
- cur_frm.add_custom_button(__('Convert to Group'),
+ cur_frm.add_custom_button(__('Group to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet', 'btn-default')
}
}
diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py
index a8ebbeaada..1f9c74df10 100644
--- a/erpnext/accounts/doctype/account/account.py
+++ b/erpnext/accounts/doctype/account/account.py
@@ -27,6 +27,7 @@ class Account(Document):
return
self.validate_parent()
self.validate_root_details()
+ self.validate_group_or_ledger()
self.set_root_and_report_type()
self.validate_mandatory()
self.validate_warehouse_account()
@@ -80,6 +81,20 @@ class Account(Document):
if not self.parent_account and not self.is_group:
frappe.throw(_("Root Account must be a group"))
+
+ def validate_group_or_ledger(self):
+ if self.get("__islocal"):
+ return
+
+ existing_is_group = frappe.db.get_value("Account", self.name, "is_group")
+ if self.is_group != existing_is_group:
+ if self.check_gle_exists():
+ throw(_("Account with existing transaction cannot be converted to ledger"))
+ elif self.is_group:
+ if self.account_type:
+ throw(_("Cannot covert to Group because Account Type is selected."))
+ elif self.check_if_child_exists():
+ throw(_("Account with child nodes cannot be set as ledger"))
def validate_frozen_accounts_modifier(self):
old_value = frappe.db.get_value("Account", self.name, "freeze_account")
diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json
index 1b933ce2c8..1ba9221b38 100644
--- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json
+++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json
@@ -21,9 +21,11 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Make Accounting Entry For Every Stock Movement",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -43,9 +45,11 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Accounts Frozen Upto",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -65,10 +69,12 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Role Allowed to Set Frozen Accounts & Edit Frozen Entries",
+ "length": 0,
"no_copy": 0,
"options": "Role",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -88,10 +94,12 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Credit Controller",
+ "length": 0,
"no_copy": 0,
"options": "Role",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -110,10 +118,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Check Supplier Invoice Number Uniqueness",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -131,7 +141,8 @@
"is_submittable": 0,
"issingle": 1,
"istable": 0,
- "modified": "2015-07-14 00:51:48.095525",
+ "max_attachments": 0,
+ "modified": "2015-12-24 21:42:01.274459",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
index 3c280bd2dd..d6d8822096 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
@@ -26,7 +26,7 @@ class BankReconciliation(Document):
t2.parent = t1.name and t2.account = %s
and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1
and ifnull(t1.is_opening, 'No') = 'No' %s
- order by t1.posting_date""" %
+ order by t1.posting_date DESC, t1.name DESC""" %
('%s', '%s', '%s', condition), (self.bank_account, self.from_date, self.to_date), as_dict=1)
self.set('journal_entries', [])
@@ -51,6 +51,7 @@ class BankReconciliation(Document):
if d.cheque_date and getdate(d.clearance_date) < getdate(d.cheque_date):
frappe.throw(_("Clearance date cannot be before check date in row {0}").format(d.idx))
+ if d.clearance_date or self.include_reconciled_entries:
frappe.db.set_value("Journal Entry", d.voucher_id, "clearance_date", d.clearance_date)
frappe.db.sql("""update `tabJournal Entry` set clearance_date = %s, modified = %s
where name=%s""", (d.clearance_date, nowdate(), d.voucher_id))
diff --git a/erpnext/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.json b/erpnext/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.json
index 5d74c3f126..d770a934f9 100644
--- a/erpnext/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.json
+++ b/erpnext/accounts/doctype/bank_reconciliation_detail/bank_reconciliation_detail.json
@@ -16,7 +16,7 @@
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
- "in_list_view": 0,
+ "in_list_view": 1,
"label": "Voucher ID",
"length": 0,
"no_copy": 0,
@@ -31,7 +31,8 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
- "unique": 0
+ "unique": 0,
+ "width": "50"
},
{
"allow_on_submit": 0,
@@ -56,7 +57,8 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
- "unique": 0
+ "unique": 0,
+ "width": "15"
},
{
"allow_on_submit": 0,
@@ -67,7 +69,7 @@
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
- "in_list_view": 1,
+ "in_list_view": 0,
"label": "Debit",
"length": 0,
"no_copy": 0,
@@ -93,7 +95,7 @@
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
- "in_list_view": 1,
+ "in_list_view": 0,
"label": "Credit",
"length": 0,
"no_copy": 0,
@@ -143,7 +145,7 @@
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
- "in_list_view": 0,
+ "in_list_view": 1,
"label": "Posting Date",
"length": 0,
"no_copy": 0,
@@ -268,7 +270,7 @@
"istable": 1,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2015-12-04 11:01:24.286320",
+ "modified": "2016-01-19 12:06:17.568428",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation Detail",
@@ -277,4 +279,4 @@
"read_only": 0,
"read_only_onload": 0,
"version": 0
-}
\ No newline at end of file
+}
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.js b/erpnext/accounts/doctype/cost_center/cost_center.js
index e4db510cad..f66459be18 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.js
+++ b/erpnext/accounts/doctype/cost_center/cost_center.js
@@ -51,7 +51,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.set_intro(intro_txt);
cur_frm.add_custom_button(__('Chart of Cost Centers'),
- function() { frappe.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap')
+ function() { frappe.set_route("Accounts Browser", "Cost Center"); }, __("View"))
}
cur_frm.cscript.parent_cost_center = function(doc, cdt, cdn) {
@@ -62,12 +62,12 @@ cur_frm.cscript.parent_cost_center = function(doc, cdt, cdn) {
cur_frm.cscript.hide_unhide_group_ledger = function(doc) {
if (doc.is_group == 1) {
- cur_frm.add_custom_button(__('Convert to non-Group'),
- function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet',
+ cur_frm.add_custom_button(__('Convert to Non-Group'),
+ function() { cur_frm.cscript.convert_to_ledger(); }, "icon-retweet",
"btn-default")
} else if (doc.is_group == 0) {
cur_frm.add_custom_button(__('Convert to Group'),
- function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet',
+ function() { cur_frm.cscript.convert_to_group(); }, "icon-retweet",
"btn-default")
}
}
diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js
index cca01a408b..e7812c38ce 100644
--- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js
+++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js
@@ -14,7 +14,7 @@ $.extend(cur_frm.cscript, {
this.frm.toggle_enable('year_end_date', doc.__islocal)
if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) {
- this.frm.add_custom_button(__("Set as Default"),
+ this.frm.add_custom_button(__("Default"),
this.frm.cscript.set_as_default, "icon-star");
this.frm.set_intro(__("To set this Fiscal Year as Default, click on 'Set as Default'"));
} else {
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js
index dc24522926..76f6ee5ad4 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.js
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js
@@ -11,7 +11,7 @@ frappe.ui.form.on("Journal Entry", {
frm.cscript.voucher_type(frm.doc);
if(frm.doc.docstatus==1) {
- frm.add_custom_button(__('View Ledger'), function() {
+ frm.add_custom_button(__('Ledger'), function() {
frappe.route_options = {
"voucher_no": frm.doc.name,
"from_date": frm.doc.posting_date,
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py
index 670661c01f..9c39f0d5a7 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.py
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py
@@ -351,6 +351,7 @@ class JournalEntry(AccountsController):
def set_print_format_fields(self):
total_amount = 0.0
bank_account_currency = None
+ self.pay_to_recd_from = None
for d in self.get('accounts'):
if d.party_type and d.party:
if not self.pay_to_recd_from:
@@ -360,7 +361,10 @@ class JournalEntry(AccountsController):
elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
total_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
bank_account_currency = d.account_currency
-
+
+ if not self.pay_to_recd_from:
+ total_amount = 0
+
self.set_total_amount(total_amount, bank_account_currency)
def set_total_amount(self, amt, currency):
@@ -508,7 +512,7 @@ class JournalEntry(AccountsController):
d.party_balance = party_balance[(d.party_type, d.party)]
@frappe.whitelist()
-def get_default_bank_cash_account(company, voucher_type, mode_of_payment=None):
+def get_default_bank_cash_account(company, voucher_type, mode_of_payment=None, account=None):
from erpnext.accounts.doctype.sales_invoice.sales_invoice import get_bank_cash_account
if mode_of_payment:
account = get_bank_cash_account(mode_of_payment, company)
@@ -516,16 +520,18 @@ def get_default_bank_cash_account(company, voucher_type, mode_of_payment=None):
account.update({"balance": get_balance_on(account.get("account"))})
return account
- if voucher_type=="Bank Entry":
- account = frappe.db.get_value("Company", company, "default_bank_account")
- if not account:
- account = frappe.db.get_value("Account",
- {"company": company, "account_type": "Bank", "is_group": 0})
- elif voucher_type=="Cash Entry":
- account = frappe.db.get_value("Company", company, "default_cash_account")
- if not account:
- account = frappe.db.get_value("Account",
- {"company": company, "account_type": "Cash", "is_group": 0})
+ if not account:
+ if voucher_type=="Bank Entry":
+ account = frappe.db.get_value("Company", company, "default_bank_account")
+ if not account:
+ account = frappe.db.get_value("Account",
+ {"company": company, "account_type": "Bank", "is_group": 0})
+
+ elif voucher_type=="Cash Entry":
+ account = frappe.db.get_value("Company", company, "default_cash_account")
+ if not account:
+ account = frappe.db.get_value("Account",
+ {"company": company, "account_type": "Cash", "is_group": 0})
if account:
account_details = frappe.db.get_value("Account", account,
@@ -538,7 +544,7 @@ def get_default_bank_cash_account(company, voucher_type, mode_of_payment=None):
}
@frappe.whitelist()
-def get_payment_entry_against_order(dt, dn):
+def get_payment_entry_against_order(dt, dn, amount=None, journal_entry=False, bank_account=None):
ref_doc = frappe.get_doc(dt, dn)
if flt(ref_doc.per_billed, 2) > 0:
@@ -556,10 +562,11 @@ def get_payment_entry_against_order(dt, dn):
party_account = get_party_account(party_type, ref_doc.get(party_type.lower()), ref_doc.company)
party_account_currency = get_account_currency(party_account)
- if party_account_currency == ref_doc.company_currency:
- amount = flt(ref_doc.base_grand_total) - flt(ref_doc.advance_paid)
- else:
- amount = flt(ref_doc.grand_total) - flt(ref_doc.advance_paid)
+ if not amount:
+ if party_account_currency == ref_doc.company_currency:
+ amount = flt(ref_doc.base_grand_total) - flt(ref_doc.advance_paid)
+ else:
+ amount = flt(ref_doc.grand_total) - flt(ref_doc.advance_paid)
return get_payment_entry(ref_doc, {
"party_type": party_type,
@@ -569,11 +576,13 @@ def get_payment_entry_against_order(dt, dn):
"amount_field_bank": amount_field_bank,
"amount": amount,
"remarks": 'Advance Payment received against {0} {1}'.format(dt, dn),
- "is_advance": "Yes"
+ "is_advance": "Yes",
+ "bank_account": bank_account,
+ "journal_entry": journal_entry
})
@frappe.whitelist()
-def get_payment_entry_against_invoice(dt, dn):
+def get_payment_entry_against_invoice(dt, dn, amount=None, journal_entry=False, bank_account=None):
ref_doc = frappe.get_doc(dt, dn)
if dt == "Sales Invoice":
party_type = "Customer"
@@ -597,24 +606,28 @@ def get_payment_entry_against_invoice(dt, dn):
"party_account_currency": ref_doc.party_account_currency,
"amount_field_party": amount_field_party,
"amount_field_bank": amount_field_bank,
- "amount": abs(ref_doc.outstanding_amount),
+ "amount": amount if amount else abs(ref_doc.outstanding_amount),
"remarks": 'Payment received against {0} {1}. {2}'.format(dt, dn, ref_doc.remarks),
- "is_advance": "No"
+ "is_advance": "No",
+ "bank_account": bank_account,
+ "journal_entry": journal_entry
})
def get_payment_entry(ref_doc, args):
cost_center = frappe.db.get_value("Company", ref_doc.company, "cost_center")
- exchange_rate = get_exchange_rate(args.get("party_account"), args.get("party_account_currency"),
- ref_doc.company, ref_doc.doctype, ref_doc.name)
+ exchange_rate = 1
+ if args.get("party_account"):
+ exchange_rate = get_exchange_rate(args.get("party_account"), args.get("party_account_currency"),
+ ref_doc.company, ref_doc.doctype, ref_doc.name)
- jv = frappe.new_doc("Journal Entry")
- jv.update({
+ je = frappe.new_doc("Journal Entry")
+ je.update({
"voucher_type": "Bank Entry",
"company": ref_doc.company,
"remark": args.get("remarks")
})
- party_row = jv.append("accounts", {
+ party_row = je.append("accounts", {
"account": args.get("party_account"),
"party_type": args.get("party_type"),
"party": ref_doc.get(args.get("party_type").lower()),
@@ -631,8 +644,10 @@ def get_payment_entry(ref_doc, args):
"reference_name": ref_doc.name
})
- bank_row = jv.append("accounts")
- bank_account = get_default_bank_cash_account(ref_doc.company, "Bank Entry")
+ bank_row = je.append("accounts")
+
+ #make it bank_details
+ bank_account = get_default_bank_cash_account(ref_doc.company, "Bank Entry", account=args.get("bank_account"))
if bank_account:
bank_row.update(bank_account)
bank_row.exchange_rate = get_exchange_rate(bank_account["account"],
@@ -648,12 +663,12 @@ def get_payment_entry(ref_doc, args):
# set multi currency check
if party_row.account_currency != ref_doc.company_currency \
or (bank_row.account_currency and bank_row.account_currency != ref_doc.company_currency):
- jv.multi_currency = 1
+ je.multi_currency = 1
- jv.set_amounts_in_company_currency()
- jv.set_total_debit_credit()
-
- return jv.as_dict()
+ je.set_amounts_in_company_currency()
+ je.set_total_debit_credit()
+
+ return je if args.get("journal_entry") else je.as_dict()
@frappe.whitelist()
def get_opening_accounts(company):
diff --git a/erpnext/accounts/doctype/payment_gateway/__init__.py b/erpnext/accounts/doctype/payment_gateway/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/erpnext/accounts/doctype/payment_gateway/payment_gateway.json b/erpnext/accounts/doctype/payment_gateway/payment_gateway.json
new file mode 100644
index 0000000000..3f1da8f2d6
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_gateway/payment_gateway.json
@@ -0,0 +1,118 @@
+{
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "autoname": "field:gateway",
+ "creation": "2015-12-15 22:26:45.221162",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "",
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "gateway",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Gateway",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ }
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "in_create": 1,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2016-01-18 03:58:22.588834",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Payment Gateway",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Administrator",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ },
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "role": "System Manager",
+ "set_user_permissions": 0,
+ "share": 0,
+ "submit": 0,
+ "write": 0
+ },
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "role": "Accounts Manager",
+ "set_user_permissions": 0,
+ "share": 0,
+ "submit": 0,
+ "write": 0
+ }
+ ],
+ "read_only": 1,
+ "read_only_onload": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_gateway/payment_gateway.py b/erpnext/accounts/doctype/payment_gateway/payment_gateway.py
new file mode 100644
index 0000000000..80799e311b
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_gateway/payment_gateway.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.model.document import Document
+
+class PaymentGateway(Document):
+ pass
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_gateway/test_payment_gateway.py b/erpnext/accounts/doctype/payment_gateway/test_payment_gateway.py
new file mode 100644
index 0000000000..2faf1a7fb4
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_gateway/test_payment_gateway.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+import frappe
+import unittest
+
+# test_records = frappe.get_test_records('Payment Gateway')
+
+class TestPaymentGateway(unittest.TestCase):
+ pass
diff --git a/erpnext/accounts/doctype/payment_gateway_account/__init__.py b/erpnext/accounts/doctype/payment_gateway_account/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.js b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.js
new file mode 100644
index 0000000000..c9bdc9b80a
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.js
@@ -0,0 +1,6 @@
+cur_frm.cscript.refresh = function(doc, dt, dn){
+ if(!doc.__islocal){
+ var df = frappe.meta.get_docfield(doc.doctype, "gateway", doc.name);
+ df.read_only = 1;
+ }
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.json b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.json
new file mode 100644
index 0000000000..579c2c29b3
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.json
@@ -0,0 +1,293 @@
+{
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "creation": "2015-12-23 21:31:52.699821",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "",
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "gateway",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Payment Gateway",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Payment Gateway",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "is_default",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Is Default",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_4",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "payment_account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Payment Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Account",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "currency",
+ "fieldtype": "Read Only",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Currency",
+ "length": 0,
+ "no_copy": 0,
+ "options": "payment_account.account_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "payment_request_message",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "Please click on the link below to make your payment",
+ "fieldname": "message",
+ "fieldtype": "Text Editor",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Default Payment Request Message",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "Click here to make a payment",
+ "fieldname": "payment_url_message",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Payment URL Message",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "payment_success_url",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Payment Success URL",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ }
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2016-01-18 03:53:50.534673",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Payment Gateway Account",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Administrator",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ },
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Accounts Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ }
+ ],
+ "read_only": 0,
+ "read_only_onload": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py
new file mode 100644
index 0000000000..dd971ad5d2
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.model.document import Document
+
+class PaymentGatewayAccount(Document):
+ def autoname(self):
+ self.name = self.gateway + " - " + self.currency
+
+ def validate(self):
+ self.update_default_payment_gateway()
+ self.set_as_default_if_not_set()
+
+ def update_default_payment_gateway(self):
+ if self.is_default:
+ frappe.db.sql("""update `tabPayment Gateway Account` set is_default = 0
+ where is_default = 1 """)
+
+ def set_as_default_if_not_set(self):
+ if not frappe.db.get_value("Payment Gateway Account", {"is_default": 1, "name": ("!=", self.name)}, "name"):
+ self.is_default = 1
diff --git a/erpnext/accounts/doctype/payment_gateway_account/test_payment_gateway_account.py b/erpnext/accounts/doctype/payment_gateway_account/test_payment_gateway_account.py
new file mode 100644
index 0000000000..84c3bc4a60
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_gateway_account/test_payment_gateway_account.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+import frappe
+import unittest
+
+# test_records = frappe.get_test_records('Payment Gateway Account')
+
+class TestPaymentGatewayAccount(unittest.TestCase):
+ pass
diff --git a/erpnext/accounts/doctype/payment_request/__init__.py b/erpnext/accounts/doctype/payment_request/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/erpnext/accounts/doctype/payment_request/payment_request.js b/erpnext/accounts/doctype/payment_request/payment_request.js
new file mode 100644
index 0000000000..b519dee734
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_request/payment_request.js
@@ -0,0 +1,34 @@
+cur_frm.add_fetch("payment_gateway", "payment_account", "payment_account")
+cur_frm.add_fetch("payment_gateway", "gateway", "gateway")
+cur_frm.add_fetch("payment_gateway", "message", "message")
+cur_frm.add_fetch("payment_gateway", "payment_url_message", "payment_url_message")
+cur_frm.add_fetch("payment_gateway", "payment_success_url", "payment_success_url")
+
+frappe.ui.form.on("Payment Request", "onload", function(frm, dt, dn){
+ if (frm.doc.reference_doctype) {
+ frappe.call({
+ method:"erpnext.accounts.doctype.payment_request.payment_request.get_print_format_list",
+ args: {"ref_doctype": frm.doc.reference_doctype},
+ callback:function(r){
+ set_field_options("print_format", r.message["print_format"])
+ }
+ })
+ }
+})
+
+frappe.ui.form.on("Payment Request", "refresh", function(frm) {
+ frm.add_custom_button(__('Resend Payment Email'), function(){
+ frappe.call({
+ method: "erpnext.accounts.doctype.payment_request.payment_request.resend_payment_email",
+ args: {"docname": frm.doc.name},
+ freeze: true,
+ freeze_message: __("Sending"),
+ callback: function(r){
+ if(!r.exc) {
+ frappe.msgprint(__("Message Sent"));
+ }
+ }
+ });
+ });
+});
+
diff --git a/erpnext/accounts/doctype/payment_request/payment_request.json b/erpnext/accounts/doctype/payment_request/payment_request.json
new file mode 100644
index 0000000000..7655b5872e
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_request/payment_request.json
@@ -0,0 +1,678 @@
+{
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "autoname": "PR.######",
+ "creation": "2015-12-15 22:23:24.745065",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "",
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "payment_details",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Payment Details",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Amount",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "2",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "currency",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Currency",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:doc.reference_doctype==\"Sales Order\"",
+ "fieldname": "make_sales_invoice",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Make Sales Invoice",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_5",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "Draft",
+ "fieldname": "status",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Status",
+ "length": 0,
+ "no_copy": 0,
+ "options": "\nDraft\nInitiated\nPaid\nFailed\nCancelled",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "section_break_7",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "payment_gateway",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Payment Gateway",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Payment Gateway Account",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "payment_success_url",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Payment Success URL",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_9",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "gateway",
+ "fieldtype": "Read Only",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Gateway",
+ "length": 0,
+ "no_copy": 0,
+ "options": "payment_gateway.gateway",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "payment_account",
+ "fieldtype": "Read Only",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Payment Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "payment_gateway.payment_account",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "recipient_and_message",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Recipient and Message",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "",
+ "fieldname": "print_format",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Print Format",
+ "length": 0,
+ "no_copy": 0,
+ "options": "",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "mute_email",
+ "fieldtype": "Check",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Mute Email",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 1,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "email_to",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Email To",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "subject",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Subject",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "message",
+ "fieldtype": "Text Editor",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Message",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "payment_url_message",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Payment URL Message",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "payment_url",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "payment_url",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "reference_details",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Reference Details",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "reference_doctype",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Reference Doctype",
+ "length": 0,
+ "no_copy": 1,
+ "options": "DocType",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 1,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "reference_name",
+ "fieldtype": "Dynamic Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Reference Name",
+ "length": 0,
+ "no_copy": 1,
+ "options": "reference_doctype",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 1,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "amended_from",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Amended From",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Payment Request",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ }
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 1,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2016-01-11 05:49:28.342786",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Payment Request",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Accounts User",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ },
+ {
+ "amend": 1,
+ "apply_user_permissions": 0,
+ "cancel": 1,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Accounts Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 1,
+ "write": 1
+ },
+ {
+ "amend": 1,
+ "apply_user_permissions": 0,
+ "cancel": 1,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Administrator",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 1,
+ "write": 1
+ }
+ ],
+ "read_only": 0,
+ "read_only_onload": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py
new file mode 100644
index 0000000000..9e296973d1
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_request/payment_request.py
@@ -0,0 +1,234 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe import _
+from frappe.model.document import Document
+from frappe.utils import flt, nowdate, get_url, cstr
+from erpnext.accounts.party import get_party_account
+from erpnext.accounts.utils import get_account_currency, get_balance_on
+from erpnext.accounts.doctype.journal_entry.journal_entry import (get_payment_entry_against_invoice,
+get_payment_entry_against_order)
+
+from itertools import chain
+
+class PaymentRequest(Document):
+ def validate(self):
+ self.validate_payment_gateway_account()
+ self.validate_payment_request()
+ self.validate_currency()
+
+ def validate_payment_request(self):
+ if frappe.db.get_value("Payment Request", {"reference_name": self.reference_name,
+ "name": ("!=", self.name), "status": ("not in", ["Initiated", "Paid"]), "docstatus": 1}, "name"):
+ frappe.throw(_("Payment Request already exists {0}".fomart(self.reference_name)))
+
+ def validate_currency(self):
+ ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
+ if ref_doc.currency != frappe.db.get_value("Account", self.payment_account, "account_currency"):
+ frappe.throw(_("Transaction currency must be same as Payment Gateway currency"))
+
+ def validate_payment_gateway_account(self):
+ if not self.payment_gateway:
+ frappe.throw(_("Payment Gateway Account is not configured"))
+
+ def validate_payment_gateway(self):
+ if self.gateway == "PayPal":
+ if not frappe.db.get_value("PayPal Settings", None, "api_username"):
+ if not frappe.conf.paypal_username:
+ frappe.throw(_("PayPal Settings missing"))
+
+ def on_submit(self):
+ if not self.mute_email:
+ self.send_payment_request()
+ self.send_email()
+
+ self.make_communication_entry()
+
+ def on_cancel(self):
+ self.set_as_cancelled()
+
+ def on_update_after_submit(self):
+ pass
+
+ def set_status(self):
+ pass
+
+ def get_payment_url(self):
+ pass
+
+ def make_invoice(self):
+ if self.make_sales_invoice:
+ from erpnext.selling.doctype.sales_order.sales_order import make_sales_invoice
+ si = make_sales_invoice(self.reference_name, ignore_permissions=True)
+ si = si.insert(ignore_permissions=True)
+ si.submit()
+
+ def send_payment_request(self):
+ self.payment_url = get_url("/api/method/erpnext.accounts.doctype.payment_request.payment_request.generate_payment_request?name={0}".format(self.name))
+ if self.payment_url:
+ frappe.db.set_value(self.doctype, self.name, "status", "Initiated")
+
+ def set_as_paid(self):
+ if frappe.session.user == "Guest":
+ frappe.set_user("Administrator")
+
+ jv = self.create_journal_entry()
+ self.make_invoice()
+
+ return jv
+
+ def create_journal_entry(self):
+ """create entry"""
+ payment_details = {
+ "amount": self.amount,
+ "journal_entry": True,
+ "bank_account": self.payment_account
+ }
+
+ frappe.flags.ignore_account_permission = True
+
+ if self.reference_doctype == "Sales Order":
+ jv = get_payment_entry_against_order(self.reference_doctype, self.reference_name,\
+ amount=self.amount, journal_entry=True, bank_account=self.payment_account)
+
+ if self.reference_doctype == "Sales Invoice":
+ jv = get_payment_entry_against_invoice(self.reference_doctype, self.reference_name,\
+ amount=self.amount, journal_entry=True, bank_account=self.payment_account)
+
+ jv.update({
+ "voucher_type": "Journal Entry",
+ "posting_date": nowdate()
+ })
+ jv.insert(ignore_permissions=True)
+ jv.submit()
+
+ #set status as paid for Payment Request
+ frappe.db.set_value(self.doctype, self.name, "status", "Paid")
+
+ return jv
+
+ def send_email(self):
+ """send email with payment link"""
+ frappe.sendmail(recipients=self.email_to, sender=None, subject=self.subject,
+ message=self.get_message(), attachments=[frappe.attach_print(self.reference_doctype,
+ self.reference_name, file_name=self.reference_name, print_format=self.print_format)])
+
+ def get_message(self):
+ """return message with payment gateway link"""
+ return cstr(self.message) + " {1} ".format(self.payment_url, \
+ self.payment_url_message or _(" Click here to pay"))
+
+ def set_failed(self):
+ pass
+
+ def set_as_cancelled(self):
+ frappe.db.set_value(self.doctype, self.name, "status", "Cancelled")
+
+ def make_communication_entry(self):
+ """Make communication entry"""
+ comm = frappe.get_doc({
+ "doctype":"Communication",
+ "subject": self.subject,
+ "content": self.get_message(),
+ "sent_or_received": "Sent",
+ "reference_doctype": self.reference_doctype,
+ "reference_name": self.reference_name
+ })
+ comm.insert(ignore_permissions=True)
+
+ def get_payment_success_url(self):
+ return self.payment_success_url
+
+@frappe.whitelist(allow_guest=True)
+def make_payment_request(**args):
+ """Make payment request"""
+
+ args = frappe._dict(args)
+ ref_doc = frappe.get_doc(args.dt, args.dn)
+ gateway_account = get_gateway_details(args)
+
+ pr = frappe.new_doc("Payment Request")
+ pr.update({
+ "payment_gateway": gateway_account.name,
+ "gateway": gateway_account.gateway,
+ "payment_account": gateway_account.payment_account,
+ "currency": ref_doc.currency,
+ "make_sales_invoice": args.cart or 0,
+ "amount": get_amount(ref_doc, args.dt),
+ "mute_email": args.mute_email or 0,
+ "email_to": args.recipient_id or "",
+ "subject": "Payment Request for %s"%args.dn,
+ "message": gateway_account.message,
+ "payment_url_message": gateway_account.payment_url_message,
+ "payment_success_url": gateway_account.payment_success_url,
+ "reference_doctype": args.dt,
+ "reference_name": args.dn
+ })
+
+ if args.return_doc:
+ return pr
+
+ if args.submit_doc:
+ pr.insert(ignore_permissions=True)
+ pr.submit()
+
+ if args.cart:
+ generate_payment_request(pr.name)
+ frappe.db.commit()
+
+ if not args.cart:
+ return pr
+
+ return pr.as_dict()
+
+def get_amount(ref_doc, dt):
+ """get amount based on doctype"""
+ if dt == "Sales Order":
+ amount = flt(ref_doc.base_grand_total) - flt(ref_doc.advance_paid)
+
+ if dt == "Sales Invoice":
+ amount = abs(ref_doc.outstanding_amount)
+
+ if amount > 0:
+ return amount
+ else:
+ frappe.throw(_("Payment Entry is already created"))
+
+def get_gateway_details(args):
+ """return gateway and payment account of default payment gateway"""
+ if args.payemnt_gateway:
+ gateway_account = frappe.db.get_value("Payment Gateway Account", args.payemnt_gateway,
+ ["name", "gateway", "payment_account", "message", "payment_url_message", "payment_success_url"],
+ as_dict=1)
+
+ gateway_account = frappe.db.get_value("Payment Gateway Account", {"is_default": 1},
+ ["name", "gateway", "payment_account", "message", "payment_url_message", "payment_success_url"],
+ as_dict=1)
+
+ if not gateway_account:
+ frappe.throw(_("Payment Gateway Account is not configured"))
+
+ return gateway_account
+
+@frappe.whitelist()
+def get_print_format_list(ref_doctype):
+ print_format_list = ["Standard"]
+
+ print_format_list.extend([p.name for p in frappe.get_all("Print Format",
+ filters={"doc_type": ref_doctype})])
+
+ return {
+ "print_format": print_format_list
+ }
+
+@frappe.whitelist(allow_guest=True)
+def generate_payment_request(name):
+ frappe.get_doc("Payment Request", name).run_method("get_payment_url")
+
+@frappe.whitelist(allow_guest=True)
+def resend_payment_email(docname):
+ return frappe.get_doc("Payment Request", docname).send_email()
+
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_request/payment_request_list.js b/erpnext/accounts/doctype/payment_request/payment_request_list.js
new file mode 100644
index 0000000000..0caf1c2f7f
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_request/payment_request_list.js
@@ -0,0 +1,17 @@
+frappe.listview_settings['Payment Request'] = {
+ add_fields: ["status"],
+ get_indicator: function(doc) {
+ if(doc.status == "Draft") {
+ return [__("Draft"), "darkgrey", "status,=,Draft"];
+ }
+ else if(doc.status == "Initiated") {
+ return [__("Initiated"), "green", "status,=,Initiated"];
+ }
+ else if(doc.status == "Paid") {
+ return [__("Paid"), "blue", "status,=,Paid"];
+ }
+ else if(doc.status == "Cancelled") {
+ return [__("Cancelled"), "orange", "status,=,Cancelled"];
+ }
+ }
+}
diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py
new file mode 100644
index 0000000000..a1e975a984
--- /dev/null
+++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py
@@ -0,0 +1,79 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+import frappe
+import unittest
+from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
+from erpnext.accounts.doctype.payment_request.payment_request import make_payment_request
+from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
+# test_records = frappe.get_test_records('Payment Request')
+
+test_dependencies = ["Currency Exchange", "Journal Entry", "Contact", "Address"]
+
+payment_gateway = {
+ "doctype": "Payment Gateway",
+ "gateway": "_Test Gateway"
+}
+
+payment_method = [
+ {
+ "doctype": "Payment Gateway Account",
+ "is_default": 1,
+ "gateway": "_Test Gateway",
+ "payment_account": "_Test Bank - _TC",
+ "currency": "INR"
+ },
+ {
+ "doctype": "Payment Gateway Account",
+ "gateway": "_Test Gateway",
+ "payment_account": "_Test Bank - _TC",
+ "currency": "USD"
+ }
+]
+
+class TestPaymentRequest(unittest.TestCase):
+ def setUp(self):
+ if not frappe.db.get_value("Payment Gateway", payment_gateway["gateway"], "name"):
+ frappe.get_doc(payment_gateway).insert(ignore_permissions=True)
+
+ for method in payment_method:
+ if not frappe.db.get_value("Payment Gateway Account", {"gateway": method["gateway"],
+ "currency": method["currency"]}, "name"):
+ frappe.get_doc(method).insert(ignore_permissions=True)
+
+ def test_payment_request_linkings(self):
+ SO_INR = make_sales_order(currency="INR")
+ pr = make_payment_request(dt="Sales Order", dn=SO_INR.name, recipient_id="saurabh@erpnext.com")
+
+ self.assertEquals(pr.reference_doctype, "Sales Order")
+ self.assertEquals(pr.reference_name, SO_INR.name)
+ self.assertEquals(pr.currency, "INR")
+
+ SI_USD = create_sales_invoice(currency="USD", conversion_rate=50)
+ pr = make_payment_request(dt="Sales Invoice", dn=SI_USD.name, recipient_id="saurabh@erpnext.com")
+
+ self.assertEquals(pr.reference_doctype, "Sales Invoice")
+ self.assertEquals(pr.reference_name, SI_USD.name)
+ self.assertEquals(pr.currency, "USD")
+
+ def test_payment_entry(self):
+ SO_INR = make_sales_order(currency="INR")
+ pr = make_payment_request(dt="Sales Order", dn=SO_INR.name, recipient_id="saurabh@erpnext.com",
+ mute_email=1, submit_doc=1)
+ jv = pr.set_as_paid()
+
+ SO_INR = frappe.get_doc("Sales Order", SO_INR.name)
+
+ self.assertEquals(SO_INR.advance_paid, jv.total_debit)
+
+ SI_USD = create_sales_invoice(customer="_Test Customer USD", debit_to="_Test Receivable USD - _TC",
+ currency="USD", conversion_rate=50)
+
+ pr = make_payment_request(dt="Sales Invoice", dn=SI_USD.name, recipient_id="saurabh@erpnext.com",
+ mute_email=1, return_doc=1, payemnt_gateway="_Test Gateway - USD")
+
+ self.assertRaises(frappe.ValidationError, pr.save)
+
+
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json
index a9c7ce7ec4..eb77ae2372 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json
@@ -1,8 +1,8 @@
{
"allow_copy": 0,
"allow_import": 1,
- "allow_rename": 0,
- "autoname": "PRULE.#####",
+ "allow_rename": 1,
+ "autoname": "field:title",
"creation": "2014-02-21 15:02:51",
"custom": 0,
"docstatus": 0,
@@ -24,6 +24,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -47,6 +48,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -71,6 +73,7 @@
"options": "\nItem Code\nItem Group\nBrand",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -95,6 +98,7 @@
"options": "Item",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -119,6 +123,7 @@
"options": "Brand",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -143,6 +148,7 @@
"options": "Item Group",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -165,6 +171,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -189,6 +196,7 @@
"options": "\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -211,6 +219,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -233,6 +242,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -255,6 +265,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -277,6 +288,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -299,6 +311,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -323,6 +336,7 @@
"options": "\nCustomer\nCustomer Group\nTerritory\nSales Partner\nCampaign\nSupplier\nSupplier Type",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -347,6 +361,7 @@
"options": "Customer",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -371,6 +386,7 @@
"options": "Customer Group",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -395,6 +411,7 @@
"options": "Territory",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -419,6 +436,7 @@
"options": "Sales Partner",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -443,6 +461,7 @@
"options": "Campaign",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -467,6 +486,7 @@
"options": "Supplier",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -491,6 +511,7 @@
"options": "Supplier Type",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -513,6 +534,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -535,6 +557,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -557,6 +580,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -579,6 +603,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -601,6 +626,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -624,6 +650,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -646,6 +673,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -667,6 +695,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -690,6 +719,7 @@
"options": "Company",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -712,6 +742,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -736,6 +767,7 @@
"options": "\nPrice\nDiscount Percentage",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -757,6 +789,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -780,6 +813,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -803,6 +837,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -827,6 +862,7 @@
"options": "Price List",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -850,6 +886,7 @@
"options": "Simple",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -872,6 +909,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -890,7 +928,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:51.958974",
+ "modified": "2016-01-15 04:05:11.633824",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Pricing Rule",
@@ -1001,5 +1039,5 @@
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
- "title_field": "title"
+ "title_field": ""
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
index d835e76505..fcc1f92173 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
@@ -76,7 +76,7 @@ class PricingRule(Document):
def apply_pricing_rule(args):
"""
args = {
- "item_list": [{"doctype": "", "name": "", "item_code": "", "brand": "", "item_group": ""}, ...],
+ "items": [{"doctype": "", "name": "", "item_code": "", "brand": "", "item_group": ""}, ...],
"customer": "something",
"customer_group": "something",
"territory": "something",
@@ -97,18 +97,17 @@ def apply_pricing_rule(args):
args = json.loads(args)
args = frappe._dict(args)
-
+
+ if not args.transaction_type:
+ set_transaction_type(args)
+
# list of dictionaries
out = []
- if args.get("parenttype") == "Material Request": return out
+ if args.get("doctype") == "Material Request": return out
- if not args.transaction_type:
- args.transaction_type = "buying" if frappe.get_meta(args.parenttype).get_field("supplier") \
- else "selling"
-
- item_list = args.get("item_list")
- args.pop("item_list")
+ item_list = args.get("items")
+ args.pop("items")
for item in item_list:
args_copy = copy.deepcopy(args)
@@ -138,13 +137,17 @@ def get_pricing_rule_for_item(args):
if not args.item_group:
frappe.throw(_("Item Group not mentioned in item master for item {0}").format(args.item_code))
- if args.customer and not (args.customer_group and args.territory):
- customer = frappe.db.get_value("Customer", args.customer, ["customer_group", "territory"])
- if customer:
- args.customer_group, args.territory = customer
+ if args.transaction_type=="selling":
+ if args.customer and not (args.customer_group and args.territory):
+ customer = frappe.db.get_value("Customer", args.customer, ["customer_group", "territory"])
+ if customer:
+ args.customer_group, args.territory = customer
+
+ args.supplier = args.supplier_type = None
elif args.supplier and not args.supplier_type:
args.supplier_type = frappe.db.get_value("Supplier", args.supplier, "supplier_type")
+ args.customer = args.customer_group = args.territory = None
pricing_rules = get_pricing_rules(args)
pricing_rule = filter_pricing_rules(args, pricing_rules)
@@ -184,9 +187,12 @@ def get_pricing_rules(args):
conditions = ""
+ values = {"item_code": args.get("item_code"), "brand": args.get("brand")}
+
for field in ["company", "customer", "supplier", "supplier_type", "campaign", "sales_partner"]:
if args.get(field):
conditions += " and ifnull("+field+", '') in (%("+field+")s, '')"
+ values[field] = args.get(field)
else:
conditions += " and ifnull("+field+", '') = ''"
@@ -194,12 +200,15 @@ def get_pricing_rules(args):
group_condition = _get_tree_conditions(parenttype)
if group_condition:
conditions += " and " + group_condition
+
if not args.price_list: args.price_list = None
conditions += " and ifnull(for_price_list, '') in (%(price_list)s, '')"
+ values["price_list"] = args.get("price_list")
if args.get("transaction_date"):
conditions += """ and %(transaction_date)s between ifnull(valid_from, '2000-01-01')
and ifnull(valid_upto, '2500-12-31')"""
+ values['transaction_date'] = args.get('transaction_date')
item_group_condition = _get_tree_conditions("Item Group", False)
if item_group_condition: item_group_condition = " or " + item_group_condition
@@ -210,7 +219,8 @@ def get_pricing_rules(args):
and {transaction_type} = 1 {conditions}
order by priority desc, name desc""".format(
item_group_condition=item_group_condition,
- transaction_type=args.transaction_type, conditions=conditions), args, as_dict=1)
+ transaction_type= args.transaction_type,
+ conditions=conditions), values, as_dict=1)
def filter_pricing_rules(args, pricing_rules):
# filter for qty
@@ -267,3 +277,14 @@ def apply_internal_priority(pricing_rules, field_set, args):
if filtered_rules: break
return filtered_rules or pricing_rules
+
+def set_transaction_type(args):
+ if args.doctype in ("Opportunity", "Quotation", "Sales Order", "Delivery Note", "Sales Invoice"):
+ args.transaction_type = "selling"
+ elif args.doctype in ("Material Request", "Supplier Quotation", "Purchase Order",
+ "Purchase Receipt", "Purchase Invoice"):
+ args.transaction_type = "buying"
+ elif args.customer:
+ args.transaction_type = "selling"
+ else:
+ args.transaction_type = "buying"
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py
index 2a43814fab..bdd743125a 100644
--- a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py
+++ b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py
@@ -31,22 +31,22 @@ class TestPricingRule(unittest.TestCase):
"company": "_Test Company",
"price_list": "_Test Price List",
"currency": "_Test Currency",
- "parenttype": "Sales Order",
+ "doctype": "Sales Order",
"conversion_rate": 1,
"price_list_currency": "_Test Currency",
"plc_conversion_rate": 1,
"order_type": "Sales",
- "transaction_type": "selling",
"customer": "_Test Customer",
- "doctype": "Sales Order Item",
"name": None
})
details = get_item_details(args)
self.assertEquals(details.get("discount_percentage"), 10)
-
+
prule = frappe.get_doc(test_record.copy())
prule.applicable_for = "Customer"
+ prule.title = "_Test Pricing Rule for Customer"
self.assertRaises(MandatoryError, prule.insert)
+
prule.customer = "_Test Customer"
prule.discount_percentage = 20
prule.insert()
@@ -56,16 +56,18 @@ class TestPricingRule(unittest.TestCase):
prule = frappe.get_doc(test_record.copy())
prule.apply_on = "Item Group"
prule.item_group = "All Item Groups"
+ prule.title = "_Test Pricing Rule for Item Group"
prule.discount_percentage = 15
prule.insert()
-
- args.customer = None
+
+ args.customer = "_Test Customer 1"
details = get_item_details(args)
self.assertEquals(details.get("discount_percentage"), 10)
prule = frappe.get_doc(test_record.copy())
prule.applicable_for = "Campaign"
prule.campaign = "_Test Campaign"
+ prule.title = "_Test Pricing Rule for Campaign"
prule.discount_percentage = 5
prule.priority = 8
prule.insert()
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
index 6eb29fa55b..d3a72d64d4 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -25,13 +25,14 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
if(!doc.is_return) {
if(doc.docstatus==1) {
if(doc.outstanding_amount != 0) {
- this.frm.add_custom_button(__('Payment'), this.make_bank_entry).addClass("btn-primary");
+ this.frm.add_custom_button(__('Payment'), this.make_bank_entry, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
- cur_frm.add_custom_button(__('Debit Note'), this.make_debit_note);
+ cur_frm.add_custom_button(__('Debit Note'), this.make_debit_note, __("Make"));
}
if(doc.docstatus===0) {
- cur_frm.add_custom_button(__('From Purchase Order'), function() {
+ cur_frm.add_custom_button(__('Purchase Order'), function() {
frappe.model.map_current_doc({
method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice",
source_doctype: "Purchase Order",
@@ -43,9 +44,9 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
company: cur_frm.doc.company
}
})
- });
+ }, __("Get items from"));
- cur_frm.add_custom_button(__('From Purchase Receipt'), function() {
+ cur_frm.add_custom_button(__('Purchase Receipt'), function() {
frappe.model.map_current_doc({
method: "erpnext.stock.doctype.purchase_receipt.purchase_receipt.make_purchase_invoice",
source_doctype: "Purchase Receipt",
@@ -56,7 +57,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
company: cur_frm.doc.company
}
})
- });
+ }, __("Get items from"));
}
}
},
@@ -76,7 +77,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
me.apply_pricing_rule();
})
},
-
+
credit_to: function() {
var me = this;
if(this.frm.doc.credit_to) {
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
index b4c81df7c3..5d91426b22 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -261,15 +261,19 @@ class PurchaseInvoice(BuyingController):
gl_entries = []
# parent's gl entry
- if self.base_grand_total:
+ if self.grand_total:
+ # Didnot use base_grand_total to book rounding loss gle
+ grand_total_in_company_currency = flt(self.grand_total * self.conversion_rate,
+ self.precision("grand_total"))
+
gl_entries.append(
self.get_gl_dict({
"account": self.credit_to,
"party_type": "Supplier",
"party": self.supplier,
"against": self.against_expense_account,
- "credit": self.base_grand_total,
- "credit_in_account_currency": self.base_grand_total \
+ "credit": grand_total_in_company_currency,
+ "credit_in_account_currency": grand_total_in_company_currency \
if self.party_account_currency==self.company_currency else self.grand_total,
"against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype,
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 1b541cf063..1725b7ebd4 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -50,15 +50,16 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
if(doc.update_stock) this.show_stock_ledger();
if(doc.docstatus==1 && !doc.is_return) {
-
+
var is_delivered_by_supplier = false;
-
+
is_delivered_by_supplier = cur_frm.doc.items.some(function(item){
return item.is_delivered_by_supplier ? true : false;
})
-
+
cur_frm.add_custom_button(doc.update_stock ? __('Sales Return') : __('Credit Note'),
- this.make_sales_return);
+ this.make_sales_return, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
if(cint(doc.update_stock)!=1) {
// show Make Delivery Note button only if Sales Invoice is not created from Delivery Note
@@ -69,12 +70,13 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
});
if(!from_delivery_note && !is_delivered_by_supplier) {
- cur_frm.add_custom_button(__('Delivery'), cur_frm.cscript['Make Delivery Note']).addClass("btn-primary");
+ cur_frm.add_custom_button(__('Delivery'), cur_frm.cscript['Delivery Note'], __("Make"));
}
}
if(doc.outstanding_amount!=0 && !cint(doc.is_return)) {
- cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_bank_entry).addClass("btn-primary");
+ cur_frm.add_custom_button(__('Payment Request'), this.make_payment_request, __("Make"));
+ cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_bank_entry, __("Make"));
}
}
@@ -104,7 +106,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
},
sales_order_btn: function() {
- this.$sales_order_btn = cur_frm.add_custom_button(__('From Sales Order'),
+ this.$sales_order_btn = cur_frm.add_custom_button(__('Sales Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice",
@@ -117,11 +119,11 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
company: cur_frm.doc.company
}
})
- });
+ }, __("Get items from"));
},
delivery_note_btn: function() {
- this.$delivery_note_btn = cur_frm.add_custom_button(__('From Delivery Note'),
+ this.$delivery_note_btn = cur_frm.add_custom_button(__('Delivery Note'),
function() {
frappe.model.map_current_doc({
method: "erpnext.stock.doctype.delivery_note.delivery_note.make_sales_invoice",
@@ -137,7 +139,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
};
}
});
- });
+ }, __("Get items from"));
},
tc_name: function() {
@@ -435,9 +437,11 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
})
if(cur_frm.doc.is_pos) {
- cur_frm.msgbox = frappe.msgprint('Print \
- New ');
+ cur_frm.msgbox = frappe.msgprint(format('{0} \
+ {1} ', [
+ __('Print'), __('New')
+ ]));
} else if(cint(frappe.boot.notification_settings.sales_invoice)) {
cur_frm.email_doc(frappe.boot.notification_settings.sales_invoice_message);
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index a0ce980bcc..e87794a979 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -531,14 +531,18 @@ class SalesInvoice(SellingController):
def make_customer_gl_entry(self, gl_entries):
if self.grand_total:
+ # Didnot use base_grand_total to book rounding loss gle
+ grand_total_in_company_currency = flt(self.grand_total * self.conversion_rate,
+ self.precision("grand_total"))
+
gl_entries.append(
self.get_gl_dict({
"account": self.debit_to,
"party_type": "Customer",
"party": self.customer,
"against": self.against_income_account,
- "debit": self.base_grand_total,
- "debit_in_account_currency": self.base_grand_total \
+ "debit": grand_total_in_company_currency,
+ "debit_in_account_currency": grand_total_in_company_currency \
if self.party_account_currency==self.company_currency else self.grand_total,
"against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype
diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py
index 49a7bd0fd6..64882886d4 100644
--- a/erpnext/accounts/general_ledger.py
+++ b/erpnext/accounts/general_ledger.py
@@ -141,6 +141,8 @@ def make_round_off_gle(gl_map, debit_credit_diff):
round_off_gle.update({
"account": round_off_account,
+ "debit_in_account_currency": abs(debit_credit_diff) if debit_credit_diff < 0 else 0,
+ "credit_in_account_currency": debit_credit_diff if debit_credit_diff > 0 else 0,
"debit": abs(debit_credit_diff) if debit_credit_diff < 0 else 0,
"credit": debit_credit_diff if debit_credit_diff > 0 else 0,
"cost_center": round_off_cost_center,
diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html
index ee77085ca5..dd1609a00c 100644
--- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html
+++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html
@@ -1,8 +1,8 @@
-
+
{%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %}
{%= __("Bank Reconciliation Statement") %}
-
{%= filters.account %}
+
{%= filters.account && (filters.account + ", "+filters.report_date) || "" %} {%= filters.company %}
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 6ff1eeab3b..581a7c86da 100644
--- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
+++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
@@ -39,18 +39,18 @@ def execute(filters=None):
+ amounts_not_reflected_in_system
data += [
- get_balance_row(_("System Balance"), balance_as_per_system, account_currency),
+ get_balance_row(_("Bank Statement balance as per General Ledger"), balance_as_per_system, account_currency),
{},
{
- "journal_entry": '"' + _("Amounts not reflected in bank") + '"',
+ "journal_entry": _("Outstanding Cheques and Deposits to clear"),
"debit": total_debit,
"credit": total_credit,
"account_currency": account_currency
},
- get_balance_row(_("Amounts not reflected in system"), amounts_not_reflected_in_system,
+ get_balance_row(_("Cheques and Deposits incorrectly cleared"), amounts_not_reflected_in_system,
account_currency),
{},
- get_balance_row(_("Expected balance as per bank"), bank_bal, account_currency)
+ get_balance_row(_("Calculated Bank Statement balance"), bank_bal, account_currency)
]
return columns, data
@@ -129,22 +129,22 @@ def get_entries(filters):
and jvd.account = %(account)s and jv.posting_date <= %(report_date)s
and ifnull(jv.clearance_date, '4000-01-01') > %(report_date)s
and ifnull(jv.is_opening, 'No') = 'No'
- order by jv.name DESC""", filters, as_dict=1)
+ order by jv.posting_date DESC,jv.name DESC""", filters, as_dict=1)
return entries
def get_balance_row(label, amount, account_currency):
if amount > 0:
return {
- "journal_entry": '"' + label + '"',
+ "journal_entry": label,
"debit": amount,
"credit": 0,
"account_currency": account_currency
}
else:
return {
- "journal_entry": '"' + label + '"',
+ "journal_entry": label,
"debit": 0,
"credit": abs(amount),
"account_currency": account_currency
- }
\ No newline at end of file
+ }
diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py
index 8d9684cbe5..3c90fe29b7 100644
--- a/erpnext/accounts/report/gross_profit/gross_profit.py
+++ b/erpnext/accounts/report/gross_profit/gross_profit.py
@@ -7,7 +7,9 @@ from frappe import _, scrub
from frappe.utils import flt
def execute(filters=None):
- if not filters: filters = {}
+ if not filters: filters = frappe._dict()
+ company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
+
gross_profit_data = GrossProfitGenerator(filters)
data = []
@@ -43,6 +45,8 @@ def execute(filters=None):
row = []
for col in group_wise_columns.get(scrub(filters.group_by)):
row.append(src.get(col))
+
+ row.append(company_currency)
data.append(row)
return columns, data
@@ -60,15 +64,15 @@ def get_columns(group_wise_columns, filters):
"description": _("Description"),
"warehouse": _("Warehouse") + ":Link/Warehouse",
"qty": _("Qty") + ":Float",
- "base_rate": _("Avg. Selling Rate") + ":Currency",
- "buying_rate": _("Avg. Buying Rate") + ":Currency",
- "base_amount": _("Selling Amount") + ":Currency",
- "buying_amount": _("Buying Amount") + ":Currency",
- "gross_profit": _("Gross Profit") + ":Currency",
+ "base_rate": _("Avg. Selling Rate") + ":Currency/currency",
+ "buying_rate": _("Avg. Buying Rate") + ":Currency/currency",
+ "base_amount": _("Selling Amount") + ":Currency/currency",
+ "buying_amount": _("Buying Amount") + ":Currency/currency",
+ "gross_profit": _("Gross Profit") + ":Currency/currency",
"gross_profit_percent": _("Gross Profit %") + ":Percent",
"project": _("Project") + ":Link/Project",
"sales_person": _("Sales person"),
- "allocated_amount": _("Allocated Amount") + ":Currency",
+ "allocated_amount": _("Allocated Amount") + ":Currency/currency",
"customer": _("Customer") + ":Link/Customer",
"customer_group": _("Customer Group") + ":Link/Customer Group",
"territory": _("Territory") + ":Link/Territory"
@@ -76,6 +80,13 @@ def get_columns(group_wise_columns, filters):
for col in group_wise_columns.get(scrub(filters.group_by)):
columns.append(column_map.get(col))
+
+ columns.append({
+ "fieldname": "currency",
+ "label" : _("Currency"),
+ "fieldtype": "Link",
+ "options": "Currency"
+ })
return columns
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index e7f2b8ab0e..6f02a54742 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -247,7 +247,7 @@ def update_against_doc(d, jv_obj):
# will work as update after submit
jv_obj.flags.ignore_validate_update_after_submit = True
- jv_obj.save()
+ jv_obj.save(ignore_permissions=True)
def remove_against_link_from_jv(ref_type, ref_no):
linked_jv = frappe.db.sql_list("""select parent from `tabJournal Entry Account`
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index 0860bca37c..c856e28edd 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -167,9 +167,9 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
set_from_product_bundle: function() {
var me = this;
- this.frm.add_custom_button(__("From Product Bundle"), function() {
+ this.frm.add_custom_button(__("Product Bundle"), function() {
erpnext.buying.get_items_from_product_bundle(me.frm);
- });
+ }, __("Get items from"));
}
});
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js
index ba215c1572..e23b0d440a 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.js
@@ -41,48 +41,61 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
if(doc.docstatus == 1 && !in_list(["Stopped", "Closed", "Delivered"], doc.status)) {
if (this.frm.has_perm("submit")) {
if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100) {
- cur_frm.add_custom_button(__('Stop'), this.stop_purchase_order);
+ cur_frm.add_custom_button(__('Stop'), this.stop_purchase_order, __("Status"));
}
- cur_frm.add_custom_button(__('Close'), this.close_purchase_order);
+ cur_frm.add_custom_button(__('Close'), this.close_purchase_order, __("Status"));
}
- if(flt(doc.per_billed)==0) {
- cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_bank_entry);
- }
if(is_drop_ship && doc.status!="Delivered"){
- cur_frm.add_custom_button(__('Mark as Delivered'),
- this.delivered_by_supplier).addClass("btn-primary");
+ cur_frm.add_custom_button(__('Delivered'),
+ this.delivered_by_supplier, __("Status"));
+
+ cur_frm.page.set_inner_btn_group_as_primary(__("Status"));
}
} else if(doc.docstatus===0) {
- cur_frm.add_custom_button(__('Get Last Purchase Rate'), this.get_last_purchase_rate);
-
cur_frm.cscript.add_from_mappers();
}
+ if(doc.docstatus == 1 && in_list(["Stopped", "Closed", "Delivered"], doc.status)) {
+ if (this.frm.has_perm("submit")) {
+ cur_frm.add_custom_button(__('Re-open'), this.unstop_purchase_order, __("Status"));
+ }
+ }
+
if(doc.docstatus == 1 && !in_list(["Stopped", "Closed"], doc.status)) {
if(flt(doc.per_received, 2) < 100 && allow_receipt) {
- cur_frm.add_custom_button(__('Receive'), this.make_purchase_receipt).addClass("btn-primary");
+ cur_frm.add_custom_button(__('Receive'), this.make_purchase_receipt, __("Make"));
if(doc.is_subcontracted==="Yes") {
- cur_frm.add_custom_button(__('Transfer Material to Supplier'),
- function() { me.make_stock_entry(); });
+ cur_frm.add_custom_button(__('Material to Supplier'),
+ function() { me.make_stock_entry(); }, __("Transfer"));
}
}
if(flt(doc.per_billed, 2) < 100)
cur_frm.add_custom_button(__('Invoice'),
- this.make_purchase_invoice).addClass("btn-primary");
- }
+ this.make_purchase_invoice, __("Make"));
- if(doc.docstatus == 1 && in_list(["Stopped", "Closed", "Delivered"], doc.status)) {
- if (this.frm.has_perm("submit")) {
- cur_frm.add_custom_button(__('Re-open'), this.unstop_purchase_order).addClass("btn-primary");
+ if(flt(doc.per_billed)==0 && doc.status != "Delivered") {
+ cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_bank_entry, __("Make"));
}
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
+
}
},
+ get_items_from_open_material_requests: function() {
+ frappe.model.map_current_doc({
+ method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order_based_on_supplier",
+ source_name: this.frm.doc.supplier,
+ get_query_filters: {
+ docstatus: ["!=", 2],
+ }
+ });
+ },
+
make_stock_entry: function() {
var items = $.map(cur_frm.doc.items, function(d) { return d.bom ? d.item_code : false; });
var me = this;
@@ -126,7 +139,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
},
add_from_mappers: function() {
- cur_frm.add_custom_button(__('From Material Request'),
+ cur_frm.add_custom_button(__('Material Request'),
function() {
frappe.model.map_current_doc({
method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order",
@@ -139,10 +152,9 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
company: cur_frm.doc.company
}
})
- }
- );
+ }, __("Add items from"));
- cur_frm.add_custom_button(__('From Supplier Quotation'),
+ cur_frm.add_custom_button(__('Supplier Quotation'),
function() {
frappe.model.map_current_doc({
method: "erpnext.buying.doctype.supplier_quotation.supplier_quotation.make_purchase_order",
@@ -153,20 +165,8 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
company: cur_frm.doc.company
}
})
- }
- );
+ }, __("Add items from"));
- cur_frm.add_custom_button(__('For Supplier'),
- function() {
- frappe.model.map_current_doc({
- method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order_based_on_supplier",
- source_doctype: "Supplier",
- get_query_filters: {
- docstatus: ["!=", 2],
- }
- })
- }
- );
},
tc_name: function() {
@@ -207,12 +207,13 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
delivered_by_supplier: function(){
cur_frm.cscript.update_status('Deliver', 'Delivered')
},
-
+
get_last_purchase_rate: function() {
frappe.call({
"method": "get_last_purchase_rate",
"doc": cur_frm.doc,
callback: function(r, rt) {
+ cur_frm.dirty();
cur_frm.cscript.calculate_taxes_and_totals();
}
})
@@ -265,54 +266,12 @@ cur_frm.fields_dict['items'].grid.get_field('bom').get_query = function(doc, cdt
}
}
-cur_frm.pformat.indent_no = function(doc, cdt, cdn){
- //function to make row of table
-
- var make_row = function(title,val1, val2, bold){
- var bstart = ''; var bend = ' ';
-
- return ''+(bold?bstart:'')+title+(bold?bend:'')+' '
- +''+val1+(val2?' ('+dateutil.str_to_user(val2)+')':'')+' '
- +' '
- }
-
- out ='';
-
- var cl = doc.items || [];
-
- // outer table
- var out='';
-
- // main table
- out +='';
-
- // add rows
- if(cl.length){
- prevdoc_list = new Array();
- for(var i=0;i
';
-
- return out;
-}
-
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
if(cint(frappe.boot.notification_settings.purchase_order)) {
cur_frm.email_doc(frappe.boot.notification_settings.purchase_order_message);
}
}
-
-
cur_frm.cscript.schedule_date = function(doc, cdt, cdn) {
erpnext.utils.copy_value_in_all_row(doc, cdt, cdn, "items", "schedule_date");
}
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json
index 88e317e77a..277229a3be 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.json
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.json
@@ -111,6 +111,31 @@
"set_only_once": 0,
"unique": 0
},
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:doc.supplier && doc.docstatus===0 && !(doc.items && doc.items.length)",
+ "fieldname": "get_items_from_open_material_requests",
+ "fieldtype": "Button",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Get Items from Open Material Requests",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
{
"allow_on_submit": 0,
"bold": 0,
@@ -847,6 +872,31 @@
"set_only_once": 0,
"unique": 0
},
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:doc.docstatus===0 && (doc.items && doc.items.length)",
+ "fieldname": "get_last_purchase_rate",
+ "fieldtype": "Button",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Get last purchase rate",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
{
"allow_on_submit": 0,
"bold": 0,
@@ -2458,7 +2508,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-12-17 16:18:39.096762",
+ "modified": "2016-01-15 04:13:35.179163",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order",
diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js
index 375d4d2409..136514a763 100644
--- a/erpnext/buying/doctype/supplier/supplier.js
+++ b/erpnext/buying/doctype/supplier/supplier.js
@@ -1,24 +1,44 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-cur_frm.cscript.refresh = function(doc, dt, dn) {
- cur_frm.cscript.make_dashboard(doc);
+frappe.ui.form.on("Supplier", {
+ refresh: function(frm) {
+ frm.cscript.make_dashboard(frm.doc);
- if(frappe.defaults.get_default("supp_master_name")!="Naming Series") {
- cur_frm.toggle_display("naming_series", false);
- } else {
- erpnext.toggle_naming_series();
- }
+ if(frappe.defaults.get_default("supp_master_name")!="Naming Series") {
+ frm.toggle_display("naming_series", false);
+ } else {
+ erpnext.toggle_naming_series();
+ }
- if(doc.__islocal){
- hide_field(['address_html','contact_html']);
- erpnext.utils.clear_address_and_contact(cur_frm);
- }
- else{
- unhide_field(['address_html','contact_html']);
- erpnext.utils.render_address_and_contact(cur_frm)
- }
-}
+ if(frm.doc.__islocal){
+ hide_field(['address_html','contact_html']);
+ erpnext.utils.clear_address_and_contact(frm);
+ }
+ else {
+ unhide_field(['address_html','contact_html']);
+ erpnext.utils.render_address_and_contact(frm);
+ }
+
+ frm.events.add_custom_buttons(frm);
+ },
+ add_custom_buttons: function(frm) {
+ ["Supplier Quotation", "Purchase Order", "Purchase Receipt", "Purchase Invoice"].forEach(function(doctype, i) {
+ if(frappe.model.can_read(doctype)) {
+ frm.add_custom_button(__(doctype), function() {
+ frappe.route_options = {"supplier": frm.doc.name};
+ frappe.set_route("List", doctype);
+ }, __("View"));
+ }
+ if(frappe.model.can_create(doctype)) {
+ frm.add_custom_button(__(doctype), function() {
+ frappe.route_options = {"supplier": frm.doc.name};
+ new_doc(doctype);
+ }, __("Make"));
+ }
+ });
+ },
+});
cur_frm.cscript.make_dashboard = function(doc) {
cur_frm.dashboard.reset();
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
index 67c8795170..2e314e0ce8 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
@@ -9,11 +9,12 @@ erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.ext
this._super();
if (this.frm.doc.docstatus === 1) {
- cur_frm.add_custom_button(__("Make Purchase Order"), this.make_purchase_order,
- frappe.boot.doctype_icons["Journal Entry"]);
+ cur_frm.add_custom_button(__("Purchase Order"), this.make_purchase_order,
+ __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
else if (this.frm.doc.docstatus===0) {
- cur_frm.add_custom_button(__('From Material Request'),
+ cur_frm.add_custom_button(__('Material Request'),
function() {
frappe.model.map_current_doc({
method: "erpnext.stock.doctype.material_request.material_request.make_supplier_quotation",
@@ -26,7 +27,7 @@ erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.ext
company: cur_frm.doc.company
}
})
- }, "icon-download", "btn-default");
+ }, __("Get items from"));
}
},
diff --git a/erpnext/change_log/v6/v6.16.3.md b/erpnext/change_log/v6/v6_16_3.md
similarity index 100%
rename from erpnext/change_log/v6/v6.16.3.md
rename to erpnext/change_log/v6/v6_16_3.md
diff --git a/erpnext/change_log/v6/v6_18_0.md b/erpnext/change_log/v6/v6_18_0.md
new file mode 100644
index 0000000000..d4aa424061
--- /dev/null
+++ b/erpnext/change_log/v6/v6_18_0.md
@@ -0,0 +1,4 @@
+- Added Additional Cost field in Time Log and cleaned up layout
+- Grouped contextual buttons in sales & purchase cycle
+- Rounded Total and Change in POS based on smallest circulating currency fraction value
+- Now items can be returned in any warehouse
\ No newline at end of file
diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py
index 8a27394509..859764d301 100644
--- a/erpnext/config/accounts.py
+++ b/erpnext/config/accounts.py
@@ -32,6 +32,11 @@ def get_data():
"name": "Supplier",
"description": _("Supplier database.")
},
+ {
+ "type": "doctype",
+ "name": "Payment Request",
+ "description": _("Payment Request")
+ },
{
"type": "page",
"name": "Accounts Browser",
@@ -83,6 +88,11 @@ def get_data():
"name": "Fiscal Year",
"description": _("Financial / accounting year.")
},
+ {
+ "type": "doctype",
+ "name": "Payment Gateway Account",
+ "description": _("Setup Gateway accounts.")
+ },
{
"type": "page",
"name": "Accounts Browser",
diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py
index a8ce6a7a68..863ad6dd0d 100644
--- a/erpnext/config/desktop.py
+++ b/erpnext/config/desktop.py
@@ -2,32 +2,50 @@ from __future__ import unicode_literals
from frappe import _
def get_data():
- return {
- "Accounts": {
+ return [
+ {
+ "module_name": "Accounts",
"color": "#3498db",
"icon": "octicon octicon-repo",
"type": "module"
},
- "Buying": {
+ {
+ "module_name": "CRM",
+ "color": "#EF4DB6",
+ "icon": "octicon octicon-broadcast",
+ "type": "module"
+ },
+ {
+ "module_name": "Selling",
+ "color": "#1abc9c",
+ "icon": "icon-tag",
+ "icon": "octicon octicon-tag",
+ "type": "module"
+ },
+ {
+ "module_name": "Buying",
"color": "#c0392b",
"icon": "icon-shopping-cart",
"icon": "octicon octicon-briefcase",
"type": "module"
},
- "HR": {
+ {
+ "module_name": "HR",
"color": "#2ecc71",
"icon": "icon-group",
"icon": "octicon octicon-organization",
"label": _("Human Resources"),
"type": "module"
},
- "Manufacturing": {
+ {
+ "module_name": "Manufacturing",
"color": "#7f8c8d",
"icon": "icon-cogs",
"icon": "octicon octicon-tools",
"type": "module"
},
- "POS": {
+ {
+ "module_name": "POS",
"color": "#589494",
"icon": "icon-th",
"icon": "octicon octicon-credit-card",
@@ -35,41 +53,33 @@ def get_data():
"link": "pos",
"label": _("POS")
},
- "Projects": {
+ {
+ "module_name": "Projects",
"color": "#8e44ad",
"icon": "icon-puzzle-piece",
"icon": "octicon octicon-rocket",
"type": "module"
},
- "Selling": {
- "color": "#1abc9c",
- "icon": "icon-tag",
- "icon": "octicon octicon-tag",
- "type": "module"
- },
- "CRM": {
- "color": "#EF4DB6",
- "icon": "octicon octicon-broadcast",
- "type": "module"
- },
- "Stock": {
+ {
+ "module_name": "Stock",
"color": "#f39c12",
"icon": "icon-truck",
"icon": "octicon octicon-package",
"type": "module"
},
- "Support": {
+ {
+ "module_name": "Support",
"color": "#2c3e50",
"icon": "icon-phone",
"icon": "octicon octicon-issue-opened",
"type": "module"
},
- "Learn": {
+ {
+ "module_name": "Learn",
"color": "#FF888B",
- "force_show": True,
"icon": "octicon octicon-device-camera-video",
"type": "module",
"is_help": True,
"label": _("Learn")
}
- }
+ ]
diff --git a/erpnext/config/learn.py b/erpnext/config/learn.py
index dcb682db18..426449ba69 100644
--- a/erpnext/config/learn.py
+++ b/erpnext/config/learn.py
@@ -135,7 +135,7 @@ def get_data():
{
"type": "help",
"label": _("Product Bundle"),
- "youtube_id": "yk-7kPrRyRRc"
+ "youtube_id": "yk3kPrRyRRc"
},
{
"type": "help",
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 861ec8e942..5c84112df4 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -133,13 +133,13 @@ class AccountsController(TransactionBase):
def set_missing_item_details(self):
"""set missing item values"""
from erpnext.stock.get_item_details import get_item_details
-
+
if self.doctype == "Purchase Invoice":
auto_accounting_for_stock = cint(frappe.defaults.get_global_default("auto_accounting_for_stock"))
if auto_accounting_for_stock:
stock_not_billed_account = self.get_company_default("stock_received_but_not_billed")
-
+
stock_items = self.get_stock_items()
if hasattr(self, "items"):
@@ -151,6 +151,10 @@ class AccountsController(TransactionBase):
if item.get("item_code"):
args = parent_dict.copy()
args.update(item.as_dict())
+
+ args["doctype"] = self.doctype
+ args["name"] = self.name
+
if not args.get("transaction_date"):
args["transaction_date"] = args.get("posting_date")
@@ -178,13 +182,13 @@ class AccountsController(TransactionBase):
if item.price_list_rate:
item.rate = flt(item.price_list_rate *
(1.0 - (flt(item.discount_percentage) / 100.0)), item.precision("rate"))
-
+
if self.doctype == "Purchase Invoice":
if auto_accounting_for_stock and item.item_code in stock_items \
and self.is_opening == 'No' \
- and (not item.po_detail or not frappe.db.get_value("Purchase Order Item",
+ and (not item.po_detail or not frappe.db.get_value("Purchase Order Item",
item.po_detail, "delivered_by_supplier")):
-
+
item.expense_account = stock_not_billed_account
item.cost_center = None
diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py
index 350827790f..0ea0734676 100644
--- a/erpnext/controllers/item_variant.py
+++ b/erpnext/controllers/item_variant.py
@@ -32,15 +32,16 @@ def validate_item_variant_attributes(item, args):
attribute_values = {}
for t in frappe.get_all("Item Attribute Value", fields=["parent", "attribute_value"],
filters={"parent": ["in", args.keys()]}):
- (attribute_values.setdefault(t.parent, [])).append(t.attribute_value)
+
+ (attribute_values.setdefault(t.parent.lower(), [])).append(t.attribute_value)
- numeric_attributes = frappe._dict((t.attribute, t) for t in \
+ numeric_attributes = frappe._dict((t.attribute.lower(), t) for t in \
frappe.db.sql("""select attribute, from_range, to_range, increment from `tabItem Variant Attribute`
where parent = %s and numeric_values=1""", (item), as_dict=1))
-
+
for attribute, value in args.items():
- if attribute in numeric_attributes:
- numeric_attribute = numeric_attributes[attribute]
+ if attribute.lower() in numeric_attributes:
+ numeric_attribute = numeric_attributes[attribute.lower()]
from_range = numeric_attribute.from_range
to_range = numeric_attribute.to_range
@@ -60,8 +61,8 @@ def validate_item_variant_attributes(item, args):
if not (is_in_range and is_incremental):
frappe.throw(_("Value for Attribute {0} must be within the range of {1} to {2} in the increments of {3}")\
.format(attribute, from_range, to_range, increment), InvalidItemAttributeValueError)
-
- elif value not in attribute_values.get(attribute, []):
+
+ elif value not in attribute_values.get(attribute.lower(), []):
frappe.throw(_("Value {0} for Attribute {1} does not exist in the list of valid Item Attribute Values").format(
value, attribute))
diff --git a/erpnext/controllers/js/contact_address_common.js b/erpnext/controllers/js/contact_address_common.js
index df3323fed7..c51ff468c3 100644
--- a/erpnext/controllers/js/contact_address_common.js
+++ b/erpnext/controllers/js/contact_address_common.js
@@ -33,7 +33,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
cur_frm.set_value("address_title", cur_frm.doc.customer_name);
}
}
- if(["Supplier", "Supplier Quotation", "Purchase Order", "Purchase Invoice", "Purchase Receipt"]
+ else if(["Supplier", "Supplier Quotation", "Purchase Order", "Purchase Invoice", "Purchase Receipt"]
.indexOf(doctype)!==-1) {
var refdoc = frappe.get_doc(doctype, docname);
cur_frm.set_value("supplier", refdoc.supplier || refdoc.name);
@@ -41,7 +41,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(cur_frm.doc.doctype==="Address")
cur_frm.set_value("address_title", cur_frm.doc.supplier_name);
}
- if(["Lead", "Opportunity", "Quotation"]
+ else if(["Lead", "Opportunity", "Quotation"]
.indexOf(doctype)!==-1) {
var refdoc = frappe.get_doc(doctype, docname);
@@ -53,6 +53,9 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
cur_frm.set_value("address_title", cur_frm.doc.lead_name);
}
}
+ else if(doctype == "Sales Partner") {
+ cur_frm.set_value("sales_partner", docname);
+ }
}
}
}
diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py
index 3c262f12b5..ca431ce724 100644
--- a/erpnext/controllers/queries.py
+++ b/erpnext/controllers/queries.py
@@ -158,7 +158,7 @@ def tax_account_query(doctype, txt, searchfield, start, page_len, filters):
def item_query(doctype, txt, searchfield, start, page_len, filters):
conditions = []
- return frappe.db.sql("""select tabItem.name,
+ return frappe.db.sql("""select tabItem.name,tabItem.item_group,
if(length(tabItem.item_name) > 40,
concat(substr(tabItem.item_name, 1, 40), "..."), item_name) as item_name,
if(length(tabItem.description) > 40, \
diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py
index c6c7111851..868720a2e0 100644
--- a/erpnext/controllers/sales_and_purchase_return.py
+++ b/erpnext/controllers/sales_and_purchase_return.py
@@ -96,6 +96,9 @@ def validate_returned_items(doc):
if s not in ref_serial_nos:
frappe.throw(_("Row # {0}: Serial No {1} does not match with {2} {3}")
.format(d.idx, s, doc.doctype, doc.return_against))
+
+ if not d.warehouse:
+ frappe.throw(_("Warehouse is mandatory"))
items_returned = True
diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py
index 842faec049..4c6a320158 100644
--- a/erpnext/controllers/stock_controller.py
+++ b/erpnext/controllers/stock_controller.py
@@ -218,14 +218,14 @@ class StockController(AccountsController):
return serialized_items
- def get_incoming_rate_for_sales_return(self, item_code, warehouse, against_document):
+ def get_incoming_rate_for_sales_return(self, item_code, against_document):
incoming_rate = 0.0
if against_document and item_code:
incoming_rate = frappe.db.sql("""select abs(stock_value_difference / actual_qty)
from `tabStock Ledger Entry`
where voucher_type = %s and voucher_no = %s
- and item_code = %s and warehouse=%s limit 1""",
- (self.doctype, against_document, item_code, warehouse))
+ and item_code = %s limit 1""",
+ (self.doctype, against_document, item_code))
incoming_rate = incoming_rate[0][0] if incoming_rate else 0.0
return incoming_rate
@@ -257,8 +257,7 @@ class StockController(AccountsController):
if frappe.db.get_value("Item", d.item_code, "is_stock_item") == 1 and flt(d.qty):
return_rate = 0
if cint(self.is_return) and self.return_against and self.docstatus==1:
- return_rate = self.get_incoming_rate_for_sales_return(d.item_code,
- d.warehouse, self.return_against)
+ return_rate = self.get_incoming_rate_for_sales_return(d.item_code, self.return_against)
# On cancellation or if return entry submission, make stock ledger entry for
# target warehouse first, to update serial no values properly
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index b5b3e53412..f4fb8a9c4f 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -5,7 +5,7 @@ from __future__ import unicode_literals
import json
import frappe
from frappe import _, scrub
-from frappe.utils import cint, flt, rounded
+from frappe.utils import cint, flt, round_based_on_smallest_currency_fraction
from erpnext.setup.utils import get_company_currency
from erpnext.controllers.accounts_controller import validate_conversion_rate, \
validate_taxes_and_charges, validate_inclusive_tax
@@ -319,9 +319,14 @@ class calculate_taxes_and_totals(object):
self.doc.round_floats_in(self.doc, ["grand_total", "base_grand_total"])
if self.doc.meta.get_field("rounded_total"):
- self.doc.rounded_total = rounded(self.doc.grand_total)
+ self.doc.rounded_total = round_based_on_smallest_currency_fraction(self.doc.grand_total,
+ self.doc.currency, self.doc.precision("rounded_total"))
if self.doc.meta.get_field("base_rounded_total"):
- self.doc.base_rounded_total = rounded(self.doc.base_grand_total)
+ company_currency = get_company_currency(self.doc.company)
+
+ self.doc.base_rounded_total = \
+ round_based_on_smallest_currency_fraction(self.doc.base_grand_total,
+ company_currency, self.doc.precision("base_rounded_total"))
def _cleanup(self):
for tax in self.doc.get("taxes"):
@@ -408,8 +413,9 @@ class calculate_taxes_and_totals(object):
total_amount_to_pay = flt(self.doc.grand_total - self.doc.total_advance
- flt(self.doc.write_off_amount), self.doc.precision("grand_total"))
else:
- total_amount_to_pay = flt(self.doc.base_grand_total - self.doc.total_advance
- - flt(self.doc.base_write_off_amount), self.doc.precision("grand_total"))
+ total_amount_to_pay = flt(flt(self.doc.grand_total *
+ self.doc.conversion_rate, self.doc.precision("grand_total")) - self.doc.total_advance
+ - flt(self.doc.base_write_off_amount), self.doc.precision("grand_total"))
if self.doc.doctype == "Sales Invoice":
self.doc.round_floats_in(self.doc, ["paid_amount"])
diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js
index 1dc8eb2579..be3cd82e7f 100644
--- a/erpnext/crm/doctype/lead/lead.js
+++ b/erpnext/crm/doctype/lead/lead.js
@@ -27,12 +27,10 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({
erpnext.toggle_naming_series();
if(!this.frm.doc.__islocal && this.frm.doc.__onload && !this.frm.doc.__onload.is_customer) {
- this.frm.add_custom_button(__("Create Customer"), this.create_customer,
- frappe.boot.doctype_icons["Customer"], "btn-default");
- this.frm.add_custom_button(__("Create Opportunity"), this.create_opportunity,
- frappe.boot.doctype_icons["Opportunity"], "btn-default");
- this.frm.add_custom_button(__("Make Quotation"), this.make_quotation,
- frappe.boot.doctype_icons["Quotation"], "btn-default");
+ this.frm.add_custom_button(__("Customer"), this.create_customer, __("Make"));
+ this.frm.add_custom_button(__("Opportunity"), this.create_opportunity, __("Make"));
+ this.frm.add_custom_button(__("Quotation"), this.make_quotation, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
if(!this.frm.doc.__islocal) {
@@ -55,7 +53,7 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({
frm: cur_frm
})
},
-
+
make_quotation: function() {
frappe.model.open_mapped_doc({
method: "erpnext.crm.doctype.lead.lead.make_quotation",
diff --git a/erpnext/crm/doctype/newsletter_list/newsletter_list.js b/erpnext/crm/doctype/newsletter_list/newsletter_list.js
index ed0ac5e210..d6cda45a0a 100644
--- a/erpnext/crm/doctype/newsletter_list/newsletter_list.js
+++ b/erpnext/crm/doctype/newsletter_list/newsletter_list.js
@@ -3,7 +3,7 @@ frappe.ui.form.on("Newsletter List", "refresh", function(frm) {
frm.add_custom_button(__("View Subscribers"), function() {
frappe.route_options = {"newsletter_list": frm.doc.name};
frappe.set_route("Report", "Newsletter List Subscriber");
- });
+ }, __("View"));
frm.add_custom_button(__("Import Subscribers"), function() {
frappe.prompt({fieldtype:"Select", options: frm.doc.__onload.import_types,
@@ -19,7 +19,7 @@ frappe.ui.form.on("Newsletter List", "refresh", function(frm) {
}
})
}, __("Import Subscribers"), __("Import"));
- });
+ }, __("Action"));
frm.add_custom_button(__("Add Subscribers"), function() {
frappe.prompt({fieldtype:"Text",
@@ -35,12 +35,12 @@ frappe.ui.form.on("Newsletter List", "refresh", function(frm) {
}
})
}, __("Add Subscribers"), __("Add"));
- });
+ }, __("Action"));
frm.add_custom_button(__("New Newsletter"), function() {
frappe.route_options = {"newsletter_list": frm.doc.name};
new_doc("Newsletter");
- });
+ }, __("Action"));
}
});
diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js
index 43e2dd5872..af4e387b07 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.js
+++ b/erpnext/crm/doctype/opportunity/opportunity.js
@@ -78,30 +78,31 @@ $.extend(cur_frm.cscript, new erpnext.crm.Opportunity({frm: cur_frm}));
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
erpnext.toggle_naming_series();
- if(doc.status!=="Lost") {
- cur_frm.add_custom_button(__('Create Quotation'),
- cur_frm.cscript.create_quotation, frappe.boot.doctype_icons["Quotation"],
- "btn-default");
- if(doc.status!=="Quotation")
- cur_frm.add_custom_button(__('Opportunity Lost'),
- cur_frm.cscript['Declare Opportunity Lost'], "icon-remove", "btn-default");
- }
-
var frm = cur_frm;
if(frm.perm[0].write && doc.docstatus==0) {
if(frm.doc.status==="Open") {
frm.add_custom_button(__("Close"), function() {
frm.set_value("status", "Closed");
frm.save();
- });
+ }, __("Status"));
} else {
frm.add_custom_button(__("Reopen"), function() {
frm.set_value("status", "Open");
frm.save();
- });
+ }, __("Status"));
}
}
+ if(doc.status!=="Lost") {
+ if(doc.status!=="Quotation") {
+ cur_frm.add_custom_button(__('Lost'),
+ cur_frm.cscript['Declare Opportunity Lost'], __("Status"));
+ }
+
+ cur_frm.add_custom_button(__('Quotation'),cur_frm.cscript.create_quotation, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
+ }
+
}
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
diff --git a/erpnext/docs/assets/img/accounts/pr-details-1.png b/erpnext/docs/assets/img/accounts/pr-details-1.png
new file mode 100644
index 0000000000..12e40a6a89
Binary files /dev/null and b/erpnext/docs/assets/img/accounts/pr-details-1.png differ
diff --git a/erpnext/docs/assets/img/accounts/pr-details-2.png b/erpnext/docs/assets/img/accounts/pr-details-2.png
new file mode 100644
index 0000000000..43122e30c8
Binary files /dev/null and b/erpnext/docs/assets/img/accounts/pr-details-2.png differ
diff --git a/erpnext/docs/assets/img/accounts/pr-email.png b/erpnext/docs/assets/img/accounts/pr-email.png
new file mode 100644
index 0000000000..de1a86890f
Binary files /dev/null and b/erpnext/docs/assets/img/accounts/pr-email.png differ
diff --git a/erpnext/docs/assets/img/accounts/pr-from-si.png b/erpnext/docs/assets/img/accounts/pr-from-si.png
new file mode 100644
index 0000000000..c9e654ae0e
Binary files /dev/null and b/erpnext/docs/assets/img/accounts/pr-from-si.png differ
diff --git a/erpnext/docs/assets/img/accounts/pr-from-so.png b/erpnext/docs/assets/img/accounts/pr-from-so.png
new file mode 100644
index 0000000000..b41ea4fd75
Binary files /dev/null and b/erpnext/docs/assets/img/accounts/pr-from-so.png differ
diff --git a/erpnext/docs/assets/img/articles/$SGrab_383.png b/erpnext/docs/assets/img/articles/$SGrab_383.png
deleted file mode 100644
index 720ecdfafb..0000000000
Binary files a/erpnext/docs/assets/img/articles/$SGrab_383.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/$SGrab_389.png b/erpnext/docs/assets/img/articles/$SGrab_389.png
deleted file mode 100644
index ee1b8cbe52..0000000000
Binary files a/erpnext/docs/assets/img/articles/$SGrab_389.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/$SGrab_390.png b/erpnext/docs/assets/img/articles/$SGrab_390.png
deleted file mode 100644
index b936c07e2b..0000000000
Binary files a/erpnext/docs/assets/img/articles/$SGrab_390.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/$SGrab_391.png b/erpnext/docs/assets/img/articles/$SGrab_391.png
deleted file mode 100644
index 79595aea2a..0000000000
Binary files a/erpnext/docs/assets/img/articles/$SGrab_391.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/$SGrab_392.png b/erpnext/docs/assets/img/articles/$SGrab_392.png
deleted file mode 100644
index 677e7c9743..0000000000
Binary files a/erpnext/docs/assets/img/articles/$SGrab_392.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-16 at 2.52.56 pm.png b/erpnext/docs/assets/img/articles/Screen Shot 2015-02-16 at 2.52.56 pm.png
deleted file mode 100644
index e20b65fcbd..0000000000
Binary files a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-16 at 2.52.56 pm.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.10.35 pm.png b/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.10.35 pm.png
deleted file mode 100644
index bdbf34c420..0000000000
Binary files a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.10.35 pm.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.11.58 pm.png b/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.11.58 pm.png
deleted file mode 100644
index 151a0ca88d..0000000000
Binary files a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.11.58 pm.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.13.16 pm.png b/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.13.16 pm.png
deleted file mode 100644
index c491c0a660..0000000000
Binary files a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.13.16 pm.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.14.46 pm.png b/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.14.46 pm.png
deleted file mode 100644
index 63701a3cb2..0000000000
Binary files a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.14.46 pm.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.15.27 pm.png b/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.15.27 pm.png
deleted file mode 100644
index d016ec053f..0000000000
Binary files a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 4.15.27 pm.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 5.13.50 pm.png b/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 5.13.50 pm.png
deleted file mode 100644
index f446efc179..0000000000
Binary files a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 5.13.50 pm.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 5.20.52 pm.png b/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 5.20.52 pm.png
deleted file mode 100644
index 404a1cd7d5..0000000000
Binary files a/erpnext/docs/assets/img/articles/Screen Shot 2015-02-19 at 5.20.52 pm.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Selection_049.png b/erpnext/docs/assets/img/articles/Selection_049.png
deleted file mode 100644
index 2cf490e3e6..0000000000
Binary files a/erpnext/docs/assets/img/articles/Selection_049.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Selection_054.png b/erpnext/docs/assets/img/articles/Selection_054.png
deleted file mode 100644
index a17b1eae39..0000000000
Binary files a/erpnext/docs/assets/img/articles/Selection_054.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Selection_061.png b/erpnext/docs/assets/img/articles/Selection_061.png
deleted file mode 100644
index 176d8c5eae..0000000000
Binary files a/erpnext/docs/assets/img/articles/Selection_061.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Selection_062.png b/erpnext/docs/assets/img/articles/Selection_062.png
deleted file mode 100644
index a230c9392a..0000000000
Binary files a/erpnext/docs/assets/img/articles/Selection_062.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Selection_071.png b/erpnext/docs/assets/img/articles/Selection_071.png
deleted file mode 100644
index 86b7cff34f..0000000000
Binary files a/erpnext/docs/assets/img/articles/Selection_071.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Selection_072.png b/erpnext/docs/assets/img/articles/Selection_072.png
deleted file mode 100644
index e8dd519290..0000000000
Binary files a/erpnext/docs/assets/img/articles/Selection_072.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Selection_440.png b/erpnext/docs/assets/img/articles/Selection_440.png
deleted file mode 100644
index 63fb04cf09..0000000000
Binary files a/erpnext/docs/assets/img/articles/Selection_440.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Selection_442.png b/erpnext/docs/assets/img/articles/Selection_442.png
deleted file mode 100644
index 55d0735e44..0000000000
Binary files a/erpnext/docs/assets/img/articles/Selection_442.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Selection_443.png b/erpnext/docs/assets/img/articles/Selection_443.png
deleted file mode 100644
index 6d045f2331..0000000000
Binary files a/erpnext/docs/assets/img/articles/Selection_443.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Selection_445.png b/erpnext/docs/assets/img/articles/Selection_445.png
deleted file mode 100644
index bab81858a6..0000000000
Binary files a/erpnext/docs/assets/img/articles/Selection_445.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Selection_446.png b/erpnext/docs/assets/img/articles/Selection_446.png
deleted file mode 100644
index ecd0edd5e9..0000000000
Binary files a/erpnext/docs/assets/img/articles/Selection_446.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Selection_447.png b/erpnext/docs/assets/img/articles/Selection_447.png
deleted file mode 100644
index 683c289d34..0000000000
Binary files a/erpnext/docs/assets/img/articles/Selection_447.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Supplier Item Code in Purchase Order.png b/erpnext/docs/assets/img/articles/Supplier Item Code in Purchase Order.png
deleted file mode 100644
index 2fc511c01f..0000000000
Binary files a/erpnext/docs/assets/img/articles/Supplier Item Code in Purchase Order.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/Supplier Item Code.png b/erpnext/docs/assets/img/articles/Supplier Item Code.png
deleted file mode 100644
index cea3f1445d..0000000000
Binary files a/erpnext/docs/assets/img/articles/Supplier Item Code.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/allowance-percentage-1.png b/erpnext/docs/assets/img/articles/allowance-percentage-1.png
new file mode 100644
index 0000000000..4fbed90f71
Binary files /dev/null and b/erpnext/docs/assets/img/articles/allowance-percentage-1.png differ
diff --git a/erpnext/docs/assets/img/articles/allowance-percentage-2.png b/erpnext/docs/assets/img/articles/allowance-percentage-2.png
new file mode 100644
index 0000000000..a7b968834c
Binary files /dev/null and b/erpnext/docs/assets/img/articles/allowance-percentage-2.png differ
diff --git a/erpnext/docs/assets/img/articles/allowance_percentage.png b/erpnext/docs/assets/img/articles/allowance_percentage.png
deleted file mode 100644
index 519a837623..0000000000
Binary files a/erpnext/docs/assets/img/articles/allowance_percentage.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/allowance_percentage_item.png b/erpnext/docs/assets/img/articles/allowance_percentage_item.png
deleted file mode 100644
index 3d30fdc6a4..0000000000
Binary files a/erpnext/docs/assets/img/articles/allowance_percentage_item.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/barcode-feature-setup.png b/erpnext/docs/assets/img/articles/barcode-feature-setup.png
new file mode 100644
index 0000000000..0a097ef174
Binary files /dev/null and b/erpnext/docs/assets/img/articles/barcode-feature-setup.png differ
diff --git a/erpnext/docs/assets/img/articles/barcode-item-master.png b/erpnext/docs/assets/img/articles/barcode-item-master.png
new file mode 100644
index 0000000000..57b5fccc33
Binary files /dev/null and b/erpnext/docs/assets/img/articles/barcode-item-master.png differ
diff --git a/erpnext/docs/assets/img/articles/barcode-item-selection.gif b/erpnext/docs/assets/img/articles/barcode-item-selection.gif
new file mode 100644
index 0000000000..55f3465c1e
Binary files /dev/null and b/erpnext/docs/assets/img/articles/barcode-item-selection.gif differ
diff --git a/erpnext/docs/assets/img/articles/batchwise-stock-1.png b/erpnext/docs/assets/img/articles/batchwise-stock-1.png
new file mode 100644
index 0000000000..4477425882
Binary files /dev/null and b/erpnext/docs/assets/img/articles/batchwise-stock-1.png differ
diff --git a/erpnext/docs/assets/img/articles/batchwise-stock-2.png b/erpnext/docs/assets/img/articles/batchwise-stock-2.png
new file mode 100644
index 0000000000..5d9b9b461d
Binary files /dev/null and b/erpnext/docs/assets/img/articles/batchwise-stock-2.png differ
diff --git a/erpnext/docs/assets/img/articles/batchwise-stock-3.png b/erpnext/docs/assets/img/articles/batchwise-stock-3.png
new file mode 100644
index 0000000000..2fa7712322
Binary files /dev/null and b/erpnext/docs/assets/img/articles/batchwise-stock-3.png differ
diff --git a/erpnext/docs/assets/img/articles/batchwise-stock-4.png b/erpnext/docs/assets/img/articles/batchwise-stock-4.png
new file mode 100644
index 0000000000..e6a22f3de2
Binary files /dev/null and b/erpnext/docs/assets/img/articles/batchwise-stock-4.png differ
diff --git a/erpnext/docs/assets/img/articles/delivery-note-barcode.png b/erpnext/docs/assets/img/articles/delivery-note-barcode.png
deleted file mode 100644
index 25814c6407..0000000000
Binary files a/erpnext/docs/assets/img/articles/delivery-note-barcode.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/difference-account-1.png b/erpnext/docs/assets/img/articles/difference-account-1.png
new file mode 100644
index 0000000000..d812b70155
Binary files /dev/null and b/erpnext/docs/assets/img/articles/difference-account-1.png differ
diff --git a/erpnext/docs/assets/img/articles/editing-uom-in-po.gif b/erpnext/docs/assets/img/articles/editing-uom-in-po.gif
new file mode 100644
index 0000000000..d59ff58f23
Binary files /dev/null and b/erpnext/docs/assets/img/articles/editing-uom-in-po.gif differ
diff --git a/erpnext/docs/assets/img/articles/feature-setup-barcode.png b/erpnext/docs/assets/img/articles/feature-setup-barcode.png
deleted file mode 100644
index 667e3a1d77..0000000000
Binary files a/erpnext/docs/assets/img/articles/feature-setup-barcode.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-1.gif b/erpnext/docs/assets/img/articles/fixed-asset-dep-1.gif
new file mode 100644
index 0000000000..e6330adb87
Binary files /dev/null and b/erpnext/docs/assets/img/articles/fixed-asset-dep-1.gif differ
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-2.png b/erpnext/docs/assets/img/articles/fixed-asset-dep-2.png
new file mode 100644
index 0000000000..0679403e14
Binary files /dev/null and b/erpnext/docs/assets/img/articles/fixed-asset-dep-2.png differ
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping b/erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/erpnext/docs/assets/img/articles/for-supplier-1.gif b/erpnext/docs/assets/img/articles/for-supplier-1.gif
new file mode 100644
index 0000000000..821bc28d55
Binary files /dev/null and b/erpnext/docs/assets/img/articles/for-supplier-1.gif differ
diff --git a/erpnext/docs/assets/img/articles/for-supplier-2.png b/erpnext/docs/assets/img/articles/for-supplier-2.png
new file mode 100644
index 0000000000..20ebde726a
Binary files /dev/null and b/erpnext/docs/assets/img/articles/for-supplier-2.png differ
diff --git a/erpnext/docs/assets/img/articles/for-supplier-3.png b/erpnext/docs/assets/img/articles/for-supplier-3.png
new file mode 100644
index 0000000000..4d00d5e112
Binary files /dev/null and b/erpnext/docs/assets/img/articles/for-supplier-3.png differ
diff --git a/erpnext/docs/assets/img/articles/item-barcode.png b/erpnext/docs/assets/img/articles/item-barcode.png
deleted file mode 100644
index 6fd0f72596..0000000000
Binary files a/erpnext/docs/assets/img/articles/item-barcode.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/item-purchase-uom-conversion.png b/erpnext/docs/assets/img/articles/item-purchase-uom-conversion.png
new file mode 100644
index 0000000000..e076e2e394
Binary files /dev/null and b/erpnext/docs/assets/img/articles/item-purchase-uom-conversion.png differ
diff --git a/erpnext/docs/assets/img/articles/kb_po_forsupp.png b/erpnext/docs/assets/img/articles/kb_po_forsupp.png
deleted file mode 100644
index 4c336af10d..0000000000
Binary files a/erpnext/docs/assets/img/articles/kb_po_forsupp.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/kb_po_itemtable.png b/erpnext/docs/assets/img/articles/kb_po_itemtable.png
deleted file mode 100644
index ec7b406e59..0000000000
Binary files a/erpnext/docs/assets/img/articles/kb_po_itemtable.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/kb_po_popup.png b/erpnext/docs/assets/img/articles/kb_po_popup.png
deleted file mode 100644
index f642fdd2e2..0000000000
Binary files a/erpnext/docs/assets/img/articles/kb_po_popup.png and /dev/null differ
diff --git a/erpnext/docs/assets/img/articles/maintain-stock-1.png b/erpnext/docs/assets/img/articles/maintain-stock-1.png
new file mode 100644
index 0000000000..c38b88fb8c
Binary files /dev/null and b/erpnext/docs/assets/img/articles/maintain-stock-1.png differ
diff --git a/erpnext/docs/assets/img/articles/managing-assets-1.png b/erpnext/docs/assets/img/articles/managing-assets-1.png
new file mode 100644
index 0000000000..772037ec09
Binary files /dev/null and b/erpnext/docs/assets/img/articles/managing-assets-1.png differ
diff --git a/erpnext/docs/assets/img/articles/po-conversion-factor.png b/erpnext/docs/assets/img/articles/po-conversion-factor.png
new file mode 100644
index 0000000000..00ef8cd3ff
Binary files /dev/null and b/erpnext/docs/assets/img/articles/po-conversion-factor.png differ
diff --git a/erpnext/docs/assets/img/articles/po-qty-in-stock-uom.png b/erpnext/docs/assets/img/articles/po-qty-in-stock-uom.png
new file mode 100644
index 0000000000..48381f6dad
Binary files /dev/null and b/erpnext/docs/assets/img/articles/po-qty-in-stock-uom.png differ
diff --git a/erpnext/docs/assets/img/articles/po-stock-uom-ledger.png b/erpnext/docs/assets/img/articles/po-stock-uom-ledger.png
new file mode 100644
index 0000000000..14bbc64db4
Binary files /dev/null and b/erpnext/docs/assets/img/articles/po-stock-uom-ledger.png differ
diff --git a/erpnext/docs/assets/img/articles/reorder-request-1.png b/erpnext/docs/assets/img/articles/reorder-request-1.png
new file mode 100644
index 0000000000..ca9b2b095c
Binary files /dev/null and b/erpnext/docs/assets/img/articles/reorder-request-1.png differ
diff --git a/erpnext/docs/assets/img/articles/reorder-request-2.png b/erpnext/docs/assets/img/articles/reorder-request-2.png
new file mode 100644
index 0000000000..7ed3b03c7e
Binary files /dev/null and b/erpnext/docs/assets/img/articles/reorder-request-2.png differ
diff --git a/erpnext/docs/assets/img/articles/reorder-request-3.png b/erpnext/docs/assets/img/articles/reorder-request-3.png
new file mode 100644
index 0000000000..a4e4f07cf8
Binary files /dev/null and b/erpnext/docs/assets/img/articles/reorder-request-3.png differ
diff --git a/erpnext/docs/assets/img/articles/repack-1.png b/erpnext/docs/assets/img/articles/repack-1.png
new file mode 100644
index 0000000000..d08429979d
Binary files /dev/null and b/erpnext/docs/assets/img/articles/repack-1.png differ
diff --git a/erpnext/docs/assets/img/articles/repack-2.png b/erpnext/docs/assets/img/articles/repack-2.png
new file mode 100644
index 0000000000..5b0f4dfa1e
Binary files /dev/null and b/erpnext/docs/assets/img/articles/repack-2.png differ
diff --git a/erpnext/docs/assets/img/articles/serial-naming-1.png b/erpnext/docs/assets/img/articles/serial-naming-1.png
new file mode 100644
index 0000000000..964363a79f
Binary files /dev/null and b/erpnext/docs/assets/img/articles/serial-naming-1.png differ
diff --git a/erpnext/docs/assets/img/articles/serial-naming-2.png b/erpnext/docs/assets/img/articles/serial-naming-2.png
new file mode 100644
index 0000000000..12336df728
Binary files /dev/null and b/erpnext/docs/assets/img/articles/serial-naming-2.png differ
diff --git a/erpnext/docs/assets/img/articles/serial-naming-3.png b/erpnext/docs/assets/img/articles/serial-naming-3.png
new file mode 100644
index 0000000000..17ecdcf757
Binary files /dev/null and b/erpnext/docs/assets/img/articles/serial-naming-3.png differ
diff --git a/erpnext/docs/assets/img/articles/serial-naming-4.png b/erpnext/docs/assets/img/articles/serial-naming-4.png
new file mode 100644
index 0000000000..6b3d52c2b6
Binary files /dev/null and b/erpnext/docs/assets/img/articles/serial-naming-4.png differ
diff --git a/erpnext/docs/assets/img/articles/stock-entry-issue.png b/erpnext/docs/assets/img/articles/stock-entry-issue.png
new file mode 100644
index 0000000000..eb47037266
Binary files /dev/null and b/erpnext/docs/assets/img/articles/stock-entry-issue.png differ
diff --git a/erpnext/docs/assets/img/articles/stock-entry-manufacture-transfer.gif b/erpnext/docs/assets/img/articles/stock-entry-manufacture-transfer.gif
new file mode 100644
index 0000000000..20379ff035
Binary files /dev/null and b/erpnext/docs/assets/img/articles/stock-entry-manufacture-transfer.gif differ
diff --git a/erpnext/docs/assets/img/articles/stock-entry-manufacture.gif b/erpnext/docs/assets/img/articles/stock-entry-manufacture.gif
new file mode 100644
index 0000000000..a36c18d2f8
Binary files /dev/null and b/erpnext/docs/assets/img/articles/stock-entry-manufacture.gif differ
diff --git a/erpnext/docs/assets/img/articles/stock-entry-receipt.png b/erpnext/docs/assets/img/articles/stock-entry-receipt.png
new file mode 100644
index 0000000000..44f62aa5a5
Binary files /dev/null and b/erpnext/docs/assets/img/articles/stock-entry-receipt.png differ
diff --git a/erpnext/docs/assets/img/articles/stock-entry-subcontract.gif b/erpnext/docs/assets/img/articles/stock-entry-subcontract.gif
new file mode 100644
index 0000000000..f952654e14
Binary files /dev/null and b/erpnext/docs/assets/img/articles/stock-entry-subcontract.gif differ
diff --git a/erpnext/docs/assets/img/articles/stock-entry-transfer.png b/erpnext/docs/assets/img/articles/stock-entry-transfer.png
new file mode 100644
index 0000000000..04bd881a26
Binary files /dev/null and b/erpnext/docs/assets/img/articles/stock-entry-transfer.png differ
diff --git a/erpnext/docs/assets/img/articles/supplier-item-code-in-purchase-order.png b/erpnext/docs/assets/img/articles/supplier-item-code-in-purchase-order.png
new file mode 100644
index 0000000000..ad00657859
Binary files /dev/null and b/erpnext/docs/assets/img/articles/supplier-item-code-in-purchase-order.png differ
diff --git a/erpnext/docs/assets/img/articles/supplier-item-code.png b/erpnext/docs/assets/img/articles/supplier-item-code.png
new file mode 100644
index 0000000000..1ad1b164fc
Binary files /dev/null and b/erpnext/docs/assets/img/articles/supplier-item-code.png differ
diff --git a/erpnext/docs/assets/img/articles/uom-fraction-1.png b/erpnext/docs/assets/img/articles/uom-fraction-1.png
new file mode 100644
index 0000000000..081627b899
Binary files /dev/null and b/erpnext/docs/assets/img/articles/uom-fraction-1.png differ
diff --git a/erpnext/docs/assets/img/articles/uom-fraction-2.png b/erpnext/docs/assets/img/articles/uom-fraction-2.png
new file mode 100644
index 0000000000..831106b402
Binary files /dev/null and b/erpnext/docs/assets/img/articles/uom-fraction-2.png differ
diff --git a/erpnext/docs/assets/img/videos/conf-2015.jpg b/erpnext/docs/assets/img/videos/conf-2015.jpg
new file mode 100644
index 0000000000..c8f0591b99
Binary files /dev/null and b/erpnext/docs/assets/img/videos/conf-2015.jpg differ
diff --git a/erpnext/docs/current/api/controllers/erpnext.controllers.status_updater.html b/erpnext/docs/current/api/controllers/erpnext.controllers.status_updater.html
index eb34f9bfb7..fddc5d7cbb 100644
--- a/erpnext/docs/current/api/controllers/erpnext.controllers.status_updater.html
+++ b/erpnext/docs/current/api/controllers/erpnext.controllers.status_updater.html
@@ -33,7 +33,7 @@ Installation Note: Update Installed Qty, Update Percent Qty and Validate over in
_update_children
- (self, args)
+ (self, args, update_modified)
Update quantities or amount in child table
@@ -43,11 +43,39 @@ Installation Note: Update Installed Qty, Update Percent Qty and Validate over in
+
+
+
+ _update_modified
+ (self, args, update_modified)
+
+
+
+
+
+
+
+
_update_percent_field
- (self, args)
+ (self, args, update_modified=True)
+
+ Update percent field in parent transaction
+
+
+
+
+
+
+
+
+
+
+ _update_percent_field_in_targets
+ (self, args, update_modified=True)
Update percent field in parent transaction
@@ -131,14 +159,14 @@ Installation Note: Update Installed Qty, Update Percent Qty and Validate over in
update_qty
- (self, change_modified=True)
+ (self, update_modified=True)
Updates qty or amount at row level
Parameters:
-change_modified
- If true, updates modified
and modified_by
for target parent doc
+update_modified
- If true, updates modified
and modified_by
for target parent doc
diff --git a/erpnext/docs/current/api/controllers/erpnext.controllers.stock_controller.html b/erpnext/docs/current/api/controllers/erpnext.controllers.stock_controller.html
index fd3dc8cec3..9ab68002fc 100644
--- a/erpnext/docs/current/api/controllers/erpnext.controllers.stock_controller.html
+++ b/erpnext/docs/current/api/controllers/erpnext.controllers.stock_controller.html
@@ -58,7 +58,7 @@
get_incoming_rate_for_sales_return
- (self, item_code, warehouse, against_document)
+ (self, item_code, against_document)
@@ -194,6 +194,20 @@
+
+
+
+ update_billing_percentage
+ (self, update_modified=True)
+
+
+
+
+
+
+
+
diff --git a/erpnext/docs/current/api/stock/erpnext.stock.get_item_details.html b/erpnext/docs/current/api/stock/erpnext.stock.get_item_details.html
index 8724808640..bce01a4ee5 100644
--- a/erpnext/docs/current/api/stock/erpnext.stock.get_item_details.html
+++ b/erpnext/docs/current/api/stock/erpnext.stock.get_item_details.html
@@ -23,23 +23,34 @@
erpnext.stock.get_item_details.apply_price_list
- (args)
+ (args, as_doc=False)
- args = {
- "itemlist": [{"doctype": "", "name": "", "item code": "", "brand": "", "itemgroup": ""}, ...],
- "conversion rate": 1.0,
- "sellingprice list": None,
- "pricelist currency": None,
- "plcconversion rate": 1.0,
- "parenttype": "",
- "parent": "",
+
Apply pricelist on a document-like dict object and return as
+{'parent': dict, 'children': list}
+
+
Parameters:
+
+
+args
- See below
+as_doc
- Updates value in the passed dict
+
+args = {
+ "doctype": "",
+ "name": "",
+ "items": [{"doctype": "", "name": "", "itemcode": "", "brand": "", "item group": ""}, ...],
+ "conversionrate": 1.0,
+ "selling pricelist": None,
+ "price listcurrency": None,
+ "plc conversionrate": 1.0,
+ "doctype": "",
+ "name": "",
"supplier": None,
- "transactiondate": None,
- "conversion rate": 1.0,
- "buyingprice list": None,
- "transactiontype": "selling",
+ "transaction date": None,
+ "conversionrate": 1.0,
+ "buying pricelist": None,
"ignore pricing_rule": 0/1
-}
+}
+
@@ -251,16 +262,15 @@
"selling
price list": None,
"price
list currency": None,
"plc
conversion rate": 1.0,
- "parenttype": "",
- "parent": "",
+ "doctype": "",
+ "name": "",
"supplier": None,
"transaction
date": None,
"conversion rate": 1.0,
"buying
price list": None,
"is
subcontracted": "Yes" / "No",
- "transaction type": "selling",
- "ignore
pricing rule": 0/1
- "project_name": ""
+ "ignorepricing
rule": 0/1
+ "project name": ""
}
@@ -373,7 +383,7 @@
erpnext.stock.get_item_details.get_price_list_rate_for
- (args, item_code)
+ (price_list, item_code)
diff --git a/erpnext/docs/current/index.html b/erpnext/docs/current/index.html
index 5762d0a52e..01071ee1e0 100644
--- a/erpnext/docs/current/index.html
+++ b/erpnext/docs/current/index.html
@@ -35,7 +35,7 @@
Version
- 6.16.2
+ 6.17.0
@@ -52,4 +52,4 @@
-
+
\ No newline at end of file
diff --git a/erpnext/docs/current/models/accounts/account.html b/erpnext/docs/current/models/accounts/account.html
index bbc0203e32..37c774eb4c 100644
--- a/erpnext/docs/current/models/accounts/account.html
+++ b/erpnext/docs/current/models/accounts/account.html
@@ -581,6 +581,20 @@ Credit
+
+
+
+ validate_group_or_ledger
+ (self)
+
+
+
+
+
+
+
+
@@ -847,6 +861,15 @@ Credit
+
+
+
+Payment Gateway Account
+
+
+
+
+
@@ -946,10 +969,6 @@ Credit
-
-
-
-
diff --git a/erpnext/docs/current/models/accounts/journal_entry.html b/erpnext/docs/current/models/accounts/journal_entry.html
index 4aab93c269..fb29c5cb0f 100644
--- a/erpnext/docs/current/models/accounts/journal_entry.html
+++ b/erpnext/docs/current/models/accounts/journal_entry.html
@@ -1215,7 +1215,7 @@ Yes
erpnext.accounts.doctype.journal_entry.journal_entry.get_default_bank_cash_account
- (company, voucher_type, mode_of_payment=None)
+ (company, voucher_type, mode_of_payment=None, account=None)
@@ -1321,7 +1321,7 @@ Yes
erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_against_invoice
- (dt, dn)
+ (dt, dn, amount=None, journal_entry=False, bank_account=None)
@@ -1339,7 +1339,7 @@ Yes
erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_against_order
- (dt, dn)
+ (dt, dn, amount=None, journal_entry=False, bank_account=None)
diff --git a/erpnext/docs/current/models/accounts/payment_gateway.html b/erpnext/docs/current/models/accounts/payment_gateway.html
new file mode 100644
index 0000000000..9707ba6c79
--- /dev/null
+++ b/erpnext/docs/current/models/accounts/payment_gateway.html
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Table Name: tabPayment Gateway
+
+
+
+
+Fields
+
+
+
+
+ Sr
+ Fieldname
+ Type
+ Label
+ Options
+
+
+
+
+
+ 1
+ gateway
+
+ Data
+
+ Gateway
+
+
+
+
+
+
+
+
+
+
+ Controller
+ erpnext.accounts.doctype.payment_gateway.payment_gateway
+
+
+
+
+
+
+
+ Class PaymentGateway
+
+ Inherits from frappe.model.document.Document
+
+
+
+
+
+
+
+
+
+
+
+
+ Linked In:
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/erpnext/docs/current/models/accounts/payment_gateway_account.html b/erpnext/docs/current/models/accounts/payment_gateway_account.html
new file mode 100644
index 0000000000..d48bdcdfe7
--- /dev/null
+++ b/erpnext/docs/current/models/accounts/payment_gateway_account.html
@@ -0,0 +1,273 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Table Name: tabPayment Gateway Account
+
+
+
+
+Fields
+
+
+
+
+ Sr
+ Fieldname
+ Type
+ Label
+ Options
+
+
+
+
+
+ 1
+ gateway
+
+ Link
+
+ Payment Gateway
+
+
+
+
+
+
+
+Payment Gateway
+
+
+
+
+
+
+
+ 2
+ is_default
+
+ Check
+
+ Is Default
+
+
+
+
+
+
+ 3
+ column_break_4
+
+ Column Break
+
+
+
+
+
+
+
+
+ 4
+ payment_account
+
+ Link
+
+ Payment Account
+
+
+
+
+
+
+
+Account
+
+
+
+
+
+
+
+ 5
+ currency
+
+ Read Only
+
+ Currency
+
+
+
+ payment_account.account_currency
+
+
+
+
+ 6
+ payment_request_message
+
+ Section Break
+
+
+
+
+
+
+
+
+ 7
+ message
+
+ Text Editor
+
+ Default Payment Request Message
+
+
+
+
+
+
+ 8
+ payment_url_message
+
+ Data
+
+ Payment URL Message
+
+
+
+
+
+
+ 9
+ payment_success_url
+
+ Data
+
+ Payment Success URL
+
+
+
+
+
+
+
+
+
+
+ Controller
+ erpnext.accounts.doctype.payment_gateway_account.payment_gateway_account
+
+
+
+
+
+
+
+ Class PaymentGatewayAccount
+
+ Inherits from frappe.model.document.Document
+
+
+
+
+
+
+
+
+
+
+ autoname
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ set_as_default_if_not_set
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ update_default_payment_gateway
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ validate
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Linked In:
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/erpnext/docs/current/models/accounts/payment_request.html b/erpnext/docs/current/models/accounts/payment_request.html
new file mode 100644
index 0000000000..668fff8fb6
--- /dev/null
+++ b/erpnext/docs/current/models/accounts/payment_request.html
@@ -0,0 +1,810 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Table Name: tabPayment Request
+
+
+
+
+Fields
+
+
+
+
+ Sr
+ Fieldname
+ Type
+ Label
+ Options
+
+
+
+
+
+ 1
+ payment_details
+
+ Section Break
+
+ Payment Details
+
+
+
+
+
+
+ 2
+ amount
+
+ Currency
+
+ Amount
+
+
+
+
+
+
+ 3
+ currency
+
+ Link
+
+ Currency
+
+
+
+
+
+
+
+Currency
+
+
+
+
+
+
+
+ 4
+ make_sales_invoice
+
+ Check
+
+ Make Sales Invoice
+
+
+
+
+
+
+ 5
+ column_break_5
+
+ Column Break
+
+
+
+
+
+
+
+
+ 6
+ status
+
+ Select
+
+ Status
+
+
+
+
+Draft
+Initiated
+Paid
+Failed
+Cancelled
+
+
+
+
+ 7
+ section_break_7
+
+ Section Break
+
+
+
+
+
+
+
+
+ 8
+ payment_gateway
+
+ Link
+
+ Payment Gateway
+
+
+
+
+
+
+
+Payment Gateway Account
+
+
+
+
+
+
+
+ 9
+ payment_success_url
+
+ Data
+
+ Payment Success URL
+
+
+
+
+
+
+ 10
+ column_break_9
+
+ Column Break
+
+
+
+
+
+
+
+
+ 11
+ gateway
+
+ Read Only
+
+ Gateway
+
+
+
+ payment_gateway.gateway
+
+
+
+
+ 12
+ payment_account
+
+ Read Only
+
+ Payment Account
+
+
+
+ payment_gateway.payment_account
+
+
+
+
+ 13
+ recipient_and_message
+
+ Section Break
+
+ Recipient and Message
+
+
+
+
+
+
+ 14
+ print_format
+
+ Select
+
+ Print Format
+
+
+
+
+
+
+ 15
+ mute_email
+
+ Check
+
+ Mute Email
+
+
+
+
+
+
+ 16
+ email_to
+
+ Data
+
+ Email To
+
+
+
+
+
+
+ 17
+ subject
+
+ Data
+
+ Subject
+
+
+
+
+
+
+ 18
+ message
+
+ Text Editor
+
+ Message
+
+
+
+
+
+
+ 19
+ payment_url_message
+
+ Data
+
+ Payment URL Message
+
+
+
+
+
+
+ 20
+ payment_url
+
+ Data
+
+ payment_url
+
+
+
+
+
+
+ 21
+ reference_details
+
+ Section Break
+
+ Reference Details
+
+
+
+
+
+
+ 22
+ reference_doctype
+
+ Link
+
+ Reference Doctype
+
+
+
+
+
+
+
+DocType
+
+
+
+
+
+
+
+ 23
+ reference_name
+
+ Dynamic Link
+
+ Reference Name
+
+
+
+ reference_doctype
+
+
+
+
+ 24
+ amended_from
+
+ Link
+
+ Amended From
+
+
+
+
+
+
+
+Payment Request
+
+
+
+
+
+
+
+
+
+
+
+ Controller
+ erpnext.accounts.doctype.payment_request.payment_request
+
+
+
+
+
+
+
+ Class PaymentRequest
+
+ Inherits from frappe.model.document.Document
+
+
+
+
+
+
+
+
+
+
+ create_journal_entry
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ get_message
+ (self)
+
+
return message with payment gateway link
+
+
+
+
+
+
+
+
+
+
+ get_payment_success_url
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ get_payment_url
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ make_communication_entry
+ (self)
+
+
Make communication entry
+
+
+
+
+
+
+
+
+
+
+ make_invoice
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ on_cancel
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ on_submit
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ on_update_after_submit
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ send_email
+ (self)
+
+
send email with payment link
+
+
+
+
+
+
+
+
+
+
+ send_payment_request
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ set_as_cancelled
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ set_as_paid
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ set_failed
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ set_status
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ validate
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ validate_currency
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ validate_payment_gateway
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ validate_payment_gateway_account
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+ validate_payment_request
+ (self)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Public API
+ /api/method/erpnext.accounts.doctype.payment_request.payment_request.generate_payment_request
+
+
+
+
+ erpnext.accounts.doctype.payment_request.payment_request.generate_payment_request
+ (name)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ erpnext.accounts.doctype.payment_request.payment_request.get_amount
+ (ref_doc, dt)
+
+ get amount based on doctype
+
+
+
+
+
+
+
+
+
+
+
+
+ erpnext.accounts.doctype.payment_request.payment_request.get_gateway_details
+ (args)
+
+ return gateway and payment account of default payment gateway
+
+
+
+
+
+
+
+
+ Public API
+ /api/method/erpnext.accounts.doctype.payment_request.payment_request.get_print_format_list
+
+
+
+
+ erpnext.accounts.doctype.payment_request.payment_request.get_print_format_list
+ (ref_doctype)
+
+
+
+
+
+
+
+
+
+ Public API
+ /api/method/erpnext.accounts.doctype.payment_request.payment_request.make_payment_request
+
+
+
+
+ erpnext.accounts.doctype.payment_request.payment_request.make_payment_request
+ ()
+
+
+
+
+
+
+
+
+
+ Public API
+ /api/method/erpnext.accounts.doctype.payment_request.payment_request.resend_payment_email
+
+
+
+
+ erpnext.accounts.doctype.payment_request.payment_request.resend_payment_email
+ (docname)
+
+
+
+
+
+
+
+
+
+ Linked In:
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/erpnext/docs/current/models/accounts/period_closing_voucher.html b/erpnext/docs/current/models/accounts/period_closing_voucher.html
index c14226eed0..1a3aac1fc8 100644
--- a/erpnext/docs/current/models/accounts/period_closing_voucher.html
+++ b/erpnext/docs/current/models/accounts/period_closing_voucher.html
@@ -157,7 +157,7 @@
Closing Account Head
- The account head under Liability, in which Profit/Loss will be booked
+ The account head under Liability or Equity, in which Profit/Loss will be booked
diff --git a/erpnext/docs/current/models/accounts/pricing_rule.html b/erpnext/docs/current/models/accounts/pricing_rule.html
index 67e561f63c..d68b253c79 100644
--- a/erpnext/docs/current/models/accounts/pricing_rule.html
+++ b/erpnext/docs/current/models/accounts/pricing_rule.html
@@ -814,21 +814,21 @@ Discount Percentage
(args)
args = {
- "itemlist": [{"doctype": "", "name": "", "item code": "", "brand": "", "itemgroup": ""}, ...],
+ "items": [{"doctype": "", "name": "", "itemcode": "", "brand": "", "item group": ""}, ...],
"customer": "something",
- "customer group": "something",
+ "customergroup": "something",
"territory": "something",
"supplier": "something",
- "suppliertype": "something",
+ "supplier type": "something",
"currency": "something",
- "conversion rate": "something",
- "pricelist": "something",
- "plc conversionrate": "something",
+ "conversionrate": "something",
+ "price list": "something",
+ "plcconversion rate": "something",
"company": "something",
- "transaction date": "something",
+ "transactiondate": "something",
"campaign": "something",
- "salespartner": "something",
- "ignore pricing_rule": "something"
+ "sales partner": "something",
+ "ignorepricing rule": "something"
}
@@ -899,6 +899,22 @@ Discount Percentage
+
+
+
+
+
+
+
+ erpnext.accounts.doctype.pricing_rule.pricing_rule.set_transaction_type
+ (args)
+
+
+
+
+
+
diff --git a/erpnext/docs/current/models/accounts/purchase_invoice.html b/erpnext/docs/current/models/accounts/purchase_invoice.html
index 197b896100..1bdbcbf029 100644
--- a/erpnext/docs/current/models/accounts/purchase_invoice.html
+++ b/erpnext/docs/current/models/accounts/purchase_invoice.html
@@ -1750,6 +1750,20 @@ Yearly
+
+
+
+ update_billing_status_in_pr
+ (self, update_modified=True)
+
+
+
+
+
+
+
+
diff --git a/erpnext/docs/current/models/accounts/sales_invoice.html b/erpnext/docs/current/models/accounts/sales_invoice.html
index 9bd05d4b2e..07e32122ec 100644
--- a/erpnext/docs/current/models/accounts/sales_invoice.html
+++ b/erpnext/docs/current/models/accounts/sales_invoice.html
@@ -2361,6 +2361,20 @@ Yearly
+
+
+
+ update_billing_status_in_dn
+ (self, update_modified=True)
+
+
+
+
+
+
+
+
diff --git a/erpnext/docs/current/models/buying/purchase_order.html b/erpnext/docs/current/models/buying/purchase_order.html
index 202cb44a10..c627191b0a 100644
--- a/erpnext/docs/current/models/buying/purchase_order.html
+++ b/erpnext/docs/current/models/buying/purchase_order.html
@@ -101,6 +101,18 @@
5
+ get_items_from_open_material_requests
+
+ Button
+
+ Get Items from Open Material Requests
+
+
+
+
+
+
+ 6
is_subcontracted
Select
@@ -115,7 +127,7 @@ Yes
- 6
+ 7
supplier_name
Data
@@ -127,7 +139,7 @@ Yes
- 7
+ 8
address_display
Small Text
@@ -139,7 +151,7 @@ Yes
- 8
+ 9
contact_display
Small Text
@@ -151,7 +163,7 @@ Yes
- 9
+ 10
contact_mobile
Small Text
@@ -163,7 +175,7 @@ Yes
- 10
+ 11
contact_email
Small Text
@@ -175,7 +187,7 @@ Yes
- 11
+ 12
column_break1
Column Break
@@ -187,7 +199,7 @@ Yes
- 12
+ 13
transaction_date
Date
@@ -199,7 +211,7 @@ Yes
- 13
+ 14
amended_from
Link
@@ -220,7 +232,7 @@ Yes
- 14
+ 15
company
Link
@@ -241,7 +253,7 @@ Yes
- 15
+ 16
drop_ship
Section Break
@@ -253,7 +265,7 @@ Yes
- 16
+ 17
customer
Link
@@ -274,7 +286,7 @@ Yes
- 17
+ 18
customer_name
Data
@@ -286,7 +298,7 @@ Yes
- 18
+ 19
column_break_19
Column Break
@@ -298,7 +310,7 @@ Yes
- 19
+ 20
customer_address
Link
@@ -319,7 +331,7 @@ Yes
- 20
+ 21
customer_contact_person
Link
@@ -340,7 +352,7 @@ Yes
- 21
+ 22
customer_address_display
Small Text
@@ -352,7 +364,7 @@ Yes
- 22
+ 23
customer_contact_display
Small Text
@@ -364,7 +376,7 @@ Yes
- 23
+ 24
customer_contact_mobile
Small Text
@@ -376,7 +388,7 @@ Yes
- 24
+ 25
customer_contact_email
Small Text
@@ -388,7 +400,7 @@ Yes
- 25
+ 26
currency_and_price_list
Section Break
@@ -402,7 +414,7 @@ Yes
- 26
+ 27
currency
Link
@@ -423,7 +435,7 @@ Yes
- 27
+ 28
conversion_rate
Float
@@ -435,7 +447,7 @@ Yes
- 28
+ 29
cb_price_list
Column Break
@@ -447,7 +459,7 @@ Yes
- 29
+ 30
buying_price_list
Link
@@ -468,7 +480,7 @@ Yes
- 30
+ 31
price_list_currency
Link
@@ -489,7 +501,7 @@ Yes
- 31
+ 32
plc_conversion_rate
Float
@@ -501,7 +513,7 @@ Yes
- 32
+ 33
ignore_pricing_rule
Check
@@ -513,7 +525,7 @@ Yes
- 33
+ 34
items_section
Section Break
@@ -527,7 +539,7 @@ Yes
- 34
+ 35
items
Table
@@ -547,8 +559,20 @@ Yes
+
+ 36
+ get_last_purchase_rate
+
+ Button
+
+ Get last purchase rate
+
+
+
+
+
- 35
+ 37
sb_last_purchase
Section Break
@@ -560,7 +584,7 @@ Yes
- 36
+ 38
base_total
Currency
@@ -574,7 +598,7 @@ Yes
- 37
+ 39
base_net_total
Currency
@@ -588,7 +612,7 @@ Yes
- 38
+ 40
column_break_26
Column Break
@@ -600,7 +624,7 @@ Yes
- 39
+ 41
total
Currency
@@ -614,7 +638,7 @@ Yes
- 40
+ 42
net_total
Currency
@@ -628,7 +652,7 @@ Yes
- 41
+ 43
taxes_section
Section Break
@@ -642,7 +666,7 @@ Yes
- 42
+ 44
taxes_and_charges
Link
@@ -663,7 +687,7 @@ Yes
- 43
+ 45
taxes
Table
@@ -684,7 +708,7 @@ Yes
- 44
+ 46
other_charges_calculation
HTML
@@ -696,7 +720,7 @@ Yes
- 45
+ 47
totals
Section Break
@@ -710,7 +734,7 @@ Yes
- 46
+ 48
base_taxes_and_charges_added
Currency
@@ -724,7 +748,7 @@ Yes
- 47
+ 49
base_taxes_and_charges_deducted
Currency
@@ -738,7 +762,7 @@ Yes
- 48
+ 50
base_total_taxes_and_charges
Currency
@@ -752,7 +776,7 @@ Yes
- 49
+ 51
column_break_39
Column Break
@@ -764,7 +788,7 @@ Yes
- 50
+ 52
taxes_and_charges_added
Currency
@@ -778,7 +802,7 @@ Yes
- 51
+ 53
taxes_and_charges_deducted
Currency
@@ -792,7 +816,7 @@ Yes
- 52
+ 54
total_taxes_and_charges
Currency
@@ -806,7 +830,7 @@ Yes
- 53
+ 55
discount_section
Section Break
@@ -818,7 +842,7 @@ Yes
- 54
+ 56
apply_discount_on
Select
@@ -834,7 +858,7 @@ Net Total
- 55
+ 57
base_discount_amount
Currency
@@ -848,7 +872,7 @@ Net Total
- 56
+ 58
column_break_45
Column Break
@@ -860,7 +884,7 @@ Net Total
- 57
+ 59
additional_discount_percentage
Float
@@ -872,7 +896,7 @@ Net Total
- 58
+ 60
discount_amount
Currency
@@ -886,7 +910,7 @@ Net Total
- 59
+ 61
totals_section
Section Break
@@ -898,7 +922,7 @@ Net Total
- 60
+ 62
base_grand_total
Currency
@@ -912,7 +936,7 @@ Net Total
- 61
+ 63
base_in_words
Data
@@ -925,7 +949,7 @@ Net Total
- 62
+ 64
base_rounded_total
Currency
@@ -939,7 +963,7 @@ Net Total
- 63
+ 65
advance_paid
Currency
@@ -951,7 +975,7 @@ Net Total
- 64
+ 66
column_break4
Column Break
@@ -963,7 +987,7 @@ Net Total
- 65
+ 67
grand_total
Currency
@@ -977,7 +1001,7 @@ Net Total
- 66
+ 68
in_words
Data
@@ -989,7 +1013,7 @@ Net Total
- 67
+ 69
terms_section_break
Section Break
@@ -1003,7 +1027,7 @@ Net Total
- 68
+ 70
tc_name
Link
@@ -1024,7 +1048,7 @@ Net Total
- 69
+ 71
terms
Text Editor
@@ -1036,7 +1060,7 @@ Net Total
- 70
+ 72
contact_section
Section Break
@@ -1050,7 +1074,7 @@ Net Total
- 71
+ 73
supplier_address
Link
@@ -1071,7 +1095,7 @@ Net Total
- 72
+ 74
cb_contact
Column Break
@@ -1083,7 +1107,7 @@ Net Total
- 73
+ 75
contact_person
Link
@@ -1104,7 +1128,7 @@ Net Total
- 74
+ 76
more_info
Section Break
@@ -1116,7 +1140,7 @@ Net Total
- 75
+ 77
status
Select
@@ -1139,7 +1163,7 @@ Delivered
- 76
+ 78
fiscal_year
Link
@@ -1160,7 +1184,7 @@ Delivered
- 77
+ 79
ref_sq
Data
@@ -1172,7 +1196,7 @@ Delivered
- 78
+ 80
column_break_74
Column Break
@@ -1184,7 +1208,7 @@ Delivered
- 79
+ 81
per_received
Percent
@@ -1196,7 +1220,7 @@ Delivered
- 80
+ 82
per_billed
Percent
@@ -1208,7 +1232,7 @@ Delivered
- 81
+ 83
column_break5
Section Break
@@ -1220,7 +1244,7 @@ Delivered
- 82
+ 84
letter_head
Link
@@ -1241,7 +1265,7 @@ Delivered
- 83
+ 85
select_print_heading
Link
@@ -1262,7 +1286,7 @@ Delivered
- 84
+ 86
raw_material_details
Section Break
@@ -1276,7 +1300,7 @@ Delivered
- 85
+ 87
supplied_items
Table
@@ -1297,7 +1321,7 @@ Delivered
- 86
+ 88
recurring_order
Section Break
@@ -1311,7 +1335,7 @@ Delivered
- 87
+ 89
column_break
Column Break
@@ -1323,7 +1347,7 @@ Delivered
- 88
+ 90
is_recurring
Check
@@ -1335,7 +1359,7 @@ Delivered
- 89
+ 91
recurring_type
Select
@@ -1352,7 +1376,7 @@ Yearly
- 90
+ 92
from_date
Date
@@ -1365,7 +1389,7 @@ Yearly
- 91
+ 93
to_date
Date
@@ -1378,7 +1402,7 @@ Yearly
- 92
+ 94
repeat_on_day_of_month
Int
@@ -1391,7 +1415,7 @@ Yearly
- 93
+ 95
end_date
Date
@@ -1404,7 +1428,7 @@ Yearly
- 94
+ 96
column_break83
Column Break
@@ -1416,7 +1440,7 @@ Yearly
- 95
+ 97
next_date
Date
@@ -1429,7 +1453,7 @@ Yearly
- 96
+ 98
recurring_id
Data
@@ -1441,7 +1465,7 @@ Yearly
- 97
+ 99
notification_email_address
Small Text
@@ -1454,7 +1478,7 @@ Yearly
- 98
+ 100
recurring_print_format
Link
@@ -1555,6 +1579,20 @@ Yearly
+
+
+
+ get_last_purchase_rate
+ (self)
+
+ get last purchase rates for all items
+
+
+
+
+
+
+
diff --git a/erpnext/docs/current/models/projects/time_log.html b/erpnext/docs/current/models/projects/time_log.html
index 227631405b..b37e0b54cb 100644
--- a/erpnext/docs/current/models/projects/time_log.html
+++ b/erpnext/docs/current/models/projects/time_log.html
@@ -40,110 +40,6 @@ Log of Activities performed by users against Tasks that can be used for tracking
1
- naming_series
-
- Select
-
- Series
-
-
-
- TL-
-
-
-
-
- 2
- column_break_2
-
- Column Break
-
-
-
-
-
-
-
-
- 3
- status
-
- Select
-
- Status
-
-
-
- Draft
-Submitted
-Batched for Billing
-Billed
-Cancelled
-
-
-
-
- 4
- section_break_4
-
- Section Break
-
-
-
-
-
-
-
-
- 5
- from_time
-
- Datetime
-
- From Time
-
-
-
-
-
-
- 6
- hours
-
- Float
-
- Hours
-
-
-
-
-
-
- 7
- to_time
-
- Datetime
-
- To Time
-
-
-
-
-
-
- 8
- column_break_8
-
- Column Break
-
-
-
-
-
-
-
-
- 9
activity_type
Link
@@ -164,7 +60,21 @@ Cancelled
- 10
+ 2
+ naming_series
+
+ Select
+
+ Series
+
+
+
+ TL-
+
+
+
+
+ 3
project
Link
@@ -185,7 +95,7 @@ Cancelled
- 11
+ 4
task
Link
@@ -205,8 +115,110 @@ Cancelled
+
+ 5
+ status
+
+ Select
+
+ Status
+
+
+
+ Draft
+Submitted
+Batched for Billing
+Billed
+Cancelled
+
+
+
+
+ 6
+ column_break_2
+
+ Column Break
+
+
+
+
+
+
+
+
+ 7
+ from_time
+
+ Datetime
+
+ From Time
+
+
+
+
+
+
+ 8
+ hours
+
+ Float
+
+ Hours
+
+
+
+
+
+
+ 9
+ to_time
+
+ Datetime
+
+ To Time
+
+
+
+
+
+
+ 10
+ billable
+
+ Check
+
+ Billable
+
+
+
+
+
+ 11
+ section_break_7
+
+ Section Break
+
+
+
+
+
+
+
+
12
+ note
+
+ Text Editor
+
+ Note
+
+
+
+
+
+
+ 13
section_break_12
Section Break
@@ -218,7 +230,7 @@ Cancelled
- 13
+ 14
user
Link
@@ -239,7 +251,7 @@ Cancelled
- 14
+ 15
employee
Link
@@ -260,7 +272,7 @@ Cancelled
- 15
+ 16
column_break_3
Column Break
@@ -272,7 +284,7 @@ Cancelled
- 16
+ 17
for_manufacturing
Check
@@ -283,18 +295,6 @@ Cancelled
-
- 17
- billable
-
- Check
-
- Billable
-
-
-
-
-
18
section_break_11
@@ -409,30 +409,6 @@ Cancelled
25
- section_break_7
-
- Section Break
-
-
-
-
-
-
-
-
- 26
- note
-
- Text Editor
-
- Note
-
-
-
-
-
-
- 27
section_break_24
Section Break
@@ -444,7 +420,7 @@ Cancelled
- 28
+ 26
costing_rate
Currency
@@ -456,7 +432,7 @@ Cancelled
- 29
+ 27
costing_amount
Currency
@@ -468,7 +444,7 @@ Cancelled
- 30
+ 28
column_break_25
Column Break
@@ -480,7 +456,7 @@ Cancelled
- 31
+ 29
billing_rate
Currency
@@ -492,7 +468,19 @@ Cancelled
- 32
+ 30
+ additional_cost
+
+ Currency
+
+ Additional Cost
+
+
+
+
+
+
+ 31
billing_amount
Currency
@@ -505,7 +493,7 @@ Cancelled
- 33
+ 32
section_break_29
Section Break
@@ -517,7 +505,7 @@ Cancelled
- 34
+ 33
time_log_batch
Link
@@ -539,7 +527,7 @@ Cancelled
- 35
+ 34
sales_invoice
Link
@@ -561,7 +549,7 @@ Cancelled
- 36
+ 35
amended_from
Link
@@ -582,7 +570,7 @@ Cancelled
- 37
+ 36
title
Data
diff --git a/erpnext/docs/current/models/selling/sales_order.html b/erpnext/docs/current/models/selling/sales_order.html
index d3b0e68cc3..aadc66430f 100644
--- a/erpnext/docs/current/models/selling/sales_order.html
+++ b/erpnext/docs/current/models/selling/sales_order.html
@@ -1845,6 +1845,20 @@ Yearly
+
+
+
+ set_indicator
+ (self)
+
+ Set indicator for portal
+
+
+
+
+
+
+
@@ -2260,7 +2274,7 @@ Yearly
erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice
- (source_name, target_doc=None)
+ (source_name, target_doc=None, ignore_permissions=False)
diff --git a/erpnext/docs/current/models/setup/company.html b/erpnext/docs/current/models/setup/company.html
index 27e2294966..88381d143b 100644
--- a/erpnext/docs/current/models/setup/company.html
+++ b/erpnext/docs/current/models/setup/company.html
@@ -824,20 +824,6 @@ Stop
-
-
-
- add_acc
- (self, lst)
-
-
-
-
-
-
-
-
diff --git a/erpnext/docs/current/models/setup/terms_and_conditions.html b/erpnext/docs/current/models/setup/terms_and_conditions.html
index 95acfe1b84..cc3fdeeb51 100644
--- a/erpnext/docs/current/models/setup/terms_and_conditions.html
+++ b/erpnext/docs/current/models/setup/terms_and_conditions.html
@@ -64,6 +64,18 @@ Examples:
2
+ disabled
+
+ Check
+
+ Disabled
+
+
+
+
+
+
+ 3
terms
Text Editor
diff --git a/erpnext/docs/current/models/stock/delivery_note.html b/erpnext/docs/current/models/stock/delivery_note.html
index 64a872b006..8da39c01dd 100644
--- a/erpnext/docs/current/models/stock/delivery_note.html
+++ b/erpnext/docs/current/models/stock/delivery_note.html
@@ -1316,8 +1316,20 @@ Campaign
-
+
86
+ per_billed
+
+ Currency
+
+ % Amount Billed
+
+
+
+
+
+
+ 87
printing_details
Section Break
@@ -1329,7 +1341,7 @@ Campaign
- 87
+ 88
letter_head
Link
@@ -1350,7 +1362,7 @@ Campaign
- 88
+ 89
select_print_heading
Link
@@ -1371,7 +1383,7 @@ Campaign
- 89
+ 90
column_break_88
Column Break
@@ -1383,7 +1395,7 @@ Campaign
- 90
+ 91
print_without_amount
Check
@@ -1395,7 +1407,7 @@ Campaign
- 91
+ 92
section_break_83
Section Break
@@ -1407,7 +1419,7 @@ Campaign
- 92
+ 93
status
Select
@@ -1418,14 +1430,15 @@ Campaign
Draft
-Submitted
+To Bill
+Completed
Cancelled
Closed
- 93
+ 94
per_installed
Percent
@@ -1438,7 +1451,7 @@ Closed
- 94
+ 95
installation_status
Select
@@ -1450,7 +1463,7 @@ Closed
- 95
+ 96
column_break_89
Column Break
@@ -1462,7 +1475,7 @@ Closed
- 96
+ 97
to_warehouse
Link
@@ -1484,7 +1497,7 @@ Closed
- 97
+ 98
excise_page
Data
@@ -1496,7 +1509,7 @@ Closed
- 98
+ 99
instructions
Text
@@ -1508,7 +1521,7 @@ Closed
- 99
+ 100
sales_team_section_break
Section Break
@@ -1522,7 +1535,7 @@ Closed
- 100
+ 101
sales_partner
Link
@@ -1543,7 +1556,7 @@ Closed
- 101
+ 102
column_break7
Column Break
@@ -1555,7 +1568,7 @@ Closed
- 102
+ 103
commission_rate
Float
@@ -1567,7 +1580,7 @@ Closed
- 103
+ 104
total_commission
Currency
@@ -1581,7 +1594,7 @@ Closed
- 104
+ 105
section_break1
Section Break
@@ -1593,7 +1606,7 @@ Closed
- 105
+ 106
sales_team
Table
@@ -1736,20 +1749,6 @@ Closed
-
-
-
- onload
- (self)
-
-
-
-
-
-
-
-
@@ -1778,6 +1777,20 @@ Closed
+
+
+
+ update_billing_status
+ (self, update_modified=True)
+
+
+
+
+
+
+
+
@@ -1999,6 +2012,22 @@ Closed
+
+
+
+
+ erpnext.stock.doctype.delivery_note.delivery_note.update_billed_amount_based_on_so
+ (so_detail, update_modified=True)
+
+
+
+
+
+
+
+
+
Public API
/api/method/erpnext.stock.doctype.delivery_note.delivery_note.update_delivery_note_status
diff --git a/erpnext/docs/current/models/stock/delivery_note_item.html b/erpnext/docs/current/models/stock/delivery_note_item.html
index c7abefed9d..1c48c11e0e 100644
--- a/erpnext/docs/current/models/stock/delivery_note_item.html
+++ b/erpnext/docs/current/models/stock/delivery_note_item.html
@@ -746,6 +746,20 @@
49
+ billed_amt
+
+ Currency
+
+ Billed Amt
+
+
+
+ currency
+
+
+
+
+ 50
page_break
Check
diff --git a/erpnext/docs/current/models/stock/item.html b/erpnext/docs/current/models/stock/item.html
index a2fb3686ba..8a06f29b25 100644
--- a/erpnext/docs/current/models/stock/item.html
+++ b/erpnext/docs/current/models/stock/item.html
@@ -777,12 +777,21 @@ Moving Average
51
manufacturer
- Data
+ Link
Manufacturer
-
+
+
+
+
+
+Manufacturer
+
+
+
+
diff --git a/erpnext/docs/current/models/stock/manufacturer.html b/erpnext/docs/current/models/stock/manufacturer.html
new file mode 100644
index 0000000000..654875e413
--- /dev/null
+++ b/erpnext/docs/current/models/stock/manufacturer.html
@@ -0,0 +1,171 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Table Name: tabManufacturer
+
+
+Manufacturers used in Items
+
+Fields
+
+
+
+
+ Sr
+ Fieldname
+ Type
+ Label
+ Options
+
+
+
+
+
+ 1
+ short_name
+
+ Data
+
+ Short Name
+
+ Limited to 12 characters
+
+
+
+
+
+ 2
+ full_name
+
+ Data
+
+ Full Name
+
+
+
+
+
+
+ 3
+ website
+
+ Data
+
+ Website
+
+
+
+
+
+
+ 4
+ data_6
+
+ Link
+
+ Country
+
+
+
+
+
+
+
+Country
+
+
+
+
+
+
+
+ 5
+ logo
+
+ Attach Image
+
+ Logo
+
+
+
+
+
+
+ 6
+ notes
+
+ Small Text
+
+ Notes
+
+
+
+
+
+
+
+
+
+
+ Controller
+ erpnext.stock.doctype.manufacturer.manufacturer
+
+
+
+
+
+
+
+ Class Manufacturer
+
+ Inherits from frappe.model.document.Document
+
+
+
+
+
+
+
+
+
+
+
+
+ Linked In:
+
+
+
+
+
+
+Item
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/erpnext/docs/current/models/stock/price_list.html b/erpnext/docs/current/models/stock/price_list.html
index 28e2cec31e..60d5b2eabe 100644
--- a/erpnext/docs/current/models/stock/price_list.html
+++ b/erpnext/docs/current/models/stock/price_list.html
@@ -391,8 +391,6 @@ Price List Master
-
-
diff --git a/erpnext/docs/current/models/stock/purchase_receipt.html b/erpnext/docs/current/models/stock/purchase_receipt.html
index ee9ed2768d..5e59506297 100644
--- a/erpnext/docs/current/models/stock/purchase_receipt.html
+++ b/erpnext/docs/current/models/stock/purchase_receipt.html
@@ -409,7 +409,7 @@ PREC-RET-
Button
- Get Current Stock
+ Get current stock
@@ -1082,7 +1082,8 @@ Yes
Draft
-Submitted
+To Bill
+Completed
Cancelled
Closed
@@ -1157,6 +1158,18 @@ Closed
77
+ per_billed
+
+ Percent
+
+ % Amount Billed
+
+
+
+
+
+
+ 78
company
Link
@@ -1177,7 +1190,7 @@ Closed
- 78
+ 79
fiscal_year
Link
@@ -1198,7 +1211,7 @@ Closed
- 79
+ 80
printing_settings
Section Break
@@ -1210,7 +1223,7 @@ Closed
- 80
+ 81
letter_head
Link
@@ -1231,7 +1244,7 @@ Closed
- 81
+ 82
select_print_heading
Link
@@ -1252,7 +1265,7 @@ Closed
- 82
+ 83
other_details
HTML
@@ -1264,7 +1277,7 @@ Closed
- 83
+ 84
instructions
Small Text
@@ -1276,7 +1289,7 @@ Closed
- 84
+ 85
remarks
Small Text
@@ -1288,7 +1301,7 @@ Closed
- 85
+ 86
transporter_info
Section Break
@@ -1302,7 +1315,7 @@ Closed
- 86
+ 87
transporter_name
Data
@@ -1314,7 +1327,7 @@ Closed
- 87
+ 88
column_break5
Column Break
@@ -1326,7 +1339,7 @@ Closed
- 88
+ 89
lr_no
Data
@@ -1338,7 +1351,7 @@ Closed
- 89
+ 90
lr_date
Date
@@ -1528,20 +1541,6 @@ Closed
-
-
-
- onload
- (self)
-
-
-
-
-
-
-
-
@@ -1570,6 +1569,20 @@ Closed
+
+
+
+ update_billing_status
+ (self, update_modified=True)
+
+
+
+
+
+
+
+
@@ -1753,6 +1766,22 @@ Closed
+
+
+
+
+ erpnext.stock.doctype.purchase_receipt.purchase_receipt.update_billed_amount_based_on_po
+ (po_detail, update_modified=True)
+
+
+
+
+
+
+
+
+
Public API
/api/method/erpnext.stock.doctype.purchase_receipt.purchase_receipt.update_purchase_receipt_status
diff --git a/erpnext/docs/current/models/stock/purchase_receipt_item.html b/erpnext/docs/current/models/stock/purchase_receipt_item.html
index 025f291cdc..2404597bdf 100644
--- a/erpnext/docs/current/models/stock/purchase_receipt_item.html
+++ b/erpnext/docs/current/models/stock/purchase_receipt_item.html
@@ -584,48 +584,6 @@
40
- project_name
-
- Link
-
- Project Name
-
-
-
-
-
-
-
-Project
-
-
-
-
-
-
-
- 41
- cost_center
-
- Link
-
- Cost Center
-
-
-
-
-
-
-
-Cost Center
-
-
-
-
-
-
-
- 42
qa_no
Link
@@ -642,6 +600,39 @@
+
+
+
+
+ 41
+ column_break_40
+
+ Column Break
+
+
+
+
+
+
+
+
+ 42
+ prevdoc_docname
+
+ Link
+
+ Purchase Order
+
+
+
+
+
+
+
+Purchase Order
+
+
+
@@ -669,13 +660,13 @@
-
+
45
- prevdoc_doctype
+ section_break_45
- Data
-
- Prevdoc Doctype
+ Section Break
+
+
@@ -683,72 +674,6 @@
46
- prevdoc_docname
-
- Link
-
- Purchase Order
-
-
-
-
-
-
-
-Purchase Order
-
-
-
-
-
-
-
- 47
- prevdoc_detail_docname
-
- Data
-
- Purchase Order Item No
-
-
-
-
-
-
- 48
- col_break5
-
- Column Break
-
-
-
-
-
-
-
-
- 49
- bom
-
- Link
-
- BOM
-
-
-
-
-
-
-
-BOM
-
-
-
-
-
-
-
- 50
serial_no
Text
@@ -760,19 +685,7 @@
- 51
- rejected_serial_no
-
- Text
-
- Rejected Serial No
-
-
-
-
-
-
- 52
+ 47
batch_no
Link
@@ -789,11 +702,170 @@
+
+
+
+
+ 48
+ column_break_48
+
+ Column Break
+
+
+
+
+
+
+
+
+ 49
+ rejected_serial_no
+
+ Text
+
+ Rejected Serial No
+
+
+
+
+
+
+ 50
+ section_break_50
+
+ Section Break
+
+
+
+
+
+
+
+
+ 51
+ project_name
+
+ Link
+
+ Project Name
+
+
+
+
+
+
+
+Project
+
+
+
+
+
+
+
+ 52
+ cost_center
+
+ Link
+
+ Cost Center
+
+
+
+
+
+
+
+Cost Center
+
+
+
53
+ prevdoc_doctype
+
+ Data
+
+ Prevdoc Doctype
+
+
+
+
+
+
+ 54
+ prevdoc_detail_docname
+
+ Data
+
+ Purchase Order Item No
+
+
+
+
+
+
+ 55
+ col_break5
+
+ Column Break
+
+
+
+
+
+
+
+
+ 56
+ bom
+
+ Link
+
+ BOM
+
+
+
+
+
+
+
+BOM
+
+
+
+
+
+
+
+ 57
+ billed_amt
+
+ Currency
+
+ Billed Amt
+
+
+
+
+
+
+ 58
+ landed_cost_voucher_amount
+
+ Currency
+
+ Landed Cost Voucher Amount
+
+
+
+
+
+
+ 59
brand
Link
@@ -814,7 +886,7 @@
- 54
+ 60
item_group
Link
@@ -835,7 +907,7 @@
- 55
+ 61
rm_supp_cost
Currency
@@ -849,7 +921,7 @@
- 56
+ 62
item_tax_amount
Currency
@@ -863,19 +935,7 @@
- 57
- landed_cost_voucher_amount
-
- Currency
-
- Landed Cost Voucher Amount
-
-
-
-
-
-
- 58
+ 63
valuation_rate
Currency
@@ -889,7 +949,7 @@
- 59
+ 64
item_tax_rate
Small Text
@@ -903,7 +963,7 @@ Used for Taxes and Charges
- 60
+ 65
page_break
Check
diff --git a/erpnext/docs/current/models/stock/stock_entry.html b/erpnext/docs/current/models/stock/stock_entry.html
index 652d8162fb..29bc11e7bc 100644
--- a/erpnext/docs/current/models/stock/stock_entry.html
+++ b/erpnext/docs/current/models/stock/stock_entry.html
@@ -1191,20 +1191,6 @@ whichever is less
-
-
-
- get_warehouse_details
- (self, args)
-
-
-
-
-
-
-
-
@@ -1580,6 +1566,24 @@ the raw materials supplied table
+
+
+
+ Public API
+ /api/method/erpnext.stock.doctype.stock_entry.stock_entry.get_warehouse_details
+
+
+
+
+ erpnext.stock.doctype.stock_entry.stock_entry.get_warehouse_details
+ (args)
+
+
+
+
+
+
diff --git a/erpnext/docs/current/models/stock/warehouse.html b/erpnext/docs/current/models/stock/warehouse.html
index 2d7108b2b0..c0fa5d3d6b 100644
--- a/erpnext/docs/current/models/stock/warehouse.html
+++ b/erpnext/docs/current/models/stock/warehouse.html
@@ -629,8 +629,6 @@ A logical Warehouse against which stock entries are made.
-
-
diff --git a/erpnext/docs/user/index.md b/erpnext/docs/user/index.md
index 0394638550..7ce09d357e 100644
--- a/erpnext/docs/user/index.md
+++ b/erpnext/docs/user/index.md
@@ -1,3 +1,6 @@
# User Manual and Videos
-{index}
\ No newline at end of file
+Learn ERPNext by watching the user manual or training videos.
+
+1. [User Manual]({{docs_base_url}}/user/manual)
+1. [Help Videos]({{docs_base_url}}/user/videos/learn)
diff --git a/erpnext/docs/user/manual/en/accounts/index.txt b/erpnext/docs/user/manual/en/accounts/index.txt
index 391a1852b7..1a1d5d55fe 100644
--- a/erpnext/docs/user/manual/en/accounts/index.txt
+++ b/erpnext/docs/user/manual/en/accounts/index.txt
@@ -1,9 +1,11 @@
journal-entry
sales-invoice
purchase-invoice
+payment-request
chart-of-accounts
making-payments
advance-payment-entry
+payment-request
credit-limit
opening-entry
accounting-reports
diff --git a/erpnext/docs/user/manual/en/accounts/payment-request.md b/erpnext/docs/user/manual/en/accounts/payment-request.md
new file mode 100644
index 0000000000..68d4397a5c
--- /dev/null
+++ b/erpnext/docs/user/manual/en/accounts/payment-request.md
@@ -0,0 +1,28 @@
+Payment Request is sent via Email and will contain a link to a Payment Gateway if setup. You can create payment request via Sales Order or Sales Invoice.
+
+- Create Payment Request via Sales Order
+
+
+- Create payment Request via Sales Invoice
+
+
+---
+
+Select appropriate Payment Gateway Account on Payment Request. Account head specified on payment gateway will
+considered to create journal entry.
+
+Note: Invoice/Order Currency and Payment Gateway Account corruncy should be same.
+
+
+
+---
+
+##### Notify Customer
+You can notify customer from Payment Request with print format. If customer contact email is mentioned, it will automatically fetch email. If not so you can set email id on Payment Request.
+
+
+
+##### Request Mail
+
+
+
diff --git a/erpnext/docs/user/manual/en/buying/articles/index.txt b/erpnext/docs/user/manual/en/buying/articles/index.txt
index c0ed867e5b..5ae3658097 100644
--- a/erpnext/docs/user/manual/en/buying/articles/index.txt
+++ b/erpnext/docs/user/manual/en/buying/articles/index.txt
@@ -1,3 +1,3 @@
maintaining-suppliers-part-no-in-item
-managing-purchase-uom-and-stock-uom
-select-material-requests-based-on-supplier
\ No newline at end of file
+purchasing-in-different-unit
+pull-items-in-purchase-order-based-on-supplier
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/buying/articles/maintaining-suppliers-part-no-in-item.md b/erpnext/docs/user/manual/en/buying/articles/maintaining-suppliers-part-no-in-item.md
index 52f4c97792..2a925813b7 100644
--- a/erpnext/docs/user/manual/en/buying/articles/maintaining-suppliers-part-no-in-item.md
+++ b/erpnext/docs/user/manual/en/buying/articles/maintaining-suppliers-part-no-in-item.md
@@ -1,20 +1,20 @@
-Maintaining Supplier's Item Code in the Item master
+#Maintaining Supplier's Item Code in the Item master
-Since each company has their own item coding standards, for each item, your item code differ from supplier's Item Code. ERPNext allows you to track Supplier's Item Code in your item master, so that you refer to each others item code while transacting. Also you can fetch Supplier's Item Code in your purchase transactions, so that they can easily recognize item referring to their Item Code.
+For each item, code assigned might differ from the code your supplier has given to that same item. ERPNext allows you to track Supplier's Item Code in the item master. Also you can fetch Supplier's Item Code in your purchase transactions, so that they can easily recognize item referring to their Item Code.
#### 1. Updating Supplier Item Code In Item
-Under Purchase section in the Item master, you will find table to track Item Code for each Supplier.
+In the Item master, under Supplier Details section, enter Item Code as given by the Supplier to this item.
-
+
#### 2. Supplier's Item Code in Transactions
-Each purchase transaction has field in the Item table where Supplier's Item Code is fetched. This field is hidden in form as well as in the Standard print format. You can make it visible by changing property for this field from [Customize Form](https://erpnext.com/user-guide/customize-erpnext/customize-form).
+Each purchase transaction has field in the Item table where Supplier's Item Code is fetched. This field is hidden in form as well as in the Standard print format. You can make it visible by changing property for this field from [Customize Form.]({{docs_base_url}}/user/manual/en/customize-erpnext/customize-form.html)
Supplier Item Code will only be fetched in the purchase transaction, if both Supplier and Item Code selected in purchase transaction is mapped with value mentioned in the Item master.
-
+
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/buying/articles/managing-purchase-uom-and-stock-uom.md b/erpnext/docs/user/manual/en/buying/articles/managing-purchase-uom-and-stock-uom.md
deleted file mode 100644
index d4d97be99d..0000000000
--- a/erpnext/docs/user/manual/en/buying/articles/managing-purchase-uom-and-stock-uom.md
+++ /dev/null
@@ -1,47 +0,0 @@
-Managing Purchase UoM and Stock UoM
-
-When purchasing an item, you can set purchase UoM (Unit of Measurement) which could be different from item's stock UoM.
-
-### Scenario:
-
-Item ABC is stocked in Nos, but purchased in Cartons. Hence in the Purchase Order, you will need to update UoM as Carton.
-
-### 1. Editing Purchase UoM
-
-
-#### Step 1.1: Edit UoM in the Purchase Order
-
-In the Purchase Order, you will find two UoM fied.
-
-- UoM
-- Stock UoM
-
-In both the fields, default UoM of an item will be updated. You should edit UoM field, and select Purchase UoM (Carton in this case).
-
-
-
-#### Step 1.2: Update UoM Conversion Factor
-
-In one Carton, if you get 20 Nos. of item ABC, then UoM Conversion Factor would be 20.
-
-
-
-Based on the Qty and Conversion Factor, qty will be calculated in the Stock UoM of an item. If you purchase just one carton, then Qty in the stock UoM will be set as 20.
-
-
-
-### 2. Stock Ledger Posting
-
-Irrespective of the Purchase UoM selected, stock ledger posting will be done in the Default UoM of an item only. Hence you should ensure that conversion factor is entered correctly while purchasing item in different UoM.
-
-With this, we can conclude that, updating Purchase UoM is mainly for the reference of the supplier. In the print format, you will see item qty in the Purchase UoM.
-
-
-
-### 3. Setting Conversion Factor in the Item master
-
-In the Item master, under Purchase section, you can list all the possible purchase UoM of an item, with its UoM Conversion Factor.
-
-
-
-
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/buying/articles/pull-items-in-purchase-order-based-on-supplier.md b/erpnext/docs/user/manual/en/buying/articles/pull-items-in-purchase-order-based-on-supplier.md
new file mode 100644
index 0000000000..80f52833f1
--- /dev/null
+++ b/erpnext/docs/user/manual/en/buying/articles/pull-items-in-purchase-order-based-on-supplier.md
@@ -0,0 +1,35 @@
+#Pull Items in Purchase Order based on Supplier
+
+**Question:**
+
+Our Material Request has many items, each purchased from different suppliers. How to pull items from all open Material Request which are to be purchased from common Supplier?
+
+**Answer:**
+
+To pull items from Material Request for specific Supplier only, follow below given steps.
+
+####Step 1: Default Supplier
+
+Update Default Supplier in the Item master.
+
+
+
+####Step 2: New Purchase Order
+
+`Buying > Document > Purchase Order > New`
+
+####Step 3: Select for Supplier
+
+From the options available to pull data in the Purchase Order, click on `For Supplier`.
+
+
+
+####Step 4: Get Items
+
+Select Supplier name and click on `Get`.
+
+
+
+####Step 5: Edit Items
+
+All the items associated with a Material Request and having the default Supplier will be fetched in the Items Table. You can further edit items to enter rate, qty etc. Also items which are not to be ordered can be removed from Item table.
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/buying/articles/purchasing-in-different-unit.md b/erpnext/docs/user/manual/en/buying/articles/purchasing-in-different-unit.md
new file mode 100644
index 0000000000..e95f0e35e1
--- /dev/null
+++ b/erpnext/docs/user/manual/en/buying/articles/purchasing-in-different-unit.md
@@ -0,0 +1,42 @@
+#Purchasing in Different Unit (UoM)
+
+Each item has stock unit of measument (UoM) associated to it. For example UoM of pen is nos. and sand stocked kgs. But item could be purchased in different UoM, like 1 set/box of pen, or one truck of sand. In ERPNex, you can create purchase transaction for an item having different UoM than item's stock UoM.
+
+### Scenario:
+
+Item `Pen` is stocked in Nos, but purchased in Box. Hence we will make Purchase Order for Pen in Box.
+
+#### Step 1: Edit UoM in the Purchase Order
+
+In the Purchase Order, you will find two UoM fied.
+
+- UoM
+- Stock UoM
+
+In both the fields, default UoM of an item will be fetched by default. You should edit UoM field, and select Purchase UoM (Box in this case). Updating Purchase UoM is mainly for the reference of the supplier. In the print format, you will see item qty in the Purchase UoM.
+
+
+
+#### Step 2: Update UoM Conversion Factors
+
+In one Box, if you get 20 Nos. of Pen, UoM Conversion Factor would be 20.
+
+
+
+Based on the Qty and Conversion Factor, qty will be calculated in the Stock UoM of an item. If you purchase just one Box, then Qty in the stock UoM will be set as 20.
+
+
+
+### Stock Ledger Posting
+
+Irrespective of the Purchase UoM selected, stock ledger posting will be done in the Default UoM of an item. Hence you should ensure that conversion factor is entered correctly while purchasing item in different UoM.
+
+
+
+### Set Conversion Factor in Item
+
+In the Item master, under Purchase section, you can list all the possible purchase UoM of an item, with its UoM Conversion Factor.
+
+
+
+
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/buying/articles/select-material-requests-based-on-supplier.md b/erpnext/docs/user/manual/en/buying/articles/select-material-requests-based-on-supplier.md
deleted file mode 100644
index 6b59695046..0000000000
--- a/erpnext/docs/user/manual/en/buying/articles/select-material-requests-based-on-supplier.md
+++ /dev/null
@@ -1,19 +0,0 @@
-Select Material Requests based on Supplier
-
-Question : How to create a single Purchase Order from multiple Material Requests for all Items that are purchased from common Supplier?
-Answer :
-
- Material Requests can be individually fetched from Purchase Orders using the 'From Material Request' button. However this procedure becomes tedious when there are multiple Material Requests for items that are purchased from a single supplier.
- A more efficient way;
-
-Step 1: When creating a Purchase order use the 'For Supplier' button in the form.
-
-
-Step 2: In the 'Get From Supplier' pop-up enter the Supplier name and click on 'Get' .
-
-
-Step 3: All the items associated with a Material Request and having the default Supplier, will be fetched in the Items Table. Any Item that is not required can be deleted.
-
-
-Note: For this feature to map the Items correctly, the Default Supplier field in the Item Master must be filled.
-
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/manufacturing/subcontracting.md b/erpnext/docs/user/manual/en/manufacturing/subcontracting.md
index 6f2b86b40f..9252171a24 100644
--- a/erpnext/docs/user/manual/en/manufacturing/subcontracting.md
+++ b/erpnext/docs/user/manual/en/manufacturing/subcontracting.md
@@ -37,4 +37,8 @@ correct stock is maintained at the Supplier’s end.
> Note 2: ERPNext will automatically add the raw material rate for your
valuation purpose when you receive the finished Item in your stock.
+### Video Help
+
+VIDEO
+
{next}
diff --git a/erpnext/docs/user/manual/en/setting-up/users-and-permissions/adding-users.md b/erpnext/docs/user/manual/en/setting-up/users-and-permissions/adding-users.md
index dfd9ea00d1..517c6746e6 100644
--- a/erpnext/docs/user/manual/en/setting-up/users-and-permissions/adding-users.md
+++ b/erpnext/docs/user/manual/en/setting-up/users-and-permissions/adding-users.md
@@ -2,13 +2,13 @@
Users can be added by the System Manager. If you are a System Manager, you can add Users via
+> Setup > User
+
There are two main classes of users: Web Users and System Users. System Users are people using ERPNext in the company. Web users are customers or suppliers (or portal users).
Under User a lot of info can be entered. For the sake of usability the information entered for webs users is minimal: First Name and email.
Important is to realize that the email address is the unique key (ID) identifying the Users.
-> Setup > User
-
### 1. List of Users
@@ -26,8 +26,7 @@ After adding these details, save the user.
### 3. Setting Roles
-After saving, you will see a list of roles and a checkbox next to it. Just check the roles you want the
-the user to have and save the document. To click on what permissions translate into roles, click on the role
+After saving, you will see a list of roles and a checkbox next to it. Just check the roles you want the user to have and save the document. To click on what permissions translate into roles, click on the role
name.
diff --git a/erpnext/docs/user/manual/en/stock/articles/allow-over-delivery-billing-against-sales-order-upto-certain-limit.md b/erpnext/docs/user/manual/en/stock/articles/allow-over-delivery-billing-against-sales-order-upto-certain-limit.md
index bfee143404..f0963d142c 100644
--- a/erpnext/docs/user/manual/en/stock/articles/allow-over-delivery-billing-against-sales-order-upto-certain-limit.md
+++ b/erpnext/docs/user/manual/en/stock/articles/allow-over-delivery-billing-against-sales-order-upto-certain-limit.md
@@ -1,15 +1,22 @@
-Allow over delivery / billing against Sales Order upto certain limit
+#Allow Over Delivery/Billing
-Allow over delivery / billing against Sales Order upto certain limit
+While creating Delivery Note, system validates if item's Qty mentined is same as in the Sales Order. It Item Qty has been increased, you will get over-delivery validation. If you want to be able to deliver more items than mentioned in the Sales Order, you should update "Allow over delivery or receipt upto this percent" in the Item master.
-To setup over delivery / receipt / billing against a Sales / Purchase Order upto certain limit:
+
-1. Go to `Stock > Setup > Stock Settings`.
-2. Set `Allowance Percentage` and save the Stock Settings.
-
-For example: If you have ordered 100 units. and your Allowance is 50% then you are allowed to receive 150 units.
-3. To set item-specific limit, set `Allowance Percentage` in `Item` master.
-
+Item's and Rate is also validated when creating Sales Invoice from Sales Order. Also when creating Purchase Receipt and Purchaes Invoice from Purchase Order. Updating "Allow over delivery or receipt upto this percent" will be affective in all sales and purchase transactions.
+
+For example, if you have ordered 100 units of an item, and if item's over receipt percent is 50%, then you are allowed to make Purchase Receipt for upto 150 units.
+
+Update global value for "Allow over delivery or receipt upto this percent" from Stock Settings. Value updated here will be applicable for all the items.
+
+1. Go to `Stock > Setup > Stock Settings`
+
+2. Set `Allowance Percentage`.
+
+3. Save Stock Settings.
+
+
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/stock/articles/auto-creation-of-material-request.md b/erpnext/docs/user/manual/en/stock/articles/auto-creation-of-material-request.md
index e95b113f2b..02d88d8d3f 100644
--- a/erpnext/docs/user/manual/en/stock/articles/auto-creation-of-material-request.md
+++ b/erpnext/docs/user/manual/en/stock/articles/auto-creation-of-material-request.md
@@ -1,25 +1,27 @@
-Auto Creation of Material Request
+#Auto Creation of Material Request
-Auto Creation of Material Request
+To prevent stockouts, you can track item's reorder level. When stock level goes below reorder level, purchase manager is notified and instructed to initiate purchase process for the item.
-ERPNext allows you to define item-wise and warehouse-wise reorder level in the item master. Reorder level is the item's stock level at which item should be re-ordered.
+In ERPNext, you can update item's Reorder Level and Reorder Qty in the Item master. If same item has different reorder level, you can also update warehouse-wise reorder level and reorder qty.
+
+
With reorder level, you can also define what should be the next action. Either new purchase or transfer from another warehouse. Based on setting in Item master, purpose will be updated in the Material Request as well.
-
+
-You can have Material Request automatically created for items whose stock level reaches re-order level. You can enable this feature from:
+When item's stock reaches reorder level, Material Request is auto-created automatically. You can enable this feature from:
`Stock > Setup > Stock Settings`
-
+
-A separate Material Request will be created for each item. User with Purchase Manager's role will be informed about these Material Request. He can further process this Material Request, and create Supplier Quotation and Purchase Order against it.
+A separate Material Request will be created for each item. User with Purchase Manager's role will receive email alert about these Material Requests.
-If auto creation of Material Request is failed, Purchase Manager will be informed about error message via email. One of the most encountered error message is:
+If auto creation of Material Request is failed, User with Purchase Manager role will be informed about error message. One of the most encountered error message is:
-**An error occurred for certain Items while creating Material Requests based on Re-order level.
-Date 01-04-2015 not in any Fiscal Year.**
+**An error occurred for certain Items while creating Material Requests based on Re-order level.**
+**Date 01-04-2016 not in any Fiscal Year.**
-One of the reason of error could be Fiscal Year as well. Click [here](https://erpnext.com/kb/accounts/fiscal-year-error) to learn more about it.
+One of the reason of error could be Fiscal Year as well. Click [here]({{docs_base_url}}/user/manual/en/accounts/articles/fiscal-year-error.html) to learn more about it.
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/stock/articles/creating-depreciation-for-item.html b/erpnext/docs/user/manual/en/stock/articles/creating-depreciation-for-item.html
deleted file mode 100644
index 6115ed5451..0000000000
--- a/erpnext/docs/user/manual/en/stock/articles/creating-depreciation-for-item.html
+++ /dev/null
@@ -1,27 +0,0 @@
-Creating Depreciation For Item
-
-Creating Depreciation For Item
-
-Question: A Fixed Asset Item has been purchased and stored in a warehouse. How can the user create a depreciation for a Fixed Asset Item?Answer: Though there is no direct, automated method to book
-Asset Depreciation. A suitable work around to achieve this is by creating a Stock Reconciliation Entry.
- Step 1: In the Attachment file, fill in the appropriate columns;
-
-
- Item Code whose value is to be depreciated
- Warehouse in which it is stored
- Qty (Quantity) Leave this column blank
- Valuation Rate Enter the Value after Depreciation
-
-
-
-
-
-
-
-Step 2: In the Stock Reconciliation Form, enter the Expense account for depreciation in Difference Account .
-
-
-
-
-Note: For more information on Stock Reconciliation, see the
User Guide .
- Note: An Automated Asset Depreciation feature in on our To-Do List. See this
Github Issue .
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/stock/articles/creating-depreciation-for-item.md b/erpnext/docs/user/manual/en/stock/articles/creating-depreciation-for-item.md
index af9223fd0f..491427c3f2 100644
--- a/erpnext/docs/user/manual/en/stock/articles/creating-depreciation-for-item.md
+++ b/erpnext/docs/user/manual/en/stock/articles/creating-depreciation-for-item.md
@@ -1,24 +1,28 @@
-#Creating Depreciation For Item
+#Depreciation Entry
-**Question:** A Fixed Asset Item has been purchased and stored in a warehouse. How can the user create a depreciation for a Fixed Asset Item?<
+**Question:** A Fixed Asset Item has been purchased and stored in a warehouse. How to create a depreciation for a Fixed Asset Item?
-**Answer:**Though there is no direct, automated method to book Asset Depreciation. A suitable work around to achieve this is by creating a Stock Reconciliation Entry.
+**Answer:**You can post asset depreciation entry for the fixed asset item via [Stock Reconciliation]({{docs_base_url}}/user/manual/en/stock/opening-stock.html) Entry.
-####Step 1: In the Attachment file, fill in the appropriate columns;
+####Step 1:
-- _Item Code_ whose value is to be depreciated.
-- _Warehouse_ in which it is stored
-- _Qty_ Leave this column blank
-- _Valuation rate_ Enter the Value after Depreciation
+In the Attachment file, fill in the appropriate columns;
-
+- **Item Code** whose value is to be depreciated.
+- **Warehouse** in which item is stored.
+- **Qty (Quantity)** Leave this column blank.
+- **Valuation Rate** will be item's value after depreciation.
+
-####Step 2:
+After updating Valuation Rate for an item, come back to Stock Reconciliation and upload save .csv file.
-In the Stock Reconciliation Form, enter the Expense account for depreciation in Difference Account .
-
+####Step 2:
-Note: For more information on Stock Reconciliation, see the
User Guide .
+Select Expense account for depreciation in **Difference Account**. Value booked in the depreciation account will be the difference of old and next valuation rate of the fixed asset item, which will be actually the depreciation amount.
- Note: An Automated Asset Depreciation feature in on our To-Do List. See this
Github Issue .
\ No newline at end of file
+
+
+####Stock Reconciliation Help Video
+
+VIDEO
diff --git a/erpnext/docs/user/manual/en/stock/articles/index.txt b/erpnext/docs/user/manual/en/stock/articles/index.txt
index fc039b1795..6d20384554 100644
--- a/erpnext/docs/user/manual/en/stock/articles/index.txt
+++ b/erpnext/docs/user/manual/en/stock/articles/index.txt
@@ -1,7 +1,7 @@
allow-over-delivery-billing-against-sales-order-upto-certain-limit
auto-creation-of-material-request
-creating-depreciation-for-item
-is-stock-item-field-frozen-in-item-master
+depreciation-entry
+maintain-stock-field-frozen-in-item-master
manage-rejected-finished-goods-items
managing-assets
managing-batch-wise-inventory
@@ -11,5 +11,4 @@ repack-entry
serial-no-naming
stock-entry-purpose
stock-level-report
-track-items-using-barcode
-using-batch-feature-in-stock-entry
\ No newline at end of file
+track-items-using-barcode
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/stock/articles/is-stock-item-field-frozen-in-item-master.md b/erpnext/docs/user/manual/en/stock/articles/maintain-stock-field-frozen-in-item-master.md
similarity index 76%
rename from erpnext/docs/user/manual/en/stock/articles/is-stock-item-field-frozen-in-item-master.md
rename to erpnext/docs/user/manual/en/stock/articles/maintain-stock-field-frozen-in-item-master.md
index a0128273f9..f93e66862b 100644
--- a/erpnext/docs/user/manual/en/stock/articles/is-stock-item-field-frozen-in-item-master.md
+++ b/erpnext/docs/user/manual/en/stock/articles/maintain-stock-field-frozen-in-item-master.md
@@ -1,14 +1,12 @@
-Is Stock Item field Frozen in the Item master
+#Maintain Stock field Frozen in the Item master
-Is Stock Item field Frozen in the Item master
+In the item master, you might witness values in the following fields to be frozen.
-In the item master, you might witness values in the following fields be frozen.
-
-1. Is Stock Item
+1. Maintain Stock
1. Has Batch No.
1. Has Serial No.
-
+
For an item, once stock ledger entry is created, values in these fields will be froze. This is to prevent user from changing value which can lead to mis-match of actual stock, and stock level in the system of an item.
diff --git a/erpnext/docs/user/manual/en/stock/articles/manage-rejected-finished-goods-items.md b/erpnext/docs/user/manual/en/stock/articles/manage-rejected-finished-goods-items.md
index 9bb01036c3..2d57d6442e 100644
--- a/erpnext/docs/user/manual/en/stock/articles/manage-rejected-finished-goods-items.md
+++ b/erpnext/docs/user/manual/en/stock/articles/manage-rejected-finished-goods-items.md
@@ -1,32 +1,31 @@
-Manage Rejected Finished Goods Items
+#Manage Rejected Finished Goods Items
-Manage Rejected Finished Goods Items
+There could be manufactured Items which would not pass quality test, hence rejected.
-There could be manufactured Items which would not pass quality test, and would be rejected.
-
-Standard manufacturing process in ERPNext doesn't cover managing rejected items separately. Hence you should create finished goods entry for both accepted as well as rejected items. With this, you will have rejected items also received in the finished goods warehouse.
+Standard manufacturing process in ERPNext doesn't cover managing rejected items. Hence you should create finished goods entry for both accepted as well as rejected items. With this, you will have rejected items also received in the finished goods warehouse.
To move rejected items from the finished goods warehouse, you should create Material Transfer entry. Steps below to create Material Transfer entry.
-####New Stock Entry
+####Step 1: New Stock Entry
-`Stock > Stock Entry > New`
+`Stock > Documents > Stock Entry > New`
-####Entry Purpose
+####Step 2: Purpose
Purpose = Material Transfer
-####Warehouse
+####Step 3: Warehouse
Source Warehouse = Finished Goods warehouse
Target Warehouse = Rejected items warehouse
-####Items
+####Step 4: Items
Select item which failed quality test, and enter total rejected items as Qty.
-####Submit Stock Entry
+####Step 5: Submit Stock Entry
On Saving and Submitting Stock Entry, stock of rejected items will be moved from Finished Goods Warehouse to Rejected Warehouse.
+
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/stock/articles/managing-assets.md b/erpnext/docs/user/manual/en/stock/articles/managing-assets.md
index 5032dcd86c..0be7860640 100644
--- a/erpnext/docs/user/manual/en/stock/articles/managing-assets.md
+++ b/erpnext/docs/user/manual/en/stock/articles/managing-assets.md
@@ -1,24 +1,23 @@
-Managing Assets
+#Managing Assets
-Managing Assets
+Items like machinery, furniture, land and property, patents etc. can be categorized as fixed asset of a company. In ERPNext, you can maintain fixed asset items, mainly stock items in a separate Warehouse.
-Items like machinery, furniture, land and property, patents etc. can be categorized as fixed asset of a company. In ERPNext, you can maintain fixed asset items in a separate Warehouse.
-
-Item can be created for each type of an asset. Whereas unique Serial No. will be created for each unit of that asset item. Maintaining serialized inventory of asset item will have in tracking item's warranty and expiry details.
+For the high value asset items, serialized inventory can be maintained. It will allow assigning unique Serial No. to each unit of an asset item.
####Fixed Asset Master
-While creating Item Code for the fixed asset item, you should updated field "Is Fixed Asset" as "Yes".
+While creating Item Code for the fixed asset item, you should check "Is Fixed Asset" field.
-
+
Other item properties like Stock/Non-stock item can be updated on the nature of asset. Like patent and trademarks will be non-stock assets.
-If your asset item is serialized, click [here](https://erpnext.com/user-guide/stock/serialized-inventory) to learn how serialized inventory is managed in ERPNext.
+If your asset item is serialized, click [here]({{docs_base_url}}/user/videos/learn/serialized-inventory.html) to learn how serialized inventory is managed in ERPNext.
####Warehouse for Fixed Asset
-Separate Warehouse should be created for the fixed asset items. All the sales, purchase and stock transactions for asset items will be done in that fixed asset warehouse only.
+Separate Warehouse should be created for the fixed asset items. All the sales, purchase and stock transactions for asset items should be done for fixed asset warehouse only.
+
+As per the perpetual inventory valuation system, accounting ledger is auto-created for a warehouse. You can move the accounting ledger of fixed asset asset from Stock Asset (default group) to Fixed Asset's group account.
-Also, as per the perpetual inventory valuation system, you will have accounting ledger auto-created for the warehouse. You can move the accounting ledger of warehouse created for fixed asset from Stock Asset group to fixed asset group. This will be helpful while preparing financial statement for a company.
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/stock/articles/managing-batch-wise-inventory.html b/erpnext/docs/user/manual/en/stock/articles/managing-batch-wise-inventory.html
deleted file mode 100644
index 23cd46d518..0000000000
--- a/erpnext/docs/user/manual/en/stock/articles/managing-batch-wise-inventory.html
+++ /dev/null
@@ -1,5 +0,0 @@
-Managing Batch wise Inventory
-
-Managing Batch wise Inventory
-
-To maintain batches against an Item you need to mention 'has batch no' as yes in the Item Master. You can create a new Batch from
Stock > Documents > Batch > New
To learn more about batch check out the manual page at https://manual.erpnext.com/contents/stock/batch
While making a purchase receipt or delivery note, mention the batch number against the item.
Batch No. in Purchase Receipt
Batch No. in Delivery Note
Batch-wise Stock Balance Report
To check batch-wise stock balance report, go to:
Stock > Standard Reports > Batch-wise Balance History
diff --git a/erpnext/docs/user/manual/en/stock/articles/managing-batch-wise-inventory.md b/erpnext/docs/user/manual/en/stock/articles/managing-batch-wise-inventory.md
index 5b169545c9..7ae102beb3 100644
--- a/erpnext/docs/user/manual/en/stock/articles/managing-batch-wise-inventory.md
+++ b/erpnext/docs/user/manual/en/stock/articles/managing-batch-wise-inventory.md
@@ -1,23 +1,35 @@
#Managing Batch wise Inventory
-To maintain batches against an Item you need to mention 'has batch no' as yes in the Item Master. You can create a new Batch from:
+Set of items which has same properties and attributes can be group in a single Batch. For example, pharceuticals items are batch, so that it's manufacturing and expiry date can be tracked together.
+
+To maintain batches against an Item you need to mention 'Has Batch No' as yes in the Item Master.
+
+
+
+You can create a new Batch from:
`Stock > Documents > Batch > New`
-To learn more about batch check out the manual page at: https://manual.erpnext.com/contents/stock/batch
+To learn more about batch, click [here.]({{docs_base_url}}/user/manual/en/stock/batch.html)
-While making a purchase receipt or delivery note, mention the batch number against the item.
+For the Batch item, updating Batch No. in the stock transactions (Purchase Receipt & Delivery Note) is mandatory.
-**Batch No. in Purchase Receipt**
+#### Purchase Receipt
-
+When creating Purchase Receipt, you should create new Batch, or select one of the existing Batch master. One Batch can be associated with one Batch Item.
-**Batch No. in Delivery Note**
+
-
+#### Delivery Note
-Batch-wise Stock Balance Report
+Define Batch in Delivery Note Item table. If Batch item is added under Product Bundle, you can update it's Batch No. in the Packing List table sa well.
+
+
+
+#### Batch-wise Stock Balance Report
To check batch-wise stock balance report, go to:
-`Stock > Standard Reports > Batch-wise Balance History`
+Stock > Standard Reports > Batch-wise Balance History
+
+
diff --git a/erpnext/docs/user/manual/en/stock/articles/managing-fractions-in-uom.md b/erpnext/docs/user/manual/en/stock/articles/managing-fractions-in-uom.md
index 75acd387df..12447e006d 100644
--- a/erpnext/docs/user/manual/en/stock/articles/managing-fractions-in-uom.md
+++ b/erpnext/docs/user/manual/en/stock/articles/managing-fractions-in-uom.md
@@ -1,12 +1,10 @@
-Managing Fractions in UoM
-
-Managing Fractions in UoM
+#Managing Fractions in UoM
UoM stands for Unit of Measurement. Few examples of UoM are Numbers (Nos), Kgs, Litre, Meter, Box, Carton etc.
-There are few UoMs which cannot have value decimal places. For example, if we have television for an item, with Nos as its UoM, we cannot have 1.5 Nos. of television, or 3.7 Nos. of computer sets. The value of quantity for these items must be whole number.
+There are few UoMs which cannot have value in decimal places. For example, if we have television for an item, with Nos as its UoM, we cannot have 1.5 Nos. of television, or 3.7 Nos. of computer sets. The value of quantity for these items must be whole number.
-You can configure if particular UoM can have value in decimal place or no. Bydefault, decimal places will be allowed in all the UoMs. To restrict decimal places or value in fraction for any UoM, you should follow these steps.
+You can configure if particular UoM can have value in decimal place or no. By default, value in decimal places will be allowed for all the UoMs. To restrict decimal places or value in fraction for any UoM, you should follow these steps.
####UoM List
@@ -14,21 +12,21 @@ For UoM list, go to:
`Stock > Setup > UoM`
-For the list of UoM, select one which you want to restrict value in fraction. Let's assume that UoM is Nos.
+From the list of UoM, select UoM for which value in decimal place is to be restricted. Let's assume that UoM is Nos.
####Configure
-In the UoM form, you will find a field called "Must be whole number". Check this field to restrict user from enter decimal places in quantity field for item with this UoM.
+In the UoM master, you will find a field called "Must be whole number". Check this field to restrict user from enter value in decimal places in quantity field, for item having this UoM.
-
+
-####While Creating Entry
+####Validation
-While creating transaction, if you enter value in fraction for item who's UoM has "Must be whole number" checked, you will get error message stating:
+While creating transaction, if you enter value in fraction for item whos UoM has "Must be whole number" checked, you will get error message stating:
`Quantity cannot be a fraction at row #`
-
+
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/stock/articles/opening-stock-balance-entry-for-the-serialized-and-batch-item.md b/erpnext/docs/user/manual/en/stock/articles/opening-stock-balance-entry-for-the-serialized-and-batch-item.md
index 5251a8e4ef..9b8684a1c4 100644
--- a/erpnext/docs/user/manual/en/stock/articles/opening-stock-balance-entry-for-the-serialized-and-batch-item.md
+++ b/erpnext/docs/user/manual/en/stock/articles/opening-stock-balance-entry-for-the-serialized-and-batch-item.md
@@ -1,14 +1,14 @@
-Opening Stock Balance Entry for the Serialized and Batch Item
+#Opening Stock Balance Entry for the Serialized and Batch Item
-Opening Stock Balance Entry for the Serialized and Batch Item
+Items for which Serial No. and Batch No. is maintained, opening stock balance entry for them is update via Stock Entry. [Click here to learn how serialized inventory is managed in ERPNext]({{docs_base_url}}/user/manual/en/stock/serial-no.html).
-Items for which Serial No. and Batch No. is maintained, opening stock balance entry for them will be update via Stock Entry. [Click here to learn how serialized inventory is managed in ERPNext](https://erpnext.com/user-guide/stock/serialized-inventory).
+**Question:** Why Opening Balance entry for the Serialized and Batch Item cannot be updated via Stock Reconciliation?
-Why Opening Balance entry for the Serialized and Batch Item cannot be updated via Stock Reconciliation?
+In the ERPNext, stock level of a serialized items is derived based on the count of Serial Nos for that item. Hence, unless Serial Nos. are created for the serialized item, its stock level is not be updated. In the Stock Reconciliation Tool, you can only update opening quantity of an item, but not their Serial No. and Batch No.
-In the ERPNext, stock level of a serialized items is derived based on the count of Serial Nos for that item. Hence, unless Serial Nos. are created for the serialized item, its stock level will not be updated. In the Stock Reconciliation Tool, you can only update opening quantity of an item, and not their Serial No. and Batch No.
+### Opening Balance for the Serialized Item
-Let's check steps for create opening stock balance entry for the Serialized and Batch item.
+Following are the steps to create opening stock balance entry for the Serialized and Batch item.
#### Step 1: New Stock Entry
@@ -28,36 +28,33 @@ Target Warehouse will be one in which opening balance of an item will be updated
#### Step 5: Select Items
-Select Items in the Stock Entry table.
+Select Items for which opening balance is to be updated.
#### Step 6: Update Opening Qty
-For the serialized item, you should update as many Serial Nos as their Qty. If you have updated Prefix in the Item master, on the submission of Stock Entry Serial Nos. will be auto-created following that prefix.
+For the serialized item, update quantity as many Serial Nos are their.
-
+For the serialized item, mention Serial Nos. equivalent to it's Qty. Or if Serial Nos. are configured to be created based on Prefix, then no need to mention Serial Nos. manually. Click [here]({{docs_base_url}}/user/manual/en/stock/articles/serial-no-naming.html) to learn more about Serial No. naming.
-For a batch item, you should provide Batch ID in which opening balance will be updated. You should keep batch master ready, and updated it for the Batch Item. To create new Batch, go to:
+For a batch item, provide Batch ID in which opening balance will be updated. Keep batch master ready, and updated it for the Batch Item. To create new Batch, go to:
`Stock > Setup > Batch > New`
-[Click here to learn how Batchwise inventory is managed in ERPNext](https://erpnext.com/user-guide/stock/batchwise-inventory).
+[Click here to learn how Batchwise inventory is managed in ERPNext.]({{docs_base_url}}/user/manual/en/stock/articles/managing-batch-wise-inventory.html)
#### Step 7: Update Valuation Rate an Item
-Valuation Rate is the mandatory field, where you should update `per unit value of item`. If you have unit of items having different valuation rates, they should be updated in a separate row, with different Valuation Rate.
+Update valuation rate, which will be per unit value of item. If different units of the same items having different valuation rate, they should be updated in a separate row, with different Valuation Rates.
#### Step 8: Difference Account
-As per perpetual inventory valuation system, accounting entry is created for every stock entry. Accounting system followed in the ERPNext requires Total Debit in an entry matching with Total Credit. On the submission of Stock Entry, system Debits accounting ledger of a Warehouse by total value of items. To balance the same, we use Temporary Liability account in the Difference Account field. [Click here to learn more about use of Temporary Accounts in updating opening balance](https://erpnext.com/kb/accounts/updating-opening-balance-in-accounts-using-temporary-account).
+As per perpetual inventory valuation system, accounting entry is created for every stock transaction. Double entry accounting system requires Total Debit matching with Total Credit in an entry. On the submission of Stock Entry, system debits Warehouse account by total value of items. To balance the same, we use Temporary Opening account as a Difference Account.
-
+
#### Step 9: Save and Submit Stock Entry
-On submission of Stock Entry, stock ledger entry will be posted, and opening balance will be updated for the items on a given posting date.
+On submission of Stock Entry, stock ledger posting will be posted, and opening balance will be updated for the items on a given Posting Date.
-If Serial Nos. for your items are set to be created based on prefix, then on submission of Stock Entry, Serial Nos. will be created as well.
-
-
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/stock/articles/repack-entry.md b/erpnext/docs/user/manual/en/stock/articles/repack-entry.md
index 59bf9835f7..1d758c8a04 100644
--- a/erpnext/docs/user/manual/en/stock/articles/repack-entry.md
+++ b/erpnext/docs/user/manual/en/stock/articles/repack-entry.md
@@ -1,16 +1,14 @@
-Repack Entry
+#Repack Entry
-Repack Entry
-
-If you buy items in bulk to be repacked into smaller packs, you can create a **Stock Entry** of type "Repack". For example, item bought in tons can be repacked into Kgs.
+Repack Entry is created for item bought in bulk, which is being packed into smaller packages. For example, item bought in tons can be repacked into Kgs.
Notes:
-1. Separate purchase and repacked Items must be made.
+1. Purchase Item and repack will be have different Item Codes.
2. Repack entry can be made with or without BOM (Bill of Material).
-Let's check below scenario to understand this better.
+In a Repack Entry, there can be one or more than one repack items. Let's check below scenario to understand this better.
-Assume you buy crude oil in barrel, and get diesel and gasoline as its output. To create production entry, go to:
+Assume we are buying boxes of spray paint of specific colour (Green, Blue etc). And later re-bundling to create packs having multiple colours of spray paint (Blue-Green, Green-Yellow etc.) in them.
#### 1. New Stock Entry
@@ -22,14 +20,16 @@ Select Purpose as 'Repack Entry'.
For raw-material/input item, only Source Warehouse will be provided.
-For repacked/production item, only Target Warehouse will be entered. You will have to provide valuation for the repacked/production item.
+For repacked/output items, only Target Warehouse will be provided. You will have to provide valuation for the repack items.
-
+
+
+Update Qty for all the items selected.
#### 3. Submit Stock Entry
-On submitting Stock Entry, stock of input item will be reduced from Source Warehouse, and stock of repacked/production item will be added in the Target Warehouse.
+On submitting Stock Entry, stock of input item will be reduced from Source Warehouse, and stock of repack/output item will be added in the Target Warehouse.
-
+
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/stock/articles/serial-no-naming.md b/erpnext/docs/user/manual/en/stock/articles/serial-no-naming.md
index c4e8774e40..4f2425ffb3 100644
--- a/erpnext/docs/user/manual/en/stock/articles/serial-no-naming.md
+++ b/erpnext/docs/user/manual/en/stock/articles/serial-no-naming.md
@@ -1,26 +1,24 @@
-Serial No. Naming
+#Serial No. Naming
-Serial No. Naming
+Serial Nos. is unique value assigned on each unit of an item. Serial no. helps in tracking item's warranty and expiry details. Generally high value items like machines, computers, costly equipments are serialized.
-Serial Nos. are unique value assigned on each unit of an item. Serial no. helps in locating and tracking item's warranty and expiry details.
-
-To make item Serialized, in the Item master, on selecting **Has Serial No** field should be updated as "Yes".
+To make item Serialized, in the Item master, check **Has Serial No**.
There are two ways Serial no. can be generated in ERPNext.
###1. Serializing Purchase Items
-If purchased items are received with Serial Nos. applied by OEM (original equipment manufacturer), you should follow this approach. While creating Purchase Receipt, you shall scan or manually enter Serial nos. for an item. On submitting Purchase Receipt, Serial Nos. will be created in the backend as per Serial No. entered for an item.
+If purchased items are received with Serial Nos. applied by OEM (original equipment manufacturer), you can follow same Serial No in ERPNext as well. While creating Purchase Receipt, you shall scan or manually enter Serial nos. for an item. On submitting Purchase Receipt, Serial Nos. will be created in the backend as per Serial Nos. provided for an item. If using OEM' Serial No., then in the Item master, Prefix should not be mentioned for serializalization. As per this scenaio, Prefix field should be left blank.
If received items already has its Serial No. barcoded, you can simply scan that barcode for entering Serial No. in the Purchase Receipt. Click [here](https://frappe.io/blog/management/using-barcodes-to-ease-data-entry) to learn more about it.
On submission of Purchase Receipt or Stock entry for the serialized item, Serial Nos. will be auto-generated.
-
+
Generated Serial numbers will be updated for each item.
-
+
###2. Serializing Manufacturing Item
@@ -30,12 +28,12 @@ To Serialize Manufacturing Item, you can define Series for Serial No. Generation
When Item is set as serialized, it will allow you to mentioned Series for it.
-
+
####2.2 Production Entry for Serialized Item
On submission of production entry for manufacturing item, system will automatically generate Serial Nos. following Series as specified in the Item master.
-
+
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/stock/articles/stock-entry-purpose.md b/erpnext/docs/user/manual/en/stock/articles/stock-entry-purpose.md
index 26b6346927..426328ecf7 100644
--- a/erpnext/docs/user/manual/en/stock/articles/stock-entry-purpose.md
+++ b/erpnext/docs/user/manual/en/stock/articles/stock-entry-purpose.md
@@ -1,53 +1,49 @@
-Stock Entry Purpose
+#Stock Entry Purpose
-Stock Entry Purpose
+Stock Entry is a stock transaction, which can be used for multiple purposes. Let's learn about each Stock Entry Purpose below.
-Stock Entry document records Item movement from a Warehouse, to a Warehouse and between Warehouses. And in stock entry form selection of 'Purpose' belongs to type of item movement. Following are the uses of Stock Entry Purposes in stock entry form.
+#### 1.Purpose: Material Issue
-#### 1.Purpose = Material Issue
+Material Issue entry create to issue item(s) from a warehouse. On submission of Material Issue, stock of item is deducated from the Source Warehouse.
-This purpose is selected to issue item from a warehouse. In this stock entry, you should define Source Warehouse only. This type of stock entry can be perform for adjustment of serialized inventory.
+Material Issue is generally made for the low value consumable items like office stationary, product consumables etc. Also you can create Material Issue to reconcile serialized and batched item's stock.
-
+
-#### 2.Purpose = Material Receipt
+#### 2.Purpose: Material Receipt
-This purpose is selected to receive item in a warehouse. In this stock entry, you should define Target Warehouse only. This type of stock entry can be perform for adjustment of serialized inventory.
+Material Receipt entry is created to inward stock of item(s) in a warehouse. This type of stock entry can be created for updating opening balance of serialized and batched item. Also items purchased without Purchase Order can be inwarded from Material Receipt entry.
-
+For the stock valuation purpose, provided Item Valuation becomes a mandatory field in the Material Receipt entry.
-#### 3.Purpose = Material Transfer
+
-This purpose is selected to transfer item from warehouse to warehouse or to transfer raw material for production. In this stock entry, you should define Source Warehouse and Target Warehouse also.
+#### 3.Purpose: Material Transfer
-
+Material Transfer entry is created for the inter-warehouse Material Transfer.
+
+
-#### 4.Purpose = Manufacture
+#### 4.Purpose: Material Transfer for Manufacture
-This purpose is selected to perform finished goods entry. This purpose is auto selected in stock entry form, when you Update Finished Goods entry from Submitted Production Order. 
+In the manufacturing process, raw-materials are issued from the stores to the production department (generally WIP warehouse). This Material Transfer entry is created from Production Order. Items in this entry are fetched from the BOM of production Item, as selected in Production Order.
-
+
-#### 5.Purpose = Repack
+#### 4.Purpose: Manufacture
-This purpose is selected to perform repack of item. 
+Manufacture is created from Production Order. In this entry, both raw-material item as well as production item are fetched from the BOM, selected in the Production Order. For the raw-material items, only Source Warehouse (generally WIP warehouse) is mentioned. For the production item, only target warehouse as mentioned in the Production Order is updated. On submission, stock of raw-material items are deducted from Source Warehouse, which indicates that raw-material items were consumed in the manufacturing process. Production Item is added to the Target Warehouse marking the completion of production cycle.
-#### 6.Purpose = Subcontract
+
-This purpose is selected to transfer row material to supplier for manufacturing subcontracting item.
+#### 5.Purpose: Repack
-
+Repack Entry is created when items purchases in bulk is repacked under smaller packs. 
-#### 6.Purpose = Sales Return
+#### 6.Purpose: Subcontract
-This purpose is selected to receive returned item by customer. 
+Subcontracting transaction involves company transfer raw-material items to the sub-contractors warehouse. This requires adding a warehouse for the sub-contractor as well. Sub-contract entry transfers stock from the companies warehouse to the sub-contractors warehouse..
-
+
-#### 6.Purpose = Purchase Return
-
-This purpose is selected to issue purchased item to supplier. 
-
-
-
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/stock/articles/stock-level-report.md b/erpnext/docs/user/manual/en/stock/articles/stock-level-report.md
index fa9261298f..b674470156 100644
--- a/erpnext/docs/user/manual/en/stock/articles/stock-level-report.md
+++ b/erpnext/docs/user/manual/en/stock/articles/stock-level-report.md
@@ -1,6 +1,4 @@
-Stock Level Report
-
-Stock Level Report
+#Stock Level Report
Stock Level report list stock item's quantity available in a particular warehouse.
diff --git a/erpnext/docs/user/manual/en/stock/articles/track-items-using-barcode.md b/erpnext/docs/user/manual/en/stock/articles/track-items-using-barcode.md
index 5b0d99af11..c880dfb0a0 100644
--- a/erpnext/docs/user/manual/en/stock/articles/track-items-using-barcode.md
+++ b/erpnext/docs/user/manual/en/stock/articles/track-items-using-barcode.md
@@ -1,20 +1,21 @@
-Track items using Barcode
+#Track Items Using Barcode
-A barcode, is a code using multiple lines and spaces of varying widths, designed to represent some alpha-numeric characters. For example, in retail, it generally represents item code / serial number. Most barcode scanners behave like an external keyboard. When it scans a barcode, the data appears in the computer screens at the point of cursor.
+A barcode is a value decoded into vertical spaced lines. Barcode scanners are the input medium, like Keyboard. When it scans a barcode, the data appears in the computer screens at the point of a cursor.
-To enable barcode feature in ERPNext go to `Setup –> Customize –> Features Setup` and check "Item Barcode" option.
-
+To enable barcode feature in ERPNext go to:
-Now, a new field "Barcode" will be appear in Item master, enter barcode while creating a new item. You can update barcode field for existing items using "Data Import Tool".
+`Setup > Customize > Features Setup`
-If you are creating your own barcode, then you should print those same barcodes and attach to your products.
-
+Check "Item Barcode".
+
-Once you have updated barcode field in item master, you can fetch items using barcode in Delivery Note, Sales Invoice and Purchase Receipt document.
+Now a new field "Barcode" will be appear in Item master. Enter barcode while creating a new item.
-For example, in Delivery Note Item table, a new field "Barcode" will be appear and if you point your mouse cursor to that field and scan the barcode using Barcode Scanner, the code will appear in that field. At the same time, system will pull item details, based on the barcode.
-
+
+Once barcode field is updated in item master, items can be fetched using barcode. This feature will be availble in Delivery Note, Sales Invoice and Purchase Receipt transactions only.
+
+
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/stock/articles/using-batch-feature-in-stock-entry.md b/erpnext/docs/user/manual/en/stock/articles/using-batch-feature-in-stock-entry.md
deleted file mode 100644
index eeb5cdfdab..0000000000
--- a/erpnext/docs/user/manual/en/stock/articles/using-batch-feature-in-stock-entry.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Using Batch feature in Stock Entry.
-
-1. You need to first create an Item Master Record. You can do so by typing 'new Item' in the Awesome bar.
-
-2. In the Item Master fill in all item related details. In the 'Inventory' section select 'Has Batch No.' as 'YES'
-
- NOTE: This option can be changed after submit but only as long as there are no Stock Entries created against that Item. Once an Stock Entry is created against that item this field freezes. To modify it again you need to cancel all outstanding 'Stock Entries'
-3. You can then create a batch. To do so you can type 'new Batch' in the Awesome bar.
-4. Fill in the batch related details and save the Doc.
-
-5. Now in Stock Transaction You can associate a batch against that item under the 'Serial No / Batch' Section.
-
diff --git a/erpnext/docs/user/videos/index.md b/erpnext/docs/user/videos/index.md
index dcefe84092..1399258285 100644
--- a/erpnext/docs/user/videos/index.md
+++ b/erpnext/docs/user/videos/index.md
@@ -32,4 +32,4 @@
Join us at the ERPNext Conference on October 9th 2015 in Mumbai
-
+
\ No newline at end of file
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 03c340f768..a1c369e760 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -7,7 +7,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd."
app_description = """ERP made simple"""
app_icon = "icon-th"
app_color = "#e74c3c"
-app_version = "6.17.0"
+app_version = "6.18.0"
app_email = "info@erpnext.com"
app_license = "GNU General Public License (v3)"
source_link = "https://github.com/frappe/erpnext"
diff --git a/erpnext/hr/doctype/employee/employee.js b/erpnext/hr/doctype/employee/employee.js
index 39af40e886..8a20a09cdd 100644
--- a/erpnext/hr/doctype/employee/employee.js
+++ b/erpnext/hr/doctype/employee/employee.js
@@ -24,8 +24,9 @@ erpnext.hr.EmployeeController = frappe.ui.form.Controller.extend({
erpnext.toggle_naming_series();
if(!this.frm.doc.__islocal && this.frm.doc.__onload &&
!this.frm.doc.__onload.salary_structure_exists) {
- cur_frm.add_custom_button(__('Make Salary Structure'), function() {
- me.make_salary_structure(this); }, frappe.boot.doctype_icons["Salary Structure"]);
+ cur_frm.add_custom_button(__('Salary Structure'), function() {
+ me.make_salary_structure(this); }, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
},
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.js b/erpnext/hr/doctype/expense_claim/expense_claim.js
index 780cd70612..85cd38df41 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.js
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.js
@@ -97,8 +97,9 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){
if(doc.docstatus==1 && frappe.model.can_create("Journal Entry") &&
cint(doc.total_amount_reimbursed) < cint(doc.total_sanctioned_amount))
- cur_frm.add_custom_button(__("Make Bank Entry"),
- cur_frm.cscript.make_bank_entry, frappe.boot.doctype_icons["Journal Entry"]);
+ cur_frm.add_custom_button(__("Bank Entry"),
+ cur_frm.cscript.make_bank_entry, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
}
diff --git a/erpnext/hr/doctype/job_applicant/job_applicant.js b/erpnext/hr/doctype/job_applicant/job_applicant.js
index 1ca750ad15..eac1a9add1 100644
--- a/erpnext/hr/doctype/job_applicant/job_applicant.js
+++ b/erpnext/hr/doctype/job_applicant/job_applicant.js
@@ -10,18 +10,19 @@ frappe.ui.form.on("Job Applicant", {
refresh: function(frm) {
if (!frm.doc.__islocal) {
if (frm.doc.__onload && frm.doc.__onload.offer_letter) {
- frm.add_custom_button(__("View Offer Letter"), function() {
+ frm.add_custom_button(__("Offer Letter"), function() {
frappe.set_route("Form", "Offer Letter", frm.doc.__onload.offer_letter);
- });
+ }, __("View"));
} else {
- frm.add_custom_button(__("Make Offer Letter"), function() {
+ frm.add_custom_button(__("Offer Letter"), function() {
frappe.route_options = {
"job_applicant": frm.doc.name,
"applicant_name": frm.doc.applicant_name,
"designation": frm.doc.job_opening,
};
new_doc("Offer Letter");
- });
+ }, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
}
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.js b/erpnext/hr/doctype/salary_structure/salary_structure.js
index 995c744edf..65aac1bf60 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.js
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.js
@@ -12,8 +12,9 @@ cur_frm.cscript.onload = function(doc, dt, dn){
cur_frm.cscript.refresh = function(doc, dt, dn){
if((!doc.__islocal) && (doc.is_active == 'Yes')){
- cur_frm.add_custom_button(__('Make Salary Slip'),
- cur_frm.cscript['Make Salary Slip'], frappe.boot.doctype_icons["Salary Slip"]);
+ cur_frm.add_custom_button(__('Salary Slip'),
+ cur_frm.cscript['Make Salary Slip'], __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
}
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 7c47cb8aff..6cfbc99ca6 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -4,17 +4,15 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import cint, cstr, flt
-
from frappe import _
from frappe.model.document import Document
from operator import itemgetter
class BOM(Document):
-
def autoname(self):
last_name = frappe.db.sql("""select max(name) from `tabBOM`
- where name like "BOM/%s/%%" """ % frappe.db.escape(self.item))
+ where name like "BOM/{0}/%%" and item=%s""".format(frappe.db.escape(self.item)), self.item)
if last_name:
idx = cint(cstr(last_name[0][0]).split('/')[-1].split('-')[0]) + 1
else:
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.js b/erpnext/manufacturing/doctype/production_order/production_order.js
index 7349447ffd..ad8b7760c3 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.js
+++ b/erpnext/manufacturing/doctype/production_order/production_order.js
@@ -61,38 +61,35 @@ erpnext.production_order = {
set_custom_buttons: function(frm) {
var doc = frm.doc;
if (doc.docstatus === 1) {
-
- if (flt(doc.material_transferred_for_manufacturing) < flt(doc.qty)) {
- frm.add_custom_button(__('Transfer Materials for Manufacture'),
- cur_frm.cscript['Transfer Raw Materials'], frappe.boot.doctype_icons["Stock Entry"]);
- }
-
- if (flt(doc.produced_qty) < flt(doc.material_transferred_for_manufacturing)) {
- frm.add_custom_button(__('Update Finished Goods'),
- cur_frm.cscript['Update Finished Goods'], frappe.boot.doctype_icons["Stock Entry"]);
- }
-
- frm.add_custom_button(__("Show Stock Entries"), function() {
+ frm.add_custom_button(__("Stock Entries"), function() {
frappe.route_options = {
production_order: frm.doc.name
}
frappe.set_route("List", "Stock Entry");
- });
+ }, __("View"));
if (doc.status != 'Stopped' && doc.status != 'Completed') {
- frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Production Order'],
- "icon-exclamation", "btn-default");
+ frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Production Order'], __("Status"));
} else if (doc.status == 'Stopped') {
- frm.add_custom_button(__('Re-open'), cur_frm.cscript['Unstop Production Order'],
- "icon-check", "btn-default");
+ frm.add_custom_button(__('Re-open'), cur_frm.cscript['Unstop Production Order'], __("Status"));
}
// opertions
if ((doc.operations || []).length) {
- frm.add_custom_button(__('Show Time Logs'), function() {
+ frm.add_custom_button(__('Time Logs'), function() {
frappe.route_options = {"production_order": frm.doc.name};
frappe.set_route("List", "Time Log");
- });
+ }, __("View"));
+ }
+
+ if (flt(doc.material_transferred_for_manufacturing) < flt(doc.qty)) {
+ frm.add_custom_button(__('Transfer Materials for Manufacture'),
+ cur_frm.cscript['Transfer Raw Materials'], __("Stock Entry"));
+ }
+
+ if (flt(doc.produced_qty) < flt(doc.material_transferred_for_manufacturing)) {
+ frm.add_custom_button(__('Update Finished Goods'),
+ cur_frm.cscript['Update Finished Goods'], __("Stock Entry"));
}
}
@@ -256,11 +253,10 @@ cur_frm.cscript['Update Finished Goods'] = function() {
cur_frm.fields_dict['production_item'].get_query = function(doc) {
return {
- filters:[
- ['Item', 'is_pro_applicable', '=', 1],
- ['Item', 'has_variants', '=', 0],
- ['Item', 'end_of_life', '>=', frappe.datetime.nowdate()]
- ]
+ query: "erpnext.controllers.queries.item_query",
+ filters:{
+ 'is_pro_applicable': 1,
+ }
}
}
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index e919e92262..71aed12b97 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -20,6 +20,7 @@ execute:frappe.reload_doc('stock', 'doctype', 'purchase_receipt') # 2014-01-29
execute:frappe.reload_doc('accounts', 'doctype', 'pos_setting') # 2014-01-29
execute:frappe.reload_doc('selling', 'doctype', 'customer') # 2014-01-29
execute:frappe.reload_doc('buying', 'doctype', 'supplier') # 2014-01-29
+execute:frappe.reload_doctype('Item')
erpnext.patches.v4_0.map_charge_to_taxes_and_charges
execute:frappe.reload_doc('support', 'doctype', 'newsletter') # 2014-01-31
execute:frappe.reload_doc('hr', 'doctype', 'employee') # 2014-02-03
@@ -240,4 +241,5 @@ erpnext.patches.v6_10.fix_billed_amount_in_drop_ship_po
erpnext.patches.v6_10.fix_delivery_status_of_drop_ship_item #2015-12-08
erpnext.patches.v5_8.tax_rule #2015-12-08
erpnext.patches.v6_12.set_overdue_tasks
-erpnext.patches.v6_16.update_billing_status_in_dn_and_pr
\ No newline at end of file
+erpnext.patches.v6_16.update_billing_status_in_dn_and_pr
+erpnext.patches.v6_16.create_manufacturer_records
\ No newline at end of file
diff --git a/erpnext/patches/v6_16/create_manufacturer_records.py b/erpnext/patches/v6_16/create_manufacturer_records.py
new file mode 100644
index 0000000000..5ae65f0660
--- /dev/null
+++ b/erpnext/patches/v6_16/create_manufacturer_records.py
@@ -0,0 +1,19 @@
+# Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.utils import cstr
+
+def execute():
+ frappe.reload_doc("stock", "doctype", "manufacturer")
+ frappe.reload_doctype("Item")
+
+ for d in frappe.db.sql("""select distinct manufacturer from tabItem
+ where ifnull(manufacturer, '') != '' and disabled=0"""):
+ manufacturer_name = cstr(d[0]).strip()
+ if manufacturer_name and not frappe.db.exists("Manufacturer", manufacturer_name):
+ man = frappe.new_doc("Manufacturer")
+ man.short_name = manufacturer_name
+ man.full_name = manufacturer_name
+ man.save()
diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js
index 8c143478d3..b33386b862 100644
--- a/erpnext/projects/doctype/project/project.js
+++ b/erpnext/projects/doctype/project/project.js
@@ -30,24 +30,24 @@ cur_frm.cscript.refresh = function(doc) {
cur_frm.add_custom_button(__("Gantt Chart"), function() {
frappe.route_options = {"project": doc.name, "start": doc.expected_start_date, "end": doc.expected_end_date};
frappe.set_route("Gantt", "Task");
- }, "icon-tasks", true);
+ }, __("View"), true);
cur_frm.add_custom_button(__("Tasks"), function() {
frappe.route_options = {"project": doc.name}
frappe.set_route("List", "Task");
- }, "icon-list", true);
+ }, __("View"), true);
}
if(frappe.model.can_read("Time Log")) {
cur_frm.add_custom_button(__("Time Logs"), function() {
frappe.route_options = {"project": doc.name}
frappe.set_route("List", "Time Log");
- }, "icon-list", true);
+ }, __("View"), true);
}
if(frappe.model.can_read("Expense Claim")) {
cur_frm.add_custom_button(__("Expense Claims"), function() {
frappe.route_options = {"project": doc.name}
frappe.set_route("List", "Expense Claim");
- }, "icon-list", true);
+ }, __("View"), true);
}
}
}
diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js
index 18f5ca06c8..a0bbe26cec 100644
--- a/erpnext/projects/doctype/task/task.js
+++ b/erpnext/projects/doctype/task/task.js
@@ -20,13 +20,13 @@ frappe.ui.form.on("Task", {
frm.add_custom_button(__("Time Logs"), function() {
frappe.route_options = {"project": doc.project, "task": doc.name}
frappe.set_route("List", "Time Log");
- }, "icon-list", true);
+ }, __("View"), true);
}
if(frappe.model.can_read("Expense Claim")) {
frm.add_custom_button(__("Expense Claims"), function() {
frappe.route_options = {"project": doc.project, "task": doc.name}
frappe.set_route("List", "Expense Claim");
- }, "icon-list", true);
+ }, __("View"), true);
}
if(frm.perm[0].write) {
@@ -34,12 +34,12 @@ frappe.ui.form.on("Task", {
frm.add_custom_button(__("Close"), function() {
frm.set_value("status", "Closed");
frm.save();
- });
+ }, __("Status"));
} else {
frm.add_custom_button(__("Reopen"), function() {
frm.set_value("status", "Open");
frm.save();
- });
+ }, __("Status"));
}
}
}
diff --git a/erpnext/projects/doctype/time_log/test_time_log.py b/erpnext/projects/doctype/time_log/test_time_log.py
index 1894e37763..8d5694fb79 100644
--- a/erpnext/projects/doctype/time_log/test_time_log.py
+++ b/erpnext/projects/doctype/time_log/test_time_log.py
@@ -105,7 +105,7 @@ class TestTimeLog(unittest.TestCase):
task_name = frappe.db.get_value("Task",{"project": "_Test Project 1"})
time_log = make_time_log_test_record(employee="_T-Employee-0002", hours=2,
- task=task_name)
+ task=task_name, simulate=1)
self.assertEqual(time_log.costing_rate, 50)
self.assertEqual(time_log.costing_amount, 100)
self.assertEqual(time_log.billing_rate, 100)
@@ -115,7 +115,7 @@ class TestTimeLog(unittest.TestCase):
self.assertEqual(frappe.db.get_value("Project", "_Test Project 1", "total_billing_amount"), 200)
time_log2 = make_time_log_test_record(employee="_T-Employee-0002",
- hours=2, task= task_name, from_time = now_datetime() + datetime.timedelta(hours= 3))
+ hours=2, task= task_name, from_time = now_datetime() + datetime.timedelta(hours= 3), simulate=1)
self.assertEqual(frappe.db.get_value("Task", task_name, "total_billing_amount"), 400)
self.assertEqual(frappe.db.get_value("Project", "_Test Project 1", "total_billing_amount"), 400)
diff --git a/erpnext/projects/doctype/time_log/time_log.js b/erpnext/projects/doctype/time_log/time_log.js
index 3a01ca5de0..7648a536db 100644
--- a/erpnext/projects/doctype/time_log/time_log.js
+++ b/erpnext/projects/doctype/time_log/time_log.js
@@ -53,12 +53,12 @@ frappe.ui.form.on("Time Log", "to_time", function(frm) {
var calculate_cost = function(frm) {
frm.set_value("costing_amount", frm.doc.costing_rate * frm.doc.hours);
if (frm.doc.billable==1){
- frm.set_value("billing_amount", frm.doc.billing_rate * frm.doc.hours);
+ frm.set_value("billing_amount", (frm.doc.billing_rate * frm.doc.hours) + frm.doc.additional_cost);
}
}
var get_activity_cost = function(frm) {
- if (frm.doc.employee && frm.doc.activity_type){
+ if (frm.doc.activity_type){
return frappe.call({
method: "erpnext.projects.doctype.time_log.time_log.get_activity_cost",
args: {
@@ -80,6 +80,10 @@ frappe.ui.form.on("Time Log", "hours", function(frm) {
calculate_cost(frm);
});
+frappe.ui.form.on("Time Log", "additional_cost", function(frm) {
+ calculate_cost(frm);
+});
+
frappe.ui.form.on("Time Log", "activity_type", function(frm) {
get_activity_cost(frm);
});
@@ -94,6 +98,7 @@ frappe.ui.form.on("Time Log", "billable", function(frm) {
}
else {
frm.set_value("billing_amount", 0);
+ frm.set_value("additional_cost", 0);
}
});
diff --git a/erpnext/projects/doctype/time_log/time_log.json b/erpnext/projects/doctype/time_log/time_log.json
index 4490f97624..88eae1ef3f 100644
--- a/erpnext/projects/doctype/time_log/time_log.json
+++ b/erpnext/projects/doctype/time_log/time_log.json
@@ -1,934 +1,950 @@
{
- "allow_copy": 0,
- "allow_import": 1,
- "allow_rename": 0,
- "autoname": "naming_series:",
- "creation": "2013-04-03 16:38:41",
- "custom": 0,
- "description": "Log of Activities performed by users against Tasks that can be used for tracking time, billing.",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Setup",
+ "allow_copy": 0,
+ "allow_import": 1,
+ "allow_rename": 0,
+ "autoname": "naming_series:",
+ "creation": "2013-04-03 16:38:41",
+ "custom": 0,
+ "description": "Log of Activities performed by users against Tasks that can be used for tracking time, billing.",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Setup",
"fields": [
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "naming_series",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Series",
- "length": 0,
- "no_copy": 0,
- "options": "TL-",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 1,
+ "collapsible": 0,
+ "depends_on": "eval:!doc.for_manufacturing",
+ "fieldname": "activity_type",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Activity Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Activity Type",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_2",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "naming_series",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Series",
+ "length": 0,
+ "no_copy": 0,
+ "options": "TL-",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "status",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Status",
- "length": 0,
- "no_copy": 0,
- "options": "Draft\nSubmitted\nBatched for Billing\nBilled\nCancelled",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "project",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Project",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Project",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "section_break_4",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "task",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Task",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Task",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "from_time",
- "fieldtype": "Datetime",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "From Time",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "status",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Status",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Draft\nSubmitted\nBatched for Billing\nBilled\nCancelled",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "0",
- "fieldname": "hours",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Hours",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_2",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "to_time",
- "fieldtype": "Datetime",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "To Time",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "from_time",
+ "fieldtype": "Datetime",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "From Time",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_8",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0",
+ "fieldname": "hours",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Hours",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval:!doc.for_manufacturing",
- "fieldname": "activity_type",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Activity Type",
- "length": 0,
- "no_copy": 0,
- "options": "Activity Type",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "to_time",
+ "fieldtype": "Datetime",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "To Time",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "project",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Project",
- "length": 0,
- "no_copy": 0,
- "options": "Project",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "billable",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Billable",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "task",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Task",
- "length": 0,
- "no_copy": 0,
- "options": "Task",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "section_break_7",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "section_break_12",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "note",
+ "fieldtype": "Text Editor",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Note",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "user",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "User",
- "length": 0,
- "no_copy": 0,
- "options": "User",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "section_break_12",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "employee",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Employee",
- "length": 0,
- "no_copy": 0,
- "options": "Employee",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "user",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "User",
+ "length": 0,
+ "no_copy": 0,
+ "options": "User",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "employee",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Employee",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Employee",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "for_manufacturing",
- "fieldtype": "Check",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "For Manufacturing",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_3",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "billable",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Billable",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "for_manufacturing",
+ "fieldtype": "Check",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "For Manufacturing",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval:doc.for_manufacturing",
- "fieldname": "section_break_11",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:doc.for_manufacturing",
+ "fieldname": "section_break_11",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "production_order",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Production Order",
- "length": 0,
- "no_copy": 0,
- "options": "Production Order",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "production_order",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Production Order",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Production Order",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "operation",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Operation",
- "length": 0,
- "no_copy": 0,
- "options": "Operation",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "operation",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Operation",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Operation",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "operation_id",
- "fieldtype": "Data",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Operation ID",
- "length": 0,
- "no_copy": 0,
- "options": "",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "operation_id",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Operation ID",
+ "length": 0,
+ "no_copy": 0,
+ "options": "",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_14",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_14",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "workstation",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Workstation",
- "length": 0,
- "no_copy": 0,
- "options": "Workstation",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "workstation",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Workstation",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Workstation",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "description": "Operation completed for how many finished goods?",
- "fieldname": "completed_qty",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Completed Qty",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "description": "Operation completed for how many finished goods?",
+ "fieldname": "completed_qty",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Completed Qty",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "section_break_7",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "section_break_24",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "note",
- "fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Note",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0",
+ "description": "",
+ "fieldname": "costing_rate",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Costing Rate based on Activity Type (per hour)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "section_break_24",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0",
+ "fieldname": "costing_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Costing Amount",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "0",
- "description": "",
- "fieldname": "costing_rate",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Costing Rate based on Activity Type (per hour)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_25",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "0",
- "fieldname": "costing_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Costing Amount",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0",
+ "description": "",
+ "fieldname": "billing_rate",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Billing Rate based on Activity Type (per hour)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_25",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:doc.billable",
+ "fieldname": "additional_cost",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Additional Cost",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "0",
- "description": "",
- "fieldname": "billing_rate",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Billing Rate based on Activity Type (per hour)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0",
+ "description": "Will be updated only if Time Log is 'Billable'",
+ "fieldname": "billing_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Billing Amount",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "0",
- "description": "Will be updated only if Time Log is 'Billable'",
- "fieldname": "billing_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Billing Amount",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "section_break_29",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "section_break_29",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "description": "Will be updated when batched.",
+ "fieldname": "time_log_batch",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Time Log Batch",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Time Log Batch",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "Will be updated when batched.",
- "fieldname": "time_log_batch",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Time Log Batch",
- "length": 0,
- "no_copy": 0,
- "options": "Time Log Batch",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "description": "Will be updated when billed.",
+ "fieldname": "sales_invoice",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Sales Invoice",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Sales Invoice",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "Will be updated when billed.",
- "fieldname": "sales_invoice",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Sales Invoice",
- "length": 0,
- "no_copy": 0,
- "options": "Sales Invoice",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "amended_from",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 1,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Amended From",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Time Log",
+ "permlevel": 1,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "amended_from",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Amended From",
- "length": 0,
- "no_copy": 1,
- "options": "Time Log",
- "permlevel": 1,
- "print_hide": 1,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 1,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "title",
- "fieldtype": "Data",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Title",
- "length": 0,
- "no_copy": 1,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "title",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Title",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
}
- ],
- "hide_heading": 0,
- "hide_toolbar": 0,
- "icon": "icon-time",
- "idx": 1,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 1,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2015-11-16 06:29:59.410559",
- "modified_by": "Administrator",
- "module": "Projects",
- "name": "Time Log",
- "owner": "Administrator",
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "icon": "icon-time",
+ "idx": 1,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 1,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2016-01-14 04:40:47.439032",
+ "modified_by": "Administrator",
+ "module": "Projects",
+ "name": "Time Log",
+ "owner": "Administrator",
"permissions": [
{
- "amend": 1,
- "apply_user_permissions": 0,
- "cancel": 1,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Projects User",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 1,
+ "amend": 1,
+ "apply_user_permissions": 0,
+ "cancel": 1,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Projects User",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 1,
"write": 1
- },
+ },
{
- "amend": 1,
- "apply_user_permissions": 0,
- "cancel": 1,
- "create": 0,
- "delete": 1,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Projects Manager",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 1,
+ "amend": 1,
+ "apply_user_permissions": 0,
+ "cancel": 1,
+ "create": 0,
+ "delete": 1,
+ "email": 1,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Projects Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 1,
"write": 1
}
- ],
- "read_only": 0,
- "read_only_onload": 0,
+ ],
+ "read_only": 0,
+ "read_only_onload": 0,
"title_field": "title"
-}
\ No newline at end of file
+}
diff --git a/erpnext/projects/doctype/time_log/time_log.py b/erpnext/projects/doctype/time_log/time_log.py
index cd20036e91..6763209c35 100644
--- a/erpnext/projects/doctype/time_log/time_log.py
+++ b/erpnext/projects/doctype/time_log/time_log.py
@@ -4,7 +4,7 @@
from __future__ import unicode_literals
import frappe
from frappe import _
-from frappe.utils import cstr, flt, get_datetime, get_time, getdate
+from frappe.utils import flt, get_datetime, get_time, getdate
from dateutil.relativedelta import relativedelta
from erpnext.manufacturing.doctype.manufacturing_settings.manufacturing_settings import get_mins_between_operations
@@ -93,14 +93,12 @@ class TimeLog(Document):
(%(from_time)s > from_time and %(from_time)s < to_time) or
(%(from_time)s = from_time and %(to_time)s = to_time))
and name!=%(name)s
- and ifnull(task, "")=%(task)s
and docstatus < 2""".format(fieldname),
{
"val": self.get(fieldname),
"from_time": self.from_time,
"to_time": self.to_time,
- "name": self.name or "No Name",
- "task": cstr(self.task)
+ "name": self.name or "No Name"
}, as_dict=True)
return existing[0] if existing else None
@@ -236,6 +234,9 @@ class TimeLog(Document):
self.billing_amount = self.billing_rate * self.hours
else:
self.billing_amount = 0
+
+ if self.additional_cost and self.billable:
+ self.billing_amount += self.additional_cost
def update_task_and_project(self):
"""Update costing rate in Task or Project if either is set"""
diff --git a/erpnext/projects/doctype/time_log_batch/time_log_batch.js b/erpnext/projects/doctype/time_log_batch/time_log_batch.js
index 6b5f08094d..b1c431c1a5 100644
--- a/erpnext/projects/doctype/time_log_batch/time_log_batch.js
+++ b/erpnext/projects/doctype/time_log_batch/time_log_batch.js
@@ -37,14 +37,31 @@ $.extend(cur_frm.cscript, {
}
});
-frappe.ui.form.on("Time Log Batch Detail", "time_log", function(frm, cdt, cdn) {
+frappe.ui.form.on("Time Log Batch Detail", "time_log", function(frm) {
+ calculate_time_and_amount(frm);
+});
+
+frappe.ui.form.on("Time Log Batch Detail", "time_logs_remove", function(frm) {
+ calculate_time_and_amount(frm);
+});
+
+frappe.ui.form.on("Time Log Batch", "onload", function(frm) {
+ if (frm.doc.__islocal && frm.doc.time_logs) {
+ calculate_time_and_amount(frm);
+ }
+});
+
+var calculate_time_and_amount = function(frm) {
var tl = frm.doc.time_logs || [];
total_hr = 0;
total_amt = 0;
for(var i=0; i 0) {
+ var rounded_change =
+ round_based_on_smallest_currency_fraction(actual_change,
+ me.frm.doc.currency, precision("paid_amount"));
+ } else {
+ var rounded_change = 0;
+ }
+
+ dialog.set_value("change", rounded_change);
dialog.get_input("change").trigger("change");
}},
@@ -481,7 +496,7 @@ erpnext.pos.PointOfSale = Class.extend({
var paid_amount = flt((flt(values.paid_amount) - flt(values.change)), precision("paid_amount"));
me.frm.set_value("paid_amount", paid_amount);
-
+
// specifying writeoff amount here itself, so as to avoid recursion issue
me.frm.set_value("write_off_amount", me.frm.doc.grand_total - paid_amount);
me.frm.set_value("outstanding_amount", 0);
diff --git a/erpnext/public/js/shopping_cart.js b/erpnext/public/js/shopping_cart.js
index d437d74e96..b667177157 100644
--- a/erpnext/public/js/shopping_cart.js
+++ b/erpnext/public/js/shopping_cart.js
@@ -4,13 +4,12 @@
// shopping cart
frappe.provide("shopping_cart");
-$(function() {
+frappe.ready(function() {
// update user
if(full_name) {
$('.navbar li[data-label="User"] a')
.html(' ' + full_name);
}
-
// update login
shopping_cart.set_cart_count();
});
@@ -33,10 +32,9 @@ $.extend(shopping_cart, {
},
btn: opts.btn,
callback: function(r) {
+ shopping_cart.set_cart_count();
if(opts.callback)
opts.callback(r);
-
- shopping_cart.set_cart_count();
}
});
}
@@ -44,13 +42,29 @@ $.extend(shopping_cart, {
set_cart_count: function() {
var cart_count = getCookie("cart_count");
- var $cart = $('.dropdown [data-label="Cart"]');
- var $badge = $cart.find(".badge");
+
+ if($(".cart-icon").length == 0) {
+ $('').appendTo($('.hidden-xs'))
+ }
+
+ var $cart = $('.cart-icon');
+ var $badge = $cart.find("#cart-count");
+
+ if(parseInt(cart_count) === 0 || cart_count === undefined) {
+ $cart.css("display", "none");
+ }
+ else {
+ $cart.css("display", "inline");
+ }
+
if(cart_count) {
- if($badge.length === 0) {
- var $badge = $(' ')
- .prependTo($cart.find("a").addClass("badge-hover"));
- }
$badge.html(cart_count);
} else {
$badge.remove();
diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js
index 7bbd693c7e..f816fe3a8d 100644
--- a/erpnext/selling/doctype/customer/customer.js
+++ b/erpnext/selling/doctype/customer/customer.js
@@ -1,28 +1,50 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.ui.form.on("Customer", "refresh", function(frm) {
- cur_frm.cscript.setup_dashboard(frm.doc);
+frappe.ui.form.on("Customer", {
+ refresh: function(frm) {
+ frm.cscript.setup_dashboard(frm.doc);
- if(frappe.defaults.get_default("cust_master_name")!="Naming Series") {
- frm.toggle_display("naming_series", false);
- } else {
- erpnext.toggle_naming_series();
+ if(frappe.defaults.get_default("cust_master_name")!="Naming Series") {
+ frm.toggle_display("naming_series", false);
+ } else {
+ erpnext.toggle_naming_series();
+ }
+
+ frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
+
+ if(!frm.doc.__islocal) {
+ erpnext.utils.render_address_and_contact(frm);
+ } else {
+ erpnext.utils.clear_address_and_contact(frm);
+ }
+
+ var grid = cur_frm.get_field("sales_team").grid;
+ grid.set_column_disp("allocated_amount", false);
+ grid.set_column_disp("incentives", false);
+
+ frm.events.add_custom_buttons(frm);
+ },
+ add_custom_buttons: function(frm) {
+ ["Opportunity", "Quotation", "Sales Order", "Delivery Note", "Sales Invoice"].forEach(function(doctype, i) {
+ if(frappe.model.can_read(doctype)) {
+ frm.add_custom_button(__(doctype), function() {
+ frappe.route_options = {"customer": frm.doc.name};
+ frappe.set_route("List", doctype);
+ }, __("View"));
+ }
+ if(frappe.model.can_create(doctype)) {
+ frm.add_custom_button(__(doctype), function() {
+ frappe.route_options = {"customer": frm.doc.name};
+ new_doc(doctype);
+ }, __("Make"));
+ }
+ });
+ },
+ validate: function(frm) {
+ if(frm.doc.lead_name) frappe.model.clear_doc("Lead", frm.doc.lead_name);
}
-
- frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
-
- if(!frm.doc.__islocal) {
- erpnext.utils.render_address_and_contact(frm);
- } else {
- erpnext.utils.clear_address_and_contact(frm);
- }
-
- var grid = cur_frm.get_field("sales_team").grid;
- grid.set_column_disp("allocated_amount", false);
- grid.set_column_disp("incentives", false);
-
-})
+});
cur_frm.cscript.onload = function(doc, dt, dn) {
cur_frm.cscript.load_defaults(doc, dt, dn);
@@ -39,10 +61,6 @@ cur_frm.cscript.load_defaults = function(doc, dt, dn) {
cur_frm.add_fetch('lead_name', 'company_name', 'customer_name');
cur_frm.add_fetch('default_sales_partner','commission_rate','default_commission_rate');
-cur_frm.cscript.validate = function(doc, dt, dn) {
- if(doc.lead_name) frappe.model.clear_doc("Lead", doc.lead_name);
-}
-
cur_frm.cscript.setup_dashboard = function(doc) {
cur_frm.dashboard.reset(doc);
if(doc.__islocal)
diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js
index d717e20675..83cec04635 100644
--- a/erpnext/selling/doctype/quotation/quotation.js
+++ b/erpnext/selling/doctype/quotation/quotation.js
@@ -18,17 +18,19 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
this._super(doc, dt, dn);
if(doc.docstatus == 1 && doc.status!=='Lost') {
- cur_frm.add_custom_button(__('Make Sales Order'),
- cur_frm.cscript['Make Sales Order'], frappe.boot.doctype_icons["Sales Order"]);
- if(doc.status!=="Ordered") {
- cur_frm.add_custom_button(__('Set as Lost'),
- cur_frm.cscript['Declare Order Lost'], "icon-exclamation", "btn-default");
- }
+ cur_frm.add_custom_button(__('Sales Order'),
+ cur_frm.cscript['Make Sales Order'], __("Make"));
+ if(doc.status!=="Ordered") {
+ cur_frm.add_custom_button(__('Lost'),
+ cur_frm.cscript['Declare Order Lost'], __("Status"));
+ }
+
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
if (this.frm.doc.docstatus===0) {
- cur_frm.add_custom_button(__('From Opportunity'),
+ cur_frm.add_custom_button(__('Opportunity'),
function() {
frappe.model.map_current_doc({
method: "erpnext.crm.doctype.opportunity.opportunity.make_quotation",
@@ -41,7 +43,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
company: cur_frm.doc.company
}
})
- }, "icon-download", "btn-default");
+ }, __("Get items from"), "btn-default");
}
this.toggle_reqd_lead_customer();
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index 56c8da0578..9dae2b974d 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -41,58 +41,60 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
}
}
- // material request
- if(!doc.order_type || ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1
- && flt(doc.per_delivered, 2) < 100) {
- cur_frm.add_custom_button(__('Material Request'), this.make_material_request);
- }
-
- // make purchase order
- if(flt(doc.per_delivered, 2) < 100 && allow_purchase) {
- cur_frm.add_custom_button(__('Purchase Order'), cur_frm.cscript.make_purchase_order);
- }
-
- if(flt(doc.per_billed)==0) {
- cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_bank_entry);
- }
-
if (this.frm.has_perm("submit")) {
// stop
if(flt(doc.per_delivered, 2) < 100 || flt(doc.per_billed) < 100) {
- cur_frm.add_custom_button(__('Stop'), this.stop_sales_order)
+ cur_frm.add_custom_button(__('Stop'), this.stop_sales_order, __("Status"))
}
- cur_frm.add_custom_button(__('Close'), this.close_sales_order)
- }
-
- // maintenance
- if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)===-1) {
- cur_frm.add_custom_button(__('Maint. Visit'), this.make_maintenance_visit);
- cur_frm.add_custom_button(__('Maint. Schedule'), this.make_maintenance_schedule);
+ cur_frm.add_custom_button(__('Close'), this.close_sales_order, __("Status"))
}
// delivery note
if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 && allow_delivery) {
- cur_frm.add_custom_button(__('Delivery'), this.make_delivery_note).addClass("btn-primary");
+ cur_frm.add_custom_button(__('Delivery'), this.make_delivery_note, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
// sales invoice
if(flt(doc.per_billed, 2) < 100) {
- cur_frm.add_custom_button(__('Invoice'), this.make_sales_invoice).addClass("btn-primary");
+ cur_frm.add_custom_button(__('Invoice'), this.make_sales_invoice, __("Make"));
+ }
+
+ // material request
+ if(!doc.order_type || ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1
+ && flt(doc.per_delivered, 2) < 100) {
+ cur_frm.add_custom_button(__('Material Request'), this.make_material_request, __("Make"));
+ }
+
+ // make purchase order
+ if(flt(doc.per_delivered, 2) < 100 && allow_purchase) {
+ cur_frm.add_custom_button(__('Purchase Order'), cur_frm.cscript.make_purchase_order, __("Make"));
+ }
+
+ if(flt(doc.per_billed)==0) {
+ cur_frm.add_custom_button(__('Payment Request'), this.make_payment_request, __("Make"));
+ cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_bank_entry, __("Make"));
+ }
+
+ // maintenance
+ if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)===-1) {
+ cur_frm.add_custom_button(__('Maintenance Visit'), this.make_maintenance_visit, __("Make"));
+ cur_frm.add_custom_button(__('Maintenance Schedule'), this.make_maintenance_schedule, __("Make"));
}
} else {
if (this.frm.has_perm("submit")) {
// un-stop
- cur_frm.add_custom_button(__('Re-open'), cur_frm.cscript['Unstop Sales Order']);
+ cur_frm.add_custom_button(__('Re-open'), cur_frm.cscript['Unstop Sales Order'], __("Status"));
}
}
}
if (this.frm.doc.docstatus===0) {
- cur_frm.add_custom_button(__('From Quotation'),
+ cur_frm.add_custom_button(__('Quotation'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.quotation.quotation.make_sales_order",
@@ -105,7 +107,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
company: cur_frm.doc.company
}
})
- });
+ }, __("Get items from"));
}
this.order_type(doc);
diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json
index db8cb8121d..ee97334ad2 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.json
+++ b/erpnext/selling/doctype/sales_order/sales_order.json
@@ -2802,7 +2802,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-12-17 16:19:40.324514",
+ "modified": "2015-12-29 12:32:45.649349",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order",
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index 99e708d5b0..8bc96e666b 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -288,11 +288,26 @@ class SalesOrder(SellingController):
frappe.db.set_value("Sales Order", self.name, "per_delivered", flt(delivered_qty/tot_qty) * 100,
update_modified=False)
+
+ def set_indicator(self):
+ """Set indicator for portal"""
+ if self.per_billed < 100 and self.per_delivered < 100:
+ self.indicator_color = "orange"
+ self.indicator_title = _("Not Paid and Not Delivered")
+
+ elif self.per_billed == 100 and self.per_delivered < 100:
+ self.indicator_color = "orange"
+ self.indicator_title = _("Paid and Not Delivered")
+ else:
+ self.indicator_color = "green"
+ self.indicator_title = _("Paid")
+
def get_list_context(context=None):
from erpnext.controllers.website_list_for_contact import get_list_context
list_context = get_list_context(context)
list_context["title"] = _("My Orders")
+ list_context["parents"] = [{"title": _("My Account"), "name": "me"}]
return list_context
@frappe.whitelist()
@@ -401,7 +416,7 @@ def make_delivery_note(source_name, target_doc=None):
return target_doc
@frappe.whitelist()
-def make_sales_invoice(source_name, target_doc=None):
+def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False):
def postprocess(source, target):
set_missing_values(source, target)
#Get the advance paid Journal Entries in Sales Invoice Advance
@@ -410,6 +425,7 @@ def make_sales_invoice(source_name, target_doc=None):
def set_missing_values(source, target):
target.is_pos = 0
target.ignore_pricing_rule = 1
+ target.flags.ignore_permissions = True
target.run_method("set_missing_values")
target.run_method("calculate_taxes_and_totals")
@@ -442,7 +458,7 @@ def make_sales_invoice(source_name, target_doc=None):
"doctype": "Sales Team",
"add_if_empty": True
}
- }, target_doc, postprocess)
+ }, target_doc, postprocess, ignore_permissions=ignore_permissions)
return doclist
diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py
index 3501f525d8..c6ea618eb0 100644
--- a/erpnext/selling/doctype/sales_order/test_sales_order.py
+++ b/erpnext/selling/doctype/sales_order/test_sales_order.py
@@ -334,15 +334,15 @@ class TestSalesOrder(unittest.TestCase):
existing_ordered_qty = bin[0].ordered_qty if bin else 0.0
existing_reserved_qty = bin[0].reserved_qty if bin else 0.0
- bin = frappe.get_all("Bin", filters={"item_code": dn_item.item_code, "warehouse": "_Test Warehouse - _TC"},
- fields=["reserved_qty"])
+ bin = frappe.get_all("Bin", filters={"item_code": dn_item.item_code,
+ "warehouse": "_Test Warehouse - _TC"}, fields=["reserved_qty"])
existing_reserved_qty_for_dn_item = bin[0].reserved_qty if bin else 0.0
#create so, po and partial dn
so = make_sales_order(item_list=so_items, do_not_submit=True)
so.submit()
-
+
po = make_purchase_order_for_drop_shipment(so.name, '_Test Supplier')
po.submit()
diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index 6a8744a385..7f17bd3837 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -288,6 +288,24 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
}
}
refresh_field('product_bundle_help');
+ },
+
+ make_payment_request: function() {
+ frappe.call({
+ method:"erpnext.accounts.doctype.payment_request.payment_request.make_payment_request",
+ args: {
+ "dt": cur_frm.doc.doctype,
+ "dn": cur_frm.doc.name,
+ "recipient_id": cur_frm.doc.contact_email
+ },
+ callback: function(r) {
+ if(!r.exc){
+ var doc = frappe.model.sync(r.message);
+ console.log(r.message)
+ frappe.set_route("Form", r.message.doctype, r.message.name);
+ }
+ }
+ })
}
});
diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py
index 9be2880eb0..b92dcf98a7 100644
--- a/erpnext/setup/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/setup_wizard/setup_wizard.py
@@ -112,19 +112,21 @@ def create_fiscal_year_and_company(args):
def create_bank_account(args):
if args.get("bank_account"):
+ company_name = args.get('company_name').strip()
bank_account_group = frappe.db.get_value("Account",
- {"account_type": "Bank", "is_group": 1, "root_type": "Asset"})
+ {"account_type": "Bank", "is_group": 1, "root_type": "Asset",
+ "company": company_name})
if bank_account_group:
bank_account = frappe.get_doc({
"doctype": "Account",
'account_name': args.get("bank_account"),
'parent_account': bank_account_group,
'is_group':0,
- 'company':args.get('company_name').strip(),
+ 'company': company_name,
"account_type": "Bank",
})
try:
- bank_account.insert()
+ return bank_account.insert()
except RootNotEditable:
frappe.throw(_("Bank account cannot be named as {0}").format(args.get("bank_account")))
diff --git a/erpnext/shopping_cart/utils.py b/erpnext/shopping_cart/utils.py
index 7794a8fb9f..b8d5054e87 100644
--- a/erpnext/shopping_cart/utils.py
+++ b/erpnext/shopping_cart/utils.py
@@ -28,17 +28,7 @@ def update_website_context(context):
cart_enabled = is_cart_enabled()
context["shopping_cart_enabled"] = cart_enabled
- if cart_enabled:
- post_login = [
- {"label": _("Cart"), "url": "cart", "class": "cart-count"},
- {"class": "divider"}
- ]
- context["post_login"] = post_login + context.get("post_login", [])
-
def update_my_account_context(context):
- if is_cart_enabled():
- context["my_account_list"].append({"label": _("Cart"), "url": "cart"})
-
context["my_account_list"].extend([
{"label": _("Orders"), "url": "orders"},
{"label": _("Invoices"), "url": "invoices"},
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index c5a3bab06e..0b6f47e09f 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -11,19 +11,23 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
if (!doc.is_return && doc.status!="Closed") {
if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1)
- cur_frm.add_custom_button(__('Installation Note'), this.make_installation_note);
+ cur_frm.add_custom_button(__('Installation Note'), this.make_installation_note, __("Make"));
if (doc.docstatus==1) {
- cur_frm.add_custom_button(__('Sales Return'), this.make_sales_return);
+ cur_frm.add_custom_button(__('Sales Return'), this.make_sales_return, __("Make"));
}
if(doc.docstatus==0 && !doc.__islocal) {
cur_frm.add_custom_button(__('Packing Slip'),
- cur_frm.cscript['Make Packing Slip'], frappe.boot.doctype_icons["Packing Slip"]);
+ cur_frm.cscript['Make Packing Slip'], __("Make"));
+ }
+
+ if (!doc.__islocal && doc.docstatus==1) {
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
if (this.frm.doc.docstatus===0) {
- cur_frm.add_custom_button(__('From Sales Order'),
+ cur_frm.add_custom_button(__('Sales Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_delivery_note",
@@ -37,7 +41,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
company: cur_frm.doc.company
}
})
- });
+ }, __("Get items from"));
}
}
@@ -46,18 +50,24 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
if (cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
this.show_general_ledger();
}
- if (this.frm.has_perm("submit") && (doc.status !== "Closed")
- && this.frm.doc.__onload && !this.frm.doc.__onload.has_return_entry) {
- cur_frm.add_custom_button(__("Close"), this.close_delivery_note)
+ if (this.frm.has_perm("submit") && doc.status !== "Closed") {
+ cur_frm.add_custom_button(__("Close"), this.close_delivery_note, __("Status"))
}
}
- if(doc.docstatus==1 && !doc.is_return && doc.status!="Closed" && flt(doc.per_billed, 2) < 100) {
- cur_frm.add_custom_button(__('Invoice'), this.make_sales_invoice).addClass("btn-primary");
+ if(doc.docstatus==1 && !doc.is_return && doc.status!="Closed" && flt(doc.per_billed) < 100) {
+ // 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.items.some(function(item) {
+ return item.against_sales_invoice ? true : false;
+ });
+
+ if(!from_sales_invoice)
+ cur_frm.add_custom_button(__('Invoice'), this.make_sales_invoice, __("Make"));
}
if(doc.docstatus==1 && doc.status === "Closed" && this.frm.has_perm("submit")) {
- cur_frm.add_custom_button(__('Reopen'), this.reopen_delivery_note)
+ cur_frm.add_custom_button(__('Reopen'), this.reopen_delivery_note, __("Status"))
}
erpnext.stock.delivery_note.set_print_hide(doc, dt, dn);
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index b553054c5a..7cb855fd67 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -61,10 +61,6 @@ class DeliveryNote(SellingController):
'extra_cond': """ and exists (select name from `tabDelivery Note` where name=`tabDelivery Note Item`.parent and is_return=1)"""
}]
- def onload(self):
- self.set_onload("has_return_entry", len(frappe.db.exists({"doctype": "Delivery Note",
- "is_return": 1, "return_against": self.name, "docstatus": 1})))
-
def before_print(self):
def toggle_print_hide(meta, fieldname):
df = meta.get_field(fieldname)
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 2caade633c..9ce603cb4b 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -22,19 +22,19 @@ frappe.ui.form.on("Item", {
"item_code": frm.doc.name
}
frappe.set_route("query-report", "Stock Balance");
- });
+ }, __("View"));
frm.add_custom_button(__("Ledger"), function() {
frappe.route_options = {
"item_code": frm.doc.name
}
frappe.set_route("query-report", "Stock Ledger");
- });
+ }, __("View"));
frm.add_custom_button(__("Projected"), function() {
frappe.route_options = {
"item_code": frm.doc.name
}
frappe.set_route("query-report", "Stock Projected Qty");
- });
+ }, __("View"));
}
// make sensitive fields(has_serial_no, is_stock_item, valuation_method)
@@ -48,11 +48,12 @@ frappe.ui.form.on("Item", {
frm.set_intro(__("This Item is a Template and cannot be used in transactions. Item attributes will be copied over into the variants unless 'No Copy' is set"), true);
frm.add_custom_button(__("Show Variants"), function() {
frappe.set_route("List", "Item", {"variant_of": frm.doc.name});
- }, "icon-list", "btn-default");
+ }, __("View"));
- frm.add_custom_button(__("Make Variant"), function() {
+ frm.add_custom_button(__("Variant"), function() {
erpnext.item.make_variant()
- }, "icon-list", "btn-default");
+ }, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
if (frm.doc.variant_of) {
frm.set_intro(__("This Item is a Variant of {0} (Template). Attributes will be copied over from the template unless 'No Copy' is set", [frm.doc.variant_of]), true);
@@ -191,8 +192,8 @@ $.extend(erpnext.item, {
edit_prices_button: function(frm) {
frm.add_custom_button(__("Add / Edit Prices"), function() {
- frappe.set_route("Report", "Item Price", {"item_code": frm.doc.name});
- }, "icon-money", "btn-default");
+ frappe.set_route("List", "Item Price", {"item_code": frm.doc.name});
+ }, __("View"));
},
weight_to_validate: function(frm){
@@ -320,7 +321,7 @@ $.extend(erpnext.item, {
frm.toggle_display("attributes", frm.doc.has_variants || frm.doc.variant_of);
frm.fields_dict.attributes.grid.toggle_reqd("attribute_value", frm.doc.variant_of ? 1 : 0);
frm.fields_dict.attributes.grid.set_column_disp("attribute_value", frm.doc.variant_of ? 1 : 0);
-
+
frm.toggle_enable("attributes", !frm.doc.variant_of);
frm.fields_dict.attributes.grid.toggle_enable("attribute", !frm.doc.variant_of);
frm.fields_dict.attributes.grid.toggle_enable("attribute_value", !frm.doc.variant_of);
diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json
index dfa55b1d20..b7d866de42 100644
--- a/erpnext/stock/doctype/item/item.json
+++ b/erpnext/stock/doctype/item/item.json
@@ -1,2511 +1,2521 @@
{
- "allow_copy": 0,
- "allow_import": 1,
- "allow_rename": 1,
- "autoname": "field:item_code",
- "creation": "2013-05-03 10:45:46",
- "custom": 0,
- "default_print_format": "Standard",
- "description": "A Product or a Service that is bought, sold or kept in stock.",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Setup",
+ "allow_copy": 0,
+ "allow_import": 1,
+ "allow_rename": 1,
+ "autoname": "field:item_code",
+ "creation": "2013-05-03 10:45:46",
+ "custom": 0,
+ "default_print_format": "Standard",
+ "description": "A Product or a Service that is bought, sold or kept in stock.",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Setup",
"fields": [
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "name_and_description_section",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Section Break",
- "options": "icon-flag",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "name_and_description_section",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Section Break",
+ "options": "icon-flag",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "naming_series",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Series",
- "length": 0,
- "no_copy": 0,
- "options": "ITEM-",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "naming_series",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Series",
+ "length": 0,
+ "no_copy": 0,
+ "options": "ITEM-",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "",
- "fieldname": "item_code",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Item Code",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "item_code",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "description": "",
+ "fieldname": "item_code",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Item Code",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "item_code",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "variant_of",
- "description": "If item is a variant of another item then description, image, pricing, taxes etc will be set from the template unless explicitly specified",
- "fieldname": "variant_of",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Variant Of",
- "length": 0,
- "no_copy": 0,
- "options": "Item",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "variant_of",
+ "description": "If item is a variant of another item then description, image, pricing, taxes etc will be set from the template unless explicitly specified",
+ "fieldname": "variant_of",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Variant Of",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Item",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "item_name",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 1,
- "in_list_view": 0,
- "label": "Item Name",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "item_name",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 1,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "item_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 1,
+ "in_list_view": 0,
+ "label": "Item Name",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "item_name",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 1,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "",
- "fieldname": "item_group",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 1,
- "in_list_view": 1,
- "label": "Item Group",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "item_group",
- "oldfieldtype": "Link",
- "options": "Item Group",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "description": "",
+ "fieldname": "item_group",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 1,
+ "in_list_view": 1,
+ "label": "Item Group",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "item_group",
+ "oldfieldtype": "Link",
+ "options": "Item Group",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "",
- "fieldname": "stock_uom",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Default Unit of Measure",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "stock_uom",
- "oldfieldtype": "Link",
- "options": "UOM",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "description": "",
+ "fieldname": "stock_uom",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 1,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Default Unit of Measure",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "stock_uom",
+ "oldfieldtype": "Link",
+ "options": "UOM",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break0",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break0",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "1",
- "description": "",
- "fieldname": "is_stock_item",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Maintain Stock",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "is_stock_item",
- "oldfieldtype": "Select",
- "options": "",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "1",
+ "description": "",
+ "fieldname": "is_stock_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Maintain Stock",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "is_stock_item",
+ "oldfieldtype": "Select",
+ "options": "",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "disabled",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Disabled",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "disabled",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Disabled",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "image",
- "fieldtype": "Attach",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Image",
- "length": 0,
- "no_copy": 0,
- "options": "image",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "image",
+ "fieldtype": "Attach",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Image",
+ "length": 0,
+ "no_copy": 0,
+ "options": "image",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "image_view",
- "fieldtype": "Image",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Image View",
- "length": 0,
- "no_copy": 0,
- "options": "image",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "image_view",
+ "fieldtype": "Image",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Image View",
+ "length": 0,
+ "no_copy": 0,
+ "options": "image",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "fieldname": "section_break_11",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Description",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "fieldname": "section_break_11",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Description",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "brand",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Brand",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "brand",
- "oldfieldtype": "Link",
- "options": "Brand",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "brand",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Brand",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "brand",
+ "oldfieldtype": "Link",
+ "options": "Brand",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "barcode",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Barcode",
- "length": 0,
- "no_copy": 1,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "barcode",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Barcode",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "description",
- "fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Description",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "description",
- "oldfieldtype": "Text",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "description",
+ "fieldtype": "Text Editor",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Description",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "description",
+ "oldfieldtype": "Text",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "collapsible_depends_on": "is_stock_item",
- "depends_on": "is_stock_item",
- "fieldname": "inventory",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Inventory",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Section Break",
- "options": "icon-truck",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "collapsible_depends_on": "is_stock_item",
+ "depends_on": "is_stock_item",
+ "fieldname": "inventory",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Inventory",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Section Break",
+ "options": "icon-truck",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_stock_item",
- "description": "",
- "fieldname": "default_warehouse",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Default Warehouse",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "default_warehouse",
- "oldfieldtype": "Link",
- "options": "Warehouse",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_stock_item",
+ "description": "",
+ "fieldname": "default_warehouse",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 1,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Default Warehouse",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "default_warehouse",
+ "oldfieldtype": "Link",
+ "options": "Warehouse",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "2099-12-31",
- "depends_on": "is_stock_item",
- "fieldname": "end_of_life",
- "fieldtype": "Date",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "End of Life",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "end_of_life",
- "oldfieldtype": "Date",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "2099-12-31",
+ "depends_on": "is_stock_item",
+ "fieldname": "end_of_life",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "End of Life",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "end_of_life",
+ "oldfieldtype": "Date",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "",
- "depends_on": "eval:doc.is_stock_item",
- "fieldname": "has_batch_no",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Has Batch No",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "has_batch_no",
- "oldfieldtype": "Select",
- "options": "",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "",
+ "depends_on": "eval:doc.is_stock_item",
+ "fieldname": "has_batch_no",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Has Batch No",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "has_batch_no",
+ "oldfieldtype": "Select",
+ "options": "",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "",
- "depends_on": "eval:doc.is_stock_item",
- "description": "Selecting \"Yes\" will give a unique identity to each entity of this item which can be viewed in the Serial No master.",
- "fieldname": "has_serial_no",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 1,
- "in_list_view": 0,
- "label": "Has Serial No",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "has_serial_no",
- "oldfieldtype": "Select",
- "options": "",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "",
+ "depends_on": "eval:doc.is_stock_item",
+ "description": "Selecting \"Yes\" will give a unique identity to each entity of this item which can be viewed in the Serial No master.",
+ "fieldname": "has_serial_no",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 1,
+ "in_list_view": 0,
+ "label": "Has Serial No",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "has_serial_no",
+ "oldfieldtype": "Select",
+ "options": "",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "has_serial_no",
- "description": "Example: ABCD.#####\nIf series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.",
- "fieldname": "serial_no_series",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Serial Number Series",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "has_serial_no",
+ "description": "Example: ABCD.#####\nIf series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.",
+ "fieldname": "serial_no_series",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Serial Number Series",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "",
- "depends_on": "eval:doc.is_stock_item",
- "description": "",
- "fieldname": "is_asset_item",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Is Fixed Asset Item",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "is_asset_item",
- "oldfieldtype": "Select",
- "options": "",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "",
+ "depends_on": "eval:doc.is_stock_item",
+ "description": "",
+ "fieldname": "is_asset_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Is Fixed Asset Item",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "is_asset_item",
+ "oldfieldtype": "Select",
+ "options": "",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_stock_item",
- "fieldname": "column_break1",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Column Break",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_stock_item",
+ "fieldname": "column_break1",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Column Break",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "50%"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_stock_item",
- "description": "",
- "fieldname": "tolerance",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Allow over delivery or receipt upto this percent",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "tolerance",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_stock_item",
+ "description": "",
+ "fieldname": "tolerance",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Allow over delivery or receipt upto this percent",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "tolerance",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_stock_item",
- "fieldname": "valuation_method",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Valuation Method",
- "length": 0,
- "no_copy": 0,
- "options": "\nFIFO\nMoving Average",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_stock_item",
+ "fieldname": "valuation_method",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Valuation Method",
+ "length": 0,
+ "no_copy": 0,
+ "options": "\nFIFO\nMoving Average",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval:doc.is_stock_item",
- "fieldname": "warranty_period",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Warranty Period (in days)",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "warranty_period",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:doc.is_stock_item",
+ "fieldname": "warranty_period",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Warranty Period (in days)",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "warranty_period",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_stock_item",
- "description": "",
- "fieldname": "net_weight",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Net Weight",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_stock_item",
+ "description": "",
+ "fieldname": "net_weight",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Net Weight",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval:doc.is_stock_item",
- "fieldname": "weight_uom",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Weight UOM",
- "length": 0,
- "no_copy": 0,
- "options": "UOM",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:doc.is_stock_item",
+ "fieldname": "weight_uom",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 1,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Weight UOM",
+ "length": 0,
+ "no_copy": 0,
+ "options": "UOM",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "depends_on": "is_stock_item",
- "description": "",
- "fieldname": "reorder_section",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Auto re-order",
- "length": 0,
- "no_copy": 0,
- "options": "icon-rss",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "depends_on": "is_stock_item",
+ "description": "",
+ "fieldname": "reorder_section",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Auto re-order",
+ "length": 0,
+ "no_copy": 0,
+ "options": "icon-rss",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval:(doc.is_stock_item && !doc.apply_warehouse_wise_reorder_level)",
- "description": "Automatically create Material Request if quantity falls below this level",
- "fieldname": "re_order_level",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Re-order Level",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "re_order_level",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:(doc.is_stock_item && !doc.apply_warehouse_wise_reorder_level)",
+ "description": "Automatically create Material Request if quantity falls below this level",
+ "fieldname": "re_order_level",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Re-order Level",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "re_order_level",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval:(doc.is_stock_item && !doc.apply_warehouse_wise_reorder_level)",
- "fieldname": "re_order_qty",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Re-order Qty",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:(doc.is_stock_item && !doc.apply_warehouse_wise_reorder_level)",
+ "fieldname": "re_order_qty",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Re-order Qty",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_stock_item",
- "fieldname": "apply_warehouse_wise_reorder_level",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Apply Warehouse-wise Reorder Level",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_stock_item",
+ "fieldname": "apply_warehouse_wise_reorder_level",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Apply Warehouse-wise Reorder Level",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "collapsible_depends_on": "reorder_levels",
- "depends_on": "eval:(doc.is_stock_item && doc.apply_warehouse_wise_reorder_level)",
- "fieldname": "section_break_31",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Reorder level based on Warehouse",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "collapsible_depends_on": "reorder_levels",
+ "depends_on": "eval:(doc.is_stock_item && doc.apply_warehouse_wise_reorder_level)",
+ "fieldname": "section_break_31",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Reorder level based on Warehouse",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval:(doc.is_stock_item && doc.apply_warehouse_wise_reorder_level)",
- "description": "Will also apply for variants unless overrridden",
- "fieldname": "reorder_levels",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Reorder level based on Warehouse",
- "length": 0,
- "no_copy": 0,
- "options": "Item Reorder",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:(doc.is_stock_item && doc.apply_warehouse_wise_reorder_level)",
+ "description": "Will also apply for variants unless overrridden",
+ "fieldname": "reorder_levels",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Reorder level based on Warehouse",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Item Reorder",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "collapsible_depends_on": "attributes",
- "depends_on": "",
- "fieldname": "variants_section",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Variants",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "collapsible_depends_on": "attributes",
+ "depends_on": "",
+ "fieldname": "variants_section",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Variants",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "0",
- "depends_on": "eval:!doc.variant_of",
- "description": "If this item has variants, then it cannot be selected in sales orders etc.",
- "fieldname": "has_variants",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Has Variants",
- "length": 0,
- "no_copy": 1,
- "options": "",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0",
+ "depends_on": "eval:!doc.variant_of",
+ "description": "If this item has variants, then it cannot be selected in sales orders etc.",
+ "fieldname": "has_variants",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Has Variants",
+ "length": 0,
+ "no_copy": 1,
+ "options": "",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "attributes",
- "fieldtype": "Table",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Attributes",
- "length": 0,
- "no_copy": 1,
- "options": "Item Variant Attribute",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "attributes",
+ "fieldtype": "Table",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Attributes",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Item Variant Attribute",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "fieldname": "purchase_details",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Purchase Details",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Section Break",
- "options": "icon-shopping-cart",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "fieldname": "purchase_details",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Purchase Details",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Section Break",
+ "options": "icon-shopping-cart",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "1",
- "description": "",
- "fieldname": "is_purchase_item",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Is Purchase Item",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "is_purchase_item",
- "oldfieldtype": "Select",
- "options": "",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "1",
+ "description": "",
+ "fieldname": "is_purchase_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Is Purchase Item",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "is_purchase_item",
+ "oldfieldtype": "Select",
+ "options": "",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "0.00",
- "depends_on": "is_stock_item",
- "description": "",
- "fieldname": "min_order_qty",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Minimum Order Qty",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "min_order_qty",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0.00",
+ "depends_on": "is_stock_item",
+ "description": "",
+ "fieldname": "min_order_qty",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Minimum Order Qty",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "min_order_qty",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_purchase_item",
- "description": "Average time taken by the supplier to deliver",
- "fieldname": "lead_time_days",
- "fieldtype": "Int",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Lead Time in days",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "lead_time_days",
- "oldfieldtype": "Int",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_purchase_item",
+ "description": "Average time taken by the supplier to deliver",
+ "fieldname": "lead_time_days",
+ "fieldtype": "Int",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Lead Time in days",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "lead_time_days",
+ "oldfieldtype": "Int",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_purchase_item",
- "description": "",
- "fieldname": "buying_cost_center",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Default Buying Cost Center",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "cost_center",
- "oldfieldtype": "Link",
- "options": "Cost Center",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_purchase_item",
+ "description": "",
+ "fieldname": "buying_cost_center",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 1,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Default Buying Cost Center",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "cost_center",
+ "oldfieldtype": "Link",
+ "options": "Cost Center",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_purchase_item",
- "description": "",
- "fieldname": "expense_account",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Default Expense Account",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "purchase_account",
- "oldfieldtype": "Link",
- "options": "Account",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_purchase_item",
+ "description": "",
+ "fieldname": "expense_account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 1,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Default Expense Account",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "purchase_account",
+ "oldfieldtype": "Link",
+ "options": "Account",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_purchase_item",
- "fieldname": "unit_of_measure_conversion",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Unit of Measure Conversion",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_purchase_item",
+ "fieldname": "unit_of_measure_conversion",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Unit of Measure Conversion",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_purchase_item",
- "description": "Will also apply for variants",
- "fieldname": "uoms",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "UOMs",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "uom_conversion_details",
- "oldfieldtype": "Table",
- "options": "UOM Conversion Detail",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_purchase_item",
+ "description": "Will also apply for variants",
+ "fieldname": "uoms",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "UOMs",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "uom_conversion_details",
+ "oldfieldtype": "Table",
+ "options": "UOM Conversion Detail",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_purchase_item",
- "fieldname": "last_purchase_rate",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Last Purchase Rate",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "last_purchase_rate",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_purchase_item",
+ "fieldname": "last_purchase_rate",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Last Purchase Rate",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "last_purchase_rate",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "depends_on": "is_purchase_item",
- "fieldname": "supplier_details",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Supplier Details",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "depends_on": "is_purchase_item",
+ "fieldname": "supplier_details",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Supplier Details",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval:doc.is_purchase_item",
- "fieldname": "default_supplier",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Default Supplier",
- "length": 0,
- "no_copy": 0,
- "options": "Supplier",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:doc.is_purchase_item",
+ "fieldname": "default_supplier",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 1,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Default Supplier",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Supplier",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "delivered_by_supplier",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Delivered by Supplier (Drop Ship)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "delivered_by_supplier",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Delivered by Supplier (Drop Ship)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval:doc.is_purchase_item",
- "fieldname": "manufacturer",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Manufacturer",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:doc.is_purchase_item",
+ "fieldname": "manufacturer",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Manufacturer",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Manufacturer",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval:doc.is_purchase_item",
- "fieldname": "manufacturer_part_no",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Manufacturer Part Number",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:doc.is_purchase_item",
+ "fieldname": "manufacturer_part_no",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Manufacturer Part Number",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_purchase_item",
- "fieldname": "column_break2",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Item Code for Suppliers",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Column Break",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_purchase_item",
+ "fieldname": "column_break2",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Item Code for Suppliers",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Column Break",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "50%"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_purchase_item",
- "fieldname": "supplier_items",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Supplier Items",
- "length": 0,
- "no_copy": 0,
- "options": "Item Supplier",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_purchase_item",
+ "fieldname": "supplier_items",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Supplier Items",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Item Supplier",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "fieldname": "sales_details",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Sales Details",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Section Break",
- "options": "icon-tag",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "fieldname": "sales_details",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Sales Details",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Section Break",
+ "options": "icon-tag",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "1",
- "description": "",
- "fieldname": "is_sales_item",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 1,
- "in_list_view": 0,
- "label": "Is Sales Item",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "is_sales_item",
- "oldfieldtype": "Select",
- "options": "",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "1",
+ "description": "",
+ "fieldname": "is_sales_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 1,
+ "in_list_view": 0,
+ "label": "Is Sales Item",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "is_sales_item",
+ "oldfieldtype": "Select",
+ "options": "",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "",
- "depends_on": "eval:doc.is_sales_item",
- "description": "Allow in Sales Order of type \"Service\"",
- "fieldname": "is_service_item",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 1,
- "in_list_view": 0,
- "label": "Is Service Item",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "is_service_item",
- "oldfieldtype": "Select",
- "options": "",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "",
+ "depends_on": "eval:doc.is_sales_item",
+ "description": "Allow in Sales Order of type \"Service\"",
+ "fieldname": "is_service_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 1,
+ "in_list_view": 0,
+ "label": "Is Service Item",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "is_service_item",
+ "oldfieldtype": "Select",
+ "options": "",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "0",
- "description": "Publish Item to hub.erpnext.com",
- "fieldname": "publish_in_hub",
- "fieldtype": "Check",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Publish in Hub",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0",
+ "description": "Publish Item to hub.erpnext.com",
+ "fieldname": "publish_in_hub",
+ "fieldtype": "Check",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Publish in Hub",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "0",
- "fieldname": "synced_with_hub",
- "fieldtype": "Check",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Synced With Hub",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0",
+ "fieldname": "synced_with_hub",
+ "fieldtype": "Check",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Synced With Hub",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_sales_item",
- "fieldname": "income_account",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Default Income Account",
- "length": 0,
- "no_copy": 0,
- "options": "Account",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_sales_item",
+ "fieldname": "income_account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 1,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Default Income Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Account",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_sales_item",
- "fieldname": "selling_cost_center",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Default Selling Cost Center",
- "length": 0,
- "no_copy": 0,
- "options": "Cost Center",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_sales_item",
+ "fieldname": "selling_cost_center",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 1,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Default Selling Cost Center",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Cost Center",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_sales_item",
- "fieldname": "column_break3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Customer Item Codes",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Column Break",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_sales_item",
+ "fieldname": "column_break3",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Customer Item Codes",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Column Break",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "50%"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_sales_item",
- "description": "",
- "fieldname": "customer_items",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Customer Items",
- "length": 0,
- "no_copy": 0,
- "options": "Item Customer Detail",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_sales_item",
+ "description": "",
+ "fieldname": "customer_items",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Customer Items",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Item Customer Detail",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval:doc.is_sales_item",
- "fieldname": "max_discount",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Max Discount (%)",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "max_discount",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:doc.is_sales_item",
+ "fieldname": "max_discount",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Max Discount (%)",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "max_discount",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "fieldname": "item_tax_section_break",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Item Tax",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Section Break",
- "options": "icon-money",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "fieldname": "item_tax_section_break",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Item Tax",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Section Break",
+ "options": "icon-money",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "Will also apply for variants",
- "fieldname": "taxes",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Taxes",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "item_tax",
- "oldfieldtype": "Table",
- "options": "Item Tax",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "description": "Will also apply for variants",
+ "fieldname": "taxes",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Taxes",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "item_tax",
+ "oldfieldtype": "Table",
+ "options": "Item Tax",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "fieldname": "inspection_criteria",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Inspection Criteria",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Section Break",
- "options": "icon-search",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "fieldname": "inspection_criteria",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Inspection Criteria",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Section Break",
+ "options": "icon-search",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "",
- "fieldname": "inspection_required",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Inspection Required",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "inspection_required",
- "oldfieldtype": "Select",
- "options": "",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "",
+ "fieldname": "inspection_required",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Inspection Required",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "inspection_required",
+ "oldfieldtype": "Select",
+ "options": "",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "inspection_required",
- "description": "Will also apply to variants",
- "fieldname": "quality_parameters",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Quality Parameters",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "item_specification_details",
- "oldfieldtype": "Table",
- "options": "Item Quality Inspection Parameter",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "inspection_required",
+ "description": "Will also apply to variants",
+ "fieldname": "quality_parameters",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Quality Parameters",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "item_specification_details",
+ "oldfieldtype": "Table",
+ "options": "Item Quality Inspection Parameter",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "fieldname": "manufacturing",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Manufacturing",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Section Break",
- "options": "icon-cogs",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "fieldname": "manufacturing",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Manufacturing",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldtype": "Section Break",
+ "options": "icon-cogs",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "",
- "depends_on": "",
- "description": "",
- "fieldname": "is_pro_applicable",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Allow Production Order",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "is_pro_applicable",
- "oldfieldtype": "Select",
- "options": "",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "",
+ "depends_on": "",
+ "description": "",
+ "fieldname": "is_pro_applicable",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Allow Production Order",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "is_pro_applicable",
+ "oldfieldtype": "Select",
+ "options": "",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "",
- "description": "If subcontracted to a vendor",
- "fieldname": "is_sub_contracted_item",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Supply Raw Materials for Purchase",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "is_sub_contracted_item",
- "oldfieldtype": "Select",
- "options": "",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "",
+ "description": "If subcontracted to a vendor",
+ "fieldname": "is_sub_contracted_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Supply Raw Materials for Purchase",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "is_sub_contracted_item",
+ "oldfieldtype": "Select",
+ "options": "",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_74",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_74",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "",
- "fieldname": "default_bom",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Default BOM",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "default_bom",
- "oldfieldtype": "Link",
- "options": "BOM",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "",
+ "fieldname": "default_bom",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 1,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Default BOM",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "default_bom",
+ "oldfieldtype": "Link",
+ "options": "BOM",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "customer_code",
- "fieldtype": "Data",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 1,
- "in_list_view": 0,
- "label": "Customer Code",
- "length": 0,
- "no_copy": 1,
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "customer_code",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 1,
+ "in_list_view": 0,
+ "label": "Customer Code",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "fieldname": "website_section",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Website",
- "length": 0,
- "no_copy": 0,
- "options": "icon-globe",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "fieldname": "website_section",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Website",
+ "length": 0,
+ "no_copy": 0,
+ "options": "icon-globe",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "show_in_website",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Show in Website",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "show_in_website",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Show in Website",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "show_in_website",
- "description": "website page link",
- "fieldname": "page_name",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Page Name",
- "length": 0,
- "no_copy": 1,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "show_in_website",
+ "description": "website page link",
+ "fieldname": "page_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Page Name",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "show_in_website",
- "description": "Items with higher weightage will be shown higher",
- "fieldname": "weightage",
- "fieldtype": "Int",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Weightage",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 1,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "show_in_website",
+ "description": "Items with higher weightage will be shown higher",
+ "fieldname": "weightage",
+ "fieldtype": "Int",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Weightage",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 1,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "show_in_website",
- "description": "Show a slideshow at the top of the page",
- "fieldname": "slideshow",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Slideshow",
- "length": 0,
- "no_copy": 0,
- "options": "Website Slideshow",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "show_in_website",
+ "description": "Show a slideshow at the top of the page",
+ "fieldname": "slideshow",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Slideshow",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Website Slideshow",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "show_in_website",
- "description": "Item Image (if not slideshow)",
- "fieldname": "website_image",
- "fieldtype": "Attach",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Image",
- "length": 0,
- "no_copy": 0,
- "options": "",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "show_in_website",
+ "description": "Item Image (if not slideshow)",
+ "fieldname": "website_image",
+ "fieldtype": "Attach",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Image",
+ "length": 0,
+ "no_copy": 0,
+ "options": "",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "thumbnail",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Thumbnail",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "thumbnail",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Thumbnail",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "cb72",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "cb72",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "show_in_website",
- "description": "Show \"In Stock\" or \"Not in Stock\" based on stock available in this warehouse.",
- "fieldname": "website_warehouse",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Website Warehouse",
- "length": 0,
- "no_copy": 0,
- "options": "Warehouse",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "show_in_website",
+ "description": "Show \"In Stock\" or \"Not in Stock\" based on stock available in this warehouse.",
+ "fieldname": "website_warehouse",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 1,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Website Warehouse",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Warehouse",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "show_in_website",
- "description": "List this Item in multiple groups on the website.",
- "fieldname": "website_item_groups",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Website Item Groups",
- "length": 0,
- "no_copy": 0,
- "options": "Website Item Group",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "show_in_website",
+ "description": "List this Item in multiple groups on the website.",
+ "fieldname": "website_item_groups",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Website Item Groups",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Website Item Group",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "collapsible_depends_on": "website_specifications",
- "depends_on": "show_in_website",
- "fieldname": "sb72",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Website Specifications",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "collapsible_depends_on": "website_specifications",
+ "depends_on": "show_in_website",
+ "fieldname": "sb72",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Website Specifications",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "show_in_website",
- "fieldname": "copy_from_item_group",
- "fieldtype": "Button",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Copy From Item Group",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "show_in_website",
+ "fieldname": "copy_from_item_group",
+ "fieldtype": "Button",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Copy From Item Group",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "show_in_website",
- "fieldname": "website_specifications",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Website Specifications",
- "length": 0,
- "no_copy": 0,
- "options": "Item Website Specification",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "show_in_website",
+ "fieldname": "website_specifications",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Website Specifications",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Item Website Specification",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "show_in_website",
- "fieldname": "web_long_description",
- "fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Website Description",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "show_in_website",
+ "fieldname": "web_long_description",
+ "fieldtype": "Text Editor",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Website Description",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "parent_website_route",
- "fieldtype": "Read Only",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Parent Website Route",
- "length": 0,
- "no_copy": 1,
- "options": "",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "parent_website_route",
+ "fieldtype": "Read Only",
+ "hidden": 0,
+ "ignore_user_permissions": 1,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Parent Website Route",
+ "length": 0,
+ "no_copy": 1,
+ "options": "",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
}
- ],
- "hide_heading": 0,
- "hide_toolbar": 0,
- "icon": "icon-tag",
- "idx": 1,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 1,
- "modified": "2015-12-07 14:14:33.563140",
- "modified_by": "Administrator",
- "module": "Stock",
- "name": "Item",
- "owner": "Administrator",
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "icon": "icon-tag",
+ "idx": 1,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 1,
+ "modified": "2016-01-17 11:14:10.169713",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Item",
+ "owner": "Administrator",
"permissions": [
{
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Item Manager",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 0,
+ "if_owner": 0,
+ "import": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "restrict": 0,
+ "role": "Material Master Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
"write": 1
- },
+ },
{
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Stock Manager",
- "set_user_permissions": 0,
- "share": 0,
- "submit": 0,
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 1,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "restrict": 0,
+ "role": "Material Manager",
+ "set_user_permissions": 0,
+ "share": 0,
+ "submit": 0,
"write": 0
- },
+ },
{
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Stock User",
- "set_user_permissions": 0,
- "share": 0,
- "submit": 0,
+ "amend": 0,
+ "apply_user_permissions": 1,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 1,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "restrict": 0,
+ "role": "Material User",
+ "set_user_permissions": 0,
+ "share": 0,
+ "submit": 0,
"write": 0
- },
+ },
{
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "email": 0,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 0,
- "read": 1,
- "report": 0,
- "role": "Sales User",
- "set_user_permissions": 0,
- "share": 0,
- "submit": 0,
+ "amend": 0,
+ "apply_user_permissions": 1,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "restrict": 0,
+ "role": "Sales User",
+ "set_user_permissions": 0,
+ "share": 0,
+ "submit": 0,
"write": 0
- },
+ },
{
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "email": 0,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 0,
- "read": 1,
- "report": 0,
- "role": "Purchase User",
- "set_user_permissions": 0,
- "share": 0,
- "submit": 0,
+ "amend": 0,
+ "apply_user_permissions": 1,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "restrict": 0,
+ "role": "Purchase User",
+ "set_user_permissions": 0,
+ "share": 0,
+ "submit": 0,
"write": 0
- },
+ },
{
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "email": 0,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 0,
- "read": 1,
- "report": 0,
- "role": "Maintenance User",
- "set_user_permissions": 0,
- "share": 0,
- "submit": 0,
+ "amend": 0,
+ "apply_user_permissions": 1,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "restrict": 0,
+ "role": "Maintenance User",
+ "set_user_permissions": 0,
+ "share": 0,
+ "submit": 0,
"write": 0
- },
+ },
{
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "email": 0,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 0,
- "read": 1,
- "report": 0,
- "role": "Accounts User",
- "set_user_permissions": 0,
- "share": 0,
- "submit": 0,
+ "amend": 0,
+ "apply_user_permissions": 1,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "restrict": 0,
+ "role": "Accounts User",
+ "set_user_permissions": 0,
+ "share": 0,
+ "submit": 0,
"write": 0
- },
+ },
{
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "email": 0,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 0,
- "read": 1,
- "report": 0,
- "role": "Manufacturing User",
- "set_user_permissions": 0,
- "share": 0,
- "submit": 0,
+ "amend": 0,
+ "apply_user_permissions": 1,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "restrict": 0,
+ "role": "Manufacturing User",
+ "set_user_permissions": 0,
+ "share": 0,
+ "submit": 0,
"write": 0
}
- ],
- "read_only": 0,
- "read_only_onload": 0,
- "search_fields": "item_name,description,item_group,customer_code",
+ ],
+ "read_only": 0,
+ "read_only_onload": 0,
+ "search_fields": "item_name,description,item_group,customer_code",
+ "sort_order": "DESC",
"title_field": "item_name"
-}
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item/item_list.js b/erpnext/stock/doctype/item/item_list.js
index 1074bd0039..fffc7fe526 100644
--- a/erpnext/stock/doctype/item/item_list.js
+++ b/erpnext/stock/doctype/item/item_list.js
@@ -1,6 +1,7 @@
frappe.listview_settings['Item'] = {
add_fields: ["item_name", "stock_uom", "item_group", "image", "variant_of",
"has_variants", "end_of_life", "disabled", "is_sales_item"],
+ filters: [["disabled", "=", "0"]],
get_indicator: function(doc) {
if (doc.disabled) {
diff --git a/erpnext/stock/doctype/item/test_item.py b/erpnext/stock/doctype/item/test_item.py
index f8b63936bd..e5392d451b 100644
--- a/erpnext/stock/doctype/item/test_item.py
+++ b/erpnext/stock/doctype/item/test_item.py
@@ -93,14 +93,14 @@ class TestItem(unittest.TestCase):
"price_list_currency": "_Test Currency",
"plc_conversion_rate": 1,
"order_type": "Sales",
- "transaction_type": "selling"
+ "customer": "_Test Customer"
})
for key, value in to_check.iteritems():
self.assertEquals(value, details.get(key))
def test_make_item_variant(self):
- frappe.delete_doc_if_exists("Item", "_Test Variant Item-L")
+ frappe.delete_doc_if_exists("Item", "_Test Variant Item-L", force=1)
variant = create_variant("_Test Variant Item", {"Test Size": "Large"})
variant.save()
diff --git a/erpnext/stock/doctype/manufacturer/__init__.py b/erpnext/stock/doctype/manufacturer/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/erpnext/stock/doctype/manufacturer/manufacturer.json b/erpnext/stock/doctype/manufacturer/manufacturer.json
new file mode 100644
index 0000000000..623e352a1d
--- /dev/null
+++ b/erpnext/stock/doctype/manufacturer/manufacturer.json
@@ -0,0 +1,224 @@
+{
+ "allow_copy": 0,
+ "allow_import": 1,
+ "allow_rename": 1,
+ "autoname": "field:short_name",
+ "creation": "2016-01-17 11:04:52.761731",
+ "custom": 0,
+ "description": "Manufacturers used in Items",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Setup",
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "description": "Limited to 12 characters",
+ "fieldname": "short_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Short Name",
+ "length": 10,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "full_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Full Name",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "website",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Website",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "data_6",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Country",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Country",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "logo",
+ "fieldtype": "Attach Image",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Logo",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "notes",
+ "fieldtype": "Small Text",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Notes",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ }
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "icon": "icon-certificate",
+ "idx": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2016-01-17 11:39:36.686949",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Manufacturer",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Stock Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ },
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Stock User",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 0
+ }
+ ],
+ "read_only": 0,
+ "read_only_onload": 0,
+ "search_fields": "short_name, full_name",
+ "sort_field": "",
+ "sort_order": "DESC",
+ "title_field": "short_name"
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/manufacturer/manufacturer.py b/erpnext/stock/doctype/manufacturer/manufacturer.py
new file mode 100644
index 0000000000..7b85b05aa1
--- /dev/null
+++ b/erpnext/stock/doctype/manufacturer/manufacturer.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.model.document import Document
+
+class Manufacturer(Document):
+ pass
diff --git a/erpnext/stock/doctype/manufacturer/test_manufacturer.py b/erpnext/stock/doctype/manufacturer/test_manufacturer.py
new file mode 100644
index 0000000000..996f6b27ca
--- /dev/null
+++ b/erpnext/stock/doctype/manufacturer/test_manufacturer.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+import frappe
+import unittest
+
+# test_records = frappe.get_test_records('Manufacturer')
+
+class TestManufacturer(unittest.TestCase):
+ pass
diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js
index 3ce6707dcf..0bb4815fff 100644
--- a/erpnext/stock/doctype/material_request/material_request.js
+++ b/erpnext/stock/doctype/material_request/material_request.js
@@ -34,32 +34,36 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
}
if(doc.docstatus == 1 && doc.status != 'Stopped') {
- if(doc.material_request_type === "Purchase")
- cur_frm.add_custom_button(__("Make Supplier Quotation"),
- this.make_supplier_quotation,
- frappe.boot.doctype_icons["Supplier Quotation"]);
if(flt(doc.per_ordered, 2) < 100) {
+ // make
if(doc.material_request_type === "Material Transfer" && doc.status === "Submitted")
- cur_frm.add_custom_button(__("Transfer Material"), this.make_stock_entry,
- frappe.boot.doctype_icons["Stock Entry"]);
+ cur_frm.add_custom_button(__("Transfer Material"),
+ this.make_stock_entry, __("Make"));
if(doc.material_request_type === "Material Issue" && doc.status === "Submitted")
- cur_frm.add_custom_button(__("Issue Material"), this.make_stock_entry,
- frappe.boot.doctype_icons["Stock Entry"]);
+ cur_frm.add_custom_button(__("Issue Material"),
+ this.make_stock_entry, __("Make"));
if(doc.material_request_type === "Purchase")
- cur_frm.add_custom_button(__('Make Purchase Order'),
- this.make_purchase_order, frappe.boot.doctype_icons["Purchase Order"]);
+ cur_frm.add_custom_button(__('Purchase Order'),
+ this.make_purchase_order, __("Make"));
+ if(doc.material_request_type === "Purchase")
+ cur_frm.add_custom_button(__("Supplier Quotation"),
+ this.make_supplier_quotation, __("Make"));
+
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
+
+ // stop
cur_frm.add_custom_button(__('Stop'),
- cur_frm.cscript['Stop Material Request'], "icon-exclamation", "btn-default");
+ cur_frm.cscript['Stop Material Request'], __("Status"));
}
}
if (this.frm.doc.docstatus===0) {
- cur_frm.add_custom_button(__('From Sales Order'),
+ cur_frm.add_custom_button(__('Sales Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_material_request",
@@ -71,12 +75,12 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
company: cur_frm.doc.company
}
})
- }, "icon-download", "btn-default");
+ }, __("Get items from"));
}
if(doc.docstatus == 1 && doc.status == 'Stopped')
cur_frm.add_custom_button(__('Re-open'),
- cur_frm.cscript['Unstop Material Request'], "icon-check");
+ cur_frm.cscript['Unstop Material Request'], __("Status"));
},
diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py
index 5462228215..74a8fa146c 100644
--- a/erpnext/stock/doctype/material_request/material_request.py
+++ b/erpnext/stock/doctype/material_request/material_request.py
@@ -11,7 +11,6 @@ from frappe.utils import cstr, flt, getdate
from frappe import _
from frappe.model.mapper import get_mapped_doc
from erpnext.stock.stock_balance import update_bin_qty, get_indented_qty
-
from erpnext.controllers.buying_controller import BuyingController
@@ -24,7 +23,7 @@ class MaterialRequest(BuyingController):
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('items')]
+ pass
def validate_qty_against_so(self):
so_items = {} # Format --> {'SO/00001': {'Item/001': 120, 'Item/002': 24}}
@@ -182,6 +181,9 @@ def update_item(obj, target, source_parent):
@frappe.whitelist()
def make_purchase_order(source_name, target_doc=None):
+ def postprocess(source, target_doc):
+ set_missing_values(source, target_doc)
+
doclist = get_mapped_doc("Material Request", source_name, {
"Material Request": {
"doctype": "Purchase Order",
@@ -202,7 +204,7 @@ def make_purchase_order(source_name, target_doc=None):
"postprocess": update_item,
"condition": lambda doc: doc.ordered_qty < doc.qty
}
- }, target_doc, set_missing_values)
+ }, target_doc, postprocess)
return doclist
@@ -218,11 +220,11 @@ def make_purchase_order_based_on_supplier(source_name, target_doc=None):
def postprocess(source, target_doc):
target_doc.supplier = source_name
- set_missing_values(source, target_doc)
+
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
+
+ set_missing_values(source, target_doc)
for mr in material_requests:
target_doc = get_mapped_doc("Material Request", mr, {
@@ -264,6 +266,9 @@ def get_material_requests_based_on_supplier(supplier):
@frappe.whitelist()
def make_supplier_quotation(source_name, target_doc=None):
+ def postprocess(source, target_doc):
+ set_missing_values(source, target_doc)
+
doclist = get_mapped_doc("Material Request", source_name, {
"Material Request": {
"doctype": "Supplier Quotation",
@@ -280,7 +285,7 @@ def make_supplier_quotation(source_name, target_doc=None):
"parenttype": "prevdoc_doctype"
}
}
- }, target_doc, set_missing_values)
+ }, target_doc, postprocess)
return doclist
diff --git a/erpnext/stock/doctype/material_request/test_material_request.py b/erpnext/stock/doctype/material_request/test_material_request.py
index 0905b399c6..37d985edb0 100644
--- a/erpnext/stock/doctype/material_request/test_material_request.py
+++ b/erpnext/stock/doctype/material_request/test_material_request.py
@@ -106,6 +106,7 @@ class TestMaterialRequest(unittest.TestCase):
mr.submit()
# check if per complete is None
+ mr.load_from_db()
self.assertEquals(mr.per_ordered, 0)
self.assertEquals(mr.get("items")[0].ordered_qty, 0)
self.assertEquals(mr.get("items")[1].ordered_qty, 0)
@@ -173,6 +174,7 @@ class TestMaterialRequest(unittest.TestCase):
mr.submit()
# check if per complete is None
+ mr.load_from_db()
self.assertEquals(mr.per_ordered, 0)
self.assertEquals(mr.get("items")[0].ordered_qty, 0)
self.assertEquals(mr.get("items")[1].ordered_qty, 0)
@@ -262,6 +264,7 @@ class TestMaterialRequest(unittest.TestCase):
mr.submit()
# check if per complete is None
+ mr.load_from_db()
self.assertEquals(mr.per_ordered, 0)
self.assertEquals(mr.get("items")[0].ordered_qty, 0)
self.assertEquals(mr.get("items")[1].ordered_qty, 0)
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index eec1a6d8b5..7cf7ae9f88 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -38,7 +38,7 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
if(!this.frm.doc.is_return && this.frm.doc.status!="Closed") {
if(this.frm.doc.docstatus==0) {
- cur_frm.add_custom_button(__('From Purchase Order'),
+ cur_frm.add_custom_button(__('Purchase Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_receipt",
@@ -51,25 +51,26 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
company: cur_frm.doc.company
}
})
- });
+ }, __("Get items from"));
}
if(this.frm.doc.docstatus == 1 && this.frm.doc.status!="Closed") {
- cur_frm.add_custom_button(__('Return'), this.make_purchase_return);
- if(this.frm.doc.__onload && !this.frm.doc.__onload.billing_complete) {
- cur_frm.add_custom_button(__('Invoice'),
- this.make_purchase_invoice).addClass("btn-primary");
+ if (this.frm.has_perm("submit")) {
+ cur_frm.add_custom_button(__("Close"), this.close_purchase_receipt, __("Status"))
}
- if (this.frm.has_perm("submit") &&
- this.frm.doc.__onload && !this.frm.doc.__onload.has_return_entry) {
- cur_frm.add_custom_button(__("Close"), this.close_purchase_receipt)
+
+ cur_frm.add_custom_button(__('Return'), this.make_purchase_return, __("Make"));
+
+ if(flt(this.frm.doc.per_billed) < 100) {
+ cur_frm.add_custom_button(__('Invoice'), this.make_purchase_invoice, __("Make"));
}
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
}
if(this.frm.doc.docstatus==1 && this.frm.doc.status === "Closed" && this.frm.has_perm("submit")) {
- cur_frm.add_custom_button(__('Reopen'), this.reopen_purchase_receipt)
+ cur_frm.add_custom_button(__('Reopen'), this.reopen_purchase_receipt, __("Status"))
}
this.frm.toggle_reqd("supplier_warehouse", this.frm.doc.is_subcontracted==="Yes");
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
index f0eac39bd1..47069ea5a0 100755
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
@@ -644,7 +644,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
- "label": "Get Current Stock",
+ "label": "Get current stock",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Button",
@@ -2302,7 +2302,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2015-12-30 18:15:06.678001",
+ "modified": "2016-01-15 04:14:16.311445",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt",
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
index df62f7d246..1d872388f3 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -46,16 +46,6 @@ class PurchaseReceipt(BuyingController):
'extra_cond': """ and exists (select name from `tabPurchase Receipt` where name=`tabPurchase Receipt Item`.parent and is_return=1)"""
}]
- def onload(self):
- billed_qty = frappe.db.sql("""select sum(qty) 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("items")))
- self.set_onload("billing_complete", (billed_qty[0][0] == total_qty))
-
- self.set_onload("has_return_entry", len(frappe.db.exists({"doctype": "Purchase Receipt",
- "is_return": 1, "return_against": self.name, "docstatus": 1})))
-
def validate(self):
super(PurchaseReceipt, self).validate()
diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
index 0032c890b2..ceff05a941 100755
--- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
+++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
@@ -1,1569 +1,1663 @@
{
- "allow_copy": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "autoname": "hash",
- "creation": "2013-05-24 19:29:10",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "autoname": "hash",
+ "creation": "2013-05-24 19:29:10",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Document",
"fields": [
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "barcode",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Barcode",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "barcode",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Barcode",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "section_break_2",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "section_break_2",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 1,
- "collapsible": 0,
- "fieldname": "item_code",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 1,
- "in_list_view": 1,
- "label": "Item Code",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "item_code",
- "oldfieldtype": "Link",
- "options": "Item",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": "100px",
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 1,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 1,
+ "collapsible": 0,
+ "fieldname": "item_code",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 1,
+ "in_list_view": 1,
+ "label": "Item Code",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "item_code",
+ "oldfieldtype": "Link",
+ "options": "Item",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": "100px",
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 1,
+ "set_only_once": 0,
+ "unique": 0,
"width": "100px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_2",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_2",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "item_name",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Item Name",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "item_name",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "item_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Item Name",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "item_name",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "fieldname": "section_break_4",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Description",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "fieldname": "section_break_4",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Description",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "description",
- "fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Description",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "description",
- "oldfieldtype": "Text",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": "300px",
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "description",
+ "fieldtype": "Text Editor",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Description",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "description",
+ "oldfieldtype": "Text",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": "300px",
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "300px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "col_break1",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "col_break1",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "image",
- "fieldtype": "Attach",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Image",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "image",
+ "fieldtype": "Attach",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Image",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "image_view",
- "fieldtype": "Image",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Image View",
- "length": 0,
- "no_copy": 0,
- "options": "image",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "image_view",
+ "fieldtype": "Image",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Image View",
+ "length": 0,
+ "no_copy": 0,
+ "options": "image",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "received_and_accepted",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Received and Accepted",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "received_and_accepted",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Received and Accepted",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 1,
- "collapsible": 0,
- "fieldname": "received_qty",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Recd Quantity",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "received_qty",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "100px",
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 1,
+ "collapsible": 0,
+ "fieldname": "received_qty",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Recd Quantity",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "received_qty",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "100px",
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "100px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "qty",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Accepted Quantity",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "qty",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": "100px",
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "qty",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Accepted Quantity",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "qty",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": "100px",
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "100px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "rejected_qty",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Rejected Quantity",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "rejected_qty",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "100px",
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "rejected_qty",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Rejected Quantity",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "rejected_qty",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "100px",
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "100px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "col_break2",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "col_break2",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "uom",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "UOM",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "uom",
- "oldfieldtype": "Link",
- "options": "UOM",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "100px",
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "uom",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "UOM",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "uom",
+ "oldfieldtype": "Link",
+ "options": "UOM",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "100px",
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "100px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "stock_uom",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Stock UOM",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "stock_uom",
- "oldfieldtype": "Data",
- "options": "UOM",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "100px",
- "read_only": 1,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "stock_uom",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Stock UOM",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "stock_uom",
+ "oldfieldtype": "Data",
+ "options": "UOM",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "100px",
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "100px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "conversion_factor",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Conversion Factor",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "conversion_factor",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "100px",
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "conversion_factor",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Conversion Factor",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "conversion_factor",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "100px",
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "100px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "rate_and_amount",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Rate and Amount",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "rate_and_amount",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Rate and Amount",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "price_list_rate",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Price List Rate",
- "length": 0,
- "no_copy": 0,
- "options": "currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "price_list_rate",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Price List Rate",
+ "length": 0,
+ "no_copy": 0,
+ "options": "currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "price_list_rate",
- "fieldname": "discount_percentage",
- "fieldtype": "Percent",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Discount on Price List Rate (%)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "price_list_rate",
+ "fieldname": "discount_percentage",
+ "fieldtype": "Percent",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Discount on Price List Rate (%)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "col_break3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "col_break3",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "base_price_list_rate",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Price List Rate (Company Currency)",
- "length": 0,
- "no_copy": 0,
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "base_price_list_rate",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Price List Rate (Company Currency)",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "sec_break1",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "sec_break1",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 1,
- "collapsible": 0,
- "fieldname": "rate",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Rate",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "import_rate",
- "oldfieldtype": "Currency",
- "options": "currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": "100px",
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 1,
+ "collapsible": 0,
+ "fieldname": "rate",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Rate",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "import_rate",
+ "oldfieldtype": "Currency",
+ "options": "currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "print_width": "100px",
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "100px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Amount",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "import_amount",
- "oldfieldtype": "Currency",
- "options": "currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Amount",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "import_amount",
+ "oldfieldtype": "Currency",
+ "options": "currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "col_break4",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "col_break4",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "base_rate",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Rate (Company Currency)",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "purchase_rate",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "100px",
- "read_only": 1,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "base_rate",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Rate (Company Currency)",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "purchase_rate",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "100px",
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "100px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "base_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Amount (Company Currency)",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "amount",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "100px",
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "base_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Amount (Company Currency)",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "amount",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "100px",
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "100px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "pricing_rule",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Pricing Rule",
- "length": 0,
- "no_copy": 0,
- "options": "Pricing Rule",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "pricing_rule",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Pricing Rule",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Pricing Rule",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "section_break_29",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "section_break_29",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "net_rate",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Net Rate",
- "length": 0,
- "no_copy": 0,
- "options": "currency",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "net_rate",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Net Rate",
+ "length": 0,
+ "no_copy": 0,
+ "options": "currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "net_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Net Amount",
- "length": 0,
- "no_copy": 0,
- "options": "currency",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "net_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Net Amount",
+ "length": 0,
+ "no_copy": 0,
+ "options": "currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_32",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_32",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "base_net_rate",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Net Rate (Company Currency)",
- "length": 0,
- "no_copy": 0,
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "base_net_rate",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Net Rate (Company Currency)",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "base_net_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Net Amount (Company Currency)",
- "length": 0,
- "no_copy": 0,
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "base_net_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Net Amount (Company Currency)",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "warehouse_and_reference",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Warehouse and Reference",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "warehouse_and_reference",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Warehouse and Reference",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 1,
- "collapsible": 0,
- "fieldname": "warehouse",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Accepted Warehouse",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "warehouse",
- "oldfieldtype": "Link",
- "options": "Warehouse",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "100px",
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 1,
+ "collapsible": 0,
+ "fieldname": "warehouse",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Accepted Warehouse",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "warehouse",
+ "oldfieldtype": "Link",
+ "options": "Warehouse",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "100px",
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "100px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "rejected_warehouse",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Rejected Warehouse",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "rejected_warehouse",
- "oldfieldtype": "Link",
- "options": "Warehouse",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "100px",
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "rejected_warehouse",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Rejected Warehouse",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "rejected_warehouse",
+ "oldfieldtype": "Link",
+ "options": "Warehouse",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "100px",
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "100px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "project_name",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 1,
- "in_list_view": 0,
- "label": "Project Name",
- "length": 0,
- "no_copy": 0,
- "options": "Project",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "qa_no",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Quality Inspection",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "qa_no",
+ "oldfieldtype": "Link",
+ "options": "Quality Inspection",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": ":Company",
- "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)",
- "fieldname": "cost_center",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Cost Center",
- "length": 0,
- "no_copy": 0,
- "options": "Cost Center",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_40",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "qa_no",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Quality Inspection",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "qa_no",
- "oldfieldtype": "Link",
- "options": "Quality Inspection",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "schedule_date",
- "fieldtype": "Date",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Required By",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "schedule_date",
- "oldfieldtype": "Date",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "stock_qty",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Qty as per Stock UOM",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "stock_qty",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "100px",
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
- "width": "100px"
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "prevdoc_doctype",
- "fieldtype": "Data",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Prevdoc Doctype",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "prevdoc_doctype",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "prevdoc_docname",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 1,
- "in_list_view": 0,
- "label": "Purchase Order",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "prevdoc_docname",
- "oldfieldtype": "Link",
- "options": "Purchase Order",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "150px",
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 1,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "prevdoc_docname",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 1,
+ "in_list_view": 0,
+ "label": "Purchase Order",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "prevdoc_docname",
+ "oldfieldtype": "Link",
+ "options": "Purchase Order",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "150px",
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 1,
+ "set_only_once": 0,
+ "unique": 0,
"width": "150px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "prevdoc_detail_docname",
- "fieldtype": "Data",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 1,
- "in_list_view": 0,
- "label": "Purchase Order Item No",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "prevdoc_detail_docname",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "150px",
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 1,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "schedule_date",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Required By",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "schedule_date",
+ "oldfieldtype": "Date",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "stock_qty",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Qty as per Stock UOM",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "stock_qty",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "100px",
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
+ "width": "100px"
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "section_break_45",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "serial_no",
+ "fieldtype": "Text",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 1,
+ "in_list_view": 1,
+ "label": "Serial No",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "serial_no",
+ "oldfieldtype": "Text",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "batch_no",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Batch No",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "batch_no",
+ "oldfieldtype": "Link",
+ "options": "Batch",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_48",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "rejected_serial_no",
+ "fieldtype": "Text",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Rejected Serial No",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "section_break_50",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "project_name",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 1,
+ "in_list_view": 0,
+ "label": "Project Name",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Project",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": ":Company",
+ "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)",
+ "fieldname": "cost_center",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Cost Center",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Cost Center",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "prevdoc_doctype",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Prevdoc Doctype",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "prevdoc_doctype",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "prevdoc_detail_docname",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 1,
+ "in_list_view": 0,
+ "label": "Purchase Order Item No",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "prevdoc_detail_docname",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "150px",
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 1,
+ "set_only_once": 0,
+ "unique": 0,
"width": "150px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "col_break5",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "col_break5",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "bom",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "BOM",
- "length": 0,
- "no_copy": 1,
- "options": "BOM",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "bom",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "BOM",
+ "length": 0,
+ "no_copy": 1,
+ "options": "BOM",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "serial_no",
- "fieldtype": "Text",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 1,
- "in_list_view": 1,
- "label": "Serial No",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "serial_no",
- "oldfieldtype": "Text",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "billed_amt",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Billed Amt",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "rejected_serial_no",
- "fieldtype": "Text",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Rejected Serial No",
- "length": 0,
- "no_copy": 1,
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "landed_cost_voucher_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Landed Cost Voucher Amount",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "batch_no",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Batch No",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "batch_no",
- "oldfieldtype": "Link",
- "options": "Batch",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "brand",
+ "fieldtype": "Link",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Brand",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "brand",
+ "oldfieldtype": "Link",
+ "options": "Brand",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "billed_amt",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Billed Amt",
- "length": 0,
- "no_copy": 1,
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "description": "",
+ "fieldname": "item_group",
+ "fieldtype": "Link",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 1,
+ "in_list_view": 0,
+ "label": "Item Group",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "item_group",
+ "oldfieldtype": "Link",
+ "options": "Item Group",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 1,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "brand",
- "fieldtype": "Link",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Brand",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "brand",
- "oldfieldtype": "Link",
- "options": "Brand",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "",
- "fieldname": "item_group",
- "fieldtype": "Link",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 1,
- "in_list_view": 0,
- "label": "Item Group",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "item_group",
- "oldfieldtype": "Link",
- "options": "Item Group",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 1,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "rm_supp_cost",
- "fieldtype": "Currency",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Raw Materials Supplied Cost",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "rm_supp_cost",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "150px",
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "rm_supp_cost",
+ "fieldtype": "Currency",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Raw Materials Supplied Cost",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "rm_supp_cost",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "150px",
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "150px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "item_tax_amount",
- "fieldtype": "Currency",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Item Tax Amount",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "item_tax_amount",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "150px",
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "item_tax_amount",
+ "fieldtype": "Currency",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Item Tax Amount",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "item_tax_amount",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "150px",
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "150px"
- },
+ },
{
- "allow_on_submit": 1,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "landed_cost_voucher_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Landed Cost Voucher Amount",
- "length": 0,
- "no_copy": 1,
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 1,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "valuation_rate",
- "fieldtype": "Currency",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Valuation Rate",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "valuation_rate",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "print_width": "80px",
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "valuation_rate",
+ "fieldtype": "Currency",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Valuation Rate",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "valuation_rate",
+ "oldfieldtype": "Currency",
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "print_width": "80px",
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0,
"width": "80px"
- },
+ },
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges",
- "fieldname": "item_tax_rate",
- "fieldtype": "Small Text",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Item Tax Rate",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "item_tax_rate",
- "oldfieldtype": "Small Text",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 1,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges",
+ "fieldname": "item_tax_rate",
+ "fieldtype": "Small Text",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Item Tax Rate",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "item_tax_rate",
+ "oldfieldtype": "Small Text",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 1,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
- },
+ },
{
- "allow_on_submit": 1,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "page_break",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Page Break",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "page_break",
- "oldfieldtype": "Check",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "page_break",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Page Break",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "page_break",
+ "oldfieldtype": "Check",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
"unique": 0
}
- ],
- "hide_heading": 0,
- "hide_toolbar": 0,
- "idx": 1,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 1,
- "max_attachments": 0,
- "modified": "2016-01-06 02:22:04.312514",
- "modified_by": "Administrator",
- "module": "Stock",
- "name": "Purchase Receipt Item",
- "owner": "Administrator",
- "permissions": [],
- "read_only": 0,
- "read_only_onload": 0,
- "sort_field": "modified",
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 1,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 1,
+ "max_attachments": 0,
+ "modified": "2016-01-15 04:20:38.803896",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Purchase Receipt Item",
+ "owner": "Administrator",
+ "permissions": [],
+ "read_only": 0,
+ "read_only_onload": 0,
+ "sort_field": "modified",
"sort_order": "DESC"
-}
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 585f8dd55f..34374630b5 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -176,12 +176,13 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
add_excise_button: function() {
if(frappe.boot.sysdefaults.country === "India")
- this.frm.add_custom_button(__("Make Excise Invoice"), function() {
+ this.frm.add_custom_button(__("Excise Invoice"), function() {
var excise = frappe.model.make_new_doc_and_get_name('Journal Entry');
excise = locals['Journal Entry'][excise];
excise.voucher_type = 'Excise Entry';
loaddoc('Journal Entry', excise.name);
- }, frappe.boot.doctype_icons["Journal Entry"], "btn-default");
+ }, __("Make"));
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
},
items_add: function(doc, cdt, cdn) {
@@ -235,11 +236,11 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
},
s_warehouse: function(doc, cdt, cdn) {
-
+ this.get_warehouse_details(doc, cdt, cdn)
},
t_warehouse: function(doc, cdt, cdn) {
- this.s_warehouse(doc, cdt, cdn);
+ this.get_warehouse_details(doc, cdt, cdn)
},
get_warehouse_details: function(doc, cdt, cdn) {
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index 247ce787a6..28939cae4c 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -233,6 +233,7 @@ class StockEntry(StockController):
self.posting_date, self.posting_time, d.actual_qty, d.transfer_qty), NegativeStockError)
def get_stock_and_rate(self):
+ self.set_transfer_qty()
self.set_actual_qty()
self.calculate_rate_and_amount()
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index 535e397c55..08c1df171f 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -10,16 +10,18 @@ frappe.ui.form.on("Stock Reconciliation", {
// end of life
frm.set_query("item_code", "items", function(doc, cdt, cdn) {
return {
- filters:[
- ['Item', 'end_of_life', '>=', frappe.datetime.nowdate()]
- ]
+ query: "erpnext.controllers.queries.item_query",
+ filters:{
+ "is_stock_item": 1,
+ "has_serial_no": 0
+ }
}
});
},
refresh: function(frm) {
if(frm.doc.docstatus < 1) {
- frm.add_custom_button(__("Get Items"), function() {
+ frm.add_custom_button(__("Items"), function() {
frm.events.get_items(frm);
});
}
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index fa51ab9de9..cc80d1ee44 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -6,7 +6,7 @@ import frappe
from frappe import _, throw
from frappe.utils import flt, cint, add_days, cstr
import json
-from erpnext.accounts.doctype.pricing_rule.pricing_rule import get_pricing_rule_for_item
+from erpnext.accounts.doctype.pricing_rule.pricing_rule import get_pricing_rule_for_item, set_transaction_type
from erpnext.setup.utils import get_exchange_rate
from frappe.model.meta import get_field_precision
@@ -21,14 +21,13 @@ def get_item_details(args):
"selling_price_list": None,
"price_list_currency": None,
"plc_conversion_rate": 1.0,
- "parenttype": "",
- "parent": "",
+ "doctype": "",
+ "name": "",
"supplier": None,
"transaction_date": None,
"conversion_rate": 1.0,
"buying_price_list": None,
"is_subcontracted": "Yes" / "No",
- "transaction_type": "selling",
"ignore_pricing_rule": 0/1
"project_name": ""
}
@@ -49,7 +48,7 @@ def get_item_details(args):
get_price_list_rate(args, item_doc, out)
- if args.transaction_type == "selling" and cint(args.is_pos):
+ if args.customer and cint(args.is_pos):
out.update(get_pos_profile_item_details(args.company, args))
# update args with out, if key or value not exists
@@ -59,7 +58,7 @@ def get_item_details(args):
out.update(get_pricing_rule_for_item(args))
- if args.get("parenttype") in ("Sales Invoice", "Delivery Note"):
+ if args.get("doctype") in ("Sales Invoice", "Delivery Note"):
if item_doc.has_serial_no == 1 and not args.serial_no:
out.serial_no = get_serial_nos_by_fifo(args, item_doc)
@@ -78,13 +77,6 @@ def process_args(args):
args = frappe._dict(args)
- if not args.get("transaction_type"):
- if args.get("parenttype")=="Material Request" or \
- frappe.get_meta(args.get("parenttype")).get_field("supplier"):
- args.transaction_type = "buying"
- else:
- args.transaction_type = "selling"
-
if not args.get("price_list"):
args.price_list = args.get("selling_price_list") or args.get("buying_price_list")
@@ -92,6 +84,8 @@ def process_args(args):
args.item_code = get_item_code(barcode=args.barcode)
elif not args.item_code and args.serial_no:
args.item_code = get_item_code(serial_no=args.serial_no)
+
+ set_transaction_type(args)
return args
@@ -115,7 +109,7 @@ def validate_item_details(args, item):
from erpnext.stock.doctype.item.item import validate_end_of_life
validate_end_of_life(item.name, item.end_of_life, item.disabled)
- if args.transaction_type == "selling":
+ if args.transaction_type=="selling":
# validate if sales item or service item
if args.get("order_type") == "Maintenance":
if item.is_service_item != 1:
@@ -127,7 +121,7 @@ def validate_item_details(args, item):
if cint(item.has_variants):
throw(_("Item {0} is a template, please select one of its variants").format(item.name))
- elif args.transaction_type == "buying" and args.parenttype != "Material Request":
+ elif args.transaction_type=="buying" and args.doctype != "Material Request":
# validate if purchase item or subcontracted item
if item.is_purchase_item != 1:
throw(_("Item {0} must be a Purchase Item").format(item.name))
@@ -160,7 +154,7 @@ def get_basic_details(args, item):
"item_tax_rate": json.dumps(dict(([d.tax_type, d.tax_rate] for d in
item.get("taxes")))),
"uom": item.stock_uom,
- "min_order_qty": flt(item.min_order_qty) if args.parenttype == "Material Request" else "",
+ "min_order_qty": flt(item.min_order_qty) if args.doctype == "Material Request" else "",
"conversion_factor": 1.0,
"qty": args.qty or 1.0,
"stock_qty": 1.0,
@@ -201,7 +195,7 @@ def get_default_expense_account(args, item):
def get_default_cost_center(args, item):
return (frappe.db.get_value("Project", args.get("project_name"), "cost_center")
- or (item.selling_cost_center if args.get("transaction_type") == "selling" else item.buying_cost_center)
+ or (item.selling_cost_center if args.get("customer") else item.buying_cost_center)
or frappe.db.get_value("Item Group", item.item_group, "default_cost_center")
or args.get("cost_center"))
@@ -212,10 +206,13 @@ def get_price_list_rate(args, item_doc, out):
validate_price_list(args)
validate_conversion_rate(args, meta)
- price_list_rate = get_price_list_rate_for(args, item_doc.name)
- if not price_list_rate and item_doc.variant_of:
- price_list_rate = get_price_list_rate_for(args, item_doc.variant_of)
+ price_list_rate = get_price_list_rate_for(args.price_list, item_doc.name)
+ # variant
+ if not price_list_rate and item_doc.variant_of:
+ price_list_rate = get_price_list_rate_for(args.price_list, item_doc.variant_of)
+
+ # insert in database
if not price_list_rate:
if args.price_list and args.rate:
insert_item_price(args)
@@ -224,10 +221,10 @@ def get_price_list_rate(args, item_doc, out):
out.price_list_rate = flt(price_list_rate) * flt(args.plc_conversion_rate) \
/ flt(args.conversion_rate)
- if not out.price_list_rate and args.transaction_type == "buying":
+ if not out.price_list_rate and args.transaction_type=="buying":
from erpnext.stock.doctype.item.item import get_last_purchase_details
out.update(get_last_purchase_details(item_doc.name,
- args.parent, args.conversion_rate))
+ args.name, args.conversion_rate))
def insert_item_price(args):
"""Insert Item Price if Price List and Price List Rate are specified and currency is the same"""
@@ -249,9 +246,9 @@ def insert_item_price(args):
frappe.msgprint(_("Item Price added for {0} in Price List {1}").format(args.item_code,
args.price_list))
-def get_price_list_rate_for(args, item_code):
+def get_price_list_rate_for(price_list, item_code):
return frappe.db.get_value("Item Price",
- {"price_list": args.price_list, "item_code": item_code}, "price_list_rate")
+ {"price_list": price_list, "item_code": item_code}, "price_list_rate")
def validate_price_list(args):
if args.get("price_list"):
@@ -288,10 +285,11 @@ def validate_conversion_rate(args, meta):
frappe._dict({"fields": args})))
def get_party_item_code(args, item_doc, out):
- if args.transaction_type == "selling":
+ if args.transaction_type=="selling" and args.customer:
customer_item_code = item_doc.get("customer_items", {"customer_name": args.customer})
out.customer_item_code = customer_item_code[0].ref_code if customer_item_code else None
- else:
+
+ if args.transaction_type=="buying" and args.supplier:
item_supplier = item_doc.get("supplier_items", {"supplier": args.supplier})
out.supplier_part_no = item_supplier[0].supplier_part_no if item_supplier else None
@@ -369,21 +367,27 @@ def get_batch_qty(batch_no,warehouse,item_code):
return {'actual_batch_qty': actual_batch_qty}
@frappe.whitelist()
-def apply_price_list(args):
- """
+def apply_price_list(args, as_doc=False):
+ """Apply pricelist on a document-like dict object and return as
+ {'parent': dict, 'children': list}
+
+ :param args: See below
+ :param as_doc: Updates value in the passed dict
+
args = {
- "item_list": [{"doctype": "", "name": "", "item_code": "", "brand": "", "item_group": ""}, ...],
+ "doctype": "",
+ "name": "",
+ "items": [{"doctype": "", "name": "", "item_code": "", "brand": "", "item_group": ""}, ...],
"conversion_rate": 1.0,
"selling_price_list": None,
"price_list_currency": None,
"plc_conversion_rate": 1.0,
- "parenttype": "",
- "parent": "",
+ "doctype": "",
+ "name": "",
"supplier": None,
"transaction_date": None,
"conversion_rate": 1.0,
"buying_price_list": None,
- "transaction_type": "selling",
"ignore_pricing_rule": 0/1
}
"""
@@ -392,10 +396,8 @@ def apply_price_list(args):
parent = get_price_list_currency_and_exchange_rate(args)
children = []
- if "item_list" in args:
- item_list = args.get("item_list")
- del args["item_list"]
-
+ if "items" in args:
+ item_list = args.get("items")
args.update(parent)
for item in item_list:
@@ -404,16 +406,31 @@ def apply_price_list(args):
item_details = apply_price_list_on_item(args_copy)
children.append(item_details)
- return {
- "parent": parent,
- "children": children
- }
+ if as_doc:
+ args.price_list_currency = parent.price_list_currency
+ args.plc_conversion_rate = parent.plc_conversion_rate
+ if args.get('items'):
+ for i, item in enumerate(args.get('items')):
+ for fieldname in children[i]:
+ # if the field exists in the original doc
+ # update the value
+ if fieldname in item and fieldname not in ("name", "doctype"):
+ item[fieldname] = children[i][fieldname]
+
+ return args
+ else:
+ return {
+ "parent": parent,
+ "children": children
+ }
def apply_price_list_on_item(args):
item_details = frappe._dict()
item_doc = frappe.get_doc("Item", args.item_code)
get_price_list_rate(args, item_doc, item_details)
+
item_details.update(get_pricing_rule_for_item(args))
+
return item_details
def get_price_list_currency(price_list):
@@ -437,10 +454,10 @@ def get_price_list_currency_and_exchange_rate(args):
and price_list_currency != args.price_list_currency):
plc_conversion_rate = get_exchange_rate(price_list_currency, args.currency) or plc_conversion_rate
- return {
+ return frappe._dict({
"price_list_currency": price_list_currency,
"plc_conversion_rate": plc_conversion_rate
- }
+ })
@frappe.whitelist()
def get_default_bom(item_code=None):
diff --git a/erpnext/support/doctype/issue/issue.js b/erpnext/support/doctype/issue/issue.js
index 21ef5b8f3b..15029a06a7 100644
--- a/erpnext/support/doctype/issue/issue.js
+++ b/erpnext/support/doctype/issue/issue.js
@@ -8,12 +8,12 @@ frappe.ui.form.on("Issue", {
frm.add_custom_button(__("Close"), function() {
frm.set_value("status", "Closed");
frm.save();
- });
+ }, __("Status"));
} else {
frm.add_custom_button(__("Reopen"), function() {
frm.set_value("status", "Open");
frm.save();
- });
+ }, __("Status"));
}
}
});
diff --git a/erpnext/support/doctype/issue/issue.json b/erpnext/support/doctype/issue/issue.json
index 229eccf1bd..b11eea9b50 100644
--- a/erpnext/support/doctype/issue/issue.json
+++ b/erpnext/support/doctype/issue/issue.json
@@ -1,7 +1,7 @@
{
"allow_copy": 0,
- "allow_import": 0,
- "allow_rename": 0,
+ "allow_import": 1,
+ "allow_rename": 1,
"autoname": "naming_series:",
"creation": "2013-02-01 10:36:25",
"custom": 0,
@@ -24,6 +24,7 @@
"options": "icon-flag",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -47,6 +48,7 @@
"options": "ISS-",
"permlevel": 0,
"print_hide": 1,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -69,6 +71,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -90,6 +93,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -116,6 +120,7 @@
"options": "Open\nReplied\nHold\nClosed",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -142,6 +147,7 @@
"options": "Email",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -163,6 +169,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -185,6 +192,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -210,6 +218,7 @@
"oldfieldtype": "Text",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -232,6 +241,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -257,6 +267,7 @@
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -279,6 +290,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -302,6 +314,7 @@
"options": "icon-pushpin",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -325,6 +338,7 @@
"options": "Lead",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -348,6 +362,7 @@
"options": "Contact",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -370,6 +385,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -395,6 +411,7 @@
"options": "Customer",
"permlevel": 0,
"print_hide": 1,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -419,6 +436,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -441,6 +459,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -466,6 +485,7 @@
"oldfieldtype": "Text",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -489,6 +509,7 @@
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -514,6 +535,7 @@
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -538,6 +560,7 @@
"oldfieldtype": "Time",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -561,6 +584,7 @@
"options": "Company",
"permlevel": 0,
"print_hide": 1,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -583,6 +607,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -606,6 +631,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -624,7 +650,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:47.774531",
+ "modified": "2016-01-14 07:45:55.840256",
"modified_by": "Administrator",
"module": "Support",
"name": "Issue",
diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
index 023ef6c8fa..91b1f67cb5 100644
--- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
+++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
@@ -16,7 +16,7 @@ erpnext.support.MaintenanceSchedule = frappe.ui.form.Controller.extend({
var me = this;
if (this.frm.doc.docstatus === 0) {
- this.frm.add_custom_button(__('From Sales Order'),
+ this.frm.add_custom_button(__('Sales Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_schedule",
@@ -28,7 +28,7 @@ erpnext.support.MaintenanceSchedule = frappe.ui.form.Controller.extend({
company: me.frm.doc.company
}
});
- }, "icon-download", "btn-default");
+ }, __("Get items from"));
} else if (this.frm.doc.docstatus === 1) {
this.frm.add_custom_button(__("Make Maintenance Visit"), function() {
frappe.model.open_mapped_doc({
@@ -36,7 +36,7 @@ erpnext.support.MaintenanceSchedule = frappe.ui.form.Controller.extend({
source_name: me.frm.doc.name,
frm: me.frm
})
- }, frappe.boot.doctype_icons["Maintenance Visit"]);
+ }, __("Make"));
}
},
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
index 7a803fb665..52141a8f92 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
@@ -15,7 +15,7 @@ frappe.ui.form.on_change("Maintenance Visit", "contact_person",
erpnext.support.MaintenanceVisit = frappe.ui.form.Controller.extend({
refresh: function() {
if (this.frm.doc.docstatus===0) {
- cur_frm.add_custom_button(__('From Maintenance Schedule'),
+ cur_frm.add_custom_button(__('Maintenance Schedule'),
function() {
frappe.model.map_current_doc({
method: "erpnext.support.doctype.maintenance_schedule.maintenance_schedule.make_maintenance_visit",
@@ -26,8 +26,8 @@ erpnext.support.MaintenanceVisit = frappe.ui.form.Controller.extend({
company: cur_frm.doc.company
}
})
- }, "icon-download", "btn-default");
- cur_frm.add_custom_button(__('From Warranty Claim'),
+ }, __("Get items from"));
+ cur_frm.add_custom_button(__('Warranty Claim'),
function() {
frappe.model.map_current_doc({
method: "erpnext.support.doctype.warranty_claim.warranty_claim.make_maintenance_visit",
@@ -38,8 +38,8 @@ erpnext.support.MaintenanceVisit = frappe.ui.form.Controller.extend({
company: cur_frm.doc.company
}
})
- }, "icon-download", "btn-default");
- cur_frm.add_custom_button(__('From Sales Order'),
+ }, __("Get items from"));
+ cur_frm.add_custom_button(__('Sales Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_visit",
@@ -51,7 +51,7 @@ erpnext.support.MaintenanceVisit = frappe.ui.form.Controller.extend({
company: cur_frm.doc.company
}
})
- }, "icon-download", "btn-default");
+ }, __("Get items from"));
}
},
});
diff --git a/erpnext/support/doctype/warranty_claim/warranty_claim.js b/erpnext/support/doctype/warranty_claim/warranty_claim.js
index e33f9b29a3..991745ad12 100644
--- a/erpnext/support/doctype/warranty_claim/warranty_claim.js
+++ b/erpnext/support/doctype/warranty_claim/warranty_claim.js
@@ -15,8 +15,9 @@ erpnext.support.WarrantyClaim = frappe.ui.form.Controller.extend({
refresh: function() {
if(!cur_frm.doc.__islocal &&
(cur_frm.doc.status=='Open' || cur_frm.doc.status == 'Work In Progress')) {
- cur_frm.add_custom_button(__('Make Maintenance Visit'),
- this.make_maintenance_visit, frappe.boot.doctype_icons["Maintenance Visit"], "btn-default")
+ cur_frm.add_custom_button(__('Maintenance Visit'),
+ this.make_maintenance_visit, __("Make"))
+ cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
}
},
diff --git a/erpnext/templates/generators/item.html b/erpnext/templates/generators/item.html
index dc48e0df12..34d345fd2f 100644
--- a/erpnext/templates/generators/item.html
+++ b/erpnext/templates/generators/item.html
@@ -71,18 +71,7 @@
style="display: none;
padding-left: 0px; padding-right: 0px;
padding-top: 10px;">
-
-
-
-
-
- {{ _("Update") }}
-
-
+ {{ _("Goto Cart") }}
diff --git a/erpnext/templates/includes/cart.js b/erpnext/templates/includes/cart.js
index e413f0b2e9..0c29569b9e 100644
--- a/erpnext/templates/includes/cart.js
+++ b/erpnext/templates/includes/cart.js
@@ -65,11 +65,11 @@ $.extend(shopping_cart, {
if(!r.exc) {
$(".cart-items").html(r.message.items);
$(".cart-tax-items").html(r.message.taxes);
+ $(".cart-icon").hide();
}
},
});
});
-
},
render_tax_row: function($cart_taxes, doc, shipping_rules) {
@@ -144,5 +144,6 @@ $.extend(shopping_cart, {
});
$(document).ready(function() {
+ $(".cart-icon").hide();
shopping_cart.bind_events();
});
diff --git a/erpnext/templates/includes/product_page.js b/erpnext/templates/includes/product_page.js
index 0a38c23f9b..f4d90279c5 100644
--- a/erpnext/templates/includes/product_page.js
+++ b/erpnext/templates/includes/product_page.js
@@ -49,21 +49,6 @@ frappe.ready(function() {
});
});
- $("#item-update-cart button").on("click", function() {
- shopping_cart.update_cart({
- item_code: get_item_code(),
- qty: $("#item-update-cart input").val(),
- btn: this,
- callback: function(r) {
- if(r.exc) {
- $("#item-update-cart input").val(qty);
- } else {
- qty = $("#item-update-cart input").val();
- }
- },
- });
- });
-
$("[itemscope] .item-view-attribute .form-control").on("change", function() {
try {
var item_code = encodeURIComponent(get_item_code());
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html
index 26dbed6a3e..fae55f3264 100644
--- a/erpnext/templates/pages/order.html
+++ b/erpnext/templates/pages/order.html
@@ -5,6 +5,10 @@
{% endblock %}
+{% block breadcrumbs %}
+ {% include "templates/includes/breadcrumbs.html" %}
+{% endblock %}
+
{% block style %}