Fixed merge conflict

This commit is contained in:
Nabin Hait
2015-08-27 14:55:34 +05:30
101 changed files with 15913 additions and 4308 deletions

View File

@@ -1,2 +1,2 @@
from __future__ import unicode_literals from __future__ import unicode_literals
__version__ = '5.7.5' __version__ = '5.8.2'

View File

@@ -214,144 +214,6 @@
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:inList([\"Credit Note\", \"Debit Note\"], doc.voucher_type)",
"fieldname": "stock_entry",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Stock Entry",
"no_copy": 0,
"options": "Stock Entry",
"permlevel": 0,
"precision": "",
"print_hide": 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": "total_debit",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Total Debit",
"no_copy": 1,
"oldfieldname": "total_debit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 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": "total_credit",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Total Credit",
"no_copy": 1,
"oldfieldname": "total_credit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 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": "difference",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Difference (Dr - Cr)",
"no_copy": 1,
"oldfieldname": "difference",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"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": "get_balance",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Make Difference Entry",
"no_copy": 0,
"oldfieldtype": "Button",
"permlevel": 0,
"print_hide": 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_break99",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
@@ -422,6 +284,165 @@
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break99",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 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": "total_debit",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Total Debit",
"no_copy": 1,
"oldfieldname": "total_debit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 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": "total_credit",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Total Credit",
"no_copy": 1,
"oldfieldname": "total_credit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 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": "difference",
"fieldname": "difference",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Difference (Dr - Cr)",
"no_copy": 1,
"oldfieldname": "difference",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"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": "difference",
"fieldname": "get_balance",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Make Difference Entry",
"no_copy": 0,
"oldfieldtype": "Button",
"permlevel": 0,
"print_hide": 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": "total_amount",
"fieldtype": "Currency",
"hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Total Amount",
"no_copy": 1,
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"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": "total_amount_in_words",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Total Amount in Words",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 1,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
@@ -580,6 +601,120 @@
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"depends_on": "eval:doc.voucher_type == 'Write Off Entry'",
"fieldname": "write_off",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 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": "Accounts Receivable",
"depends_on": "eval:doc.voucher_type == 'Write Off Entry'",
"fieldname": "write_off_based_on",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Based On",
"no_copy": 0,
"options": "Accounts Receivable\nAccounts Payable",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.voucher_type == 'Write Off Entry'",
"fieldname": "get_outstanding_invoices",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Get Outstanding Invoices",
"no_copy": 0,
"options": "get_outstanding_invoices",
"permlevel": 0,
"print_hide": 1,
"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_30",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 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,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.voucher_type == 'Write Off Entry'",
"fieldname": "write_off_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Amount",
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
@@ -602,6 +737,48 @@
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "pay_to_recd_from",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Pay To / Recd From",
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_35",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 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,
"unique": 0
},
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0, "bold": 0,
@@ -658,7 +835,7 @@
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "More Details", "label": "More Information",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "icon-file-text", "options": "icon-file-text",
@@ -671,212 +848,6 @@
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "No",
"description": "",
"fieldname": "is_opening",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Is Opening",
"no_copy": 0,
"oldfieldname": "is_opening",
"oldfieldtype": "Select",
"options": "No\nYes",
"permlevel": 0,
"print_hide": 1,
"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,
"default": "Accounts Receivable",
"depends_on": "eval:doc.voucher_type == 'Write Off Entry'",
"fieldname": "write_off_based_on",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Based On",
"no_copy": 0,
"options": "Accounts Receivable\nAccounts Payable",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.voucher_type == 'Write Off Entry'",
"fieldname": "write_off_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Amount",
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.voucher_type == 'Write Off Entry'",
"fieldname": "get_outstanding_invoices",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Get Outstanding Invoices",
"no_copy": 0,
"options": "get_outstanding_invoices",
"permlevel": 0,
"print_hide": 1,
"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",
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Link",
"options": "Journal Entry",
"permlevel": 0,
"print_hide": 1,
"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_break3",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 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,
"fieldname": "pay_to_recd_from",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Pay To / Recd From",
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "total_amount",
"fieldtype": "Currency",
"hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Total Amount",
"no_copy": 1,
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"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": "total_amount_in_words",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Total Amount in Words",
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"read_only": 1,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
@@ -924,6 +895,102 @@
"search_index": 1, "search_index": 1,
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break3",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 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,
"default": "No",
"description": "",
"fieldname": "is_opening",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Is Opening",
"no_copy": 0,
"oldfieldname": "is_opening",
"oldfieldtype": "Select",
"options": "No\nYes",
"permlevel": 0,
"print_hide": 1,
"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": "eval:inList([\"Credit Note\", \"Debit Note\"], doc.voucher_type)",
"fieldname": "stock_entry",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Stock Entry",
"no_copy": 0,
"options": "Stock Entry",
"permlevel": 0,
"precision": "",
"print_hide": 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": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1,
"in_filter": 0,
"in_list_view": 0,
"label": "Amended From",
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Link",
"options": "Journal Entry",
"permlevel": 0,
"print_hide": 1,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
} }
], ],
"hide_heading": 0, "hide_heading": 0,
@@ -935,7 +1002,7 @@
"is_submittable": 1, "is_submittable": 1,
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"modified": "2015-08-26 12:47:53.107439", "modified": "2015-08-27 03:19:18.634225",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Journal Entry", "name": "Journal Entry",

View File

@@ -33,7 +33,6 @@ class JournalEntry(AccountsController):
self.set_against_account() self.set_against_account()
self.create_remarks() self.create_remarks()
self.set_print_format_fields() self.set_print_format_fields()
self.check_due_date()
self.validate_expense_claim() self.validate_expense_claim()
self.validate_credit_debit_note() self.validate_credit_debit_note()
self.validate_empty_accounts_table() self.validate_empty_accounts_table()
@@ -84,20 +83,6 @@ class JournalEntry(AccountsController):
for customer in customers: for customer in customers:
check_credit_limit(customer, self.company) check_credit_limit(customer, self.company)
def check_due_date(self):
if self.cheque_date:
for d in self.get("accounts"):
if d.party_type and d.party and d.get("credit" if d.party_type=="Customer" else "debit") > 0:
due_date = None
if d.reference_type in ("Sales Invoice", "Purchase Invoice"):
due_date = frappe.db.get_value(d.reference_type, d.reference_name, "due_date")
if due_date and getdate(self.cheque_date) > getdate(due_date):
diff = date_diff(self.cheque_date, due_date)
if diff > 0:
msgprint(_("Note: Reference Date exceeds invoice due date by {0} days for {1} {2}")
.format(diff, d.party_type, d.party))
def validate_cheque_info(self): def validate_cheque_info(self):
if self.voucher_type in ['Bank Entry']: if self.voucher_type in ['Bank Entry']:
if not self.cheque_no or not self.cheque_date: if not self.cheque_no or not self.cheque_date:

View File

@@ -130,7 +130,11 @@ def get_pricing_rule_for_item(args):
return item_details return item_details
if not (args.item_group and args.brand): if not (args.item_group and args.brand):
args.item_group, args.brand = frappe.db.get_value("Item", args.item_code, ["item_group", "brand"]) try:
args.item_group, args.brand = frappe.db.get_value("Item", args.item_code, ["item_group", "brand"])
except TypeError:
# invalid item_code
return item_details
if not args.item_group: if not args.item_group:
frappe.throw(_("Item Group not mentioned in item master for item {0}").format(args.item_code)) frappe.throw(_("Item Group not mentioned in item master for item {0}").format(args.item_code))

View File

@@ -169,12 +169,22 @@ cur_frm.fields_dict['items'].grid.get_field("item_code").get_query = function(do
} }
cur_frm.fields_dict['credit_to'].get_query = function(doc) { cur_frm.fields_dict['credit_to'].get_query = function(doc) {
return{ // filter on Account
filters:{ if (doc.supplier) {
'account_type': 'Payable', return {
'root_type': 'Liability', filters: {
'is_group': 0, 'account_type': 'Payable',
'company': doc.company 'is_group': 0,
'company': doc.company
}
}
} else {
return {
filters: {
'report_type': 'Balance Sheet',
'is_group': 0,
'company': doc.company
}
} }
} }
} }

View File

@@ -1710,7 +1710,7 @@
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "More Details", "label": "More Information",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "icon-file-text", "options": "icon-file-text",
@@ -2175,7 +2175,7 @@
"is_submittable": 1, "is_submittable": 1,
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"modified": "2015-08-26 12:33:12.303959", "modified": "2015-08-27 03:21:24.432106",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Purchase Invoice", "name": "Purchase Invoice",

View File

@@ -91,8 +91,12 @@ class PurchaseInvoice(BuyingController):
throw(_("Conversion rate cannot be 0 or 1")) throw(_("Conversion rate cannot be 0 or 1"))
def validate_credit_to_acc(self): def validate_credit_to_acc(self):
account_type = frappe.db.get_value("Account", self.credit_to, "account_type") account = frappe.db.get_value("Account", self.credit_to, ["account_type", "report_type"], as_dict=True)
if account_type != "Payable":
if account.report_type != "Balance Sheet":
frappe.throw(_("Credit To account must be a Balance Sheet account"))
if self.supplier and account.account_type != "Payable":
frappe.throw(_("Credit To account must be a Payable account")) frappe.throw(_("Credit To account must be a Payable account"))
def check_for_stopped_status(self): def check_for_stopped_status(self):
@@ -127,7 +131,7 @@ class PurchaseInvoice(BuyingController):
} }
}) })
if cint(frappe.db.get_single_value('Buying Settings', 'maintain_same_rate')): if cint(frappe.db.get_single_value('Buying Settings', 'maintain_same_rate')) and not self.is_return:
self.validate_rate_with_reference_doc([ self.validate_rate_with_reference_doc([
["Purchase Order", "purchase_order", "po_detail"], ["Purchase Order", "purchase_order", "po_detail"],
["Purchase Receipt", "purchase_receipt", "pr_detail"] ["Purchase Receipt", "purchase_receipt", "pr_detail"]

View File

@@ -7,7 +7,7 @@ frappe.listview_settings['Purchase Invoice'] = {
"currency", "is_return"], "currency", "is_return"],
get_indicator: function(doc) { get_indicator: function(doc) {
if(cint(doc.is_return)==1) { if(cint(doc.is_return)==1) {
return [__("Return"), "darkgrey", "is_return,=,1"]; return [__("Return"), "darkgrey", "is_return,=,Yes"];
} else if(flt(doc.outstanding_amount) > 0 && doc.docstatus==1) { } else if(flt(doc.outstanding_amount) > 0 && doc.docstatus==1) {
if(frappe.datetime.get_diff(doc.due_date) < 0) { if(frappe.datetime.get_diff(doc.due_date) < 0) {
return [__("Overdue"), "red", "outstanding_amount,>,0|due_date,<,Today"]; return [__("Overdue"), "red", "outstanding_amount,>,0|due_date,<,Today"];

View File

@@ -10,6 +10,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "item_code", "fieldname": "item_code",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -32,6 +34,28 @@
}, },
{ {
"allow_on_submit": 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,
"no_copy": 0,
"permlevel": 0,
"print_hide": 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", "fieldname": "item_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -53,14 +77,18 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "col_break1", "bold": 0,
"fieldtype": "Column Break", "collapsible": 1,
"fieldname": "description_section",
"fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Description",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "",
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
@@ -71,6 +99,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"hidden": 0, "hidden": 0,
@@ -94,6 +124,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image", "fieldname": "image",
"fieldtype": "Attach", "fieldtype": "Attach",
"hidden": 1, "hidden": 1,
@@ -114,6 +146,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image_view", "fieldname": "image_view",
"fieldtype": "Image", "fieldtype": "Image",
"hidden": 0, "hidden": 0,
@@ -135,6 +169,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "quantity_and_rate", "fieldname": "quantity_and_rate",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -154,6 +190,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "qty", "fieldname": "qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -175,6 +213,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break2", "fieldname": "col_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -193,6 +233,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "uom", "fieldname": "uom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -213,6 +255,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "conversion_factor", "fieldname": "conversion_factor",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -232,6 +276,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "sec_break1", "fieldname": "sec_break1",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -250,6 +296,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "price_list_rate", "fieldname": "price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -270,6 +318,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "price_list_rate", "depends_on": "price_list_rate",
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Percent", "fieldtype": "Percent",
@@ -290,6 +340,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break3", "fieldname": "col_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -308,6 +360,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_price_list_rate", "fieldname": "base_price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -328,6 +382,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "sec_break2", "fieldname": "sec_break2",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -346,6 +402,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "rate", "fieldname": "rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -368,6 +426,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amount", "fieldname": "amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -390,6 +450,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break4", "fieldname": "col_break4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -408,6 +470,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_rate", "fieldname": "base_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -430,6 +494,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_amount", "fieldname": "base_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -452,6 +518,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "pricing_rule", "fieldname": "pricing_rule",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -472,6 +540,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_22", "fieldname": "section_break_22",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -491,6 +561,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_rate", "fieldname": "net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -512,6 +584,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_amount", "fieldname": "net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -533,6 +607,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_25", "fieldname": "column_break_25",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -552,6 +628,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_rate", "fieldname": "base_net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -573,6 +651,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_amount", "fieldname": "base_net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -594,6 +674,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "accounting", "fieldname": "accounting",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -613,6 +695,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "expense_account", "fieldname": "expense_account",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -637,6 +721,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break5", "fieldname": "col_break5",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -655,6 +741,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "project_name", "fieldname": "project_name",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -675,6 +763,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": ":Company", "default": ":Company",
"fieldname": "cost_center", "fieldname": "cost_center",
"fieldtype": "Link", "fieldtype": "Link",
@@ -700,6 +790,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "reference", "fieldname": "reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -719,6 +811,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "brand", "fieldname": "brand",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -740,6 +834,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "item_group", "fieldname": "item_group",
"fieldtype": "Link", "fieldtype": "Link",
@@ -763,6 +859,8 @@
}, },
{ {
"allow_on_submit": 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", "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", "fieldname": "item_tax_rate",
"fieldtype": "Small Text", "fieldtype": "Small Text",
@@ -785,6 +883,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_tax_amount", "fieldname": "item_tax_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 1, "hidden": 1,
@@ -807,6 +907,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "purchase_order", "fieldname": "purchase_order",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -829,6 +931,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break6", "fieldname": "col_break6",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -847,6 +951,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "po_detail", "fieldname": "po_detail",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -868,6 +974,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "purchase_receipt", "fieldname": "purchase_receipt",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -890,6 +998,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "page_break", "fieldname": "page_break",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -909,6 +1019,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "pr_detail", "fieldname": "pr_detail",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -930,6 +1042,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "valuation_rate", "fieldname": "valuation_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 1, "hidden": 1,
@@ -950,6 +1064,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "rm_supp_cost", "fieldname": "rm_supp_cost",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 1, "hidden": 1,
@@ -977,7 +1093,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"modified": "2015-08-19 12:45:54.213558", "modified": "2015-08-26 12:28:16.728059",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Purchase Invoice Item", "name": "Purchase Invoice Item",

View File

@@ -64,6 +64,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
if(doc.outstanding_amount!=0 && !cint(doc.is_return)) { 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'), cur_frm.cscript.make_bank_entry).addClass("btn-primary");
} }
} }
// Show buttons only when pos view is active // Show buttons only when pos view is active
@@ -132,8 +133,8 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
}, },
is_pos: function(doc, dt, dn, callback_fn) { is_pos: function(doc, dt, dn, callback_fn) {
if(cur_frm.doc.__missing_values_set) return;
cur_frm.cscript.hide_fields(this.frm.doc); cur_frm.cscript.hide_fields(this.frm.doc);
if(cur_frm.doc.__missing_values_set) return;
if(cint(this.frm.doc.is_pos)) { if(cint(this.frm.doc.is_pos)) {
if(!this.frm.doc.company) { if(!this.frm.doc.company) {
this.frm.set_value("is_pos", 0); this.frm.set_value("is_pos", 0);
@@ -426,10 +427,22 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
} }
cur_frm.set_query("debit_to", function(doc) { cur_frm.set_query("debit_to", function(doc) {
return{ // filter on Account
filters: [ if (doc.customer) {
['Account', 'root_type', '=', 'Asset'], return {
['Account', 'account_type', '=', 'Receivable'] filters: {
] 'account_type': 'Receivable',
'is_group': 0,
'company': doc.company
}
}
} else {
return {
filters: {
'report_type': 'Balance Sheet',
'is_group': 0,
'company': doc.company
}
}
} }
}); });

View File

@@ -1983,7 +1983,7 @@
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Properties", "label": "More Information",
"no_copy": 0, "no_copy": 0,
"options": "icon-bullhorn", "options": "icon-bullhorn",
"permlevel": 0, "permlevel": 0,
@@ -2882,7 +2882,7 @@
"is_submittable": 1, "is_submittable": 1,
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"modified": "2015-08-27 01:33:40.206780", "modified": "2015-08-27 03:29:14.270731",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Sales Invoice", "name": "Sales Invoice",

View File

@@ -81,9 +81,14 @@ class SalesInvoice(SellingController):
self.check_prev_docstatus() self.check_prev_docstatus()
if self.is_return:
# NOTE status updating bypassed for is_return
self.status_updater = []
self.update_status_updater_args()
self.update_prevdoc_status()
if not self.is_return: if not self.is_return:
self.update_status_updater_args()
self.update_prevdoc_status()
self.update_billing_status_for_zero_amount_refdoc("Sales Order") self.update_billing_status_for_zero_amount_refdoc("Sales Order")
self.check_credit_limit() self.check_credit_limit()
@@ -107,9 +112,14 @@ class SalesInvoice(SellingController):
from erpnext.accounts.utils import remove_against_link_from_jv from erpnext.accounts.utils import remove_against_link_from_jv
remove_against_link_from_jv(self.doctype, self.name) remove_against_link_from_jv(self.doctype, self.name)
if self.is_return:
# NOTE status updating bypassed for is_return
self.status_updater = []
self.update_status_updater_args()
self.update_prevdoc_status()
if not self.is_return: if not self.is_return:
self.update_status_updater_args()
self.update_prevdoc_status()
self.update_billing_status_for_zero_amount_refdoc("Sales Order") self.update_billing_status_for_zero_amount_refdoc("Sales Order")
self.validate_c_form_on_cancel() self.validate_c_form_on_cancel()
@@ -118,7 +128,7 @@ class SalesInvoice(SellingController):
def update_status_updater_args(self): def update_status_updater_args(self):
if cint(self.update_stock): if cint(self.update_stock):
self.status_updater.append({ self.status_updater.extend([{
'source_dt':'Sales Invoice Item', 'source_dt':'Sales Invoice Item',
'target_dt':'Sales Order Item', 'target_dt':'Sales Order Item',
'target_parent_dt':'Sales Order', 'target_parent_dt':'Sales Order',
@@ -136,7 +146,21 @@ class SalesInvoice(SellingController):
'overflow_type': 'delivery', 'overflow_type': 'delivery',
'extra_cond': """ and exists(select name from `tabSales Invoice` 'extra_cond': """ and exists(select name from `tabSales Invoice`
where name=`tabSales Invoice Item`.parent and ifnull(update_stock, 0) = 1)""" where name=`tabSales Invoice Item`.parent and ifnull(update_stock, 0) = 1)"""
}) },
{
'source_dt': 'Sales Invoice Item',
'target_dt': 'Sales Order Item',
'join_field': 'so_detail',
'target_field': 'returned_qty',
'target_parent_dt': 'Sales Order',
# 'target_parent_field': 'per_delivered',
# 'target_ref_field': 'qty',
'source_field': '-1 * qty',
# 'percent_join_field': 'sales_order',
# 'overflow_type': 'delivery',
'extra_cond': """ and exists (select name from `tabSales Invoice` where name=`tabSales Invoice Item`.parent and update_stock=1 and is_return=1)"""
}
])
def set_missing_values(self, for_validate=False): def set_missing_values(self, for_validate=False):
pos = self.set_pos_fields(for_validate) pos = self.set_pos_fields(for_validate)
@@ -247,8 +271,12 @@ class SalesInvoice(SellingController):
reconcile_against_document(lst) reconcile_against_document(lst)
def validate_debit_to_acc(self): def validate_debit_to_acc(self):
account_type = frappe.db.get_value("Account", self.debit_to, "account_type") account = frappe.db.get_value("Account", self.debit_to, ["account_type", "report_type"], as_dict=True)
if account_type != "Receivable":
if account.report_type != "Balance Sheet":
frappe.throw(_("Debit To account must be a Balance Sheet account"))
if self.customer and account.account_type != "Receivable":
frappe.throw(_("Debit To account must be a Receivable account")) frappe.throw(_("Debit To account must be a Receivable account"))
def validate_fixed_asset_account(self): def validate_fixed_asset_account(self):
@@ -273,7 +301,7 @@ class SalesInvoice(SellingController):
}, },
}) })
if cint(frappe.db.get_single_value('Selling Settings', 'maintain_same_sales_rate')): if cint(frappe.db.get_single_value('Selling Settings', 'maintain_same_sales_rate')) and not self.is_return:
self.validate_rate_with_reference_doc([ self.validate_rate_with_reference_doc([
["Sales Order", "sales_order", "so_detail"], ["Sales Order", "sales_order", "so_detail"],
["Delivery Note", "delivery_note", "dn_detail"] ["Delivery Note", "delivery_note", "dn_detail"]
@@ -294,8 +322,6 @@ class SalesInvoice(SellingController):
def so_dn_required(self): def so_dn_required(self):
"""check in manage account if sales order / delivery note required or not.""" """check in manage account if sales order / delivery note required or not."""
if self.is_return:
return
dic = {'Sales Order':'so_required','Delivery Note':'dn_required'} dic = {'Sales Order':'so_required','Delivery Note':'dn_required'}
for i in dic: for i in dic:
if frappe.db.get_value('Selling Settings', None, dic[i]) == 'Yes': if frappe.db.get_value('Selling Settings', None, dic[i]) == 'Yes':
@@ -415,35 +441,11 @@ class SalesInvoice(SellingController):
def check_prev_docstatus(self): def check_prev_docstatus(self):
for d in self.get('items'): for d in self.get('items'):
if d.sales_order: if d.sales_order and frappe.db.get_value("Sales Order", d.sales_order, "docstatus") != 1:
submitted = frappe.db.sql("""select name from `tabSales Order` frappe.throw(_("Sales Order {0} is not submitted").format(d.sales_order))
where docstatus = 1 and name = %s""", d.sales_order)
if not submitted:
frappe.throw(_("Sales Order {0} is not submitted").format(d.sales_order))
if d.delivery_note: if d.delivery_note and frappe.db.get_value("Delivery Note", d.delivery_note, "docstatus") != 1:
submitted = frappe.db.sql("""select name from `tabDelivery Note` throw(_("Delivery Note {0} is not submitted").format(d.delivery_note))
where docstatus = 1 and name = %s""", d.delivery_note)
if not submitted:
throw(_("Delivery Note {0} is not submitted").format(d.delivery_note))
def update_stock_ledger(self):
sl_entries = []
for d in self.get_item_list():
if frappe.db.get_value("Item", d.item_code, "is_stock_item") == 1 and d.warehouse and flt(d['qty']):
self.update_reserved_qty(d)
incoming_rate = 0
if cint(self.is_return) and self.return_against and self.docstatus==1:
incoming_rate = self.get_incoming_rate_for_sales_return(d.item_code,
self.return_against)
sl_entries.append(self.get_sl_entries(d, {
"actual_qty": -1*flt(d.qty),
"stock_uom": frappe.db.get_value("Item", d.item_code, "stock_uom"),
"incoming_rate": incoming_rate
}))
self.make_sl_entries(sl_entries)
def make_gl_entries(self, repost_future_gle=True): def make_gl_entries(self, repost_future_gle=True):
gl_entries = self.get_gl_entries() gl_entries = self.get_gl_entries()

View File

@@ -7,7 +7,7 @@ frappe.listview_settings['Sales Invoice'] = {
"currency", "is_return"], "currency", "is_return"],
get_indicator: function(doc) { get_indicator: function(doc) {
if(cint(doc.is_return)==1) { if(cint(doc.is_return)==1) {
return [__("Return"), "darkgrey", "is_return,=,1"]; return [__("Return"), "darkgrey", "is_return,=,Yes"];
} else if(flt(doc.outstanding_amount)==0) { } else if(flt(doc.outstanding_amount)==0) {
return [__("Paid"), "green", "outstanding_amount,=,0"] return [__("Paid"), "green", "outstanding_amount,=,0"]
} else if (flt(doc.outstanding_amount) > 0 && doc.due_date > frappe.datetime.get_today()) { } else if (flt(doc.outstanding_amount) > 0 && doc.due_date > frappe.datetime.get_today()) {

View File

@@ -10,6 +10,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "barcode", "fieldname": "barcode",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -29,6 +31,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "item_code", "fieldname": "item_code",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -51,6 +55,28 @@
}, },
{ {
"allow_on_submit": 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,
"no_copy": 0,
"permlevel": 0,
"print_hide": 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", "fieldname": "item_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -72,24 +98,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "col_break1", "bold": 0,
"fieldtype": "Column Break", "collapsible": 0,
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "customer_item_code", "fieldname": "customer_item_code",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -109,6 +119,30 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "section_break_6",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Edit Description",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 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", "fieldname": "description",
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"hidden": 0, "hidden": 0,
@@ -132,13 +166,14 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "image", "bold": 0,
"fieldtype": "Attach", "collapsible": 0,
"hidden": 1, "fieldname": "column_break_8",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Image",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
@@ -152,6 +187,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image_view", "fieldname": "image_view",
"fieldtype": "Image", "fieldtype": "Image",
"hidden": 0, "hidden": 0,
@@ -173,13 +210,37 @@
}, },
{ {
"allow_on_submit": 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",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 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": "quantity_and_rate", "fieldname": "quantity_and_rate",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Quantity and Rate", "label": "",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
@@ -192,6 +253,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "qty", "fieldname": "qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -213,6 +276,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "price_list_rate", "fieldname": "price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -235,6 +300,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "price_list_rate", "depends_on": "price_list_rate",
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Percent", "fieldtype": "Percent",
@@ -257,6 +324,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break2", "fieldname": "col_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -275,6 +344,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "stock_uom", "fieldname": "stock_uom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -295,6 +366,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_price_list_rate", "fieldname": "base_price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -317,6 +390,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break1", "fieldname": "section_break1",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -335,6 +410,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "rate", "fieldname": "rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -357,6 +434,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amount", "fieldname": "amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -379,6 +458,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break3", "fieldname": "col_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -397,6 +478,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_rate", "fieldname": "base_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -419,6 +502,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_amount", "fieldname": "base_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -441,6 +526,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "pricing_rule", "fieldname": "pricing_rule",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -461,6 +548,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_21", "fieldname": "section_break_21",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -480,6 +569,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_rate", "fieldname": "net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -501,6 +592,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_amount", "fieldname": "net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -522,6 +615,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_24", "fieldname": "column_break_24",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -541,6 +636,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_rate", "fieldname": "base_net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -562,6 +659,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_amount", "fieldname": "base_net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -583,13 +682,15 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "accounting", "fieldname": "accounting",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Accounting", "label": "Accounting Details",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
@@ -602,6 +703,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "income_account", "fieldname": "income_account",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -626,6 +729,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "expense_account", "fieldname": "expense_account",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -647,6 +752,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break4", "fieldname": "col_break4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -665,6 +772,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": ":Company", "default": ":Company",
"fieldname": "cost_center", "fieldname": "cost_center",
"fieldtype": "Link", "fieldtype": "Link",
@@ -690,13 +799,16 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "eval:doc.serial_no || doc.batch_no",
"fieldname": "warehouse_and_reference", "fieldname": "warehouse_and_reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Warehouse and Reference", "label": "Stock Details",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
@@ -709,6 +821,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "warehouse", "fieldname": "warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -731,6 +845,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "serial_no", "fieldname": "serial_no",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 0, "hidden": 0,
@@ -752,6 +868,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "batch_no", "fieldname": "batch_no",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -772,6 +890,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "item_group", "fieldname": "item_group",
"fieldtype": "Link", "fieldtype": "Link",
@@ -795,6 +915,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "brand", "fieldname": "brand",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -816,6 +938,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_tax_rate", "fieldname": "item_tax_rate",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
@@ -837,6 +961,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break5", "fieldname": "col_break5",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -855,6 +981,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "actual_batch_qty", "fieldname": "actual_batch_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -877,6 +1005,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "actual_qty", "fieldname": "actual_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -898,6 +1028,30 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "edit_references",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "References",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 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": "time_log_batch", "fieldname": "time_log_batch",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -918,6 +1072,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "sales_order", "fieldname": "sales_order",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -940,6 +1096,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "so_detail", "fieldname": "so_detail",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -961,6 +1119,29 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_50",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 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,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "delivery_note", "fieldname": "delivery_note",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -983,6 +1164,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "dn_detail", "fieldname": "dn_detail",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -1004,6 +1187,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "delivered_qty", "fieldname": "delivered_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -1023,8 +1208,31 @@
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_54",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 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,
"unique": 0
},
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "page_break", "fieldname": "page_break",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -1051,7 +1259,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"modified": "2015-08-19 12:45:54.989734", "modified": "2015-08-20 17:18:52.752064",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Sales Invoice Item", "name": "Sales Invoice Item",

View File

@@ -1,17 +0,0 @@
{
"creation": "2015-07-22 17:45:22.220567",
"custom_format": 1,
"disabled": 0,
"doc_type": "Sales Invoice",
"docstatus": 0,
"doctype": "Print Format",
"font": "Default",
"html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 6in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ doc.company }}<br>\n\t{{ doc.select_print_heading or _(\"Credit Note\") }}<br>\n</p>\n\n<hr>\n\n{%- for label, value in (\n (_(\"Receipt No\"), doc.name),\n (_(\"Date\"), doc.get_formatted(\"posting_date\")),\n\t(_(\"Customer\"), doc.customer_name),\n (_(\"Amount\"), \"<strong>\" + doc.get_formatted(\"grand_total\", absolute_value=True) + \"</strong><br>\" + (doc.in_words or \"\")),\n\t(_(\"Against\"), doc.return_against),\n (_(\"Remarks\"), doc.remarks)\n) -%}\n\n\t\t<div class=\"row\">\n\t\t <div class=\"col-xs-4\"><label class=\"text-right\">{{ label }}</label></div>\n\t\t <div class=\"col-xs-8\">{{ value }}</div>\n\t\t</div>\n{%- endfor -%}\n\n<hr>\n<br>\n<p class=\"strong\">\n {{ _(\"For\") }} {{ doc.company }},<br>\n <br>\n <br>\n <br>\n {{ _(\"Authorized Signatory\") }}\n</p>",
"modified": "2015-07-22 17:45:22.220567",
"modified_by": "Administrator",
"name": "Credit Note - Negative Invoice",
"owner": "Administrator",
"print_format_builder": 0,
"print_format_type": "Server",
"standard": "Yes"
}

View File

@@ -18,7 +18,7 @@ frappe.query_reports["Accounts Payable"] = {
}, },
{ {
"fieldname":"report_date", "fieldname":"report_date",
"label": __("Date"), "label": __("As on Date"),
"fieldtype": "Date", "fieldtype": "Date",
"default": get_today() "default": get_today()
}, },

View File

@@ -18,7 +18,7 @@ frappe.query_reports["Accounts Receivable"] = {
}, },
{ {
"fieldname":"report_date", "fieldname":"report_date",
"label": __("Date"), "label": __("As on Date"),
"fieldtype": "Date", "fieldtype": "Date",
"default": get_today() "default": get_today()
}, },

View File

@@ -61,7 +61,7 @@ def get_result(filters, account_details):
return result return result
def get_gl_entries(filters): def get_gl_entries(filters):
group_by_condition = "group by voucher_type, voucher_no, account" \ group_by_condition = "group by voucher_type, voucher_no, account, cost_center" \
if filters.get("group_by_voucher") else "group by name" if filters.get("group_by_voucher") else "group by name"
gl_entries = frappe.db.sql("""select posting_date, account, party_type, party, gl_entries = frappe.db.sql("""select posting_date, account, party_type, party,

View File

@@ -1,76 +1,209 @@
{ {
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"creation": "2013-06-25 11:04:03", "creation": "2013-06-25 11:04:03",
"custom": 0,
"description": "Settings for Buying Module", "description": "Settings for Buying Module",
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": "Other", "document_type": "Other",
"fields": [ "fields": [
{ {
"allow_on_submit": 0,
"default": "Supplier Name", "default": "Supplier Name",
"fieldname": "supp_master_name", "fieldname": "supp_master_name",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Supplier Naming By", "label": "Supplier Naming By",
"no_copy": 0,
"options": "Supplier Name\nNaming Series", "options": "Supplier Name\nNaming Series",
"permlevel": 0 "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"fieldname": "supplier_type", "fieldname": "supplier_type",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Default Supplier Type", "label": "Default Supplier Type",
"no_copy": 0,
"options": "Supplier Type", "options": "Supplier Type",
"permlevel": 0 "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"fieldname": "buying_price_list", "fieldname": "buying_price_list",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Default Buying Price List", "label": "Default Buying Price List",
"no_copy": 0,
"options": "Price List", "options": "Price List",
"permlevel": 0 "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"fieldname": "column_break_3", "fieldname": "column_break_3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "hidden": 0,
}, "ignore_user_permissions": 0,
{ "in_filter": 0,
"fieldname": "maintain_same_rate", "in_list_view": 0,
"fieldtype": "Check", "no_copy": 0,
"label": "Maintain same rate throughout purchase cycle", "permlevel": 0,
"permlevel": 0 "print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"fieldname": "po_required", "fieldname": "po_required",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Purchase Order Required", "label": "Purchase Order Required",
"no_copy": 0,
"options": "No\nYes", "options": "No\nYes",
"permlevel": 0 "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"fieldname": "pr_required", "fieldname": "pr_required",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Purchase Receipt Required", "label": "Purchase Receipt Required",
"no_copy": 0,
"options": "No\nYes", "options": "No\nYes",
"permlevel": 0 "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "maintain_same_rate",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Maintain same rate throughout purchase cycle",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "allow_multiple_items",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Allow Item to be added multiple times in a transaction",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 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-cog", "icon": "icon-cog",
"idx": 1, "idx": 1,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 1, "issingle": 1,
"modified": "2015-02-05 05:11:35.373253", "istable": 0,
"modified": "2015-08-25 04:55:06.052342",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Buying Settings", "name": "Buying Settings",
"owner": "Administrator", "owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1, "create": 1,
"delete": 0,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 0,
"role": "System Manager", "role": "System Manager",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0,
"write": 1 "write": 1
} }
] ],
"read_only": 0,
"read_only_onload": 0
} }

View File

@@ -3,7 +3,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe import frappe
from frappe.utils import flt, cstr from frappe.utils import flt, cstr, cint
from frappe import _ from frappe import _
from erpnext.stock.doctype.item.item import get_last_purchase_details from erpnext.stock.doctype.item.item import get_last_purchase_details
@@ -72,7 +72,8 @@ class PurchaseCommon(BuyingController):
frappe.throw(_("{0} must be a Purchased or Sub-Contracted Item in row {1}").format(d.item_code, d.idx)) frappe.throw(_("{0} must be a Purchased or Sub-Contracted Item in row {1}").format(d.item_code, d.idx))
items.append(cstr(d.item_code)) items.append(cstr(d.item_code))
if items and len(items) != len(set(items)): if items and len(items) != len(set(items)) and \
not cint(frappe.db.get_single_value("Buying Settings", "allow_multiple_items") or 0):
frappe.msgprint(_("Warning: Same item has been entered multiple times.")) frappe.msgprint(_("Warning: Same item has been entered multiple times."))

View File

@@ -32,7 +32,8 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
cur_frm.add_custom_button(__('Receive'), this.make_purchase_receipt).addClass("btn-primary"); cur_frm.add_custom_button(__('Receive'), this.make_purchase_receipt).addClass("btn-primary");
if(doc.is_subcontracted==="Yes") { if(doc.is_subcontracted==="Yes") {
cur_frm.add_custom_button(__('Transfer Material to Supplier'), this.make_stock_entry); cur_frm.add_custom_button(__('Transfer Material to Supplier'),
function() { me.make_stock_entry(); });
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -9,6 +9,7 @@ from frappe import msgprint, _, throw
from frappe.model.mapper import get_mapped_doc from frappe.model.mapper import get_mapped_doc
from erpnext.controllers.buying_controller import BuyingController from erpnext.controllers.buying_controller import BuyingController
from erpnext.stock.doctype.item.item import get_last_purchase_details from erpnext.stock.doctype.item.item import get_last_purchase_details
from erpnext.stock.stock_balance import update_bin_qty, get_ordered_qty
form_grid_templates = { form_grid_templates = {
@@ -136,20 +137,6 @@ class PurchaseOrder(BuyingController):
def update_ordered_qty(self, po_item_rows=None): def update_ordered_qty(self, po_item_rows=None):
"""update requested qty (before ordered_qty is updated)""" """update requested qty (before ordered_qty is updated)"""
from erpnext.stock.utils import get_bin
def _update_ordered_qty(item_code, warehouse):
ordered_qty = frappe.db.sql("""
select sum((po_item.qty - ifnull(po_item.received_qty, 0))*po_item.conversion_factor)
from `tabPurchase Order Item` po_item, `tabPurchase Order` po
where po_item.item_code=%s and po_item.warehouse=%s
and po_item.qty > ifnull(po_item.received_qty, 0) and po_item.parent=po.name
and po.status!='Stopped' and po.docstatus=1""", (item_code, warehouse))
bin_doc = get_bin(item_code, warehouse)
bin_doc.ordered_qty = flt(ordered_qty[0][0]) if ordered_qty else 0
bin_doc.save()
item_wh_list = [] item_wh_list = []
for d in self.get("items"): for d in self.get("items"):
if (not po_item_rows or d.name in po_item_rows) and [d.item_code, d.warehouse] not in item_wh_list \ if (not po_item_rows or d.name in po_item_rows) and [d.item_code, d.warehouse] not in item_wh_list \
@@ -157,7 +144,9 @@ class PurchaseOrder(BuyingController):
item_wh_list.append([d.item_code, d.warehouse]) item_wh_list.append([d.item_code, d.warehouse])
for item_code, warehouse in item_wh_list: for item_code, warehouse in item_wh_list:
_update_ordered_qty(item_code, warehouse) update_bin_qty(item_code, warehouse, {
"ordered_qty": get_ordered_qty(item_code, warehouse)
})
def check_modified_date(self): def check_modified_date(self):
mod_db = frappe.db.sql("select modified from `tabPurchase Order` where name = %s", mod_db = frappe.db.sql("select modified from `tabPurchase Order` where name = %s",
@@ -176,6 +165,7 @@ class PurchaseOrder(BuyingController):
self.update_ordered_qty() self.update_ordered_qty()
msgprint(_("Status of {0} {1} is now {2}").format(self.doctype, self.name, status)) msgprint(_("Status of {0} {1} is now {2}").format(self.doctype, self.name, status))
self.notify_modified()
def on_submit(self): def on_submit(self):
super(PurchaseOrder, self).on_submit() super(PurchaseOrder, self).on_submit()
@@ -248,8 +238,6 @@ def stop_or_unstop_purchase_orders(names, status):
if po.status == "Stopped": if po.status == "Stopped":
po.update_status("Submitted") po.update_status("Submitted")
po.notify_modified()
frappe.local.message_log = [] frappe.local.message_log = []

View File

@@ -10,6 +10,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "item_code", "fieldname": "item_code",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -32,7 +34,9 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"description": "If Supplier Part Number exists for given Item, it gets stored here", "bold": 0,
"collapsible": 0,
"description": "",
"fieldname": "supplier_part_no", "fieldname": "supplier_part_no",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -52,6 +56,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_name", "fieldname": "item_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -73,6 +79,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_4", "fieldname": "column_break_4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -92,6 +100,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "schedule_date", "fieldname": "schedule_date",
"fieldtype": "Date", "fieldtype": "Date",
"hidden": 0, "hidden": 0,
@@ -113,12 +123,15 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "section_break_5", "fieldname": "section_break_5",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Description",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
@@ -132,6 +145,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"hidden": 0, "hidden": 0,
@@ -155,6 +170,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break1", "fieldname": "col_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -173,6 +190,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image", "fieldname": "image",
"fieldtype": "Attach", "fieldtype": "Attach",
"hidden": 1, "hidden": 1,
@@ -193,6 +212,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image_view", "fieldname": "image_view",
"fieldtype": "Image", "fieldtype": "Image",
"hidden": 0, "hidden": 0,
@@ -214,6 +235,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "quantity_and_rate", "fieldname": "quantity_and_rate",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -233,6 +256,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "qty", "fieldname": "qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -256,6 +281,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "stock_uom", "fieldname": "stock_uom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -280,6 +307,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break2", "fieldname": "col_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -298,6 +327,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "uom", "fieldname": "uom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -322,6 +353,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "conversion_factor", "fieldname": "conversion_factor",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -345,6 +378,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "sec_break1", "fieldname": "sec_break1",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -363,6 +398,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "price_list_rate", "fieldname": "price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -383,6 +420,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "price_list_rate", "depends_on": "price_list_rate",
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Percent", "fieldtype": "Percent",
@@ -403,6 +442,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break3", "fieldname": "col_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -421,6 +462,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_price_list_rate", "fieldname": "base_price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -441,6 +484,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "sec_break2", "fieldname": "sec_break2",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -459,6 +504,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "rate", "fieldname": "rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -481,6 +528,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amount", "fieldname": "amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -503,6 +552,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break4", "fieldname": "col_break4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -521,6 +572,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_rate", "fieldname": "base_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -545,6 +598,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_amount", "fieldname": "base_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -567,6 +622,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "pricing_rule", "fieldname": "pricing_rule",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -587,6 +644,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_29", "fieldname": "section_break_29",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -606,6 +665,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_rate", "fieldname": "net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -627,6 +688,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_amount", "fieldname": "net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -648,6 +711,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_32", "fieldname": "column_break_32",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -667,6 +732,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_rate", "fieldname": "base_net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -688,6 +755,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_amount", "fieldname": "base_net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -709,6 +778,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "warehouse_and_reference", "fieldname": "warehouse_and_reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -728,6 +799,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "warehouse", "fieldname": "warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -750,6 +823,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "project_name", "fieldname": "project_name",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -770,6 +845,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "prevdoc_doctype", "fieldname": "prevdoc_doctype",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -791,6 +868,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "prevdoc_docname", "fieldname": "prevdoc_docname",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -815,6 +894,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "prevdoc_detail_docname", "fieldname": "prevdoc_detail_docname",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -836,6 +917,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "supplier_quotation", "fieldname": "supplier_quotation",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -856,6 +939,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "supplier_quotation_item", "fieldname": "supplier_quotation_item",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 1,
@@ -876,6 +961,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break5", "fieldname": "col_break5",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -894,6 +981,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "item_group", "fieldname": "item_group",
"fieldtype": "Link", "fieldtype": "Link",
@@ -917,6 +1006,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "brand", "fieldname": "brand",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 1,
@@ -939,6 +1030,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "bom", "fieldname": "bom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -960,6 +1053,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "stock_qty", "fieldname": "stock_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -983,6 +1078,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "received_qty", "fieldname": "received_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -1004,6 +1101,31 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "returned_qty",
"fieldname": "returned_qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Returned Qty",
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"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", "fieldname": "billed_amt",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -1024,6 +1146,8 @@
}, },
{ {
"allow_on_submit": 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", "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", "fieldname": "item_tax_rate",
"fieldtype": "Small Text", "fieldtype": "Small Text",
@@ -1046,6 +1170,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "page_break", "fieldname": "page_break",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -1074,7 +1200,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"modified": "2015-08-19 12:46:32.384796", "modified": "2015-08-27 02:29:53.767477",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Purchase Order Item", "name": "Purchase Order Item",

View File

@@ -10,6 +10,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "item_code", "fieldname": "item_code",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -32,7 +34,9 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"description": "If Supplier Part Number exists for given Item, it gets stored here", "bold": 0,
"collapsible": 0,
"description": "",
"fieldname": "supplier_part_no", "fieldname": "supplier_part_no",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -52,6 +56,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_3", "fieldname": "column_break_3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -71,6 +77,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_name", "fieldname": "item_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -85,19 +93,22 @@
"print_hide": 1, "print_hide": 1,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 1, "reqd": 0,
"search_index": 1, "search_index": 1,
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "section_break_5", "fieldname": "section_break_5",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Description",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
@@ -111,6 +122,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"hidden": 0, "hidden": 0,
@@ -134,6 +147,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break1", "fieldname": "col_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -152,6 +167,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image", "fieldname": "image",
"fieldtype": "Attach", "fieldtype": "Attach",
"hidden": 1, "hidden": 1,
@@ -172,6 +189,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image_view", "fieldname": "image_view",
"fieldtype": "Image", "fieldtype": "Image",
"hidden": 0, "hidden": 0,
@@ -193,6 +212,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "quantity_and_rate", "fieldname": "quantity_and_rate",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -212,6 +233,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "qty", "fieldname": "qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -235,6 +258,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "price_list_rate", "fieldname": "price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -255,6 +280,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "price_list_rate", "depends_on": "price_list_rate",
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Percent", "fieldtype": "Percent",
@@ -275,6 +302,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break2", "fieldname": "col_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -293,6 +322,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "uom", "fieldname": "uom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -317,6 +348,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_price_list_rate", "fieldname": "base_price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -337,6 +370,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "sec_break1", "fieldname": "sec_break1",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -355,6 +390,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "rate", "fieldname": "rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -377,6 +414,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amount", "fieldname": "amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -399,6 +438,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break3", "fieldname": "col_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -417,6 +458,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_rate", "fieldname": "base_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -441,6 +484,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_amount", "fieldname": "base_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -463,6 +508,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "pricing_rule", "fieldname": "pricing_rule",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -483,6 +530,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_24", "fieldname": "section_break_24",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -502,6 +551,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_rate", "fieldname": "net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -522,6 +573,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_amount", "fieldname": "net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -543,6 +596,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_27", "fieldname": "column_break_27",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -562,6 +617,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_rate", "fieldname": "base_net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -583,6 +640,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_amount", "fieldname": "base_net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -604,6 +663,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "warehouse_and_reference", "fieldname": "warehouse_and_reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -623,6 +684,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "warehouse", "fieldname": "warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -645,6 +708,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "project_name", "fieldname": "project_name",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -665,6 +730,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "prevdoc_doctype", "fieldname": "prevdoc_doctype",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -686,6 +753,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "prevdoc_docname", "fieldname": "prevdoc_docname",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -710,6 +779,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break4", "fieldname": "col_break4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -728,6 +799,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "prevdoc_detail_docname", "fieldname": "prevdoc_detail_docname",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -749,6 +822,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "brand", "fieldname": "brand",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -771,6 +846,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "item_group", "fieldname": "item_group",
"fieldtype": "Link", "fieldtype": "Link",
@@ -794,6 +871,8 @@
}, },
{ {
"allow_on_submit": 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", "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", "fieldname": "item_tax_rate",
"fieldtype": "Small Text", "fieldtype": "Small Text",
@@ -816,6 +895,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "page_break", "fieldname": "page_break",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -844,7 +925,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"modified": "2015-08-19 12:46:33.355334", "modified": "2015-08-26 11:51:55.140967",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Supplier Quotation Item", "name": "Supplier Quotation Item",

View File

@@ -0,0 +1,2 @@
- Most transaction forms will now have collapsibe sections so that forms appear to be more organized and you can easily locate parts to be edited.
- The document title on most transactions can be edited so that you can set meaningful titles to all transactions like Sales Invoice and also edit it to denote status.

View File

@@ -0,0 +1,5 @@
- Fixes in Sales and Purchase Return
- Update Delivered, Ordered and Returned Quantity based on Return transaction
- Allow different Rate in Return transaction
- Set default Finished Goods and Work-in-Progress Warehouse in Manufacturing Settings
- Fixed range validation for numeric attributes in Item Variants

View File

@@ -205,10 +205,10 @@ def get_project_name(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select `tabProject`.name from `tabProject` return frappe.db.sql("""select `tabProject`.name from `tabProject`
where `tabProject`.status not in ("Completed", "Cancelled") where `tabProject`.status not in ("Completed", "Cancelled")
and %(cond)s `tabProject`.name like "%(txt)s" %(mcond)s and {cond} `tabProject`.name like %s {match_cond}
order by `tabProject`.name asc order by `tabProject`.name asc
limit %(start)s, %(page_len)s """ % {'cond': cond,'txt': "%%%s%%" % frappe.db.escape(txt), limit {start}, {page_len}""".format(cond=cond, match_cond=get_match_cond(doctype),
'mcond':get_match_cond(doctype),'start': start, 'page_len': page_len}) start=start, page_len=page_len), "%{0}%".format(txt))
def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len, filters): def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select `tabDelivery Note`.name, `tabDelivery Note`.customer_name return frappe.db.sql("""select `tabDelivery Note`.name, `tabDelivery Note`.customer_name

View File

@@ -83,9 +83,6 @@ def validate_returned_items(doc):
elif abs(d.qty) > max_return_qty: elif abs(d.qty) > max_return_qty:
frappe.throw(_("Row # {0}: Cannot return more than {1} for Item {2}") frappe.throw(_("Row # {0}: Cannot return more than {1} for Item {2}")
.format(d.idx, ref.qty, d.item_code), StockOverReturnError) .format(d.idx, ref.qty, d.item_code), StockOverReturnError)
elif ref.rate and flt(d.rate) != ref.rate:
frappe.throw(_("Row # {0}: Rate must be same as {1} {2}")
.format(d.idx, doc.doctype, doc.return_against))
elif ref.batch_no and d.batch_no != ref.batch_no: elif ref.batch_no and d.batch_no != ref.batch_no:
frappe.throw(_("Row # {0}: Batch No must be same as {1} {2}") frappe.throw(_("Row # {0}: Batch No must be same as {1} {2}")
.format(d.idx, doc.doctype, doc.return_against)) .format(d.idx, doc.doctype, doc.return_against))
@@ -127,6 +124,14 @@ def make_return_doc(doctype, source_name, target_doc=None):
if doctype == "Sales Invoice": if doctype == "Sales Invoice":
doc.is_pos = 0 doc.is_pos = 0
# look for Print Heading "Credit Note"
if not doc.select_print_heading:
doc.select_print_heading = frappe.db.get_value("Print Heading", _("Credit Note"))
elif doctype == "Purchase Invoice":
# look for Print Heading "Debit Note"
doc.select_print_heading = frappe.db.get_value("Print Heading", _("Debit Note"))
for tax in doc.get("taxes"): for tax in doc.get("taxes"):
if tax.charge_type == "Actual": if tax.charge_type == "Actual":
tax.tax_amount = -1 * tax.tax_amount tax.tax_amount = -1 * tax.tax_amount
@@ -137,9 +142,26 @@ def make_return_doc(doctype, source_name, target_doc=None):
target_doc.qty = -1* source_doc.qty target_doc.qty = -1* source_doc.qty
if doctype == "Purchase Receipt": if doctype == "Purchase Receipt":
target_doc.received_qty = -1* source_doc.qty target_doc.received_qty = -1* source_doc.qty
target_doc.prevdoc_doctype = source_doc.prevdoc_doctype
target_doc.prevdoc_docname = source_doc.prevdoc_docname
target_doc.prevdoc_detail_docname = source_doc.prevdoc_detail_docname
elif doctype == "Purchase Invoice": elif doctype == "Purchase Invoice":
target_doc.purchase_order = source_doc.purchase_order
target_doc.purchase_receipt = source_doc.purchase_receipt target_doc.purchase_receipt = source_doc.purchase_receipt
target_doc.po_detail = source_doc.po_detail
target_doc.pr_detail = source_doc.pr_detail target_doc.pr_detail = source_doc.pr_detail
elif doctype == "Delivery Note":
target_doc.against_sales_order = source_doc.against_sales_order
target_doc.against_sales_invoice = source_doc.against_sales_invoice
target_doc.so_detail = source_doc.so_detail
target_doc.si_detail = source_doc.si_detail
target_doc.expense_account = source_doc.expense_account
elif doctype == "Sales Invoice":
target_doc.sales_order = source_doc.sales_order
target_doc.delivery_note = source_doc.delivery_note
target_doc.so_detail = source_doc.so_detail
target_doc.dn_detail = source_doc.dn_detail
target_doc.expense_account = source_doc.expense_account
doclist = get_mapped_doc(doctype, source_name, { doclist = get_mapped_doc(doctype, source_name, {
doctype: { doctype: {
@@ -152,8 +174,6 @@ def make_return_doc(doctype, source_name, target_doc=None):
doctype +" Item": { doctype +" Item": {
"doctype": doctype + " Item", "doctype": doctype + " Item",
"field_map": { "field_map": {
"purchase_order": "purchase_order",
"purchase_receipt": "purchase_receipt",
"serial_no": "serial_no", "serial_no": "serial_no",
"batch_no": "batch_no" "batch_no": "batch_no"
}, },

View File

@@ -163,42 +163,17 @@ class SellingController(StockController):
def get_item_list(self): def get_item_list(self):
il = [] il = []
for d in self.get("items"): for d in self.get("items"):
reserved_warehouse = ""
reserved_qty_for_main_item = 0
if d.qty is None: if d.qty is None:
frappe.throw(_("Row {0}: Qty is mandatory").format(d.idx)) frappe.throw(_("Row {0}: Qty is mandatory").format(d.idx))
if self.doctype == "Sales Order":
reserved_warehouse = d.warehouse
if flt(d.qty) > flt(d.delivered_qty):
reserved_qty_for_main_item = flt(d.qty) - flt(d.delivered_qty)
elif (((self.doctype == "Delivery Note" and d.against_sales_order)
or (self.doctype == "Sales Invoice" and d.sales_order and self.update_stock))
and not self.is_return):
# if SO qty is 10 and there is tolerance of 20%, then it will allow DN of 12.
# But in this case reserved qty should only be reduced by 10 and not 12
already_delivered_qty = self.get_already_delivered_qty(self.name,
d.against_sales_order if self.doctype=="Delivery Note" else d.sales_order, d.so_detail)
so_qty, reserved_warehouse = self.get_so_qty_and_warehouse(d.so_detail)
if already_delivered_qty + d.qty > so_qty:
reserved_qty_for_main_item = -(so_qty - already_delivered_qty)
else:
reserved_qty_for_main_item = -flt(d.qty)
if self.has_product_bundle(d.item_code): if self.has_product_bundle(d.item_code):
for p in self.get("packed_items"): for p in self.get("packed_items"):
if p.parent_detail_docname == d.name and p.parent_item == d.item_code: if p.parent_detail_docname == d.name and p.parent_item == d.item_code:
# the packing details table's qty is already multiplied with parent's qty # the packing details table's qty is already multiplied with parent's qty
il.append(frappe._dict({ il.append(frappe._dict({
'warehouse': p.warehouse, 'warehouse': p.warehouse,
'reserved_warehouse': reserved_warehouse,
'item_code': p.item_code, 'item_code': p.item_code,
'qty': flt(p.qty), 'qty': flt(p.qty),
'reserved_qty': (flt(p.qty)/flt(d.qty)) * reserved_qty_for_main_item,
'uom': p.uom, 'uom': p.uom,
'batch_no': cstr(p.batch_no).strip(), 'batch_no': cstr(p.batch_no).strip(),
'serial_no': cstr(p.serial_no).strip(), 'serial_no': cstr(p.serial_no).strip(),
@@ -207,10 +182,8 @@ class SellingController(StockController):
else: else:
il.append(frappe._dict({ il.append(frappe._dict({
'warehouse': d.warehouse, 'warehouse': d.warehouse,
'reserved_warehouse': reserved_warehouse,
'item_code': d.item_code, 'item_code': d.item_code,
'qty': d.qty, 'qty': d.qty,
'reserved_qty': reserved_qty_for_main_item,
'uom': d.stock_uom, 'uom': d.stock_uom,
'stock_uom': d.stock_uom, 'stock_uom': d.stock_uom,
'batch_no': cstr(d.get("batch_no")).strip(), 'batch_no': cstr(d.get("batch_no")).strip(),

View File

@@ -90,6 +90,10 @@ class StatusUpdater(Document):
self.global_tolerance = None self.global_tolerance = None
for args in self.status_updater: for args in self.status_updater:
if "target_ref_field" not in args:
# if target_ref_field is not specified, the programmer does not want to validate qty / amount
continue
# get unique transactions to update # get unique transactions to update
for d in self.get_all_children(): for d in self.get_all_children():
if d.doctype == args['source_dt'] and d.get(args["join_field"]): if d.doctype == args['source_dt'] and d.get(args["join_field"]):
@@ -140,8 +144,9 @@ class StatusUpdater(Document):
.format(_(item["target_ref_field"].title()), item["reduce_by"])) .format(_(item["target_ref_field"].title()), item["reduce_by"]))
def update_qty(self, change_modified=True): def update_qty(self, change_modified=True):
""" """Updates qty or amount at row level
Updates qty at row level
:param change_modified: If true, updates `modified` and `modified_by` for target parent doc
""" """
for args in self.status_updater: for args in self.status_updater:
# condition to include current record (if submit or no if cancel) # condition to include current record (if submit or no if cancel)
@@ -150,58 +155,74 @@ class StatusUpdater(Document):
else: else:
args['cond'] = ' and parent!="%s"' % self.name.replace('"', '\"') args['cond'] = ' and parent!="%s"' % self.name.replace('"', '\"')
args['modified_cond'] = '' args['set_modified'] = ''
if change_modified: if change_modified:
args['modified_cond'] = ', modified = now()' args['set_modified'] = ', modified = now(), modified_by = "{0}"'\
.format(frappe.db.escape(frappe.session.user))
# update quantities in child table self._update_children(args)
for d in self.get_all_children():
if d.doctype == args['source_dt']:
# updates qty in the child table
args['detail_id'] = d.get(args['join_field'])
args['second_source_condition'] = "" if "percent_join_field" in args:
if args.get('second_source_dt') and args.get('second_source_field') \ self._update_percent_field(args)
and args.get('second_join_field'):
if not args.get("second_source_extra_cond"):
args["second_source_extra_cond"] = ""
args['second_source_condition'] = """ + ifnull((select sum(%(second_source_field)s) def _update_children(self, args):
from `tab%(second_source_dt)s` """Update quantities or amount in child table"""
where `%(second_join_field)s`="%(detail_id)s" for d in self.get_all_children():
and (`tab%(second_source_dt)s`.docstatus=1) %(second_source_extra_cond)s), 0) """ % args if d.doctype != args['source_dt']:
continue
if args['detail_id']: # updates qty in the child table
if not args.get("extra_cond"): args["extra_cond"] = "" args['detail_id'] = d.get(args['join_field'])
frappe.db.sql("""update `tab%(target_dt)s` args['second_source_condition'] = ""
set %(target_field)s = (select sum(%(source_field)s) if args.get('second_source_dt') and args.get('second_source_field') \
from `tab%(source_dt)s` where `%(join_field)s`="%(detail_id)s" and args.get('second_join_field'):
and (docstatus=1 %(cond)s) %(extra_cond)s) %(second_source_condition)s if not args.get("second_source_extra_cond"):
where name='%(detail_id)s'""" % args) args["second_source_extra_cond"] = ""
# get unique transactions to update args['second_source_condition'] = """ + ifnull((select sum(%(second_source_field)s)
for name in set([d.get(args['percent_join_field']) for d in self.get_all_children(args['source_dt'])]): from `tab%(second_source_dt)s`
if name: where `%(second_join_field)s`="%(detail_id)s"
args['name'] = name and (`tab%(second_source_dt)s`.docstatus=1) %(second_source_extra_cond)s), 0) """ % args
# update percent complete in the parent table if args['detail_id']:
if args.get('target_parent_field'): if not args.get("extra_cond"): args["extra_cond"] = ""
frappe.db.sql("""update `tab%(target_parent_dt)s`
set %(target_parent_field)s = (select sum(if(%(target_ref_field)s >
ifnull(%(target_field)s, 0), %(target_field)s,
%(target_ref_field)s))/sum(%(target_ref_field)s)*100
from `tab%(target_dt)s` where parent="%(name)s") %(modified_cond)s
where name='%(name)s'""" % args)
# update field frappe.db.sql("""update `tab%(target_dt)s`
if args.get('status_field'): set %(target_field)s = (select sum(%(source_field)s)
frappe.db.sql("""update `tab%(target_parent_dt)s` from `tab%(source_dt)s` where `%(join_field)s`="%(detail_id)s"
set %(status_field)s = if(ifnull(%(target_parent_field)s,0)<0.001, and (docstatus=1 %(cond)s) %(extra_cond)s) %(second_source_condition)s
'Not %(keyword)s', if(%(target_parent_field)s>=99.99, where name='%(detail_id)s'""" % args)
'Fully %(keyword)s', 'Partly %(keyword)s'))
where name='%(name)s'""" % args)
def _update_percent_field(self, args):
"""Update percent field in parent transaction"""
unique_transactions = set([d.get(args['percent_join_field']) for d in self.get_all_children(args['source_dt'])])
for name in unique_transactions:
if not name:
continue
args['name'] = name
# update percent complete in the parent table
if args.get('target_parent_field'):
frappe.db.sql("""update `tab%(target_parent_dt)s`
set %(target_parent_field)s = (select sum(if(%(target_ref_field)s >
ifnull(%(target_field)s, 0), %(target_field)s,
%(target_ref_field)s))/sum(%(target_ref_field)s)*100
from `tab%(target_dt)s` where parent="%(name)s") %(set_modified)s
where name='%(name)s'""" % args)
# update field
if args.get('status_field'):
frappe.db.sql("""update `tab%(target_parent_dt)s`
set %(status_field)s = if(ifnull(%(target_parent_field)s,0)<0.001,
'Not %(keyword)s', if(%(target_parent_field)s>=99.99,
'Fully %(keyword)s', 'Partly %(keyword)s'))
where name='%(name)s'""" % args)
if args.get("set_modified"):
frappe.get_doc(args["target_parent_dt"], name).notify_modified()
def update_billing_status_for_zero_amount_refdoc(self, ref_dt): def update_billing_status_for_zero_amount_refdoc(self, ref_dt):
ref_fieldname = ref_dt.lower().replace(" ", "_") ref_fieldname = ref_dt.lower().replace(" ", "_")

View File

@@ -6,11 +6,9 @@ import frappe
from frappe.utils import cint, flt, cstr from frappe.utils import cint, flt, cstr
from frappe import msgprint, _ from frappe import msgprint, _
import frappe.defaults import frappe.defaults
from erpnext.accounts.general_ledger import make_gl_entries, delete_gl_entries, process_gl_map
from erpnext.controllers.accounts_controller import AccountsController from erpnext.controllers.accounts_controller import AccountsController
from erpnext.accounts.general_ledger import make_gl_entries, delete_gl_entries, process_gl_map
from erpnext.stock.utils import update_bin
class StockController(AccountsController): class StockController(AccountsController):
def make_gl_entries(self, repost_future_gle=True): def make_gl_entries(self, repost_future_gle=True):
@@ -230,22 +228,44 @@ class StockController(AccountsController):
return incoming_rate return incoming_rate
def update_reserved_qty(self, d): def update_reserved_qty(self):
if d['reserved_qty'] < 0 : so_map = {}
# Reduce reserved qty from reserved warehouse mentioned in so for d in self.get("items"):
if not d["reserved_warehouse"]: if d.so_detail:
frappe.throw(_("Delivery Warehouse is missing in Sales Order")) if self.doctype == "Delivery Note" and d.against_sales_order:
so_map.setdefault(d.against_sales_order, []).append(d.so_detail)
elif self.doctype == "Sales Invoice" and d.sales_order and self.update_stock:
so_map.setdefault(d.sales_order, []).append(d.so_detail)
args = { for so, so_item_rows in so_map.items():
"item_code": d['item_code'], if so and so_item_rows:
"warehouse": d["reserved_warehouse"], sales_order = frappe.get_doc("Sales Order", so)
"voucher_type": self.doctype,
"voucher_no": self.name, if sales_order.status in ["Stopped", "Cancelled"]:
"reserved_qty": (self.docstatus==1 and 1 or -1)*flt(d['reserved_qty']), frappe.throw(_("{0} {1} is cancelled or stopped").format(_("Sales Order"), so),
"posting_date": self.posting_date, frappe.InvalidStatusError)
"is_amended": self.amended_from and 'Yes' or 'No'
} sales_order.update_reserved_qty(so_item_rows)
update_bin(args)
def update_stock_ledger(self):
self.update_reserved_qty()
sl_entries = []
for d in self.get_item_list():
if frappe.db.get_value("Item", d.item_code, "is_stock_item") == 1 \
and d.warehouse and flt(d['qty']):
incoming_rate = 0
if cint(self.is_return) and self.return_against and self.docstatus==1:
incoming_rate = self.get_incoming_rate_for_sales_return(d.item_code, self.return_against)
sl_entries.append(self.get_sl_entries(d, {
"actual_qty": -1*flt(d['qty']),
"stock_uom": frappe.db.get_value("Item", d.item_code, "stock_uom"),
"incoming_rate": incoming_rate
}))
self.make_sl_entries(sl_entries)
def update_gl_entries_after(posting_date, posting_time, for_warehouses=None, for_items=None, def update_gl_entries_after(posting_date, posting_time, for_warehouses=None, for_items=None,
warehouse_account=None): warehouse_account=None):

View File

@@ -1,74 +1,160 @@
{ {
"allow_copy": 0,
"allow_import": 1, "allow_import": 1,
"allow_rename": 0,
"autoname": "naming_series:", "autoname": "naming_series:",
"creation": "2013-04-10 11:45:37", "creation": "2013-04-10 11:45:37",
"custom": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": "Master", "document_type": "Setup",
"fields": [ "fields": [
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "lead_details", "fieldname": "lead_details",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "", "label": "",
"no_copy": 0,
"options": "icon-user", "options": "icon-user",
"permlevel": 0 "permlevel": 0,
"print_hide": 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", "fieldname": "naming_series",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Series", "label": "Series",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "naming_series", "oldfieldname": "naming_series",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "LEAD-", "options": "LEAD-",
"permlevel": 0, "permlevel": 0,
"reqd": 0 "print_hide": 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": "lead_name", "fieldname": "lead_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 0, "in_list_view": 0,
"label": "Person Name", "label": "Person Name",
"no_copy": 0,
"oldfieldname": "lead_name", "oldfieldname": "lead_name",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 1 "search_index": 1,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "company_name", "fieldname": "company_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 1, "in_list_view": 1,
"label": "Organization Name", "label": "Organization Name",
"no_copy": 0,
"oldfieldname": "company_name", "oldfieldname": "company_name",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0 "search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "email_id", "fieldname": "email_id",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Email Id", "label": "Email Id",
"no_copy": 0,
"oldfieldname": "email_id", "oldfieldname": "email_id",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"options": "Email", "options": "Email",
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 1 "search_index": 1,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break123", "fieldname": "col_break123",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "50%" "width": "50%"
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "Lead", "default": "Lead",
"fieldname": "status", "fieldname": "status",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 1, "in_list_view": 1,
"label": "Status", "label": "Status",
@@ -77,12 +163,22 @@
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "Lead\nOpen\nReplied\nOpportunity\nInterested\nConverted\nDo Not Contact", "options": "Lead\nOpen\nReplied\nOpportunity\nInterested\nConverted\nDo Not Contact",
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 1 "search_index": 1,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "source", "fieldname": "source",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 0, "in_list_view": 0,
"label": "Source", "label": "Source",
@@ -91,260 +187,628 @@
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "\nAdvertisement\nBlog Post\nCampaign\nCall\nCustomer\nExhibition\nSupplier\nWebsite\nEmail", "options": "\nAdvertisement\nBlog Post\nCampaign\nCall\nCustomer\nExhibition\nSupplier\nWebsite\nEmail",
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0 "search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.source == 'Customer'", "depends_on": "eval:doc.source == 'Customer'",
"fieldname": "customer", "fieldname": "customer",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "From Customer", "label": "From Customer",
"no_copy": 0,
"oldfieldname": "customer", "oldfieldname": "customer",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Customer", "options": "Customer",
"permlevel": 0 "permlevel": 0,
"print_hide": 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.source == 'Campaign'", "depends_on": "eval:doc.source == 'Campaign'",
"description": "", "description": "",
"fieldname": "campaign_name", "fieldname": "campaign_name",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Campaign Name", "label": "Campaign Name",
"no_copy": 0,
"oldfieldname": "campaign_name", "oldfieldname": "campaign_name",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Campaign", "options": "Campaign",
"permlevel": 0 "permlevel": 0,
"print_hide": 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", "fieldname": "section_break_12",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": "",
"print_hide": 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": "__user", "default": "__user",
"fieldname": "lead_owner", "fieldname": "lead_owner",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 0,
"label": "Lead Owner", "label": "Lead Owner",
"no_copy": 0,
"oldfieldname": "lead_owner", "oldfieldname": "lead_owner",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "User", "options": "User",
"permlevel": 0, "permlevel": 0,
"search_index": 1 "print_hide": 0,
}, "read_only": 0,
{ "report_hide": 0,
"fieldname": "column_break_14", "reqd": 0,
"fieldtype": "Column Break", "search_index": 1,
"permlevel": 0, "set_only_once": 0,
"precision": "" "unique": 0
}, },
{ {
"allow_on_submit": 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,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 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": "contact_by", "fieldname": "contact_by",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 0,
"label": "Next Contact By", "label": "Next Contact By",
"no_copy": 0,
"oldfieldname": "contact_by", "oldfieldname": "contact_by",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "User", "options": "User",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "100px" "width": "100px"
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Add to calendar on this date", "description": "Add to calendar on this date",
"fieldname": "contact_date", "fieldname": "contact_date",
"fieldtype": "Datetime", "fieldtype": "Datetime",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 0,
"label": "Next Contact Date", "label": "Next Contact Date",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "contact_date", "oldfieldname": "contact_date",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "100px" "width": "100px"
}, },
{ {
"fieldname": "fold", "allow_on_submit": 0,
"fieldtype": "Fold", "bold": 0,
"label": "fold", "collapsible": 1,
"permlevel": 0
},
{
"fieldname": "contact_info", "fieldname": "contact_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Address & Contact", "label": "Address & Contact",
"no_copy": 0,
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"options": "icon-map-marker", "options": "icon-map-marker",
"permlevel": 0 "permlevel": 0,
"print_hide": 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.__islocal", "depends_on": "eval:doc.__islocal",
"fieldname": "address_desc", "fieldname": "address_desc",
"fieldtype": "HTML", "fieldtype": "HTML",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Address Desc", "label": "Address Desc",
"no_copy": 0,
"options": "<em>Addresses will appear only when you save the lead</em>", "options": "<em>Addresses will appear only when you save the lead</em>",
"permlevel": 0, "permlevel": 0,
"print_hide": 1 "print_hide": 1,
"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": "address_html", "fieldname": "address_html",
"fieldtype": "HTML", "fieldtype": "HTML",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Address HTML", "label": "Address HTML",
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 1 "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_break2", "fieldname": "column_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 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": "phone", "fieldname": "phone",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Phone", "label": "Phone",
"no_copy": 0,
"oldfieldname": "contact_no", "oldfieldname": "contact_no",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0, "permlevel": 0,
"reqd": 0 "print_hide": 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": "mobile_no", "fieldname": "mobile_no",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Mobile No.", "label": "Mobile No.",
"no_copy": 0,
"oldfieldname": "mobile_no", "oldfieldname": "mobile_no",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "fax", "fieldname": "fax",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Fax", "label": "Fax",
"no_copy": 0,
"oldfieldname": "fax", "oldfieldname": "fax",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0 "permlevel": 0,
"print_hide": 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", "fieldname": "website",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Website", "label": "Website",
"no_copy": 0,
"oldfieldname": "website", "oldfieldname": "website",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "", "description": "",
"fieldname": "territory", "fieldname": "territory",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Territory", "label": "Territory",
"no_copy": 0,
"oldfieldname": "territory", "oldfieldname": "territory",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Territory", "options": "Territory",
"permlevel": 0, "permlevel": 0,
"print_hide": 1 "print_hide": 1,
"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": "more_info", "fieldname": "more_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "More Info", "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "More Information",
"no_copy": 0,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "icon-file-text", "options": "icon-file-text",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "type", "fieldname": "type",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 0,
"label": "Lead Type", "label": "Lead Type",
"no_copy": 0,
"oldfieldname": "type", "oldfieldname": "type",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "\nClient\nChannel Partner\nConsultant", "options": "\nClient\nChannel Partner\nConsultant",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "market_segment", "fieldname": "market_segment",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 0,
"label": "Market Segment", "label": "Market Segment",
"no_copy": 0,
"oldfieldname": "market_segment", "oldfieldname": "market_segment",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "\nLower Income\nMiddle Income\nUpper Income", "options": "\nLower Income\nMiddle Income\nUpper Income",
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0 "search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "industry", "fieldname": "industry",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Industry", "label": "Industry",
"no_copy": 0,
"oldfieldname": "industry", "oldfieldname": "industry",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Industry Type", "options": "Industry Type",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "request_type", "fieldname": "request_type",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Request Type", "label": "Request Type",
"no_copy": 0,
"oldfieldname": "request_type", "oldfieldname": "request_type",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "\nProduct Enquiry\nRequest for Information\nSuggestions\nOther", "options": "\nProduct Enquiry\nRequest for Information\nSuggestions\nOther",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "fiscal_year", "fieldname": "fiscal_year",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 0,
"label": "Fiscal Year", "label": "Fiscal Year",
"no_copy": 0,
"oldfieldname": "fiscal_year", "oldfieldname": "fiscal_year",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "Fiscal Year", "options": "Fiscal Year",
"permlevel": 0 "permlevel": 0,
"print_hide": 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_break3", "fieldname": "column_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "50%" "width": "50%"
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "company", "fieldname": "company",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Company", "label": "Company",
"no_copy": 0,
"oldfieldname": "company", "oldfieldname": "company",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Company", "options": "Company",
"permlevel": 0, "permlevel": 0,
"reqd": 0 "print_hide": 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": "unsubscribed", "fieldname": "unsubscribed",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Unsubscribed", "label": "Unsubscribed",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "blog_subscriber", "fieldname": "blog_subscriber",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Blog Subscriber", "label": "Blog Subscriber",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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-user", "icon": "icon-user",
"idx": 1, "idx": 1,
"modified": "2015-07-03 03:26:18.579905", "in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-08-27 03:26:48.324207",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "CRM", "module": "CRM",
"name": "Lead", "name": "Lead",
@@ -352,86 +816,127 @@
"permissions": [ "permissions": [
{ {
"amend": 0, "amend": 0,
"apply_user_permissions": 0,
"cancel": 0, "cancel": 0,
"create": 0, "create": 0,
"delete": 0, "delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 1, "permlevel": 1,
"print": 0,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "All", "role": "All",
"set_user_permissions": 0,
"share": 0,
"submit": 0, "submit": 0,
"write": 0 "write": 0
}, },
{ {
"amend": 0, "amend": 0,
"apply_user_permissions": 0,
"cancel": 0, "cancel": 0,
"create": 1, "create": 1,
"delete": 0, "delete": 0,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Sales User", "role": "Sales User",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0, "submit": 0,
"write": 1 "write": 1
}, },
{ {
"amend": 0, "amend": 0,
"apply_user_permissions": 0,
"cancel": 0, "cancel": 0,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Sales Manager", "role": "Sales Manager",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0, "submit": 0,
"write": 1 "write": 1
}, },
{ {
"amend": 0, "amend": 0,
"apply_user_permissions": 0,
"cancel": 0, "cancel": 0,
"create": 1, "create": 1,
"delete": 0, "delete": 0,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "System Manager", "role": "System Manager",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0, "submit": 0,
"write": 1 "write": 1
}, },
{ {
"amend": 0, "amend": 0,
"apply_user_permissions": 0,
"cancel": 0, "cancel": 0,
"create": 0, "create": 0,
"delete": 0, "delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 1, "permlevel": 1,
"print": 0,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Sales Manager", "role": "Sales Manager",
"set_user_permissions": 0,
"share": 0,
"submit": 0, "submit": 0,
"write": 0 "write": 0
}, },
{ {
"amend": 0, "amend": 0,
"apply_user_permissions": 0,
"cancel": 0, "cancel": 0,
"create": 0, "create": 0,
"delete": 0, "delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 1, "permlevel": 1,
"print": 0,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Sales User", "role": "Sales User",
"set_user_permissions": 0,
"share": 0,
"submit": 0, "submit": 0,
"write": 0 "write": 0
} }
], ],
"read_only": 0,
"read_only_onload": 0,
"search_fields": "lead_name,lead_owner,status", "search_fields": "lead_name,lead_owner,status",
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC", "sort_order": "DESC",

View File

@@ -1,15 +1,23 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt // License: GNU General Public License v3. See license.txt
frappe.ui.form.on_change("Opportunity", "customer", function(frm) {
erpnext.utils.get_party_details(frm) });
frappe.ui.form.on_change("Opportunity", "customer_address", erpnext.utils.get_address_display);
frappe.ui.form.on_change("Opportunity", "contact_person", erpnext.utils.get_contact_details);
frappe.provide("erpnext.crm"); frappe.provide("erpnext.crm");
frappe.require("assets/erpnext/js/utils.js"); frappe.require("assets/erpnext/js/utils.js");
cur_frm.email_field = "contact_email"; cur_frm.email_field = "contact_email";
frappe.ui.form.on("Opportunity", {
customer: function(frm) {
erpnext.utils.get_party_details(frm);
},
customer_address: erpnext.utils.get_address_display,
contact_person: erpnext.utils.get_contact_details,
enquiry_from: function(frm) {
frm.toggle_reqd("lead", frm.doc.enquiry_from==="Lead");
frm.toggle_reqd("customer", frm.doc.enquiry_from==="Customer");
},
refresh: function(frm) {
frm.events.enquiry_from(frm);
}
})
// TODO commonify this code // TODO commonify this code
erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
@@ -21,14 +29,11 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
if(!this.frm.doc.status) if(!this.frm.doc.status)
set_multiple(cdt, cdn, { status:'Draft' }); set_multiple(cdt, cdn, { status:'Draft' });
if(!this.frm.doc.date)
this.frm.doc.transaction_date = date.obj_to_str(new Date());
if(!this.frm.doc.company && frappe.defaults.get_user_default("company")) if(!this.frm.doc.company && frappe.defaults.get_user_default("company"))
set_multiple(cdt, cdn, { company:frappe.defaults.get_user_default("company") }); set_multiple(cdt, cdn, { company:frappe.defaults.get_user_default("company") });
if(!this.frm.doc.fiscal_year && sys_defaults.fiscal_year) if(!this.frm.doc.fiscal_year && sys_defaults.fiscal_year)
set_multiple(cdt, cdn, { fiscal_year:sys_defaults.fiscal_year }); set_multiple(cdt, cdn, { fiscal_year:sys_defaults.fiscal_year });
this.setup_queries(); this.setup_queries();
}, },

View File

@@ -12,6 +12,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "from_section", "fieldname": "from_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -32,6 +34,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "naming_series", "fieldname": "naming_series",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0, "hidden": 0,
@@ -54,6 +58,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "enquiry_from", "fieldname": "enquiry_from",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0, "hidden": 0,
@@ -76,6 +82,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"depends_on": "eval:doc.enquiry_from===\"Customer\"", "depends_on": "eval:doc.enquiry_from===\"Customer\"",
"fieldname": "customer", "fieldname": "customer",
"fieldtype": "Link", "fieldtype": "Link",
@@ -99,6 +107,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"depends_on": "eval:doc.enquiry_from===\"Lead\"", "depends_on": "eval:doc.enquiry_from===\"Lead\"",
"fieldname": "lead", "fieldname": "lead",
"fieldtype": "Link", "fieldtype": "Link",
@@ -122,6 +132,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "", "depends_on": "",
"fieldname": "customer_name", "fieldname": "customer_name",
"fieldtype": "Data", "fieldtype": "Data",
@@ -142,6 +154,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break0", "fieldname": "column_break0",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -162,14 +176,17 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "title", "fieldname": "title",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 1,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Title", "label": "Title",
"no_copy": 0, "no_copy": 0,
"options": "[{status}] {enquiry_type} from {customer}",
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
"print_hide": 0, "print_hide": 0,
@@ -182,6 +199,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "Sales", "default": "Sales",
"fieldname": "enquiry_type", "fieldname": "enquiry_type",
"fieldtype": "Select", "fieldtype": "Select",
@@ -205,6 +224,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "Open", "default": "Open",
"fieldname": "status", "fieldname": "status",
"fieldtype": "Select", "fieldtype": "Select",
@@ -228,6 +249,30 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.status===\"Lost\"",
"fieldname": "order_lost_reason",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Lost Reason",
"no_copy": 1,
"permlevel": 0,
"print_hide": 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": "with_items", "fieldname": "with_items",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -248,6 +293,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "with_items", "depends_on": "with_items",
"fieldname": "items_section", "fieldname": "items_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@@ -270,6 +317,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "items", "fieldname": "items",
"fieldtype": "Table", "fieldtype": "Table",
@@ -293,24 +342,9 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "fold", "bold": 0,
"fieldtype": "Fold", "collapsible": 1,
"hidden": 0, "collapsible_depends_on": "next_contact_by",
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"depends_on": "eval:doc.lead || doc.customer", "depends_on": "eval:doc.lead || doc.customer",
"fieldname": "contact_info", "fieldname": "contact_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@@ -332,6 +366,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.customer || doc.lead", "depends_on": "eval:doc.customer || doc.lead",
"fieldname": "customer_address", "fieldname": "customer_address",
"fieldtype": "Link", "fieldtype": "Link",
@@ -353,6 +389,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "address_display", "fieldname": "address_display",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
@@ -374,6 +412,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "customer", "depends_on": "customer",
"description": "", "description": "",
"fieldname": "territory", "fieldname": "territory",
@@ -396,6 +436,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "customer", "depends_on": "customer",
"description": "", "description": "",
"fieldname": "customer_group", "fieldname": "customer_group",
@@ -420,6 +462,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break3", "fieldname": "column_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -438,6 +482,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.lead || doc.customer", "depends_on": "eval:doc.lead || doc.customer",
"fieldname": "contact_person", "fieldname": "contact_person",
"fieldtype": "Link", "fieldtype": "Link",
@@ -459,6 +505,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "customer", "depends_on": "customer",
"fieldname": "contact_display", "fieldname": "contact_display",
"fieldtype": "Small Text", "fieldtype": "Small Text",
@@ -479,6 +527,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.lead || doc.customer", "depends_on": "eval:doc.lead || doc.customer",
"fieldname": "contact_email", "fieldname": "contact_email",
"fieldtype": "Small Text", "fieldtype": "Small Text",
@@ -499,6 +549,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.lead || doc.customer", "depends_on": "eval:doc.lead || doc.customer",
"fieldname": "contact_mobile", "fieldname": "contact_mobile",
"fieldtype": "Small Text", "fieldtype": "Small Text",
@@ -519,13 +571,16 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "",
"fieldname": "more_info", "fieldname": "more_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "More Info", "label": "Source",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "icon-file-text", "options": "icon-file-text",
@@ -540,71 +595,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "column_break1", "bold": 0,
"fieldtype": "Column Break", "collapsible": 0,
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "50%"
},
{
"allow_on_submit": 0,
"default": "Today",
"fieldname": "transaction_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Opportunity Date",
"no_copy": 0,
"oldfieldname": "transaction_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "50px"
},
{
"allow_on_submit": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Company",
"no_copy": 0,
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "source", "fieldname": "source",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0, "hidden": 0,
@@ -627,6 +619,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Enter name of campaign if source of enquiry is campaign", "description": "Enter name of campaign if source of enquiry is campaign",
"fieldname": "campaign", "fieldname": "campaign",
"fieldtype": "Link", "fieldtype": "Link",
@@ -650,6 +644,79 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 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,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Company",
"no_copy": 0,
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"permlevel": 0,
"print_hide": 1,
"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,
"default": "Today",
"fieldname": "transaction_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Opportunity Date",
"no_copy": 0,
"oldfieldname": "transaction_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "50px"
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "fiscal_year", "fieldname": "fiscal_year",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -672,18 +739,21 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"depends_on": "eval:!doc.__islocal", "bold": 0,
"fieldname": "order_lost_reason", "collapsible": 1,
"fieldtype": "Text", "collapsible_depends_on": "contact_by",
"fieldname": "next_contact",
"fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Lost Reason", "label": "Next Contact",
"no_copy": 1, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "",
"print_hide": 0, "print_hide": 0,
"read_only": 1, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
@@ -692,26 +762,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "column_break2", "bold": 0,
"fieldtype": "Column Break", "collapsible": 0,
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "50%"
},
{
"allow_on_submit": 0,
"description": "Your sales person who will contact the customer in future", "description": "Your sales person who will contact the customer in future",
"fieldname": "contact_by", "fieldname": "contact_by",
"fieldtype": "Link", "fieldtype": "Link",
@@ -736,6 +788,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Your sales person will get a reminder on this date to contact the customer", "description": "Your sales person will get a reminder on this date to contact the customer",
"fieldname": "contact_date", "fieldname": "contact_date",
"fieldtype": "Datetime", "fieldtype": "Datetime",
@@ -758,6 +812,30 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 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,
"fieldname": "to_discuss", "fieldname": "to_discuss",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 0, "hidden": 0,
@@ -779,6 +857,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amended_from", "fieldname": "amended_from",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -810,7 +890,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"modified": "2015-08-07 17:11:33.955441", "modified": "2015-08-26 06:56:09.914606",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "CRM", "module": "CRM",
"name": "Opportunity", "name": "Opportunity",

View File

@@ -27,7 +27,7 @@ blogs.
""" """
app_icon = "icon-th" app_icon = "icon-th"
app_color = "#e74c3c" app_color = "#e74c3c"
app_version = "5.7.5" app_version = "5.8.2"
github_link = "https://github.com/frappe/erpnext" github_link = "https://github.com/frappe/erpnext"
error_report_email = "support@erpnext.com" error_report_email = "support@erpnext.com"

View File

@@ -6,79 +6,275 @@
"custom": 0, "custom": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": "Master", "document_type": "Document",
"fields": [ "fields": [
{ {
"allow_on_submit": 0,
"fieldname": "capacity_planning", "fieldname": "capacity_planning",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Capacity Planning", "label": "Capacity Planning",
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"description": "Disables creation of time logs against Production Orders.\nOperations shall not be tracked against Production Order", "description": "Disables creation of time logs against Production Orders.\nOperations shall not be tracked against Production Order",
"fieldname": "disable_capacity_planning", "fieldname": "disable_capacity_planning",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Disable Capacity Planning and Time Tracking", "label": "Disable Capacity Planning and Time Tracking",
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"description": "Plan time logs outside Workstation Working Hours.", "description": "Plan time logs outside Workstation Working Hours.",
"fieldname": "allow_overtime", "fieldname": "allow_overtime",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Allow Overtime", "label": "Allow Overtime",
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"default": "", "default": "",
"fieldname": "allow_production_on_holidays", "fieldname": "allow_production_on_holidays",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Allow Production on Holidays", "label": "Allow Production on Holidays",
"no_copy": 0,
"options": "", "options": "",
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": "",
}, "print_hide": 0,
{ "read_only": 0,
"default": "BOM", "report_hide": 0,
"fieldname": "backflush_raw_materials_based_on", "reqd": 0,
"fieldtype": "Select", "search_index": 0,
"label": "Backflush Raw Materials Based On", "set_only_once": 0,
"options": "BOM\nMaterial Transferred for Manufacture", "unique": 0
"permlevel": 0,
"precision": ""
}, },
{ {
"allow_on_submit": 0,
"fieldname": "column_break_3", "fieldname": "column_break_3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"default": "30", "default": "30",
"description": "Try planning operations for X days in advance.", "description": "Try planning operations for X days in advance.",
"fieldname": "capacity_planning_for_days", "fieldname": "capacity_planning_for_days",
"fieldtype": "Int", "fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Capacity Planning For (Days)", "label": "Capacity Planning For (Days)",
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"description": "Default 10 mins", "description": "Default 10 mins",
"fieldname": "mins_between_operations", "fieldname": "mins_between_operations",
"fieldtype": "Int", "fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Time Between Operations (in mins)", "label": "Time Between Operations (in mins)",
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"fieldname": "section_break_6",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 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,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "over_production_allowance_percentage", "fieldname": "over_production_allowance_percentage",
"fieldtype": "Percent", "fieldtype": "Percent",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Over Production Allowance Percentage", "label": "Over Production Allowance Percentage",
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"default": "BOM",
"fieldname": "backflush_raw_materials_based_on",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Backflush Raw Materials Based On",
"no_copy": 0,
"options": "BOM\nMaterial Transferred for Manufacture",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "column_break_11",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 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,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "default_wip_warehouse",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Default Work In Progress Warehouse",
"no_copy": 0,
"options": "Warehouse",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "default_fg_warehouse",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Default Finished Goods Warehouse",
"no_copy": 0,
"options": "Warehouse",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
} }
], ],
"hide_heading": 0, "hide_heading": 0,
@@ -89,7 +285,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 1, "issingle": 1,
"istable": 0, "istable": 0,
"modified": "2015-08-12 08:12:33.889753", "modified": "2015-08-21 08:27:03.794133",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Manufacturing", "module": "Manufacturing",
"name": "Manufacturing Settings", "name": "Manufacturing Settings",
@@ -104,6 +300,7 @@
"delete": 0, "delete": 0,
"email": 0, "email": 0,
"export": 0, "export": 0,
"if_owner": 0,
"import": 0, "import": 0,
"permlevel": 0, "permlevel": 0,
"print": 0, "print": 0,

View File

@@ -12,6 +12,7 @@ frappe.ui.form.on("Production Order", "onload", function(frm) {
"actual_start_date": "", "actual_start_date": "",
"actual_end_date": "" "actual_end_date": ""
}); });
erpnext.production_order.set_default_warehouse(frm);
} }
erpnext.production_order.set_custom_buttons(frm); erpnext.production_order.set_custom_buttons(frm);
@@ -138,10 +139,22 @@ erpnext.production_order = {
} }
} else msgprint(__("Please enter Production Item first")); } else msgprint(__("Please enter Production Item first"));
}); });
},
set_default_warehouse: function(frm) {
frappe.call({
method: "erpnext.manufacturing.doctype.production_order.production_order.get_default_warehouse",
callback: function(r) {
if(!r.exe) {
frm.set_value("wip_warehouse", r.message.wip_warehouse);
frm.set_value("fg_warehouse", r.message.fg_warehouse)
}
}
});
} }
} }
$.extend(cur_frm.cscript, { $.extend(cur_frm.cscript, {
before_submit: function() { before_submit: function() {
cur_frm.toggle_reqd(["fg_warehouse", "wip_warehouse"], true); cur_frm.toggle_reqd(["fg_warehouse", "wip_warehouse"], true);

View File

@@ -10,6 +10,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item", "fieldname": "item",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -30,6 +32,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "PRO-", "default": "PRO-",
"fieldname": "naming_series", "fieldname": "naming_series",
"fieldtype": "Select", "fieldtype": "Select",
@@ -51,6 +55,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "Draft", "default": "Draft",
"depends_on": "eval:!doc.__islocal", "depends_on": "eval:!doc.__islocal",
"fieldname": "status", "fieldname": "status",
@@ -75,6 +81,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "production_item", "fieldname": "production_item",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -97,6 +105,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "", "depends_on": "",
"description": "", "description": "",
"fieldname": "bom_no", "fieldname": "bom_no",
@@ -121,6 +131,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "1", "default": "1",
"description": "Plan material for sub-assemblies", "description": "Plan material for sub-assemblies",
"fieldname": "use_multi_level_bom", "fieldname": "use_multi_level_bom",
@@ -142,6 +154,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break1", "fieldname": "column_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -162,6 +176,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "", "depends_on": "",
"fieldname": "qty", "fieldname": "qty",
"fieldtype": "Float", "fieldtype": "Float",
@@ -184,6 +200,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "0", "default": "0",
"depends_on": "eval:doc.docstatus==1", "depends_on": "eval:doc.docstatus==1",
"description": "", "description": "",
@@ -207,6 +225,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "0", "default": "0",
"depends_on": "eval:doc.docstatus==1", "depends_on": "eval:doc.docstatus==1",
"description": "", "description": "",
@@ -231,6 +251,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "warehouses", "fieldname": "warehouses",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -251,6 +273,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "wip_warehouse", "fieldname": "wip_warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -271,6 +295,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_12", "fieldname": "column_break_12",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -289,6 +315,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "", "depends_on": "",
"description": "", "description": "",
"fieldname": "fg_warehouse", "fieldname": "fg_warehouse",
@@ -311,6 +339,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "time", "fieldname": "time",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -332,6 +362,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "", "depends_on": "",
"fieldname": "expected_delivery_date", "fieldname": "expected_delivery_date",
"fieldtype": "Date", "fieldtype": "Date",
@@ -352,6 +384,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "now", "default": "now",
"fieldname": "planned_start_date", "fieldname": "planned_start_date",
"fieldtype": "Datetime", "fieldtype": "Datetime",
@@ -373,6 +407,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "planned_end_date", "fieldname": "planned_end_date",
"fieldtype": "Datetime", "fieldtype": "Datetime",
"hidden": 0, "hidden": 0,
@@ -393,6 +429,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_13", "fieldname": "column_break_13",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -412,6 +450,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "actual_start_date", "fieldname": "actual_start_date",
"fieldtype": "Datetime", "fieldtype": "Datetime",
"hidden": 0, "hidden": 0,
@@ -432,6 +472,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "actual_end_date", "fieldname": "actual_end_date",
"fieldtype": "Datetime", "fieldtype": "Datetime",
"hidden": 0, "hidden": 0,
@@ -452,6 +494,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "", "depends_on": "",
"fieldname": "operations_section", "fieldname": "operations_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@@ -474,6 +518,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "", "depends_on": "",
"fieldname": "operations", "fieldname": "operations",
"fieldtype": "Table", "fieldtype": "Table",
@@ -496,6 +542,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "operations", "depends_on": "operations",
"fieldname": "section_break_22", "fieldname": "section_break_22",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@@ -518,6 +566,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "planned_operating_cost", "fieldname": "planned_operating_cost",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -539,6 +589,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "actual_operating_cost", "fieldname": "actual_operating_cost",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -560,6 +612,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "additional_operating_cost", "fieldname": "additional_operating_cost",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -581,6 +635,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_24", "fieldname": "column_break_24",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -600,6 +656,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "total_operating_cost", "fieldname": "total_operating_cost",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -621,13 +679,15 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "more_info", "fieldname": "more_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "More Info", "label": "More Information",
"no_copy": 0, "no_copy": 0,
"options": "icon-file-text", "options": "icon-file-text",
"permlevel": 0, "permlevel": 0,
@@ -641,6 +701,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 0, "hidden": 0,
@@ -660,6 +722,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "", "depends_on": "",
"fieldname": "stock_uom", "fieldname": "stock_uom",
"fieldtype": "Link", "fieldtype": "Link",
@@ -683,6 +747,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break2", "fieldname": "column_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -702,6 +768,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "project_name", "fieldname": "project_name",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -724,6 +792,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Manufacture against Sales Order", "description": "Manufacture against Sales Order",
"fieldname": "sales_order", "fieldname": "sales_order",
"fieldtype": "Link", "fieldtype": "Link",
@@ -745,6 +815,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "company", "fieldname": "company",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -767,6 +839,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amended_from", "fieldname": "amended_from",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -797,7 +871,7 @@
"is_submittable": 1, "is_submittable": 1,
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"modified": "2015-08-12 08:50:32.803526", "modified": "2015-08-27 03:27:08.064900",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Manufacturing", "module": "Manufacturing",
"name": "Production Order", "name": "Production Order",

View File

@@ -42,6 +42,8 @@ class ProductionOrder(Document):
self.validate_warehouse() self.validate_warehouse()
self.calculate_operating_cost() self.calculate_operating_cost()
self.validate_delivery_date() self.validate_delivery_date()
self.validate_qty()
self.validate_operation_time()
from erpnext.utilities.transaction_base import validate_uom_is_integer from erpnext.utilities.transaction_base import validate_uom_is_integer
validate_uom_is_integer(self, "stock_uom", ["qty", "produced_qty"]) validate_uom_is_integer(self, "stock_uom", ["qty", "produced_qty"])
@@ -328,6 +330,15 @@ class ProductionOrder(Document):
validate_end_of_life(self.production_item) validate_end_of_life(self.production_item)
def validate_qty(self):
if not self.qty > 0:
frappe.throw(_("Quantity to Manufacture must be greater than 0."))
def validate_operation_time(self):
for d in self.operations:
if not d.time_in_mins > 0:
frappe.throw(_("Operation Time must be greater than 0 for Operation {0}".format(d.operation)))
@frappe.whitelist() @frappe.whitelist()
def get_item_details(item): def get_item_details(item):
res = frappe.db.sql("""select stock_uom, description res = frappe.db.sql("""select stock_uom, description
@@ -411,3 +422,9 @@ def make_time_log(name, operation, from_time=None, to_time=None, qty=None, proj
if from_time and to_time : if from_time and to_time :
time_log.calculate_total_hours() time_log.calculate_total_hours()
return time_log return time_log
@frappe.whitelist()
def get_default_warehouse():
wip_warehouse = frappe.db.get_single_value("Manufacturing Settings", "default_wip_warehouse")
fg_warehouse = frappe.db.get_single_value("Manufacturing Settings", "default_fg_warehouse")
return {"wip_warehouse": wip_warehouse, "fg_warehouse": fg_warehouse}

View File

@@ -276,7 +276,7 @@
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 1,
"search_index": 0, "search_index": 0,
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
@@ -476,7 +476,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"modified": "2015-08-19 12:45:53.834920", "modified": "2015-08-21 07:17:18.185276",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Manufacturing", "module": "Manufacturing",
"name": "Production Order Operation", "name": "Production Order Operation",

View File

@@ -200,15 +200,19 @@ class ProductionPlanningTool(Document):
def create_production_order(self, items): def create_production_order(self, items):
"""Create production order. Called from Production Planning Tool""" """Create production order. Called from Production Planning Tool"""
from erpnext.manufacturing.doctype.production_order.production_order import OverProductionError from erpnext.manufacturing.doctype.production_order.production_order import OverProductionError, get_default_warehouse
warehouse = get_default_warehouse()
pro_list = [] pro_list = []
for key in items: for key in items:
pro = frappe.new_doc("Production Order") pro = frappe.new_doc("Production Order")
pro.update(items[key]) pro.update(items[key])
pro.set_production_order_operations() pro.set_production_order_operations()
if warehouse:
pro.wip_warehouse = warehouse.get('wip_warehouse')
if not pro.fg_warehouse:
pro.fg_warehouse = warehouse.get('fg_warehouse')
frappe.flags.mute_messages = True frappe.flags.mute_messages = True
try: try:
pro.insert() pro.insert()
pro_list.append(pro.name) pro_list.append(pro.name)
@@ -216,7 +220,6 @@ class ProductionPlanningTool(Document):
pass pass
frappe.flags.mute_messages = False frappe.flags.mute_messages = False
return pro_list return pro_list
def download_raw_materials(self): def download_raw_materials(self):

View File

@@ -191,6 +191,14 @@ erpnext.patches.v5_4.stock_entry_additional_costs
erpnext.patches.v5_4.cleanup_journal_entry #2015-08-14 erpnext.patches.v5_4.cleanup_journal_entry #2015-08-14
execute:frappe.db.sql("update `tabProduction Order` pro set description = (select description from tabItem where name=pro.production_item) where ifnull(description, '') = ''") execute:frappe.db.sql("update `tabProduction Order` pro set description = (select description from tabItem where name=pro.production_item) where ifnull(description, '') = ''")
erpnext.patches.v5_7.item_template_attributes erpnext.patches.v5_7.item_template_attributes
execute:frappe.delete_doc_if_exists("DocType", "Manage Variants")
execute:frappe.delete_doc_if_exists("DocType", "Manage Variants Item")
erpnext.patches.v4_2.repost_reserved_qty #2015-08-20 erpnext.patches.v4_2.repost_reserved_qty #2015-08-20
erpnext.patches.v5_4.update_purchase_cost_against_project erpnext.patches.v5_4.update_purchase_cost_against_project
erpnext.patches.v5_8.update_order_reference_in_return_entries
erpnext.patches.v5_8.add_credit_note_print_heading
execute:frappe.delete_doc_if_exists("Print Format", "Credit Note - Negative Invoice")
# V6.0
erpnext.patches.v6_0.set_default_title
erpnext.patches.v6_0.multi_currency erpnext.patches.v6_0.multi_currency

View File

@@ -5,7 +5,7 @@ from __future__ import unicode_literals
import frappe import frappe
def execute(): def execute():
from erpnext.utilities.repost_stock import set_stock_balance_as_per_serial_no from erpnext.stock.stock_balance import set_stock_balance_as_per_serial_no
frappe.db.auto_commit_on_many_writes = 1 frappe.db.auto_commit_on_many_writes = 1
set_stock_balance_as_per_serial_no() set_stock_balance_as_per_serial_no()

View File

@@ -6,7 +6,7 @@ import frappe
from frappe.utils import flt from frappe.utils import flt
def execute(): def execute():
from erpnext.utilities.repost_stock import repost from erpnext.stock.stock_balance import repost
repost(allow_zero_rate=True, only_actual=True) repost(allow_zero_rate=True, only_actual=True)
frappe.reload_doctype("Account") frappe.reload_doctype("Account")

View File

@@ -3,7 +3,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe import frappe
from erpnext.utilities.repost_stock import update_bin_qty, get_reserved_qty from erpnext.stock.stock_balance import update_bin_qty, get_reserved_qty
def execute(): def execute():
repost_for = frappe.db.sql(""" repost_for = frappe.db.sql("""

View File

@@ -5,7 +5,7 @@ from __future__ import unicode_literals
import frappe import frappe
def execute(): def execute():
from erpnext.utilities.repost_stock import update_bin_qty, get_indented_qty, get_ordered_qty from erpnext.stock.stock_balance import update_bin_qty, get_indented_qty, get_ordered_qty
count=0 count=0
for item_code, warehouse in frappe.db.sql("""select distinct item_code, warehouse from for item_code, warehouse in frappe.db.sql("""select distinct item_code, warehouse from

View File

@@ -5,7 +5,7 @@ from __future__ import unicode_literals
import frappe import frappe
def execute(): def execute():
from erpnext.utilities.repost_stock import update_bin_qty, get_indented_qty from erpnext.stock.stock_balance import update_bin_qty, get_indented_qty
count=0 count=0
for item_code, warehouse in frappe.db.sql("""select distinct item_code, warehouse for item_code, warehouse in frappe.db.sql("""select distinct item_code, warehouse

View File

@@ -3,7 +3,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe import frappe
from erpnext.utilities.repost_stock import repost_actual_qty from erpnext.stock.stock_balance import repost_actual_qty
def execute(): def execute():
cancelled_invoices = frappe.db.sql_list("""select name from `tabSales Invoice` cancelled_invoices = frappe.db.sql_list("""select name from `tabSales Invoice`

View File

@@ -10,12 +10,6 @@ def execute():
frappe.reload_doctype("Stock Entry Detail") frappe.reload_doctype("Stock Entry Detail")
frappe.reload_doctype("Landed Cost Taxes and Charges") frappe.reload_doctype("Landed Cost Taxes and Charges")
frappe.db.sql("""update `tabStock Entry Detail` sed, `tabStock Entry` se
set sed.valuation_rate=sed.incoming_rate, sed.basic_rate=sed.incoming_rate, sed.basic_amount=sed.amount
where sed.parent = se.name
and (se.purpose not in ('Manufacture', 'Repack') or ifnull(additional_operating_cost, 0)=0)
""")
stock_entry_db_columns = frappe.db.get_table_columns("Stock Entry") stock_entry_db_columns = frappe.db.get_table_columns("Stock Entry")
if "additional_operating_cost" in stock_entry_db_columns: if "additional_operating_cost" in stock_entry_db_columns:
operating_cost_fieldname = "additional_operating_cost" operating_cost_fieldname = "additional_operating_cost"
@@ -25,6 +19,13 @@ def execute():
return return
frappe.db.sql("""update `tabStock Entry Detail` sed, `tabStock Entry` se
set sed.valuation_rate=sed.incoming_rate, sed.basic_rate=sed.incoming_rate, sed.basic_amount=sed.amount
where sed.parent = se.name
and (se.purpose not in ('Manufacture', 'Repack') or ifnull({0}, 0)=0)
""".format(operating_cost_fieldname))
stock_entries = frappe.db.sql_list("""select name from `tabStock Entry` stock_entries = frappe.db.sql_list("""select name from `tabStock Entry`
where purpose in ('Manufacture', 'Repack') and ifnull({0}, 0)!=0 where purpose in ('Manufacture', 'Repack') and ifnull({0}, 0)!=0
and docstatus < 2""".format(operating_cost_fieldname)) and docstatus < 2""".format(operating_cost_fieldname))

View File

@@ -55,9 +55,6 @@ def migrate_manage_variants():
template.set('attributes', attributes) template.set('attributes', attributes)
template.save() template.save()
frappe.delete_doc("DocType", "Manage Variants")
frappe.delete_doc("DocType", "Manage Variants Item")
# patch old style # patch old style
def migrate_item_variants(): def migrate_item_variants():
for item in frappe.get_all("Item", filters={"has_variants": 1}): for item in frappe.get_all("Item", filters={"has_variants": 1}):

View File

@@ -0,0 +1 @@
from __future__ import unicode_literals

View File

@@ -0,0 +1,14 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
def execute():
for print_heading in (_("Credit Note"), _("Debit Note")):
if not frappe.db.exists("Print Heading", print_heading):
frappe.get_doc({
"doctype": "Print Heading",
"print_heading": print_heading
}).insert()

View File

@@ -0,0 +1,88 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doctype("Sales Order Item")
frappe.reload_doctype("Purchase Order Item")
# sales return
return_entries = list(frappe.db.sql("""
select dn.name as name, dn_item.name as row_id, dn.return_against,
dn_item.item_code, "Delivery Note" as doctype
from `tabDelivery Note Item` dn_item, `tabDelivery Note` dn
where dn_item.parent=dn.name and dn.is_return=1 and dn.docstatus < 2
""", as_dict=1))
return_entries += list(frappe.db.sql("""
select si.name as name, si_item.name as row_id, si.return_against,
si_item.item_code, "Sales Invoice" as doctype, update_stock
from `tabSales Invoice Item` si_item, `tabSales Invoice` si
where si_item.parent=si.name and si.is_return=1 and si.docstatus < 2
""", as_dict=1))
for d in return_entries:
ref_field = "against_sales_order" if d.doctype == "Delivery Note" else "sales_order"
order_details = frappe.db.sql("""
select {ref_field} as sales_order, so_detail,
(select transaction_date from `tabSales Order` where name=item.{ref_field}) as sales_order_date
from `tab{doctype} Item` item
where
parent=%s
and item_code=%s
and ifnull(so_detail, '') !=''
order by sales_order_date DESC limit 1
""".format(ref_field=ref_field, doctype=d.doctype), (d.return_against, d.item_code), as_dict=1)
if order_details:
frappe.db.sql("""
update `tab{doctype} Item`
set {ref_field}=%s, so_detail=%s
where name=%s
""".format(doctype=d.doctype, ref_field=ref_field),
(order_details[0].sales_order, order_details[0].so_detail, d.row_id))
if (d.doctype=="Sales Invoice" and d.update_stock) or d.doctype=="Delivery Note":
doc = frappe.get_doc(d.doctype, d.name)
doc.update_reserved_qty()
if d.doctype=="Sales Invoice":
doc.status_updater = []
doc.update_status_updater_args()
doc.update_prevdoc_status()
#--------------------------
# purchase return
return_entries = frappe.db.sql("""
select pr.name as name, pr_item.name as row_id, pr.return_against, pr_item.item_code
from `tabPurchase Receipt Item` pr_item, `tabPurchase Receipt` pr
where pr_item.parent=pr.name and pr.is_return=1 and pr.docstatus < 2
""", as_dict=1)
for d in return_entries:
order_details = frappe.db.sql("""
select prevdoc_docname as purchase_order, prevdoc_detail_docname as po_detail,
(select transaction_date from `tabPurchase Order` where name=item.prevdoc_detail_docname) as purchase_order_date
from `tabPurchase Receipt Item` item
where
parent=%s
and item_code=%s
and ifnull(prevdoc_detail_docname, '') !=''
and ifnull(prevdoc_doctype, '') = 'Purchase Order' and ifnull(prevdoc_detail_docname, '') != ''
order by purchase_order_date DESC limit 1
""", (d.return_against, d.item_code), as_dict=1)
if order_details:
frappe.db.sql("""
update `tabPurchase Receipt Item`
set prevdoc_doctype='Purchase Order', prevdoc_docname=%s, prevdoc_detail_docname=%s
where name=%s
""", (order_details[0].purchase_order, order_details[0].po_detail, d.row_id))
pr = frappe.get_doc("Purchase Receipt", d.name)
pr.update_ordered_qty()
pr.update_prevdoc_status()

View File

@@ -0,0 +1,32 @@
import frappe
def execute():
frappe.reload_doctype("Quotation")
frappe.db.sql("""update tabQuotation set title = customer_name""")
frappe.reload_doctype("Sales Order")
frappe.db.sql("""update `tabSales Order` set title = customer_name""")
frappe.reload_doctype("Delivery Note")
frappe.db.sql("""update `tabDelivery Note` set title = customer_name""")
frappe.reload_doctype("Material Request")
frappe.db.sql("""update `tabMaterial Request` set title = material_request_type""")
frappe.reload_doctype("Supplier Quotation")
frappe.db.sql("""update `tabSupplier Quotation` set title = supplier_name""")
frappe.reload_doctype("Purchase Order")
frappe.db.sql("""update `tabPurchase Order` set title = supplier_name""")
frappe.reload_doctype("Purchase Receipt")
frappe.db.sql("""update `tabPurchase Receipt` set title = supplier_name""")
frappe.reload_doctype("Purchase Invoice")
frappe.db.sql("""update `tabPurchase Invoice` set title = supplier_name""")
frappe.reload_doctype("Stock Entry")
frappe.db.sql("""update `tabStock Entry` set title = purpose""")
frappe.reload_doctype("Sales Invoice")
frappe.db.sql("""update `tabSales Invoice` set title = customer_name""")

View File

@@ -83,11 +83,11 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
refresh: function() { refresh: function() {
erpnext.toggle_naming_series(); erpnext.toggle_naming_series();
erpnext.hide_company(); erpnext.hide_company();
this.hide_currency_and_price_list()
this.show_item_wise_taxes(); this.show_item_wise_taxes();
this.set_dynamic_labels(); this.set_dynamic_labels();
erpnext.pos.make_pos_btn(this.frm); erpnext.pos.make_pos_btn(this.frm);
this.setup_sms(); this.setup_sms();
this.make_show_payments_btn();
}, },
apply_default_taxes: function() { apply_default_taxes: function() {
@@ -123,11 +123,19 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
var sms_man = new SMSManager(this.frm.doc); var sms_man = new SMSManager(this.frm.doc);
}, },
hide_currency_and_price_list: function() { make_show_payments_btn: function() {
if(this.frm.doc.conversion_rate == 1 && this.frm.doc.docstatus > 0) { var me = this;
hide_field("currency_and_price_list"); if (in_list(["Purchase Invoice", "Sales Invoice"], this.frm.doctype)) {
} else { if(this.frm.doc.outstanding_amount !== this.frm.doc.base_grand_total) {
unhide_field("currency_and_price_list"); this.frm.add_custom_button(__("Show Payments"), function() {
frappe.route_options = {
"Journal Entry Account.reference_type": me.frm.doc.doctype,
"Journal Entry Account.reference_name": me.frm.doc.name
};
frappe.set_route("List", "Journal Entry");
});
}
} }
}, },
@@ -701,7 +709,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
}).join("\n"); }).join("\n");
if(!rows) return ""; if(!rows) return "";
return '<p><a href="#" onclick="$(\'.tax-break-up\').toggleClass(\'hide\'); return false;">Show / Hide tax break-up</a><br><br></p>\ return '<p><a class="h6 text-muted" href="#" onclick="$(\'.tax-break-up\').toggleClass(\'hide\'); return false;">'
+ __("Show tax break-up") + '</a><br><br></p>\
<div class="tax-break-up hide" style="overflow-x: auto;"><table class="table table-bordered table-hover">\ <div class="tax-break-up hide" style="overflow-x: auto;"><table class="table table-bordered table-hover">\
<thead><tr>' + headings + '</tr></thead> \ <thead><tr>' + headings + '</tr></thead> \
<tbody>' + rows + '</tbody> \ <tbody>' + rows + '</tbody> \

View File

@@ -1,18 +1,20 @@
<p><button class="btn btn-sm btn-default btn-address"> <p><button class="btn btn-xs btn-default btn-address">New Address</button></p>
<i class="icon-plus"></i> New Address</button></p> <div class="clearfix"></div>
{% for(var i=0, l=addr_list.length; i<l; i++) { %} {% for(var i=0, l=addr_list.length; i<l; i++) { %}
<hr> <p class="h6">
<a href="#Form/Address/{%= addr_list[i].name %}" class="btn btn-sm btn-default pull-right"> {%= i+1 %}. {%= addr_list[i].address_type %}
{%= __("Edit") %}</a> {% if(addr_list[i].is_primary_address) { %}
<p><b>{%= i+1 %}. {%= addr_list[i].address_type %}</b></p> <span class="text-muted">({%= __("Primary") %})</span>{% } %}
{% if(addr_list[i].is_shipping_address) { %}
<span class="text-muted">({%= __("Shipping") %})</span>{% } %}
<a href="#Form/Address/{%= addr_list[i].name %}"
class="btn btn-default btn-xs pull-right">
{%= __("Edit") %}</a>
</p>
<div style="padding-left: 15px;"> <div style="padding-left: 15px;">
<div> <p style="margin-top: 5px; font-size: 12px;">
{% if(addr_list[i].is_primary_address) { %}<span class="label label-info"> {%= addr_list[i].display %}</p>
{%= __("Primary") %}</span>{% } %}
{% if(addr_list[i].is_shipping_address) { %}<span class="label label-default">
{%= __("Shipping") %}</span>{% } %}
</div>
<p style="margin-top: 5px;">{%= addr_list[i].display %}</p>
</div> </div>
{% } %} {% } %}
{% if(!addr_list.length) { %} {% if(!addr_list.length) { %}

View File

@@ -1,25 +1,29 @@
<p><button class="btn btn-sm btn-default btn-contact"> <p><button class="btn btn-xs btn-default btn-contact">
<i class="icon-plus"></i> New Contact</button></p> New Contact</button></p>
<div class="clearfix"></div>
{% for(var i=0, l=contact_list.length; i<l; i++) { %} {% for(var i=0, l=contact_list.length; i<l; i++) { %}
<hr> <p class="h6">
<a href="#Form/Contact/{%= contact_list[i].name %}" class="btn btn-sm btn-default pull-right"> {%= i+1 %}. {%= contact_list[i].first_name %} {%= contact_list[i].last_name %}
{%= __("Edit") %}</a> {% if(contact_list[i].is_primary_contact) { %}
<p><b>{%= i+1 %}. {%= contact_list[i].first_name %} {%= contact_list[i].last_name %}</b></p> <span class="text-muted">({%= __("Primary") %})</span>
{% } %}
<a href="#Form/Contact/{%= contact_list[i].name %}"
class="btn btn-xs btn-default pull-right">
{%= __("Edit") %}</a>
</p>
<div style="padding-left: 15px;"> <div style="padding-left: 15px;">
<div> <p style="padding-top: 5px; font-size: 12px;">
{% if(contact_list[i].is_primary_contact) { %}<span class="label label-info"> {% if(contact_list[i].phone) { %}
{%= __("Primary") %}</span>{% } %} {%= __("Phone") %}: {%= contact_list[i].phone %}<br>
</div> {% } %}
<p style="padding-top: 5px;"> {% if(contact_list[i].mobile_no) { %}
{% if(contact_list[i].phone) { %} {%= __("Mobile No.") %}: {%= contact_list[i].mobile_no %}<br>
{%= __("Phone") %}: {%= contact_list[i].phone %}<br> {% } %}
{% } %} {% if(contact_list[i].email_id) { %}
{% if(contact_list[i].mobile_no) { %} {%= __("Email ID") %}: {%= contact_list[i].email_id %}
{%= __("Mobile No.") %}: {%= contact_list[i].mobile_no %}<br> {% } %}
{% } %}
{% if(contact_list[i].email_id) { %}
{%= __("Email ID") %}: {%= contact_list[i].email_id %}
{% } %}
</p> </p>
</div> </div>
{% } %} {% } %}

File diff suppressed because it is too large Load Diff

View File

@@ -10,6 +10,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "item_code", "fieldname": "item_code",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -34,6 +36,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "customer_item_code", "fieldname": "customer_item_code",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -53,6 +57,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break1", "fieldname": "col_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -71,6 +77,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_name", "fieldname": "item_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -94,6 +102,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_5", "fieldname": "section_break_5",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -113,6 +123,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"hidden": 0, "hidden": 0,
@@ -136,6 +148,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_7", "fieldname": "column_break_7",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -155,6 +169,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image", "fieldname": "image",
"fieldtype": "Attach", "fieldtype": "Attach",
"hidden": 1, "hidden": 1,
@@ -175,6 +191,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image_view", "fieldname": "image_view",
"fieldtype": "Image", "fieldtype": "Image",
"hidden": 0, "hidden": 0,
@@ -196,6 +214,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "quantity_and_rate", "fieldname": "quantity_and_rate",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -215,6 +235,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "qty", "fieldname": "qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -238,6 +260,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "price_list_rate", "fieldname": "price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -262,6 +286,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "price_list_rate", "depends_on": "price_list_rate",
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Percent", "fieldtype": "Percent",
@@ -286,6 +312,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break2", "fieldname": "col_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -304,6 +332,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "stock_uom", "fieldname": "stock_uom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -328,6 +358,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_price_list_rate", "fieldname": "base_price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -352,6 +384,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break1", "fieldname": "section_break1",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -370,6 +404,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "rate", "fieldname": "rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -394,6 +430,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_rate", "fieldname": "net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -414,6 +452,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amount", "fieldname": "amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -438,6 +478,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_amount", "fieldname": "net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -459,6 +501,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break3", "fieldname": "col_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -477,6 +521,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_rate", "fieldname": "base_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -501,6 +547,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_rate", "fieldname": "base_net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -521,6 +569,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_amount", "fieldname": "base_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -545,6 +595,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_amount", "fieldname": "base_net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -566,6 +618,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "pricing_rule", "fieldname": "pricing_rule",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -586,6 +640,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "reference", "fieldname": "reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -605,6 +661,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "prevdoc_doctype", "fieldname": "prevdoc_doctype",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 1,
@@ -629,6 +687,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "prevdoc_docname", "fieldname": "prevdoc_docname",
"fieldtype": "Dynamic Link", "fieldtype": "Dynamic Link",
"hidden": 0, "hidden": 0,
@@ -653,6 +713,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_tax_rate", "fieldname": "item_tax_rate",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
@@ -674,6 +736,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break4", "fieldname": "col_break4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -692,6 +756,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "page_break", "fieldname": "page_break",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -713,6 +779,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "item_group", "fieldname": "item_group",
"fieldtype": "Link", "fieldtype": "Link",
@@ -736,6 +804,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "brand", "fieldname": "brand",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 1,
@@ -767,7 +837,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"modified": "2015-08-19 12:34:45.335386", "modified": "2015-08-26 03:05:10.048137",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Quotation Item", "name": "Quotation Item",

File diff suppressed because it is too large Load Diff

View File

@@ -5,9 +5,10 @@ from __future__ import unicode_literals
import frappe import frappe
import json import json
import frappe.utils import frappe.utils
from frappe.utils import cstr, flt, getdate, comma_and from frappe.utils import cstr, flt, getdate, comma_and, cint
from frappe import _ from frappe import _
from frappe.model.mapper import get_mapped_doc from frappe.model.mapper import get_mapped_doc
from erpnext.stock.stock_balance import update_bin_qty, get_reserved_qty
from erpnext.controllers.selling_controller import SellingController from erpnext.controllers.selling_controller import SellingController
@@ -33,8 +34,9 @@ class SalesOrder(SellingController):
so = frappe.db.sql("select name from `tabSales Order` \ so = frappe.db.sql("select name from `tabSales Order` \
where ifnull(po_no, '') = %s and name != %s and docstatus < 2\ where ifnull(po_no, '') = %s and name != %s and docstatus < 2\
and customer = %s", (self.po_no, self.name, self.customer)) and customer = %s", (self.po_no, self.name, self.customer))
if so and so[0][0]: if so and so[0][0] and not \
frappe.msgprint(_("Warning: Sales Order {0} already exists against same Purchase Order number").format(so[0][0])) cint(frappe.db.get_single_value("Selling Settings", "allow_against_multiple_purchase_orders")):
frappe.msgprint(_("Warning: Sales Order {0} already exists against Customer's Purchase Order {1}").format(so[0][0], self.po_no))
def validate_for_items(self): def validate_for_items(self):
check_list = [] check_list = []
@@ -53,8 +55,11 @@ class SalesOrder(SellingController):
tot_avail_qty = frappe.db.sql("select projected_qty from `tabBin` \ tot_avail_qty = frappe.db.sql("select projected_qty from `tabBin` \
where item_code = %s and warehouse = %s", (d.item_code,d.warehouse)) where item_code = %s and warehouse = %s", (d.item_code,d.warehouse))
d.projected_qty = tot_avail_qty and flt(tot_avail_qty[0][0]) or 0 d.projected_qty = tot_avail_qty and flt(tot_avail_qty[0][0]) or 0
# check for same entry multiple times
unique_chk_list = set(check_list) unique_chk_list = set(check_list)
if len(unique_chk_list) != len(check_list): if len(unique_chk_list) != len(check_list) and \
not cint(frappe.db.get_single_value("Selling Settings", "allow_multiple_items")):
frappe.msgprint(_("Warning: Same item has been entered multiple times.")) frappe.msgprint(_("Warning: Same item has been entered multiple times."))
def product_bundle_has_stock_item(self, product_bundle): def product_bundle_has_stock_item(self, product_bundle):
@@ -151,7 +156,7 @@ class SalesOrder(SellingController):
super(SalesOrder, self).on_submit() super(SalesOrder, self).on_submit()
self.check_credit_limit() self.check_credit_limit()
self.update_stock_ledger(update_stock = 1) self.update_reserved_qty()
frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype, self.base_grand_total, self) frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype, self.base_grand_total, self)
@@ -164,7 +169,7 @@ class SalesOrder(SellingController):
frappe.throw(_("Stopped order cannot be cancelled. Unstop to cancel.")) frappe.throw(_("Stopped order cannot be cancelled. Unstop to cancel."))
self.check_nextdoc_docstatus() self.check_nextdoc_docstatus()
self.update_stock_ledger(update_stock = -1) self.update_reserved_qty()
self.update_prevdoc_status('cancel') self.update_prevdoc_status('cancel')
@@ -213,32 +218,38 @@ class SalesOrder(SellingController):
def stop_sales_order(self): def stop_sales_order(self):
self.check_modified_date() self.check_modified_date()
self.update_stock_ledger(-1)
frappe.db.set(self, 'status', 'Stopped') frappe.db.set(self, 'status', 'Stopped')
self.update_reserved_qty()
frappe.msgprint(_("{0} {1} status is Stopped").format(self.doctype, self.name)) frappe.msgprint(_("{0} {1} status is Stopped").format(self.doctype, self.name))
self.notify_modified() self.notify_modified()
def unstop_sales_order(self): def unstop_sales_order(self):
self.check_modified_date() self.check_modified_date()
self.update_stock_ledger(1)
frappe.db.set(self, 'status', 'Submitted') frappe.db.set(self, 'status', 'Submitted')
self.update_reserved_qty()
frappe.msgprint(_("{0} {1} status is Unstopped").format(self.doctype, self.name)) frappe.msgprint(_("{0} {1} status is Unstopped").format(self.doctype, self.name))
def update_reserved_qty(self, so_item_rows=None):
"""update requested qty (before ordered_qty is updated)"""
item_wh_list = []
def _valid_for_reserve(item_code, warehouse):
if item_code and warehouse and [item_code, warehouse] not in item_wh_list \
and frappe.db.get_value("Item", item_code, "is_stock_item"):
item_wh_list.append([item_code, warehouse])
def update_stock_ledger(self, update_stock): for d in self.get("items"):
from erpnext.stock.utils import update_bin if (not so_item_rows or d.name in so_item_rows):
for d in self.get_item_list(): _valid_for_reserve(d.item_code, d.warehouse)
if frappe.db.get_value("Item", d['item_code'], "is_stock_item")==1:
args = { if self.has_product_bundle(d.item_code):
"item_code": d['item_code'], for p in self.get("packed_items"):
"warehouse": d['reserved_warehouse'], if p.parent_detail_docname == d.name and p.parent_item == d.item_code:
"reserved_qty": flt(update_stock) * flt(d['reserved_qty']), _valid_for_reserve(p.item_code, p.warehouse)
"posting_date": self.transaction_date,
"voucher_type": self.doctype, for item_code, warehouse in item_wh_list:
"voucher_no": self.name, update_bin_qty(item_code, warehouse, {
"is_amended": self.amended_from and 'Yes' or 'No' "reserved_qty": get_reserved_qty(item_code, warehouse)
} })
update_bin(args)
def on_update(self): def on_update(self):
pass pass

View File

@@ -10,6 +10,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "item_code", "fieldname": "item_code",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -34,6 +36,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "customer_item_code", "fieldname": "customer_item_code",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -53,6 +57,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break1", "fieldname": "col_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -71,6 +77,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_name", "fieldname": "item_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -94,12 +102,15 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "section_break_5", "fieldname": "section_break_5",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Description",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
@@ -113,6 +124,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"hidden": 0, "hidden": 0,
@@ -136,6 +149,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_7", "fieldname": "column_break_7",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -155,6 +170,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image", "fieldname": "image",
"fieldtype": "Attach", "fieldtype": "Attach",
"hidden": 1, "hidden": 1,
@@ -175,6 +192,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image_view", "fieldname": "image_view",
"fieldtype": "Image", "fieldtype": "Image",
"hidden": 0, "hidden": 0,
@@ -196,6 +215,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "quantity_and_rate", "fieldname": "quantity_and_rate",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -215,6 +236,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "qty", "fieldname": "qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -238,6 +261,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "price_list_rate", "fieldname": "price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -262,6 +287,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "price_list_rate", "depends_on": "price_list_rate",
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Percent", "fieldtype": "Percent",
@@ -286,6 +313,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break2", "fieldname": "col_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -304,6 +333,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "stock_uom", "fieldname": "stock_uom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -328,6 +359,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_price_list_rate", "fieldname": "base_price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -352,6 +385,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_simple1", "fieldname": "section_break_simple1",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -370,6 +405,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "rate", "fieldname": "rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -394,6 +431,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amount", "fieldname": "amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -418,6 +457,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break3", "fieldname": "col_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -436,6 +477,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_rate", "fieldname": "base_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -460,6 +503,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_amount", "fieldname": "base_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -484,6 +529,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "pricing_rule", "fieldname": "pricing_rule",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -504,6 +551,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_24", "fieldname": "section_break_24",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -523,6 +572,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_rate", "fieldname": "net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -544,6 +595,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_amount", "fieldname": "net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -565,6 +618,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_27", "fieldname": "column_break_27",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -584,6 +639,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_rate", "fieldname": "base_net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -605,6 +662,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_amount", "fieldname": "base_net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -626,6 +685,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "warehouse_and_reference", "fieldname": "warehouse_and_reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -645,6 +706,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "warehouse", "fieldname": "warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -669,6 +732,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "prevdoc_docname", "fieldname": "prevdoc_docname",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -691,6 +756,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "brand", "fieldname": "brand",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 1,
@@ -713,6 +780,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "item_group", "fieldname": "item_group",
"fieldtype": "Link", "fieldtype": "Link",
@@ -736,6 +805,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "page_break", "fieldname": "page_break",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -757,6 +828,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break4", "fieldname": "col_break4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -775,6 +848,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "projected_qty", "fieldname": "projected_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -798,6 +873,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "actual_qty", "fieldname": "actual_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -819,6 +896,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "delivered_qty", "fieldname": "delivered_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -842,6 +921,31 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "returned_qty",
"fieldname": "returned_qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Returned Qty",
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"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", "fieldname": "billed_amt",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -862,6 +966,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "For Production", "description": "For Production",
"fieldname": "planned_qty", "fieldname": "planned_qty",
"fieldtype": "Float", "fieldtype": "Float",
@@ -886,6 +992,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "For Production", "description": "For Production",
"fieldname": "produced_qty", "fieldname": "produced_qty",
"fieldtype": "Float", "fieldtype": "Float",
@@ -910,6 +1018,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_tax_rate", "fieldname": "item_tax_rate",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
@@ -931,6 +1041,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Used for Production Plan", "description": "Used for Production Plan",
"fieldname": "transaction_date", "fieldname": "transaction_date",
"fieldtype": "Date", "fieldtype": "Date",
@@ -960,7 +1072,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"modified": "2015-08-19 12:46:32.930498", "modified": "2015-08-27 02:29:20.603580",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Sales Order Item", "name": "Sales Order Item",

View File

@@ -11,6 +11,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "Customer Name", "default": "Customer Name",
"fieldname": "cust_master_name", "fieldname": "cust_master_name",
"fieldtype": "Select", "fieldtype": "Select",
@@ -32,6 +34,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "campaign_naming_by", "fieldname": "campaign_naming_by",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0, "hidden": 0,
@@ -52,6 +56,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "customer_group", "fieldname": "customer_group",
"fieldtype": "Link", "fieldtype": "Link",
@@ -73,6 +79,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "territory", "fieldname": "territory",
"fieldtype": "Link", "fieldtype": "Link",
@@ -94,6 +102,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "selling_price_list", "fieldname": "selling_price_list",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -114,6 +124,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_5", "fieldname": "column_break_5",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -132,6 +144,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "so_required", "fieldname": "so_required",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0, "hidden": 0,
@@ -152,6 +166,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "dn_required", "fieldname": "dn_required",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0, "hidden": 0,
@@ -172,6 +188,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "maintain_same_sales_rate", "fieldname": "maintain_same_sales_rate",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -191,6 +209,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "editable_price_list_rate", "fieldname": "editable_price_list_rate",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -207,6 +227,50 @@
"search_index": 0, "search_index": 0,
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "allow_multiple_items",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Allow Item to be added multiple times in a transaction",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 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": "allow_against_multiple_purchase_orders",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Allow multiple Sales Orders against a Customer's Purchase Order",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
} }
], ],
"hide_heading": 0, "hide_heading": 0,
@@ -218,7 +282,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 1, "issingle": 1,
"istable": 0, "istable": 0,
"modified": "2015-08-03 12:59:51.829458", "modified": "2015-08-27 02:42:56.512460",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Selling Settings", "name": "Selling Settings",

View File

@@ -1,16 +1,18 @@
{ {
"add_total_row": 0,
"apply_user_permissions": 1, "apply_user_permissions": 1,
"creation": "2012-10-04 18:45:27", "creation": "2012-10-04 18:45:27",
"disabled": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "Report", "doctype": "Report",
"idx": 1, "idx": 1,
"is_standard": "Yes", "is_standard": "Yes",
"modified": "2014-07-14 07:18:17.006732", "modified": "2015-08-24 11:44:00.711112",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Customer Addresses and Contacts", "name": "Customer Addresses And Contacts",
"owner": "Administrator", "owner": "Administrator",
"query": "SELECT\n\t`tabCustomer`.name as customer_id,\n\t`tabCustomer`.customer_name,\n\t`tabCustomer`.customer_group,\n\t`tabAddress`.address_line1,\n\t`tabAddress`.address_line2,\n\t`tabAddress`.city,\n\t`tabAddress`.state,\n\t`tabAddress`.pincode,\n\t`tabAddress`.country,\n\t`tabAddress`.is_primary_address, \n\t`tabContact`.first_name,\n\t`tabContact`.last_name,\n\t`tabContact`.phone,\n\t`tabContact`.mobile_no,\n\t`tabContact`.email_id,\n\t`tabContact`.is_primary_contact\nFROM\n\t`tabCustomer`\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.customer=`tabCustomer`.name\n\t)\n\tleft join `tabContact` on (\n\t\t`tabContact`.customer=`tabCustomer`.name\n\t)\nWHERE\n\t`tabCustomer`.docstatus<2\nORDER BY\n\t`tabCustomer`.name asc", "query": "SELECT\n\t`tabCustomer`.name as \"Customer ID:Link/Customer\",\n\t`tabCustomer`.customer_name as \"Customer Name\",\n\t`tabCustomer`.customer_group as \"Customer Group:Link/Customer Group\",\n\t`tabAddress`.address_line1 as \"Address Line 1\",\n\t`tabAddress`.address_line2 as \"Address Line 2\",\n\t`tabAddress`.city as \"City\",\n\t`tabAddress`.state as \"State\",\n\t`tabAddress`.pincode as \"Postal Code\",\n\t`tabAddress`.country as \"Country\",\n\t`tabAddress`.is_primary_address as \"Is Primary Address:Check\", \n\t`tabContact`.first_name as \"First Name\",\n\t`tabContact`.last_name as \"Last Name\",\n\t`tabContact`.phone as \"Phone\",\n\t`tabContact`.mobile_no as \"Mobile No\",\n\t`tabContact`.email_id as \"Email Id\",\n\t`tabContact`.is_primary_contact as \"Is Primary Contact:Check\"\nFROM\n\t`tabCustomer`\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.customer=`tabCustomer`.name\n\t)\n\tleft join `tabContact` on (\n\t\t`tabContact`.customer=`tabCustomer`.name\n\t)\nWHERE\n\t`tabCustomer`.docstatus<2\nORDER BY\n\t`tabCustomer`.name asc",
"ref_doctype": "Customer", "ref_doctype": "Customer",
"report_name": "Customer Addresses And Contacts", "report_name": "Customer Addresses And Contacts",
"report_type": "Query Report" "report_type": "Query Report"

View File

@@ -1,211 +1,667 @@
{ {
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"creation": "2012-12-20 12:50:49", "creation": "2012-12-20 12:50:49",
"custom": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"fields": [ "fields": [
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "materials", "fieldname": "materials",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Materials", "label": "Materials",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "To track item in sales and purchase documents based on their serial nos. This is can also used to track warranty details of the product.", "description": "To track item in sales and purchase documents based on their serial nos. This is can also used to track warranty details of the product.",
"fieldname": "fs_item_serial_nos", "fieldname": "fs_item_serial_nos",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Item Serial Nos", "label": "Item Serial Nos",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "To track items in sales and purchase documents with batch nos. \"Preferred Industry: Chemicals\"", "description": "To track items in sales and purchase documents with batch nos. \"Preferred Industry: Chemicals\"",
"fieldname": "fs_item_batch_nos", "fieldname": "fs_item_batch_nos",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Item Batch Nos", "label": "Item Batch Nos",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "To track brand name in the following documents Delivery Note, Opportunity, Material Request, Item, Purchase Order, Purchase Voucher, Purchaser Receipt, Quotation, Sales Invoice, Product Bundle, Sales Order, Serial No", "description": "To track brand name in the following documents Delivery Note, Opportunity, Material Request, Item, Purchase Order, Purchase Voucher, Purchaser Receipt, Quotation, Sales Invoice, Product Bundle, Sales Order, Serial No",
"fieldname": "fs_brands", "fieldname": "fs_brands",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Brands", "label": "Brands",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "To track items using barcode. You will be able to enter items in Delivery Note and Sales Invoice by scanning barcode of item.", "description": "To track items using barcode. You will be able to enter items in Delivery Note and Sales Invoice by scanning barcode of item.",
"fieldname": "fs_item_barcode", "fieldname": "fs_item_barcode",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Item Barcode", "label": "Item Barcode",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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_break0", "fieldname": "column_break0",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 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": "1. To maintain the customer wise item code and to make them searchable based on their code use this option", "description": "1. To maintain the customer wise item code and to make them searchable based on their code use this option",
"fieldname": "fs_item_advanced", "fieldname": "fs_item_advanced",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Item Advanced", "label": "Item Advanced",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "To get Item Group in details table", "description": "To get Item Group in details table",
"fieldname": "fs_item_group_in_details", "fieldname": "fs_item_group_in_details",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Item Groups in Details", "label": "Item Groups in Details",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "sales_and_purchase", "fieldname": "sales_and_purchase",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Sales and Purchase", "label": "Sales and Purchase",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "All export related fields like currency, conversion rate, export total, export grand total etc are available in Delivery Note, POS, Quotation, Sales Invoice, Sales Order etc.", "description": "All export related fields like currency, conversion rate, export total, export grand total etc are available in Delivery Note, POS, Quotation, Sales Invoice, Sales Order etc.",
"fieldname": "fs_exports", "fieldname": "fs_exports",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Exports", "label": "Exports",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "All import related fields like currency, conversion rate, import total, import grand total etc are available in Purchase Receipt, Supplier Quotation, Purchase Invoice, Purchase Order etc.", "description": "All import related fields like currency, conversion rate, import total, import grand total etc are available in Purchase Receipt, Supplier Quotation, Purchase Invoice, Purchase Order etc.",
"fieldname": "fs_imports", "fieldname": "fs_imports",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Imports", "label": "Imports",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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_break1", "fieldname": "column_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 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": "Field available in Delivery Note, Quotation, Sales Invoice, Sales Order", "description": "Field available in Delivery Note, Quotation, Sales Invoice, Sales Order",
"fieldname": "fs_discounts", "fieldname": "fs_discounts",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Sales Discounts", "label": "Sales Discounts",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "Discount Fields will be available in Purchase Order, Purchase Receipt, Purchase Invoice", "description": "Discount Fields will be available in Purchase Order, Purchase Receipt, Purchase Invoice",
"fieldname": "fs_purchase_discounts", "fieldname": "fs_purchase_discounts",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Purchase Discounts", "label": "Purchase Discounts",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "To track any installation or commissioning related work after sales", "description": "To track any installation or commissioning related work after sales",
"fieldname": "fs_after_sales_installations", "fieldname": "fs_after_sales_installations",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "After Sale Installations", "label": "After Sale Installations",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "Available in BOM, Delivery Note, Purchase Invoice, Production Order, Purchase Order, Purchase Receipt, Sales Invoice, Sales Order, Stock Entry, Timesheet", "description": "Available in BOM, Delivery Note, Purchase Invoice, Production Order, Purchase Order, Purchase Receipt, Sales Invoice, Sales Order, Stock Entry, Timesheet",
"fieldname": "fs_projects", "fieldname": "fs_projects",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Projects", "label": "Projects",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "If you have Sales Team and Sale Partners (Channel Partners) they can be tagged and maintain their contribution in the sales activity", "description": "If you have Sales Team and Sale Partners (Channel Partners) they can be tagged and maintain their contribution in the sales activity",
"fieldname": "fs_sales_extras", "fieldname": "fs_sales_extras",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Sales Extras", "label": "Sales Extras",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "accounts", "fieldname": "accounts",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Accounts", "label": "Accounts",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "Check if you need automatic recurring invoices. After submitting any sales invoice, Recurring section will be visible.", "description": "Check if you need automatic recurring invoices. After submitting any sales invoice, Recurring section will be visible.",
"fieldname": "fs_recurring_invoice", "fieldname": "fs_recurring_invoice",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Recurring Invoice", "label": "Recurring Invoice",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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_break2", "fieldname": "column_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 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": "To enable \"Point of Sale\" features", "description": "To enable \"Point of Sale\" features",
"fieldname": "fs_pos", "fieldname": "fs_pos",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Point of Sale", "label": "Point of Sale",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "To enable \"Point of Sale\" view", "description": "To enable \"Point of Sale\" view",
"fieldname": "fs_pos_view", "fieldname": "fs_pos_view",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "POS View", "label": "POS View",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "production", "fieldname": "production",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Manufacturing", "label": "Manufacturing",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "If you involve in manufacturing activity. Enables Item 'Is Manufactured'", "description": "If you involve in manufacturing activity. Enables Item 'Is Manufactured'",
"fieldname": "fs_manufacturing", "fieldname": "fs_manufacturing",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Manufacturing", "label": "Manufacturing",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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_break3", "fieldname": "column_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 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": "If you follow Quality Inspection. Enables Item QA Required and QA No in Purchase Receipt", "description": "If you follow Quality Inspection. Enables Item QA Required and QA No in Purchase Receipt",
"fieldname": "fs_quality", "fieldname": "fs_quality",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Quality", "label": "Quality",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "miscelleneous", "fieldname": "miscelleneous",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Miscelleneous", "label": "Miscelleneous",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "If you have long print formats, this feature can be used to split the page to be printed on multiple pages with all headers and footers on each page", "description": "If you have long print formats, this feature can be used to split the page to be printed on multiple pages with all headers and footers on each page",
"fieldname": "fs_page_break", "fieldname": "fs_page_break",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Page Break", "label": "Page Break",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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_break4", "fieldname": "column_break4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 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": "fs_more_info", "fieldname": "fs_more_info",
"fieldtype": "Check", "fieldtype": "Check",
"label": "More Info", "hidden": 0,
"permlevel": 0 "ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "More Information",
"no_copy": 0,
"permlevel": 0,
"print_hide": 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-glass", "icon": "icon-glass",
"idx": 1, "idx": 1,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 1, "issingle": 1,
"modified": "2015-07-06 06:11:10.534423", "istable": 0,
"modified": "2015-08-27 03:27:35.694800",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Setup", "module": "Setup",
"name": "Features Setup", "name": "Features Setup",
@@ -213,28 +669,46 @@
"owner": "Administrator", "owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1, "create": 1,
"delete": 0,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 0, "report": 0,
"role": "System Manager", "role": "System Manager",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0, "submit": 0,
"write": 1 "write": 1
}, },
{ {
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1, "create": 1,
"delete": 0,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 0, "report": 0,
"role": "Administrator", "role": "Administrator",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0, "submit": 0,
"write": 1 "write": 1
} }
] ],
"read_only": 0,
"read_only_onload": 0
} }

View File

@@ -173,6 +173,8 @@ def install(country=None):
{"doctype": "Offer Term", "offer_term": _("Notice Period")}, {"doctype": "Offer Term", "offer_term": _("Notice Period")},
{"doctype": "Offer Term", "offer_term": _("Incentives")}, {"doctype": "Offer Term", "offer_term": _("Incentives")},
{'doctype': "Print Heading", 'print_heading': _("Credit Note")},
{'doctype': "Print Heading", 'print_heading': _("Debit Note")}
] ]
from erpnext.setup.page.setup_wizard.fixtures import industry_type from erpnext.setup.page.setup_wizard.fixtures import industry_type

View File

@@ -12,7 +12,7 @@ def make_sample_data():
to help the user get started""" to help the user get started"""
selling_items = frappe.get_all("Item", filters = {"is_sales_item": 1}) selling_items = frappe.get_all("Item", filters = {"is_sales_item": 1})
buying_items = frappe.get_all("Item", filters = {"is_sales_item": 0}) buying_items = frappe.get_all("Item", filters = {"is_purchase_item": 1})
if selling_items: if selling_items:
for i in range(3): for i in range(3):

View File

@@ -7,10 +7,12 @@
"custom": 0, "custom": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": "Transaction", "document_type": "Document",
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "delivery_to_section", "fieldname": "delivery_to_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -31,6 +33,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break0", "fieldname": "column_break0",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -50,8 +54,33 @@
"unique": 0, "unique": 0,
"width": "50%" "width": "50%"
}, },
{
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"default": "{customer_name}",
"fieldname": "title",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Title",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "naming_series", "fieldname": "naming_series",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0, "hidden": 0,
@@ -74,6 +103,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "customer", "fieldname": "customer",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -96,6 +127,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "customer", "depends_on": "customer",
"fieldname": "customer_name", "fieldname": "customer_name",
"fieldtype": "Data", "fieldtype": "Data",
@@ -116,6 +149,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "customer", "depends_on": "customer",
"fieldname": "customer_address", "fieldname": "customer_address",
"fieldtype": "Link", "fieldtype": "Link",
@@ -137,6 +172,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "address_display", "fieldname": "address_display",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
@@ -156,6 +193,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "shipping_address_name", "fieldname": "shipping_address_name",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -176,6 +215,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "shipping_address", "fieldname": "shipping_address",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
@@ -195,6 +236,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_display", "fieldname": "contact_display",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
@@ -214,6 +257,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_mobile", "fieldname": "contact_mobile",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
@@ -233,6 +278,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_email", "fieldname": "contact_email",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
@@ -252,6 +299,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break1", "fieldname": "column_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -271,6 +320,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amended_from", "fieldname": "amended_from",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -295,6 +346,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "company", "fieldname": "company",
"fieldtype": "Link", "fieldtype": "Link",
@@ -320,6 +373,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "Today", "default": "Today",
"fieldname": "posting_date", "fieldname": "posting_date",
"fieldtype": "Date", "fieldtype": "Date",
@@ -344,6 +399,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "po_no", "fieldname": "po_no",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -367,6 +424,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.po_no", "depends_on": "eval:doc.po_no",
"fieldname": "po_date", "fieldname": "po_date",
"fieldtype": "Date", "fieldtype": "Date",
@@ -391,6 +450,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "is_return", "fieldname": "is_return",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -411,6 +472,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "is_return", "depends_on": "is_return",
"fieldname": "return_against", "fieldname": "return_against",
"fieldtype": "Link", "fieldtype": "Link",
@@ -433,13 +496,15 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "currency_and_price_list", "fieldname": "currency_and_price_list",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "", "label": "Currency and Price List",
"no_copy": 0, "no_copy": 0,
"options": "icon-tag", "options": "icon-tag",
"permlevel": 0, "permlevel": 0,
@@ -453,6 +518,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "currency", "fieldname": "currency",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -475,6 +542,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Rate at which customer's currency is converted to company's base currency", "description": "Rate at which customer's currency is converted to company's base currency",
"fieldname": "conversion_rate", "fieldname": "conversion_rate",
"fieldtype": "Float", "fieldtype": "Float",
@@ -498,6 +567,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break23", "fieldname": "col_break23",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -516,6 +587,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "selling_price_list", "fieldname": "selling_price_list",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -538,6 +611,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "price_list_currency", "fieldname": "price_list_currency",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -558,6 +633,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Rate at which Price list currency is converted to company's base currency", "description": "Rate at which Price list currency is converted to company's base currency",
"fieldname": "plc_conversion_rate", "fieldname": "plc_conversion_rate",
"fieldtype": "Float", "fieldtype": "Float",
@@ -579,6 +656,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "ignore_pricing_rule", "fieldname": "ignore_pricing_rule",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -598,6 +677,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "items_section", "fieldname": "items_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -619,6 +700,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "items", "fieldname": "items",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0, "hidden": 0,
@@ -641,6 +724,9 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "packed_items",
"fieldname": "packing_list", "fieldname": "packing_list",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -662,6 +748,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "packed_items", "fieldname": "packed_items",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0, "hidden": 0,
@@ -684,6 +772,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "product_bundle_help", "fieldname": "product_bundle_help",
"fieldtype": "HTML", "fieldtype": "HTML",
"hidden": 0, "hidden": 0,
@@ -703,6 +793,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_31", "fieldname": "section_break_31",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -721,6 +813,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_total", "fieldname": "base_total",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -742,6 +836,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_total", "fieldname": "base_net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -766,6 +862,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_33", "fieldname": "column_break_33",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -784,6 +882,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "total", "fieldname": "total",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -805,6 +905,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_total", "fieldname": "net_total",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -825,6 +927,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "taxes_section", "fieldname": "taxes_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -846,6 +950,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "If you have created a standard template in Sales Taxes and Charges Template, select one and click on the button below.", "description": "If you have created a standard template in Sales Taxes and Charges Template, select one and click on the button below.",
"fieldname": "taxes_and_charges", "fieldname": "taxes_and_charges",
"fieldtype": "Link", "fieldtype": "Link",
@@ -869,6 +975,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_39", "fieldname": "column_break_39",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -887,6 +995,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "shipping_rule", "fieldname": "shipping_rule",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -908,6 +1018,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_41", "fieldname": "section_break_41",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -926,6 +1038,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "taxes", "fieldname": "taxes",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0, "hidden": 0,
@@ -948,6 +1062,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "other_charges_calculation", "fieldname": "other_charges_calculation",
"fieldtype": "HTML", "fieldtype": "HTML",
"hidden": 0, "hidden": 0,
@@ -968,6 +1084,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_44", "fieldname": "section_break_44",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -986,6 +1104,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_total_taxes_and_charges", "fieldname": "base_total_taxes_and_charges",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -1010,6 +1130,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_47", "fieldname": "column_break_47",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -1029,6 +1151,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "total_taxes_and_charges", "fieldname": "total_taxes_and_charges",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -1049,12 +1173,16 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "discount_amount",
"fieldname": "section_break_49", "fieldname": "section_break_49",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Additional Discount",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
@@ -1068,6 +1196,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "Grand Total", "default": "Grand Total",
"fieldname": "apply_discount_on", "fieldname": "apply_discount_on",
"fieldtype": "Select", "fieldtype": "Select",
@@ -1080,7 +1210,7 @@
"options": "\nGrand Total\nNet Total", "options": "\nGrand Total\nNet Total",
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
"print_hide": 0, "print_hide": 1,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
@@ -1090,6 +1220,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_51", "fieldname": "column_break_51",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -1108,6 +1240,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "discount_amount", "fieldname": "discount_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -1128,6 +1262,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_discount_amount", "fieldname": "base_discount_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -1149,6 +1285,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "totals", "fieldname": "totals",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -1170,6 +1308,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_grand_total", "fieldname": "base_grand_total",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -1194,6 +1334,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_rounded_total", "fieldname": "base_rounded_total",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -1218,6 +1360,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "In Words will be visible once you save the Delivery Note.", "description": "In Words will be visible once you save the Delivery Note.",
"fieldname": "base_in_words", "fieldname": "base_in_words",
"fieldtype": "Data", "fieldtype": "Data",
@@ -1242,6 +1386,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break3", "fieldname": "column_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -1261,6 +1407,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "grand_total", "fieldname": "grand_total",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -1285,6 +1433,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "rounded_total", "fieldname": "rounded_total",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -1309,6 +1459,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "In Words (Export) will be visible once you save the Delivery Note.", "description": "In Words (Export) will be visible once you save the Delivery Note.",
"fieldname": "in_words", "fieldname": "in_words",
"fieldtype": "Data", "fieldtype": "Data",
@@ -1333,24 +1485,9 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "fold", "bold": 0,
"fieldtype": "Fold", "collapsible": 1,
"hidden": 0, "collapsible_depends_on": "terms",
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "terms_section_break", "fieldname": "terms_section_break",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -1372,6 +1509,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "tc_name", "fieldname": "tc_name",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -1394,6 +1533,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "terms", "fieldname": "terms",
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"hidden": 0, "hidden": 0,
@@ -1415,6 +1556,9 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "transporter_name",
"fieldname": "transporter_info", "fieldname": "transporter_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -1435,6 +1579,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "transporter_name", "fieldname": "transporter_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -1458,6 +1604,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break34", "fieldname": "col_break34",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -1478,7 +1626,9 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"description": "Transporter lorry number", "bold": 0,
"collapsible": 0,
"description": "",
"fieldname": "lr_no", "fieldname": "lr_no",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -1502,8 +1652,10 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "Today", "default": "Today",
"description": "Date on which lorry started from your warehouse", "description": "",
"fieldname": "lr_date", "fieldname": "lr_date",
"fieldtype": "Date", "fieldtype": "Date",
"hidden": 0, "hidden": 0,
@@ -1527,6 +1679,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"depends_on": "customer", "depends_on": "customer",
"fieldname": "contact_info", "fieldname": "contact_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@@ -1534,7 +1688,7 @@
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Contact Info", "label": "Contact Details",
"no_copy": 0, "no_copy": 0,
"options": "icon-bullhorn", "options": "icon-bullhorn",
"permlevel": 0, "permlevel": 0,
@@ -1548,6 +1702,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "territory", "fieldname": "territory",
"fieldtype": "Link", "fieldtype": "Link",
@@ -1569,6 +1725,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "customer_group", "fieldname": "customer_group",
"fieldtype": "Link", "fieldtype": "Link",
@@ -1590,6 +1748,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break21", "fieldname": "col_break21",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -1610,6 +1770,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_person", "fieldname": "contact_person",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -1630,13 +1792,15 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "more_info", "fieldname": "more_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "More Info", "label": "More Information",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "icon-file-text", "options": "icon-file-text",
@@ -1651,6 +1815,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Track this Delivery Note against any Project", "description": "Track this Delivery Note against any Project",
"fieldname": "project_name", "fieldname": "project_name",
"fieldtype": "Link", "fieldtype": "Link",
@@ -1674,6 +1840,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.source == 'Campaign'", "depends_on": "eval:doc.source == 'Campaign'",
"fieldname": "campaign", "fieldname": "campaign",
"fieldtype": "Link", "fieldtype": "Link",
@@ -1697,6 +1865,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "source", "fieldname": "source",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0, "hidden": 0,
@@ -1719,6 +1889,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break5", "fieldname": "column_break5",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -1740,6 +1912,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Time at which items were delivered from warehouse", "description": "Time at which items were delivered from warehouse",
"fieldname": "posting_time", "fieldname": "posting_time",
"fieldtype": "Time", "fieldtype": "Time",
@@ -1764,6 +1938,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "fiscal_year", "fieldname": "fiscal_year",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -1786,8 +1962,32 @@
"unique": 0, "unique": 0,
"width": "150px" "width": "150px"
}, },
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "printing_details",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Printing Details",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "letter_head", "fieldname": "letter_head",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -1810,6 +2010,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "select_print_heading", "fieldname": "select_print_heading",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -1830,8 +2032,31 @@
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_88",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 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,
"unique": 0
},
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "print_without_amount", "fieldname": "print_without_amount",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -1853,12 +2078,15 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "section_break_83", "fieldname": "section_break_83",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Status",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
@@ -1871,6 +2099,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "Draft", "default": "Draft",
"fieldname": "status", "fieldname": "status",
"fieldtype": "Select", "fieldtype": "Select",
@@ -1896,6 +2126,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:!doc.__islocal", "depends_on": "eval:!doc.__islocal",
"description": "% of materials delivered against this Delivery Note", "description": "% of materials delivered against this Delivery Note",
"fieldname": "per_installed", "fieldname": "per_installed",
@@ -1919,6 +2151,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "installation_status", "fieldname": "installation_status",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 1, "hidden": 1,
@@ -1938,6 +2172,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_89", "fieldname": "column_break_89",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -1956,6 +2192,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Required only for sample item.", "description": "Required only for sample item.",
"fieldname": "to_warehouse", "fieldname": "to_warehouse",
"fieldtype": "Link", "fieldtype": "Link",
@@ -1979,6 +2217,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "excise_page", "fieldname": "excise_page",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -2000,6 +2240,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "instructions", "fieldname": "instructions",
"fieldtype": "Text", "fieldtype": "Text",
"hidden": 0, "hidden": 0,
@@ -2021,13 +2263,16 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "total_commission",
"fieldname": "sales_team_section_break", "fieldname": "sales_team_section_break",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Sales Team", "label": "Commission",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "icon-group", "options": "icon-group",
@@ -2042,6 +2287,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "sales_partner", "fieldname": "sales_partner",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -2066,6 +2313,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break7", "fieldname": "column_break7",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -2086,6 +2335,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "commission_rate", "fieldname": "commission_rate",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -2109,6 +2360,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "total_commission", "fieldname": "total_commission",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -2131,12 +2384,16 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"collapsible_depends_on": "sales_team",
"fieldname": "section_break1", "fieldname": "section_break1",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Sales Team",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 1,
@@ -2149,6 +2406,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "sales_team", "fieldname": "sales_team",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0, "hidden": 0,
@@ -2179,7 +2438,7 @@
"is_submittable": 1, "is_submittable": 1,
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"modified": "2015-08-04 11:56:59.782517", "modified": "2015-08-27 03:29:47.032037",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Delivery Note", "name": "Delivery Note",
@@ -2311,5 +2570,5 @@
"search_fields": "status,customer,customer_name, territory,base_grand_total", "search_fields": "status,customer,customer_name, territory,base_grand_total",
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC", "sort_order": "DESC",
"title_field": "customer_name" "title_field": "title"
} }

View File

@@ -47,6 +47,19 @@ class DeliveryNote(SellingController):
'source_field': 'qty', 'source_field': 'qty',
'percent_join_field': 'against_sales_invoice', 'percent_join_field': 'against_sales_invoice',
'overflow_type': 'delivery' 'overflow_type': 'delivery'
},
{
'source_dt': 'Delivery Note Item',
'target_dt': 'Sales Order Item',
'join_field': 'so_detail',
'target_field': 'returned_qty',
'target_parent_dt': 'Sales Order',
# 'target_parent_field': 'per_delivered',
# 'target_ref_field': 'qty',
'source_field': '-1 * qty',
# 'percent_join_field': 'against_sales_order',
# 'overflow_type': 'delivery',
'extra_cond': """ and exists (select name from `tabDelivery Note` where name=`tabDelivery Note Item`.parent and is_return=1)"""
}] }]
def onload(self): def onload(self):
@@ -66,7 +79,7 @@ class DeliveryNote(SellingController):
item_meta = frappe.get_meta("Delivery Note Item") item_meta = frappe.get_meta("Delivery Note Item")
print_hide_fields = { print_hide_fields = {
"parent": ["grand_total", "rounded_total", "in_words", "currency", "net_total"], "parent": ["grand_total", "rounded_total", "in_words", "currency", "total", "taxes"],
"items": ["rate", "amount", "price_list_rate", "discount_percentage"] "items": ["rate", "amount", "price_list_rate", "discount_percentage"]
} }
@@ -83,7 +96,7 @@ class DeliveryNote(SellingController):
def so_required(self): def so_required(self):
"""check in manage account if sales order required or not""" """check in manage account if sales order required or not"""
if not self.is_return and frappe.db.get_value("Selling Settings", None, 'so_required') == 'Yes': if frappe.db.get_value("Selling Settings", None, 'so_required') == 'Yes':
for d in self.get('items'): for d in self.get('items'):
if not d.against_sales_order: if not d.against_sales_order:
frappe.throw(_("Sales Order required for Item {0}").format(d.item_code)) frappe.throw(_("Sales Order required for Item {0}").format(d.item_code))
@@ -118,7 +131,7 @@ class DeliveryNote(SellingController):
}, },
}) })
if cint(frappe.db.get_single_value('Selling Settings', 'maintain_same_sales_rate')): if cint(frappe.db.get_single_value('Selling Settings', 'maintain_same_sales_rate')) and not self.is_return:
self.validate_rate_with_reference_doc([["Sales Order", "sales_order", "so_detail"], self.validate_rate_with_reference_doc([["Sales Order", "sales_order", "so_detail"],
["Sales Invoice", "sales_invoice", "si_detail"]]) ["Sales Invoice", "sales_invoice", "si_detail"]])
@@ -133,6 +146,9 @@ class DeliveryNote(SellingController):
def validate_for_items(self): def validate_for_items(self):
check_list, chk_dupl_itm = [], [] check_list, chk_dupl_itm = [], []
if cint(frappe.db.get_single_value("Selling Settings", "allow_multiple_items")):
return
for d in self.get('items'): for d in self.get('items'):
e = [d.item_code, d.description, d.warehouse, d.against_sales_order or d.against_sales_invoice, d.batch_no or ''] e = [d.item_code, d.description, d.warehouse, d.against_sales_order or d.against_sales_invoice, d.batch_no or '']
f = [d.item_code, d.description, d.against_sales_order or d.against_sales_invoice] f = [d.item_code, d.description, d.against_sales_order or d.against_sales_invoice]
@@ -174,10 +190,10 @@ class DeliveryNote(SellingController):
# Check for Approving Authority # Check for Approving Authority
frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype, self.company, self.base_grand_total, self) frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype, self.company, self.base_grand_total, self)
if not self.is_return: # update delivered qty in sales order
# update delivered qty in sales order self.update_prevdoc_status()
self.update_prevdoc_status()
if not self.is_return:
self.check_credit_limit() self.check_credit_limit()
self.update_stock_ledger() self.update_stock_ledger()
@@ -190,8 +206,7 @@ class DeliveryNote(SellingController):
self.check_stop_sales_order("against_sales_order") self.check_stop_sales_order("against_sales_order")
self.check_next_docstatus() self.check_next_docstatus()
if not self.is_return: self.update_prevdoc_status()
self.update_prevdoc_status()
self.update_stock_ledger() self.update_stock_ledger()
@@ -242,7 +257,6 @@ class DeliveryNote(SellingController):
ps.cancel() ps.cancel()
frappe.msgprint(_("Packing Slip(s) cancelled")) frappe.msgprint(_("Packing Slip(s) cancelled"))
def update_stock_ledger(self): def update_stock_ledger(self):
sl_entries = [] sl_entries = []
for d in self.get_item_list(): for d in self.get_item_list():

View File

@@ -3,7 +3,7 @@ frappe.listview_settings['Delivery Note'] = {
"transporter_name", "grand_total", "is_return"], "transporter_name", "grand_total", "is_return"],
get_indicator: function(doc) { get_indicator: function(doc) {
if(cint(doc.is_return)==1) { if(cint(doc.is_return)==1) {
return [__("Return"), "darkgrey", "is_return,=,1"]; return [__("Return"), "darkgrey", "is_return,=,Yes"];
} }
} }
}; };

View File

@@ -10,6 +10,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "barcode", "fieldname": "barcode",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -29,6 +31,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_code", "fieldname": "item_code",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -53,6 +57,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_name", "fieldname": "item_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -76,6 +82,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break1", "fieldname": "col_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -94,6 +102,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "customer_item_code", "fieldname": "customer_item_code",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -113,12 +123,15 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "section_break_6", "fieldname": "section_break_6",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Description",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
@@ -132,6 +145,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"hidden": 0, "hidden": 0,
@@ -155,6 +170,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_8", "fieldname": "column_break_8",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -174,6 +191,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image", "fieldname": "image",
"fieldtype": "Attach", "fieldtype": "Attach",
"hidden": 1, "hidden": 1,
@@ -194,6 +213,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image_view", "fieldname": "image_view",
"fieldtype": "Image", "fieldtype": "Image",
"hidden": 0, "hidden": 0,
@@ -215,6 +236,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "quantity_and_rate", "fieldname": "quantity_and_rate",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -234,6 +257,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "qty", "fieldname": "qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -257,6 +282,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "price_list_rate", "fieldname": "price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -281,6 +308,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "price_list_rate", "depends_on": "price_list_rate",
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Float", "fieldtype": "Float",
@@ -305,6 +334,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break2", "fieldname": "col_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -323,6 +354,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "stock_uom", "fieldname": "stock_uom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -347,6 +380,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_price_list_rate", "fieldname": "base_price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -371,6 +406,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_1", "fieldname": "section_break_1",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -389,6 +426,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "rate", "fieldname": "rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -413,6 +452,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amount", "fieldname": "amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -437,6 +478,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break3", "fieldname": "col_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -455,6 +498,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_rate", "fieldname": "base_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -479,6 +524,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_amount", "fieldname": "base_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -503,6 +550,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "pricing_rule", "fieldname": "pricing_rule",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -523,6 +572,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_25", "fieldname": "section_break_25",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -542,6 +593,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_rate", "fieldname": "net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -563,6 +616,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_amount", "fieldname": "net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -584,6 +639,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_28", "fieldname": "column_break_28",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -603,6 +660,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_rate", "fieldname": "base_net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -624,6 +683,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_amount", "fieldname": "base_net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -645,6 +706,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "warehouse_and_reference", "fieldname": "warehouse_and_reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -664,6 +727,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "warehouse", "fieldname": "warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -688,6 +753,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "serial_no", "fieldname": "serial_no",
"fieldtype": "Text", "fieldtype": "Text",
"hidden": 0, "hidden": 0,
@@ -709,6 +776,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "batch_no", "fieldname": "batch_no",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -729,8 +798,60 @@
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "actual_qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Available Qty at Warehouse",
"no_copy": 1,
"oldfieldname": "actual_qty",
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 1,
"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,
"depends_on": "batch_no",
"fieldname": "actual_batch_qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Available Batch Qty at Warehouse",
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"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, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "item_group", "fieldname": "item_group",
"fieldtype": "Link", "fieldtype": "Link",
@@ -754,6 +875,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "brand", "fieldname": "brand",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 1,
@@ -778,6 +901,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_tax_rate", "fieldname": "item_tax_rate",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
@@ -799,6 +924,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break4", "fieldname": "col_break4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -815,53 +942,10 @@
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{
"allow_on_submit": 1,
"fieldname": "actual_batch_qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Available Batch Qty at Warehouse",
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"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,
"fieldname": "actual_qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Available Qty at Warehouse",
"no_copy": 1,
"oldfieldname": "actual_qty",
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 1,
"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, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "expense_account", "fieldname": "expense_account",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -883,6 +967,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": ":Company", "default": ":Company",
"fieldname": "cost_center", "fieldname": "cost_center",
"fieldtype": "Link", "fieldtype": "Link",
@@ -905,6 +991,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "against_sales_order", "fieldname": "against_sales_order",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -925,6 +1013,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "against_sales_invoice", "fieldname": "against_sales_invoice",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -945,6 +1035,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "so_detail", "fieldname": "so_detail",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -968,6 +1060,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "si_detail", "fieldname": "si_detail",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -988,6 +1082,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "installed_qty", "fieldname": "installed_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -1011,6 +1107,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "page_break", "fieldname": "page_break",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -1039,7 +1137,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"modified": "2015-08-19 12:46:31.447022", "modified": "2015-08-26 08:33:03.676574",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Delivery Note Item", "name": "Delivery Note Item",

View File

@@ -59,6 +59,10 @@ frappe.ui.form.on("Item", {
erpnext.item.toggle_reqd(frm); erpnext.item.toggle_reqd(frm);
erpnext.item.toggle_attributes(frm); erpnext.item.toggle_attributes(frm);
if (frm.is_new() && frm.doc.is_stock_item) {
frm.fields_dict.inventory.collapse(false);
}
}, },
validate: function(frm){ validate: function(frm){
@@ -91,6 +95,7 @@ frappe.ui.form.on("Item", {
}, },
is_stock_item: function(frm) { is_stock_item: function(frm) {
frm.is_new() && frm.fields_dict.inventory.collapse(!frm.doc.is_stock_item);
erpnext.item.toggle_reqd(frm); erpnext.item.toggle_reqd(frm);
}, },

File diff suppressed because it is too large Load Diff

View File

@@ -269,7 +269,7 @@ class Item(WebsiteGenerator):
frappe.db.set_value("Item", newdn, "last_purchase_rate", last_purchase_rate) frappe.db.set_value("Item", newdn, "last_purchase_rate", last_purchase_rate)
def recalculate_bin_qty(self, newdn): def recalculate_bin_qty(self, newdn):
from erpnext.utilities.repost_stock import repost_stock from erpnext.stock.stock_balance import repost_stock
frappe.db.auto_commit_on_many_writes = 1 frappe.db.auto_commit_on_many_writes = 1
existing_allow_negative_stock = frappe.db.get_value("Stock Settings", None, "allow_negative_stock") existing_allow_negative_stock = frappe.db.get_value("Stock Settings", None, "allow_negative_stock")
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1) frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1)
@@ -513,11 +513,9 @@ def validate_item_variant_attributes(item, args):
filters={"parent": ["in", args.keys()]}): filters={"parent": ["in", args.keys()]}):
(attribute_values.setdefault(t.parent, [])).append(t.attribute_value) (attribute_values.setdefault(t.parent, [])).append(t.attribute_value)
numeric_attributes = frappe._dict((t.name, t) for t in frappe.get_list("Item Attribute", filters={"numeric_values":1, numeric_attributes = frappe._dict((t.attribute, t) for t in \
"name": ["in", args.keys()]}, fields=["name", "from_range", "to_range", "increment"])) 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))
template_item = frappe.get_doc("Item", item)
template_item_attributes = frappe._dict((d.attribute, d) for d in template_item.attributes)
for attribute, value in args.items(): for attribute, value in args.items():
@@ -532,9 +530,16 @@ def validate_item_variant_attributes(item, args):
# defensive validation to prevent ZeroDivisionError # defensive validation to prevent ZeroDivisionError
frappe.throw(_("Increment for Attribute {0} cannot be 0").format(attribute)) frappe.throw(_("Increment for Attribute {0} cannot be 0").format(attribute))
is_in_range = from_range <= flt(value) <= to_range
precision = len(cstr(increment).split(".")[-1].rstrip("0"))
#avoid precision error by rounding the remainder
remainder = flt((flt(value) - from_range) % increment, precision)
if not ( (from_range <= flt(value) <= to_range) and (flt(value) - from_range) % increment == 0 ): is_incremental = remainder==0 or remainder==0 or remainder==increment
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)
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[attribute]: elif value not in attribute_values[attribute]:
frappe.throw(_("Value {0} for Attribute {1} does not exist in the list of valid Item Attribute Values").format( frappe.throw(_("Value {0} for Attribute {1} does not exist in the list of valid Item Attribute Values").format(
@@ -567,7 +572,7 @@ def find_variant(item, args):
for attribute, value in args.items(): for attribute, value in args.items():
for row in variant.attributes: for row in variant.attributes:
if row.attribute==attribute and row.attribute_value==value: if row.attribute==attribute and row.attribute_value== cstr(value):
# this row matches # this row matches
match_count += 1 match_count += 1
break break

View File

@@ -6,9 +6,8 @@ import unittest
import frappe import frappe
from frappe.test_runner import make_test_records from frappe.test_runner import make_test_records
from erpnext.stock.doctype.item.item import (WarehouseNotSet, ItemTemplateCannotHaveStock, create_variant, from erpnext.stock.doctype.item.item import (WarehouseNotSet, create_variant,
ItemVariantExistsError, InvalidItemAttributeValueError) ItemVariantExistsError, InvalidItemAttributeValueError)
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry
test_ignore = ["BOM"] test_ignore = ["BOM"]
test_dependencies = ["Warehouse"] test_dependencies = ["Warehouse"]
@@ -129,8 +128,16 @@ class TestItem(unittest.TestCase):
# make template item # make template item
make_item("_Test Numeric Template Item", { make_item("_Test Numeric Template Item", {
"attributes": [ "attributes": [
{"attribute": "Test Size"}, {
{"attribute": "Test Item Length"} "attribute": "Test Size"
},
{
"attribute": "Test Item Length",
"numeric_values": 1,
"from_range": 0.0,
"to_range": 100.0,
"increment": 0.5
}
], ],
"default_warehouse": "_Test Warehouse - _TC" "default_warehouse": "_Test Warehouse - _TC"
}) })

View File

@@ -10,7 +10,6 @@ class ItemPriceDuplicateItem(frappe.ValidationError): pass
from frappe.model.document import Document from frappe.model.document import Document
class ItemPrice(Document): class ItemPrice(Document):
def validate(self): def validate(self):
self.validate_item() self.validate_item()
self.validate_price_list() self.validate_price_list()

View File

@@ -1,34 +1,110 @@
{ {
"allow_copy": 0,
"allow_import": 1, "allow_import": 1,
"allow_rename": 0,
"autoname": "naming_series:", "autoname": "naming_series:",
"creation": "2013-03-07 14:48:38", "creation": "2013-03-07 14:48:38",
"custom": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"fields": [ "fields": [
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "type_section", "fieldname": "type_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "", "label": "",
"no_copy": 0,
"options": "icon-pushpin", "options": "icon-pushpin",
"permlevel": 0 "permlevel": 0,
"print_hide": 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,
"default": "{material_request_type}",
"fieldname": "title",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Title",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 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": "material_request_type", "fieldname": "material_request_type",
"fieldtype": "Select", "fieldtype": "Select",
"in_list_view": 1, "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Type", "label": "Type",
"no_copy": 0,
"options": "Purchase\nMaterial Transfer\nMaterial Issue", "options": "Purchase\nMaterial Transfer\nMaterial Issue",
"permlevel": 0, "permlevel": 0,
"reqd": 1 "print_hide": 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_2", "fieldname": "column_break_2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 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", "fieldname": "naming_series",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Series", "label": "Series",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "naming_series", "oldfieldname": "naming_series",
@@ -36,12 +112,23 @@
"options": "MREQ-", "options": "MREQ-",
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 1,
"reqd": 1 "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": "amended_from", "fieldname": "amended_from",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1, "ignore_user_permissions": 1,
"in_filter": 0,
"in_list_view": 0,
"label": "Amended From", "label": "Amended From",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "amended_from", "oldfieldname": "amended_from",
@@ -51,97 +138,187 @@
"print_hide": 1, "print_hide": 1,
"print_width": "150px", "print_width": "150px",
"read_only": 1, "read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "150px" "width": "150px"
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "company", "fieldname": "company",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 0,
"label": "Company", "label": "Company",
"no_copy": 0,
"oldfieldname": "company", "oldfieldname": "company",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Company", "options": "Company",
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 1,
"print_width": "150px", "print_width": "150px",
"read_only": 0,
"report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 1, "search_index": 1,
"set_only_once": 0,
"unique": 0,
"width": "150px" "width": "150px"
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "items_section", "fieldname": "items_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "", "label": "",
"no_copy": 0,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "icon-shopping-cart", "options": "icon-shopping-cart",
"permlevel": 0 "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "items", "fieldname": "items",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Items", "label": "Items",
"no_copy": 0, "no_copy": 0,
"oldfieldname": "indent_details", "oldfieldname": "indent_details",
"oldfieldtype": "Table", "oldfieldtype": "Table",
"options": "Material Request Item", "options": "Material Request Item",
"permlevel": 0 "permlevel": 0,
}, "print_hide": 0,
{ "read_only": 0,
"fieldname": "view_details", "report_hide": 0,
"fieldtype": "Fold", "reqd": 0,
"label": "View Details", "search_index": 0,
"permlevel": 0 "set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "more_info", "fieldname": "more_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "More Info", "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "More Information",
"no_copy": 0,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "icon-file-text", "options": "icon-file-text",
"permlevel": 0
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0, "permlevel": 0,
"print_width": "50%", "print_hide": 0,
"width": "50%" "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": "requested_by", "fieldname": "requested_by",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Requested For", "label": "Requested For",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "transaction_date", "fieldname": "transaction_date",
"fieldtype": "Date", "fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 0,
"label": "Transaction Date", "label": "Transaction Date",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "transaction_date", "oldfieldname": "transaction_date",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"print_width": "100px", "print_width": "100px",
"read_only": 0,
"report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 1, "search_index": 1,
"set_only_once": 0,
"unique": 0,
"width": "100px" "width": "100px"
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break2", "fieldname": "column_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"print_width": "50%", "print_width": "50%",
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "50%" "width": "50%"
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "status", "fieldname": "status",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 0, "in_list_view": 0,
"label": "Status", "label": "Status",
@@ -153,75 +330,187 @@
"print_hide": 1, "print_hide": 1,
"print_width": "100px", "print_width": "100px",
"read_only": 1, "read_only": 1,
"report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 1, "search_index": 1,
"set_only_once": 0,
"unique": 0,
"width": "100px" "width": "100px"
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 0,
"fieldname": "letter_head", "bold": 0,
"fieldtype": "Link", "collapsible": 0,
"label": "Letter Head", "description": "",
"oldfieldname": "letter_head",
"oldfieldtype": "Select",
"options": "Letter Head",
"permlevel": 0,
"print_hide": 1
},
{
"allow_on_submit": 1,
"fieldname": "select_print_heading",
"fieldtype": "Link",
"label": "Print Heading",
"options": "Print Heading",
"permlevel": 0,
"print_hide": 1
},
{
"description": "% of materials ordered against this Material Request",
"fieldname": "per_ordered", "fieldname": "per_ordered",
"fieldtype": "Percent", "fieldtype": "Percent",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "% Completed", "label": "% Ordered",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "per_ordered", "oldfieldname": "per_ordered",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 1,
"read_only": 1 "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,
"fieldname": "printing_details",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Printing Details",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 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": "letter_head",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Letter Head",
"no_copy": 0,
"oldfieldname": "letter_head",
"oldfieldtype": "Select",
"options": "Letter Head",
"permlevel": 0,
"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": "select_print_heading",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Print Heading",
"no_copy": 0,
"options": "Print Heading",
"permlevel": 0,
"print_hide": 1,
"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": "terms",
"fieldname": "terms_section_break", "fieldname": "terms_section_break",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Terms and Conditions", "label": "Terms and Conditions",
"no_copy": 0,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "icon-legal", "options": "icon-legal",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "tc_name", "fieldname": "tc_name",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Terms", "label": "Terms",
"no_copy": 0,
"oldfieldname": "tc_name", "oldfieldname": "tc_name",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Terms and Conditions", "options": "Terms and Conditions",
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 1,
"report_hide": 1 "read_only": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "terms", "fieldname": "terms",
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Terms and Conditions Content", "label": "Terms and Conditions Content",
"no_copy": 0,
"oldfieldname": "terms", "oldfieldname": "terms",
"oldfieldtype": "Text Editor", "oldfieldtype": "Text Editor",
"permlevel": 0 "permlevel": 0,
"print_hide": 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-ticket", "icon": "icon-ticket",
"idx": 1, "idx": 1,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1, "is_submittable": 1,
"modified": "2015-07-13 05:28:25.935998", "issingle": 0,
"istable": 0,
"modified": "2015-08-27 03:40:16.238465",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Material Request", "name": "Material Request",
@@ -229,30 +518,40 @@
"permissions": [ "permissions": [
{ {
"amend": 1, "amend": 1,
"apply_user_permissions": 0,
"cancel": 1, "cancel": 1,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Purchase Manager", "role": "Purchase Manager",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 1, "submit": 1,
"write": 1 "write": 1
}, },
{ {
"amend": 1, "amend": 1,
"apply_user_permissions": 0,
"cancel": 1, "cancel": 1,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Stock Manager", "role": "Stock Manager",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 1, "submit": 1,
"write": 1 "write": 1
@@ -264,11 +563,15 @@
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Stock User", "role": "Stock User",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 1, "submit": 1,
"write": 1 "write": 1
@@ -280,19 +583,24 @@
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Purchase User", "role": "Purchase User",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 1, "submit": 1,
"write": 1 "write": 1
} }
], ],
"read_only": 0,
"read_only_onload": 1, "read_only_onload": 1,
"search_fields": "status,transaction_date", "search_fields": "status,transaction_date",
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC", "sort_order": "DESC",
"title_field": "material_request_type" "title_field": "title"
} }

View File

@@ -10,9 +10,11 @@ import frappe
from frappe.utils import cstr, flt, getdate from frappe.utils import cstr, flt, getdate
from frappe import _ from frappe import _
from frappe.model.mapper import get_mapped_doc 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 from erpnext.controllers.buying_controller import BuyingController
form_grid_templates = { form_grid_templates = {
"items": "templates/form_grid/material_request_grid.html" "items": "templates/form_grid/material_request_grid.html"
} }
@@ -136,19 +138,6 @@ class MaterialRequest(BuyingController):
def update_requested_qty(self, mr_item_rows=None): def update_requested_qty(self, mr_item_rows=None):
"""update requested qty (before ordered_qty is updated)""" """update requested qty (before ordered_qty is updated)"""
from erpnext.stock.utils import get_bin
def _update_requested_qty(item_code, warehouse):
requested_qty = frappe.db.sql("""select sum(mr_item.qty - ifnull(mr_item.ordered_qty, 0))
from `tabMaterial Request Item` mr_item, `tabMaterial Request` mr
where mr_item.item_code=%s and mr_item.warehouse=%s
and mr_item.qty > ifnull(mr_item.ordered_qty, 0) and mr_item.parent=mr.name
and mr.status!='Stopped' and mr.docstatus=1""", (item_code, warehouse))
bin_doc = get_bin(item_code, warehouse)
bin_doc.indented_qty = flt(requested_qty[0][0]) if requested_qty else 0
bin_doc.save()
item_wh_list = [] item_wh_list = []
for d in self.get("items"): for d in self.get("items"):
if (not mr_item_rows or d.name in mr_item_rows) and [d.item_code, d.warehouse] not in item_wh_list \ if (not mr_item_rows or d.name in mr_item_rows) and [d.item_code, d.warehouse] not in item_wh_list \
@@ -156,7 +145,9 @@ class MaterialRequest(BuyingController):
item_wh_list.append([d.item_code, d.warehouse]) item_wh_list.append([d.item_code, d.warehouse])
for item_code, warehouse in item_wh_list: for item_code, warehouse in item_wh_list:
_update_requested_qty(item_code, warehouse) update_bin_qty(item_code, warehouse, {
"indented_qty": get_indented_qty(item_code, warehouse)
})
def update_completed_and_requested_qty(stock_entry, method): def update_completed_and_requested_qty(stock_entry, method):
if stock_entry.doctype == "Stock Entry": if stock_entry.doctype == "Stock Entry":
@@ -171,7 +162,8 @@ def update_completed_and_requested_qty(stock_entry, method):
mr_obj = frappe.get_doc("Material Request", mr) mr_obj = frappe.get_doc("Material Request", mr)
if mr_obj.status in ["Stopped", "Cancelled"]: if mr_obj.status in ["Stopped", "Cancelled"]:
frappe.throw(_("Material Request {0} is cancelled or stopped").format(mr), frappe.InvalidStatusError) frappe.throw(_("{0} {1} is cancelled or stopped").format(_("Material Request"), mr),
frappe.InvalidStatusError)
mr_obj.update_completed_qty(mr_item_rows) mr_obj.update_completed_qty(mr_item_rows)
mr_obj.update_requested_qty(mr_item_rows) mr_obj.update_requested_qty(mr_item_rows)

View File

@@ -10,6 +10,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "item_code", "fieldname": "item_code",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -34,6 +36,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break1", "fieldname": "col_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -52,6 +56,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_name", "fieldname": "item_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -75,12 +81,15 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "section_break_4", "fieldname": "section_break_4",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Description",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
@@ -94,6 +103,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"hidden": 0, "hidden": 0,
@@ -117,6 +128,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_6", "fieldname": "column_break_6",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -136,6 +149,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image", "fieldname": "image",
"fieldtype": "Attach", "fieldtype": "Attach",
"hidden": 1, "hidden": 1,
@@ -156,6 +171,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image_view", "fieldname": "image_view",
"fieldtype": "Image", "fieldtype": "Image",
"hidden": 0, "hidden": 0,
@@ -177,6 +194,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "quantity_and_warehouse", "fieldname": "quantity_and_warehouse",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -196,6 +215,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "qty", "fieldname": "qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -219,6 +240,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "uom", "fieldname": "uom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -243,6 +266,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "warehouse", "fieldname": "warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -267,6 +292,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break2", "fieldname": "col_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -285,6 +312,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "schedule_date", "fieldname": "schedule_date",
"fieldtype": "Date", "fieldtype": "Date",
"hidden": 0, "hidden": 0,
@@ -308,13 +337,15 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "more_info", "fieldname": "more_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "More Info", "label": "More Information",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
@@ -327,6 +358,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "item_group", "fieldname": "item_group",
"fieldtype": "Link", "fieldtype": "Link",
@@ -350,6 +383,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "brand", "fieldname": "brand",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -374,6 +409,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "lead_time_date", "fieldname": "lead_time_date",
"fieldtype": "Date", "fieldtype": "Date",
"hidden": 0, "hidden": 0,
@@ -395,6 +432,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "sales_order_no", "fieldname": "sales_order_no",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -415,6 +454,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break3", "fieldname": "col_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -433,6 +474,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "min_order_qty", "fieldname": "min_order_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -456,6 +499,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "projected_qty", "fieldname": "projected_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -479,6 +524,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "ordered_qty", "fieldname": "ordered_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -500,6 +547,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "page_break", "fieldname": "page_break",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -528,7 +577,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"modified": "2015-08-19 12:45:53.311363", "modified": "2015-08-27 03:30:05.501449",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Material Request Item", "name": "Material Request Item",

File diff suppressed because it is too large Load Diff

View File

@@ -29,6 +29,19 @@ class PurchaseReceipt(BuyingController):
'source_field': 'qty', 'source_field': 'qty',
'percent_join_field': 'prevdoc_docname', 'percent_join_field': 'prevdoc_docname',
'overflow_type': 'receipt' 'overflow_type': 'receipt'
},
{
'source_dt': 'Purchase Receipt Item',
'target_dt': 'Purchase Order Item',
'join_field': 'prevdoc_detail_docname',
'target_field': 'returned_qty',
'target_parent_dt': 'Purchase Order',
# 'target_parent_field': 'per_received',
# 'target_ref_field': 'qty',
'source_field': '-1 * qty',
# 'percent_join_field': 'prevdoc_docname',
# 'overflow_type': 'receipt',
'extra_cond': """ and exists (select name from `tabPurchase Receipt` where name=`tabPurchase Receipt Item`.parent and is_return=1)"""
}] }]
def onload(self): def onload(self):
@@ -113,11 +126,11 @@ class PurchaseReceipt(BuyingController):
} }
}) })
if cint(frappe.db.get_single_value('Buying Settings', 'maintain_same_rate')): if cint(frappe.db.get_single_value('Buying Settings', 'maintain_same_rate')) and not self.is_return:
self.validate_rate_with_reference_doc([["Purchase Order", "prevdoc_docname", "prevdoc_detail_docname"]]) self.validate_rate_with_reference_doc([["Purchase Order", "prevdoc_docname", "prevdoc_detail_docname"]])
def po_required(self): def po_required(self):
if not self.is_return and frappe.db.get_value("Buying Settings", None, "po_required") == 'Yes': if frappe.db.get_value("Buying Settings", None, "po_required") == 'Yes':
for d in self.get('items'): for d in self.get('items'):
if not d.prevdoc_docname: if not d.prevdoc_docname:
frappe.throw(_("Purchase Order number required for Item {0}").format(d.item_code)) frappe.throw(_("Purchase Order number required for Item {0}").format(d.item_code))
@@ -170,7 +183,8 @@ class PurchaseReceipt(BuyingController):
po_obj = frappe.get_doc("Purchase Order", po) po_obj = frappe.get_doc("Purchase Order", po)
if po_obj.status in ["Stopped", "Cancelled"]: if po_obj.status in ["Stopped", "Cancelled"]:
frappe.throw(_("Material Request {0} is cancelled or stopped").format(po), frappe.InvalidStatusError) frappe.throw(_("{0} {1} is cancelled or stopped").format(_("Purchase Order"), po),
frappe.InvalidStatusError)
po_obj.update_ordered_qty(po_item_rows) po_obj.update_ordered_qty(po_item_rows)
@@ -221,9 +235,10 @@ class PurchaseReceipt(BuyingController):
# Set status as Submitted # Set status as Submitted
frappe.db.set(self, 'status', 'Submitted') frappe.db.set(self, 'status', 'Submitted')
self.update_prevdoc_status()
self.update_ordered_qty()
if not self.is_return: if not self.is_return:
self.update_prevdoc_status()
self.update_ordered_qty()
purchase_controller.update_last_purchase_rate(self, 1) purchase_controller.update_last_purchase_rate(self, 1)
self.update_stock_ledger() self.update_stock_ledger()
@@ -257,12 +272,11 @@ class PurchaseReceipt(BuyingController):
self.update_stock_ledger() self.update_stock_ledger()
self.update_prevdoc_status()
# Must be called after updating received qty in PO
self.update_ordered_qty()
if not self.is_return: if not self.is_return:
self.update_prevdoc_status()
# Must be called after updating received qty in PO
self.update_ordered_qty()
pc_obj.update_last_purchase_rate(self, 0) pc_obj.update_last_purchase_rate(self, 0)
self.make_gl_entries_on_cancel() self.make_gl_entries_on_cancel()
@@ -339,22 +353,21 @@ class PurchaseReceipt(BuyingController):
}, warehouse_account[self.supplier_warehouse]["currency"])) }, warehouse_account[self.supplier_warehouse]["currency"]))
# divisional loss adjustment # divisional loss adjustment
if not self.get("taxes"): sle_valuation_amount = flt(flt(d.valuation_rate, val_rate_db_precision) * flt(d.qty) * flt(d.conversion_factor),
sle_valuation_amount = flt(flt(d.valuation_rate, val_rate_db_precision) * flt(d.qty) * flt(d.conversion_factor), self.precision("base_net_amount", d))
self.precision("base_net_amount", d))
distributed_amount = flt(flt(d.base_net_amount, self.precision("base_net_amount", d))) + \ distributed_amount = flt(flt(d.base_net_amount, self.precision("base_net_amount", d))) + \
flt(d.landed_cost_voucher_amount) + flt(d.rm_supp_cost) flt(d.landed_cost_voucher_amount) + flt(d.rm_supp_cost)
divisional_loss = flt(distributed_amount - sle_valuation_amount, self.precision("base_net_amount", d)) divisional_loss = flt(distributed_amount - sle_valuation_amount, self.precision("base_net_amount", d))
if divisional_loss: if divisional_loss:
gl_entries.append(self.get_gl_dict({ gl_entries.append(self.get_gl_dict({
"account": stock_rbnb, "account": stock_rbnb,
"against": warehouse_account[d.warehouse]["name"], "against": warehouse_account[d.warehouse]["name"],
"cost_center": d.cost_center, "cost_center": d.cost_center,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"), "remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"debit": divisional_loss "debit": divisional_loss
}, stock_rbnb_currency)) }, stock_rbnb_currency))
elif d.warehouse not in warehouse_with_no_account or \ elif d.warehouse not in warehouse_with_no_account or \
d.rejected_warehouse not in warehouse_with_no_account: d.rejected_warehouse not in warehouse_with_no_account:

View File

@@ -3,7 +3,7 @@ frappe.listview_settings['Purchase Receipt'] = {
"transporter_name", "is_return"], "transporter_name", "is_return"],
get_indicator: function(doc) { get_indicator: function(doc) {
if(cint(doc.is_return)==1) { if(cint(doc.is_return)==1) {
return [__("Return"), "darkgrey", "is_return,=,1"]; return [__("Return"), "darkgrey", "is_return,=,Yes"];
} }
} }
}; };

View File

@@ -10,6 +10,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "barcode", "fieldname": "barcode",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -30,6 +32,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_2", "fieldname": "section_break_2",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -49,6 +53,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "item_code", "fieldname": "item_code",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -73,6 +79,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_2", "fieldname": "column_break_2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -92,6 +100,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_name", "fieldname": "item_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -113,12 +123,15 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "section_break_4", "fieldname": "section_break_4",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Description",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
@@ -132,6 +145,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"hidden": 0, "hidden": 0,
@@ -155,6 +170,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break1", "fieldname": "col_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -173,6 +190,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image", "fieldname": "image",
"fieldtype": "Attach", "fieldtype": "Attach",
"hidden": 1, "hidden": 1,
@@ -193,6 +212,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image_view", "fieldname": "image_view",
"fieldtype": "Image", "fieldtype": "Image",
"hidden": 0, "hidden": 0,
@@ -214,6 +235,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "received_and_accepted", "fieldname": "received_and_accepted",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -233,6 +256,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "received_qty", "fieldname": "received_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -256,6 +281,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "qty", "fieldname": "qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -279,6 +306,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "rejected_qty", "fieldname": "rejected_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -302,6 +331,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break2", "fieldname": "col_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -320,6 +351,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "uom", "fieldname": "uom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -344,6 +377,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "stock_uom", "fieldname": "stock_uom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -368,6 +403,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "conversion_factor", "fieldname": "conversion_factor",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -391,6 +428,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "rate_and_amount", "fieldname": "rate_and_amount",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -410,6 +449,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "price_list_rate", "fieldname": "price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -430,6 +471,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "price_list_rate", "depends_on": "price_list_rate",
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Percent", "fieldtype": "Percent",
@@ -450,6 +493,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break3", "fieldname": "col_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -468,6 +513,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_price_list_rate", "fieldname": "base_price_list_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -488,6 +535,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "sec_break1", "fieldname": "sec_break1",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -506,6 +555,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "rate", "fieldname": "rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -530,6 +581,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amount", "fieldname": "amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -552,6 +605,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break4", "fieldname": "col_break4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -570,6 +625,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_rate", "fieldname": "base_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -594,6 +651,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_amount", "fieldname": "base_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -618,6 +677,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "pricing_rule", "fieldname": "pricing_rule",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -638,6 +699,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_29", "fieldname": "section_break_29",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -657,6 +720,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_rate", "fieldname": "net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -678,6 +743,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "net_amount", "fieldname": "net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -699,6 +766,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_32", "fieldname": "column_break_32",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -718,6 +787,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_rate", "fieldname": "base_net_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -739,6 +810,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_net_amount", "fieldname": "base_net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -760,6 +833,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "warehouse_and_reference", "fieldname": "warehouse_and_reference",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -779,6 +854,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "warehouse", "fieldname": "warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -803,6 +880,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "rejected_warehouse", "fieldname": "rejected_warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -827,6 +906,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "project_name", "fieldname": "project_name",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -847,6 +928,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": ":Company", "default": ":Company",
"depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)",
"fieldname": "cost_center", "fieldname": "cost_center",
@@ -869,6 +952,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "qa_no", "fieldname": "qa_no",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -891,6 +976,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "schedule_date", "fieldname": "schedule_date",
"fieldtype": "Date", "fieldtype": "Date",
"hidden": 0, "hidden": 0,
@@ -912,6 +999,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "stock_qty", "fieldname": "stock_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -935,6 +1024,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "prevdoc_doctype", "fieldname": "prevdoc_doctype",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -956,6 +1047,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "prevdoc_docname", "fieldname": "prevdoc_docname",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -980,6 +1073,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "prevdoc_detail_docname", "fieldname": "prevdoc_detail_docname",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
@@ -1003,6 +1098,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break5", "fieldname": "col_break5",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -1021,6 +1118,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "bom", "fieldname": "bom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -1042,6 +1141,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "serial_no", "fieldname": "serial_no",
"fieldtype": "Text", "fieldtype": "Text",
"hidden": 0, "hidden": 0,
@@ -1063,6 +1164,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "rejected_serial_no", "fieldname": "rejected_serial_no",
"fieldtype": "Text", "fieldtype": "Text",
"hidden": 0, "hidden": 0,
@@ -1082,6 +1185,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "batch_no", "fieldname": "batch_no",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -1104,6 +1209,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "brand", "fieldname": "brand",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 1,
@@ -1126,6 +1233,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "", "description": "",
"fieldname": "item_group", "fieldname": "item_group",
"fieldtype": "Link", "fieldtype": "Link",
@@ -1149,6 +1258,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "rm_supp_cost", "fieldname": "rm_supp_cost",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 1, "hidden": 1,
@@ -1173,6 +1284,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_tax_amount", "fieldname": "item_tax_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 1, "hidden": 1,
@@ -1197,6 +1310,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "landed_cost_voucher_amount", "fieldname": "landed_cost_voucher_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -1216,6 +1331,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "valuation_rate", "fieldname": "valuation_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 1, "hidden": 1,
@@ -1240,6 +1357,8 @@
}, },
{ {
"allow_on_submit": 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", "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", "fieldname": "item_tax_rate",
"fieldtype": "Small Text", "fieldtype": "Small Text",
@@ -1262,6 +1381,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "page_break", "fieldname": "page_break",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
@@ -1290,7 +1411,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"modified": "2015-08-19 12:45:54.507665", "modified": "2015-08-26 12:18:48.903651",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Purchase Receipt Item", "name": "Purchase Receipt Item",

File diff suppressed because it is too large Load Diff

View File

@@ -209,7 +209,7 @@ def validate_serial_no(sle, item_det):
frappe.throw(_("Serial No {0} quantity {1} cannot be a fraction").format(sle.item_code, sle.actual_qty)) frappe.throw(_("Serial No {0} quantity {1} cannot be a fraction").format(sle.item_code, sle.actual_qty))
if len(serial_nos) and len(serial_nos) != abs(cint(sle.actual_qty)): if len(serial_nos) and len(serial_nos) != abs(cint(sle.actual_qty)):
frappe.throw(_("{0} Serial Numbers required for Item {0}. Only {0} provided.").format(sle.actual_qty, sle.item_code, len(serial_nos)), frappe.throw(_("{0} Serial Numbers required for Item {1}. You have provided {2}.").format(sle.actual_qty, sle.item_code, len(serial_nos)),
SerialNoQtyError) SerialNoQtyError)
if len(serial_nos) != len(set(serial_nos)): if len(serial_nos) != len(set(serial_nos)):

View File

@@ -10,6 +10,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "items_section", "fieldname": "items_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -29,28 +31,32 @@
"unique": 0 "unique": 0
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 1,
"fieldname": "col1", "bold": 0,
"fieldtype": "Column Break", "collapsible": 0,
"hidden": 0, "default": "{purpose}",
"fieldname": "title",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Title",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0, "permlevel": 0,
"precision": "",
"print_hide": 0, "print_hide": 0,
"print_width": "50%",
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0, "set_only_once": 0,
"unique": 0, "unique": 0
"width": "50%"
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "naming_series", "fieldname": "naming_series",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0, "hidden": 0,
@@ -73,6 +79,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "Material Issue", "default": "Material Issue",
"fieldname": "purpose", "fieldname": "purpose",
"fieldtype": "Select", "fieldtype": "Select",
@@ -96,6 +104,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:in_list([\"Material Transfer for Manufacture\", \"Manufacture\"], doc.purpose)", "depends_on": "eval:in_list([\"Material Transfer for Manufacture\", \"Manufacture\"], doc.purpose)",
"fieldname": "production_order", "fieldname": "production_order",
"fieldtype": "Link", "fieldtype": "Link",
@@ -119,6 +129,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.purpose==\"Subcontract\"", "depends_on": "eval:doc.purpose==\"Subcontract\"",
"fieldname": "purchase_order", "fieldname": "purchase_order",
"fieldtype": "Link", "fieldtype": "Link",
@@ -141,6 +153,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.purpose==\"Sales Return\"", "depends_on": "eval:doc.purpose==\"Sales Return\"",
"fieldname": "delivery_note_no", "fieldname": "delivery_note_no",
"fieldtype": "Link", "fieldtype": "Link",
@@ -164,6 +178,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.purpose==\"Sales Return\"", "depends_on": "eval:doc.purpose==\"Sales Return\"",
"fieldname": "sales_invoice_no", "fieldname": "sales_invoice_no",
"fieldtype": "Link", "fieldtype": "Link",
@@ -185,6 +201,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.purpose==\"Purchase Return\"", "depends_on": "eval:doc.purpose==\"Purchase Return\"",
"fieldname": "purchase_receipt_no", "fieldname": "purchase_receipt_no",
"fieldtype": "Link", "fieldtype": "Link",
@@ -208,6 +226,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:in_list([\"Material Issue\", \"Material Transfer\", \"Manufacture\", \"Repack\", \t\t\t\t\t\"Subcontract\", \"Material Transfer for Manufacture\"], doc.purpose)", "depends_on": "eval:in_list([\"Material Issue\", \"Material Transfer\", \"Manufacture\", \"Repack\", \t\t\t\t\t\"Subcontract\", \"Material Transfer for Manufacture\"], doc.purpose)",
"fieldname": "from_bom", "fieldname": "from_bom",
"fieldtype": "Check", "fieldtype": "Check",
@@ -229,6 +249,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col2", "fieldname": "col2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -250,6 +272,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "Today", "default": "Today",
"fieldname": "posting_date", "fieldname": "posting_date",
"fieldtype": "Date", "fieldtype": "Date",
@@ -272,6 +296,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "posting_time", "fieldname": "posting_time",
"fieldtype": "Time", "fieldtype": "Time",
"hidden": 0, "hidden": 0,
@@ -293,6 +319,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval: doc.from_bom && (doc.purpose!==\"Sales Return\" && doc.purpose!==\"Purchase Return\")", "depends_on": "eval: doc.from_bom && (doc.purpose!==\"Sales Return\" && doc.purpose!==\"Purchase Return\")",
"fieldname": "sb1", "fieldname": "sb1",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@@ -313,6 +341,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "from_bom", "depends_on": "from_bom",
"fieldname": "bom_no", "fieldname": "bom_no",
"fieldtype": "Link", "fieldtype": "Link",
@@ -334,6 +364,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "from_bom", "depends_on": "from_bom",
"description": "As per Stock UOM", "description": "As per Stock UOM",
"fieldname": "fg_completed_qty", "fieldname": "fg_completed_qty",
@@ -357,6 +389,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "cb1", "fieldname": "cb1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -375,6 +409,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "1", "default": "1",
"depends_on": "from_bom", "depends_on": "from_bom",
"description": "Including items for sub assemblies", "description": "Including items for sub assemblies",
@@ -397,6 +433,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "from_bom", "depends_on": "from_bom",
"fieldname": "get_items", "fieldname": "get_items",
"fieldtype": "Button", "fieldtype": "Button",
@@ -418,6 +456,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_12", "fieldname": "section_break_12",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -437,6 +477,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "from_warehouse", "fieldname": "from_warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -459,6 +501,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "cb0", "fieldname": "cb0",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -477,6 +521,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "to_warehouse", "fieldname": "to_warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -499,6 +545,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "sb0", "fieldname": "sb0",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -518,6 +566,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "items", "fieldname": "items",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0, "hidden": 0,
@@ -540,14 +590,16 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"description": "Get valuation rate and available stock at source/target warehouse on mentioned posting date-time. If serialized item, please press this button after entering serial nos.", "bold": 0,
"collapsible": 0,
"description": "",
"fieldname": "get_stock_and_rate", "fieldname": "get_stock_and_rate",
"fieldtype": "Button", "fieldtype": "Button",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Get Stock and Rate", "label": "Update Rate and Availability",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Button", "oldfieldtype": "Button",
"options": "get_stock_and_rate", "options": "get_stock_and_rate",
@@ -562,6 +614,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_19", "fieldname": "section_break_19",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -581,6 +635,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "total_incoming_value", "fieldname": "total_incoming_value",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -602,6 +658,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_22", "fieldname": "column_break_22",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -621,6 +679,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "total_outgoing_value", "fieldname": "total_outgoing_value",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -642,6 +702,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "value_difference", "fieldname": "value_difference",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -663,6 +725,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "This will override Difference Account in Item", "description": "This will override Difference Account in Item",
"fieldname": "difference_account", "fieldname": "difference_account",
"fieldtype": "Link", "fieldtype": "Link",
@@ -685,6 +749,9 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "total_additional_costs",
"fieldname": "additional_costs_section", "fieldname": "additional_costs_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -705,6 +772,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "additional_costs", "fieldname": "additional_costs",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0, "hidden": 0,
@@ -726,6 +795,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "total_additional_costs", "fieldname": "total_additional_costs",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -747,24 +818,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "fold", "bold": 0,
"fieldtype": "Fold", "collapsible": 1,
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"depends_on": "eval: in_list([\"Sales Return\", \"Purchase Return\", \"Subcontract\"], doc.purpose)", "depends_on": "eval: in_list([\"Sales Return\", \"Purchase Return\", \"Subcontract\"], doc.purpose)",
"fieldname": "contact_section", "fieldname": "contact_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@@ -772,7 +827,7 @@
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "", "label": "Customer or Supplier Details",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
@@ -785,6 +840,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Subcontract\"", "depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Subcontract\"",
"fieldname": "supplier", "fieldname": "supplier",
"fieldtype": "Link", "fieldtype": "Link",
@@ -808,6 +865,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Subcontract\"", "depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Subcontract\"",
"fieldname": "supplier_name", "fieldname": "supplier_name",
"fieldtype": "Data", "fieldtype": "Data",
@@ -830,6 +889,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Subcontract\"", "depends_on": "eval:doc.purpose==\"Purchase Return\" || doc.purpose==\"Subcontract\"",
"fieldname": "supplier_address", "fieldname": "supplier_address",
"fieldtype": "Small Text", "fieldtype": "Small Text",
@@ -852,6 +913,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_39", "fieldname": "column_break_39",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -871,6 +934,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.purpose==\"Sales Return\"", "depends_on": "eval:doc.purpose==\"Sales Return\"",
"fieldname": "customer", "fieldname": "customer",
"fieldtype": "Link", "fieldtype": "Link",
@@ -894,6 +959,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.purpose==\"Sales Return\"", "depends_on": "eval:doc.purpose==\"Sales Return\"",
"fieldname": "customer_name", "fieldname": "customer_name",
"fieldtype": "Data", "fieldtype": "Data",
@@ -916,6 +983,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.purpose==\"Sales Return\"", "depends_on": "eval:doc.purpose==\"Sales Return\"",
"fieldname": "customer_address", "fieldname": "customer_address",
"fieldtype": "Small Text", "fieldtype": "Small Text",
@@ -938,16 +1007,18 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "more_info", "bold": 0,
"collapsible": 1,
"fieldname": "printing_settings",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "", "label": "Printing Settings",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Section Break",
"permlevel": 0, "permlevel": 0,
"precision": "",
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
@@ -956,133 +1027,10 @@
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{
"allow_on_submit": 0,
"fieldname": "project_name",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Project Name",
"no_copy": 0,
"oldfieldname": "project_name",
"oldfieldtype": "Link",
"options": "Project",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "remarks",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Remarks",
"no_copy": 1,
"oldfieldname": "remarks",
"oldfieldtype": "Text",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "col5",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_width": "50%",
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "50%"
},
{
"allow_on_submit": 0,
"fieldname": "total_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Total Amount",
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Company",
"no_copy": 0,
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "fiscal_year",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Fiscal Year",
"no_copy": 0,
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "select_print_heading", "fieldname": "select_print_heading",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -1105,6 +1053,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "letter_head", "fieldname": "letter_head",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -1126,6 +1076,167 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "more_info",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "More Information",
"no_copy": 0,
"oldfieldtype": "Section Break",
"permlevel": 0,
"print_hide": 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",
"no_copy": 0,
"oldfieldname": "project_name",
"oldfieldtype": "Link",
"options": "Project",
"permlevel": 0,
"print_hide": 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": "remarks",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Remarks",
"no_copy": 1,
"oldfieldname": "remarks",
"oldfieldtype": "Text",
"permlevel": 0,
"print_hide": 1,
"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": "col5",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_width": "50%",
"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,
"fieldname": "total_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Total Amount",
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 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": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Company",
"no_copy": 0,
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"permlevel": 0,
"print_hide": 1,
"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": "fiscal_year",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Fiscal Year",
"no_copy": 0,
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 1,
"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": "amended_from", "fieldname": "amended_from",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -1148,6 +1259,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "credit_note", "fieldname": "credit_note",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 1,
@@ -1178,7 +1291,7 @@
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"max_attachments": 0, "max_attachments": 0,
"modified": "2015-08-12 08:51:07.002600", "modified": "2015-08-27 03:30:35.994097",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Stock Entry", "name": "Stock Entry",
@@ -1270,5 +1383,5 @@
"search_fields": "posting_date, from_warehouse, to_warehouse, purpose, remarks", "search_fields": "posting_date, from_warehouse, to_warehouse, purpose, remarks",
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC", "sort_order": "DESC",
"title_field": "purpose" "title_field": "title"
} }

View File

@@ -10,6 +10,8 @@
"fields": [ "fields": [
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "barcode", "fieldname": "barcode",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -30,6 +32,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_2", "fieldname": "section_break_2",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -49,6 +53,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "s_warehouse", "fieldname": "s_warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -71,6 +77,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break1", "fieldname": "col_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -89,6 +97,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "t_warehouse", "fieldname": "t_warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -111,6 +121,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "sec_break1", "fieldname": "sec_break1",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -129,6 +141,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "item_code", "fieldname": "item_code",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -151,6 +165,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break2", "fieldname": "col_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -169,46 +185,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "qty", "bold": 0,
"fieldtype": "Float", "collapsible": 0,
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Qty",
"no_copy": 0,
"oldfieldname": "qty",
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "section_break_8",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 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,
"unique": 0
},
{
"allow_on_submit": 0,
"fieldname": "item_name", "fieldname": "item_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@@ -228,6 +206,30 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "section_break_8",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Description",
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 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", "fieldname": "description",
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"hidden": 0, "hidden": 0,
@@ -251,6 +253,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_10", "fieldname": "column_break_10",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -270,6 +274,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image", "fieldname": "image",
"fieldtype": "Attach", "fieldtype": "Attach",
"hidden": 1, "hidden": 1,
@@ -290,6 +296,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image_view", "fieldname": "image_view",
"fieldtype": "Image", "fieldtype": "Image",
"hidden": 0, "hidden": 0,
@@ -311,6 +319,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "quantity_and_rate", "fieldname": "quantity_and_rate",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -330,12 +340,37 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Qty",
"no_copy": 0,
"oldfieldname": "qty",
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 0,
"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": "basic_rate", "fieldname": "basic_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 0,
"label": "Basic Rate (as per Stock UOM)", "label": "Basic Rate (as per Stock UOM)",
"no_copy": 0, "no_copy": 0,
"oldfieldname": "incoming_rate", "oldfieldname": "incoming_rate",
@@ -352,6 +387,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "basic_amount", "fieldname": "basic_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -373,6 +410,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "additional_cost", "fieldname": "additional_cost",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -394,6 +433,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amount", "fieldname": "amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -416,6 +457,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "valuation_rate", "fieldname": "valuation_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
@@ -437,6 +480,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break3", "fieldname": "col_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -455,6 +500,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "uom", "fieldname": "uom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -477,6 +524,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "conversion_factor", "fieldname": "conversion_factor",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -498,6 +547,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "stock_uom", "fieldname": "stock_uom",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -520,6 +571,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "transfer_qty", "fieldname": "transfer_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -541,6 +594,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "serial_no_batch", "fieldname": "serial_no_batch",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -560,6 +615,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "serial_no", "fieldname": "serial_no",
"fieldtype": "Text", "fieldtype": "Text",
"hidden": 0, "hidden": 0,
@@ -581,6 +638,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break4", "fieldname": "col_break4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -599,6 +658,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "batch_no", "fieldname": "batch_no",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
@@ -621,6 +682,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "accounting", "fieldname": "accounting",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
@@ -640,6 +703,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)",
"fieldname": "expense_account", "fieldname": "expense_account",
"fieldtype": "Link", "fieldtype": "Link",
@@ -661,6 +726,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break5", "fieldname": "col_break5",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -679,6 +746,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": ":Company", "default": ":Company",
"depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)",
"fieldname": "cost_center", "fieldname": "cost_center",
@@ -701,13 +770,15 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "more_info", "fieldname": "more_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "More Info", "label": "More Information",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
@@ -720,6 +791,8 @@
}, },
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"fieldname": "actual_qty", "fieldname": "actual_qty",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
@@ -741,6 +814,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "BOM No. for a Finished Good Item", "description": "BOM No. for a Finished Good Item",
"fieldname": "bom_no", "fieldname": "bom_no",
"fieldtype": "Link", "fieldtype": "Link",
@@ -762,6 +837,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break6", "fieldname": "col_break6",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
@@ -780,6 +857,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Material Request used to make this Stock Entry", "description": "Material Request used to make this Stock Entry",
"fieldname": "material_request", "fieldname": "material_request",
"fieldtype": "Link", "fieldtype": "Link",
@@ -801,6 +880,8 @@
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "material_request_item", "fieldname": "material_request_item",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 1,
@@ -828,7 +909,7 @@
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"modified": "2015-08-19 12:45:55.315363", "modified": "2015-08-27 03:30:49.875635",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Stock Entry Detail", "name": "Stock Entry Detail",

View File

@@ -88,9 +88,12 @@ def update_stock_ledger_entry(item_code, new_stock_uom, conversion_factor):
if flt(conversion_factor) != flt(1): if flt(conversion_factor) != flt(1):
frappe.db.sql("""update `tabStock Ledger Entry` frappe.db.sql("""update `tabStock Ledger Entry`
set stock_uom = %s, actual_qty = ifnull(actual_qty,0) * %s set
stock_uom = %s,
actual_qty = ifnull(actual_qty,0) * %s,
qty_after_transaction = ifnull(qty_after_transaction, 0) * %s
where item_code = %s""", where item_code = %s""",
(new_stock_uom, conversion_factor, item_code)) (new_stock_uom, conversion_factor, conversion_factor, item_code))
else: else:
frappe.db.sql("""update `tabStock Ledger Entry` set stock_uom=%s frappe.db.sql("""update `tabStock Ledger Entry` set stock_uom=%s
where item_code=%s""", (new_stock_uom, item_code)) where item_code=%s""", (new_stock_uom, item_code))

View File

@@ -140,7 +140,7 @@ class Warehouse(Document):
self.recalculate_bin_qty(newdn) self.recalculate_bin_qty(newdn)
def recalculate_bin_qty(self, newdn): def recalculate_bin_qty(self, newdn):
from erpnext.utilities.repost_stock import repost_stock from erpnext.stock.stock_balance import repost_stock
frappe.db.auto_commit_on_many_writes = 1 frappe.db.auto_commit_on_many_writes = 1
existing_allow_negative_stock = frappe.db.get_value("Stock Settings", None, "allow_negative_stock") existing_allow_negative_stock = frappe.db.get_value("Stock Settings", None, "allow_negative_stock")
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1) frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1)

View File

@@ -257,6 +257,10 @@ def validate_price_list(args):
def validate_conversion_rate(args, meta): def validate_conversion_rate(args, meta):
from erpnext.controllers.accounts_controller import validate_conversion_rate from erpnext.controllers.accounts_controller import validate_conversion_rate
if (not args.conversion_rate
and args.currency==frappe.db.get_value("Company", args.company, "default_currency")):
args.conversion_rate = 1.0
# validate currency conversion rate # validate currency conversion rate
validate_conversion_rate(args.currency, args.conversion_rate, validate_conversion_rate(args.currency, args.conversion_rate,
meta.get_label("conversion_rate"), args.company) meta.get_label("conversion_rate"), args.company)

View File

@@ -1,197 +1,494 @@
{ {
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "MV.#####", "autoname": "MV.#####",
"creation": "2013-01-10 16:34:31", "creation": "2013-01-10 16:34:31",
"custom": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"fields": [ "fields": [
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "customer_details", "fieldname": "customer_details",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "", "label": "",
"no_copy": 0,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "icon-user", "options": "icon-user",
"permlevel": 0 "permlevel": 0,
"print_hide": 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_break0", "fieldname": "column_break0",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "customer", "fieldname": "customer",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 0,
"label": "Customer", "label": "Customer",
"no_copy": 0,
"oldfieldname": "customer", "oldfieldname": "customer",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Customer", "options": "Customer",
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 0 "search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "customer_name", "fieldname": "customer_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Customer Name", "label": "Customer Name",
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"read_only": 1 "print_hide": 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": "address_display", "fieldname": "address_display",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Address", "label": "Address",
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"read_only": 1 "print_hide": 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": "contact_display", "fieldname": "contact_display",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact", "label": "Contact",
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"read_only": 1 "print_hide": 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": "contact_mobile", "fieldname": "contact_mobile",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Mobile No", "label": "Mobile No",
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"read_only": 1 "print_hide": 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": "contact_email", "fieldname": "contact_email",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Email", "label": "Contact Email",
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"read_only": 1 "print_hide": 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_break1", "fieldname": "column_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "50%" "width": "50%"
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "Today", "default": "Today",
"fieldname": "mntc_date", "fieldname": "mntc_date",
"fieldtype": "Date", "fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Maintenance Date", "label": "Maintenance Date",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "mntc_date", "oldfieldname": "mntc_date",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"permlevel": 0, "permlevel": 0,
"reqd": 1 "print_hide": 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": "mntc_time", "fieldname": "mntc_time",
"fieldtype": "Time", "fieldtype": "Time",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Maintenance Time", "label": "Maintenance Time",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "mntc_time", "oldfieldname": "mntc_time",
"oldfieldtype": "Time", "oldfieldtype": "Time",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "maintenance_details", "fieldname": "maintenance_details",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "", "label": "",
"no_copy": 0,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "icon-wrench", "options": "icon-wrench",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "completion_status", "fieldname": "completion_status",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Completion Status", "label": "Completion Status",
"no_copy": 0,
"oldfieldname": "completion_status", "oldfieldname": "completion_status",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "\nPartially Completed\nFully Completed", "options": "\nPartially Completed\nFully Completed",
"permlevel": 0, "permlevel": 0,
"reqd": 1 "print_hide": 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_14", "fieldname": "column_break_14",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 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": "Unscheduled", "default": "Unscheduled",
"fieldname": "maintenance_type", "fieldname": "maintenance_type",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 1, "in_list_view": 1,
"label": "Maintenance Type", "label": "Maintenance Type",
"no_copy": 0,
"oldfieldname": "maintenance_type", "oldfieldname": "maintenance_type",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "\nScheduled\nUnscheduled\nBreakdown", "options": "\nScheduled\nUnscheduled\nBreakdown",
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 0 "search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break0", "fieldname": "section_break0",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "icon-wrench", "options": "icon-wrench",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "purposes", "fieldname": "purposes",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Purposes", "label": "Purposes",
"no_copy": 0,
"oldfieldname": "maintenance_visit_details", "oldfieldname": "maintenance_visit_details",
"oldfieldtype": "Table", "oldfieldtype": "Table",
"options": "Maintenance Visit Purpose", "options": "Maintenance Visit Purpose",
"permlevel": 0, "permlevel": 0,
"reqd": 1 "print_hide": 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": "more_info", "fieldname": "more_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "More Info", "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "More Information",
"no_copy": 0,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"options": "icon-file-text", "options": "icon-file-text",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "customer_feedback", "fieldname": "customer_feedback",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Customer Feedback", "label": "Customer Feedback",
"no_copy": 0,
"oldfieldname": "customer_feedback", "oldfieldname": "customer_feedback",
"oldfieldtype": "Small Text", "oldfieldtype": "Small Text",
"permlevel": 0 "permlevel": 0,
"print_hide": 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", "fieldname": "col_break3",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 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", "default": "Draft",
"fieldname": "status", "fieldname": "status",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Status", "label": "Status",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "status", "oldfieldname": "status",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"options": "\nDraft\nCancelled\nSubmitted", "options": "\nDraft\nCancelled\nSubmitted",
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"read_only": 1, "read_only": 1,
"reqd": 1 "report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amended_from", "fieldname": "amended_from",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1, "ignore_user_permissions": 1,
"in_filter": 0,
"in_list_view": 0,
"label": "Amended From", "label": "Amended From",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "amended_from", "oldfieldname": "amended_from",
@@ -200,86 +497,205 @@
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 1,
"read_only": 1, "read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "150px" "width": "150px"
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "company", "fieldname": "company",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 0,
"label": "Company", "label": "Company",
"no_copy": 0,
"oldfieldname": "company", "oldfieldname": "company",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "Company", "options": "Company",
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 0 "search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "fiscal_year", "fieldname": "fiscal_year",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 0,
"label": "Fiscal Year", "label": "Fiscal Year",
"no_copy": 0,
"oldfieldname": "fiscal_year", "oldfieldname": "fiscal_year",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "Fiscal Year", "options": "Fiscal Year",
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 0 "search_index": 0,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "customer", "depends_on": "customer",
"fieldname": "contact_info_section", "fieldname": "contact_info_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Info", "label": "Contact Info",
"no_copy": 0,
"options": "icon-bullhorn", "options": "icon-bullhorn",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "customer_address", "fieldname": "customer_address",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Customer Address", "label": "Customer Address",
"no_copy": 0,
"options": "Address", "options": "Address",
"permlevel": 0, "permlevel": 0,
"print_hide": 1 "print_hide": 1,
"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": "contact_person", "fieldname": "contact_person",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Person", "label": "Contact Person",
"no_copy": 0,
"options": "Contact", "options": "Contact",
"permlevel": 0, "permlevel": 0,
"print_hide": 1 "print_hide": 1,
"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_break4", "fieldname": "col_break4",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 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": "", "description": "",
"fieldname": "territory", "fieldname": "territory",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Territory", "label": "Territory",
"no_copy": 0,
"options": "Territory", "options": "Territory",
"permlevel": 0, "permlevel": 0,
"print_hide": 1 "print_hide": 1,
"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": "", "description": "",
"fieldname": "customer_group", "fieldname": "customer_group",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Customer Group", "label": "Customer Group",
"no_copy": 0,
"options": "Customer Group", "options": "Customer Group",
"permlevel": 0, "permlevel": 0,
"print_hide": 1 "print_hide": 1,
"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-file-text", "icon": "icon-file-text",
"idx": 1, "idx": 1,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1, "is_submittable": 1,
"modified": "2015-02-20 05:08:31.875844", "issingle": 0,
"istable": 0,
"modified": "2015-08-27 03:33:20.922744",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Support", "module": "Support",
"name": "Maintenance Visit", "name": "Maintenance Visit",
@@ -292,16 +708,22 @@
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Maintenance User", "role": "Maintenance User",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 1, "submit": 1,
"write": 1 "write": 1
} }
], ],
"read_only": 0,
"read_only_onload": 0,
"search_fields": "status,maintenance_type,customer,customer_name,mntc_date,company,fiscal_year", "search_fields": "status,maintenance_type,customer,customer_name,mntc_date,company,fiscal_year",
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC", "sort_order": "DESC",

File diff suppressed because it is too large Load Diff

View File

@@ -49,7 +49,8 @@
{% } %} {% } %}
{% if(doc.item_name != doc.item_code && in_list(visible_column_fieldnames, "item_name")) { %} {% if(doc.item_name != doc.item_code && in_list(visible_column_fieldnames, "item_name")) { %}
<br>{%= doc.item_name %}{% } %} {% if (doc.item_code) { %}<br>{% } %}
{%= doc.item_name %}{% } %}
{% include "templates/form_grid/includes/visible_cols.html" %} {% include "templates/form_grid/includes/visible_cols.html" %}
</div> </div>

View File

@@ -21,3 +21,5 @@ def send_message(subject="Website Query", message="", sender="", status="Open"):
"sent_or_received": "Received" "sent_or_received": "Received"
}) })
comm.insert(ignore_permissions=True) comm.insert(ignore_permissions=True)
return "okay"

View File

@@ -1,354 +1,723 @@
{ {
"allow_copy": 0,
"allow_import": 1, "allow_import": 1,
"allow_rename": 1, "allow_rename": 1,
"creation": "2013-01-10 16:34:32", "creation": "2013-01-10 16:34:32",
"custom": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": "Master", "document_type": "Setup",
"fields": [ "fields": [
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "contact_section", "fieldname": "contact_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "", "label": "",
"no_copy": 0,
"options": "icon-user", "options": "icon-user",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "first_name", "fieldname": "first_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "First Name", "label": "First Name",
"no_copy": 0,
"oldfieldname": "first_name", "oldfieldname": "first_name",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0, "permlevel": 0,
"reqd": 1 "print_hide": 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": "last_name", "fieldname": "last_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Last Name", "label": "Last Name",
"no_copy": 0,
"oldfieldname": "last_name", "oldfieldname": "last_name",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "cb00", "fieldname": "cb00",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 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": "Passive", "default": "Passive",
"fieldname": "status", "fieldname": "status",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Status", "label": "Status",
"no_copy": 0,
"options": "Passive\nOpen\nReplied", "options": "Passive\nOpen\nReplied",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "email_id", "fieldname": "email_id",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Email Id", "label": "Email Id",
"no_copy": 0,
"oldfieldname": "email_id", "oldfieldname": "email_id",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"options": "Email", "options": "Email",
"permlevel": 0, "permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 1 "search_index": 1,
"set_only_once": 0,
"unique": 0
}, },
{ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "phone", "fieldname": "phone",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Phone", "label": "Phone",
"no_copy": 0,
"oldfieldname": "contact_no", "oldfieldname": "contact_no",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0, "permlevel": 0,
"reqd": 0 "print_hide": 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": "contact_details", "fieldname": "contact_details",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Reference", "label": "Reference",
"no_copy": 0,
"options": "icon-pushpin", "options": "icon-pushpin",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "", "depends_on": "",
"fieldname": "customer", "fieldname": "customer",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Customer", "label": "Customer",
"no_copy": 0,
"oldfieldname": "customer", "oldfieldname": "customer",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Customer", "options": "Customer",
"permlevel": 0, "permlevel": 0,
"print_hide": 0 "print_hide": 0,
}, "read_only": 0,
{ "report_hide": 0,
"depends_on": "", "reqd": 0,
"fieldname": "customer_name", "search_index": 0,
"fieldtype": "Data", "set_only_once": 0,
"in_list_view": 0, "unique": 0
"label": "Customer Name",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "column_break1",
"fieldtype": "Column Break",
"oldfieldtype": "Column Break",
"permlevel": 0,
"width": "50%"
},
{
"depends_on": "",
"fieldname": "supplier",
"fieldtype": "Link",
"label": "Supplier",
"options": "Supplier",
"permlevel": 0
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "",
"fieldname": "customer_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Customer Name",
"no_copy": 0,
"permlevel": 0,
"print_hide": 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_break1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 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": "",
"fieldname": "supplier",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Supplier",
"no_copy": 0,
"options": "Supplier",
"permlevel": 0,
"print_hide": 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": "", "depends_on": "",
"fieldname": "supplier_name", "fieldname": "supplier_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Supplier Name", "label": "Supplier Name",
"no_copy": 0,
"permlevel": 0, "permlevel": 0,
"read_only": 1 "print_hide": 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": "", "depends_on": "",
"fieldname": "sales_partner", "fieldname": "sales_partner",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Sales Partner", "label": "Sales Partner",
"no_copy": 0,
"options": "Sales Partner", "options": "Sales Partner",
"permlevel": 0 "permlevel": 0,
"print_hide": 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", "default": "0",
"depends_on": "eval:(doc.customer || doc.supplier || doc.sales_partner)", "depends_on": "eval:(doc.customer || doc.supplier || doc.sales_partner)",
"fieldname": "is_primary_contact", "fieldname": "is_primary_contact",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Is Primary Contact", "label": "Is Primary Contact",
"no_copy": 0,
"oldfieldname": "is_primary_contact", "oldfieldname": "is_primary_contact",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "more_info", "fieldname": "more_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "More Info", "hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "More Information",
"no_copy": 0,
"options": "icon-file-text", "options": "icon-file-text",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "mobile_no", "fieldname": "mobile_no",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Mobile No", "label": "Mobile No",
"no_copy": 0,
"oldfieldname": "mobile_no", "oldfieldname": "mobile_no",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0 "permlevel": 0,
"print_hide": 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": "Enter department to which this Contact belongs", "description": "Enter department to which this Contact belongs",
"fieldname": "department", "fieldname": "department",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Department", "label": "Department",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "Enter designation of this Contact", "description": "Enter designation of this Contact",
"fieldname": "designation", "fieldname": "designation",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Designation", "label": "Designation",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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": "unsubscribed", "fieldname": "unsubscribed",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Unsubscribed", "label": "Unsubscribed",
"permlevel": 0 "no_copy": 0,
"permlevel": 0,
"print_hide": 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-user", "icon": "icon-user",
"idx": 1, "idx": 1,
"in_create": 0, "in_create": 0,
"in_dialog": 0, "in_dialog": 0,
"modified": "2015-07-09 08:15:29.026935", "is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-08-27 03:39:27.529205",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Utilities", "module": "Utilities",
"name": "Contact", "name": "Contact",
"owner": "Administrator", "owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0, "cancel": 0,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "System Manager", "role": "System Manager",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0, "submit": 0,
"write": 1 "write": 1
}, },
{ {
"amend": 0, "amend": 0,
"apply_user_permissions": 0,
"cancel": 0, "cancel": 0,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Sales Master Manager", "role": "Sales Master Manager",
"share": 1, "set_user_permissions": 0,
"submit": 0,
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Purchase Master Manager",
"share": 1,
"submit": 0,
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Sales Manager",
"share": 1,
"submit": 0,
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Purchase Manager",
"share": 1,
"submit": 0,
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Maintenance Manager",
"share": 1,
"submit": 0,
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"share": 1,
"submit": 0,
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Sales User",
"share": 1,
"submit": 0,
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Purchase User",
"share": 1,
"submit": 0,
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Maintenance User",
"share": 1,
"submit": 0,
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"share": 1, "share": 1,
"submit": 0, "submit": 0,
"write": 1 "write": 1
}, },
{ {
"amend": 0, "amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Purchase Master Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Sales Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Purchase Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Maintenance Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"export": 0,
"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
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Sales User",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Purchase User",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Maintenance User",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"export": 0,
"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": 0,
"apply_user_permissions": 0,
"cancel": 0, "cancel": 0,
"create": 0, "create": 0,
"delete": 0, "delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"match": "", "match": "",
"permlevel": 1, "permlevel": 1,
"print": 0,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "All", "role": "All",
"submit": 0 "set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
} }
] ],
"read_only": 0,
"read_only_onload": 0
} }

View File

@@ -47,7 +47,7 @@ class TransactionBase(StatusUpdater):
"owner": opts.owner or self.owner, "owner": opts.owner or self.owner,
"subject": opts.subject, "subject": opts.subject,
"description": opts.description, "description": opts.description,
"starts_on": self.contact_date + " 10:00:00", "starts_on": self.contact_date,
"event_type": "Private", "event_type": "Private",
"ref_type": self.doctype, "ref_type": self.doctype,
"ref_name": self.name "ref_name": self.name

Some files were not shown because too many files have changed in this diff Show More