Fixed merge conflict
diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py
index ced1e85..cedaf60 100644
--- a/erpnext/accounts/doctype/account/account.py
+++ b/erpnext/accounts/doctype/account/account.py
@@ -171,7 +171,7 @@
old_warehouse = cstr(frappe.db.get_value("Account", self.name, "warehouse"))
if old_warehouse != cstr(self.warehouse):
- if old_warehouse:
+ if old_warehouse and frappe.db.exists("Warehouse", old_warehouse):
self.validate_warehouse(old_warehouse)
if self.warehouse:
self.validate_warehouse(self.warehouse)
diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js
index bd0b8f2..8aee1ba 100644
--- a/erpnext/accounts/doctype/account/account_tree.js
+++ b/erpnext/accounts/doctype/account/account_tree.js
@@ -49,4 +49,23 @@
+ '</span>').insertBefore(node.$ul);
}
},
+ toolbar: [
+ {
+ condition: function(node) {
+ return !node.root && frappe.boot.user.can_read.indexOf("GL Entry") !== -1
+ },
+ label: __("View Ledger"),
+ click: function(node, btn) {
+ frappe.route_options = {
+ "account": node.label,
+ "from_date": sys_defaults.year_start_date,
+ "to_date": sys_defaults.year_end_date,
+ "company": frappe.defaults.get_default('company') ? frappe.defaults.get_default('company'): ""
+ };
+ frappe.set_route("query-report", "General Ledger");
+ },
+ btnClass: "hidden-xs"
+ }
+ ],
+ extend_toolbar: true
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json
index a02e591..c5b3e5b 100644
--- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json
+++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json
@@ -15,6 +15,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "1",
"description": "If enabled, the system will post accounting entries for inventory automatically.",
"fieldname": "auto_accounting_for_stock",
@@ -41,6 +42,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Accounting entry frozen up to this date, nobody can do / modify entry except role specified below.",
"fieldname": "acc_frozen_upto",
"fieldtype": "Date",
@@ -66,6 +68,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Users with this role are allowed to set frozen accounts and create / modify accounting entries against frozen accounts",
"fieldname": "frozen_accounts_modifier",
"fieldtype": "Link",
@@ -92,6 +95,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_4",
"fieldtype": "Column Break",
"hidden": 0,
@@ -116,6 +120,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Role that is allowed to submit transactions that exceed credit limits set.",
"fieldname": "credit_controller",
"fieldtype": "Link",
@@ -142,6 +147,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "check_supplier_invoice_uniqueness",
"fieldtype": "Check",
"hidden": 0,
@@ -162,6 +168,32 @@
"search_index": 0,
"set_only_once": 0,
"unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "make_payment_via_journal_entry",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Make Payment via Journal Entry",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
}
],
"hide_heading": 0,
@@ -175,8 +207,8 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-07-14 14:32:06.056888",
- "modified_by": "Administrator",
+ "modified": "2016-10-05 16:13:10.978208",
+ "modified_by": "rohitw1991@gmail.com",
"module": "Accounts",
"name": "Accounts Settings",
"owner": "Administrator",
@@ -191,6 +223,7 @@
"export": 0,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.json b/erpnext/accounts/doctype/journal_entry/journal_entry.json
index 9d4ad48..969af5a 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.json
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.json
@@ -3,16 +3,19 @@
"allow_import": 1,
"allow_rename": 0,
"autoname": "naming_series:",
+ "beta": 0,
"creation": "2013-03-25 10:53:52",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
+ "editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "entry_type_and_date",
"fieldtype": "Section Break",
"hidden": 0,
@@ -38,6 +41,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "",
"fieldname": "title",
"fieldtype": "Data",
@@ -64,6 +68,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "Journal Entry",
"fieldname": "voucher_type",
"fieldtype": "Select",
@@ -92,6 +97,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 0,
@@ -119,6 +125,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"hidden": 0,
@@ -144,6 +151,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "posting_date",
"fieldtype": "Date",
"hidden": 0,
@@ -170,6 +178,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
@@ -197,6 +206,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "2_add_edit_gl_entries",
"fieldtype": "Section Break",
"hidden": 0,
@@ -223,6 +233,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "accounts",
"fieldtype": "Table",
"hidden": 0,
@@ -250,6 +261,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break99",
"fieldtype": "Section Break",
"hidden": 0,
@@ -273,6 +285,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "cheque_no",
"fieldtype": "Data",
@@ -300,6 +313,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "cheque_date",
"fieldtype": "Date",
"hidden": 0,
@@ -326,6 +340,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "user_remark",
"fieldtype": "Small Text",
"hidden": 0,
@@ -352,6 +367,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break99",
"fieldtype": "Column Break",
"hidden": 0,
@@ -375,6 +391,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "total_debit",
"fieldtype": "Currency",
"hidden": 0,
@@ -402,6 +419,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "total_credit",
"fieldtype": "Currency",
"hidden": 0,
@@ -429,6 +447,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "difference",
"fieldname": "difference",
"fieldtype": "Currency",
@@ -457,6 +476,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "difference",
"fieldname": "get_balance",
"fieldtype": "Button",
@@ -483,6 +503,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "multi_currency",
"fieldtype": "Check",
"hidden": 0,
@@ -506,8 +527,36 @@
},
{
"allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "total_amount_currency",
+ "fieldtype": "Link",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Total Amount Currency",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 1,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
+ "columns": 0,
"fieldname": "total_amount",
"fieldtype": "Currency",
"hidden": 1,
@@ -518,7 +567,7 @@
"label": "Total Amount",
"length": 0,
"no_copy": 1,
- "options": "Company:company:default_currency",
+ "options": "total_amount_currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
@@ -533,6 +582,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "total_amount_in_words",
"fieldtype": "Data",
"hidden": 1,
@@ -557,6 +607,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "reference",
"fieldtype": "Section Break",
"hidden": 0,
@@ -582,6 +633,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "clearance_date",
"fieldtype": "Date",
"hidden": 0,
@@ -608,6 +660,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "remark",
"fieldtype": "Small Text",
@@ -635,6 +688,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break98",
"fieldtype": "Column Break",
"hidden": 0,
@@ -658,6 +712,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "bill_no",
"fieldtype": "Data",
"hidden": 0,
@@ -684,6 +739,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "bill_date",
"fieldtype": "Date",
"hidden": 0,
@@ -710,6 +766,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "due_date",
"fieldtype": "Date",
"hidden": 0,
@@ -736,6 +793,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"depends_on": "eval:doc.voucher_type == 'Write Off Entry'",
"fieldname": "write_off",
"fieldtype": "Section Break",
@@ -762,6 +820,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "Accounts Receivable",
"depends_on": "eval:doc.voucher_type == 'Write Off Entry'",
"fieldname": "write_off_based_on",
@@ -789,6 +848,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.voucher_type == 'Write Off Entry'",
"fieldname": "get_outstanding_invoices",
"fieldtype": "Button",
@@ -815,6 +875,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_30",
"fieldtype": "Column Break",
"hidden": 0,
@@ -839,6 +900,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.voucher_type == 'Write Off Entry'",
"fieldname": "write_off_amount",
"fieldtype": "Currency",
@@ -865,6 +927,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "printing_settings",
"fieldtype": "Section Break",
"hidden": 0,
@@ -890,6 +953,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "pay_to_recd_from",
"fieldtype": "Data",
"hidden": 0,
@@ -914,6 +978,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_35",
"fieldtype": "Column Break",
"hidden": 0,
@@ -938,6 +1003,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "letter_head",
"fieldtype": "Link",
"hidden": 0,
@@ -963,6 +1029,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "select_print_heading",
"fieldtype": "Link",
"hidden": 0,
@@ -990,6 +1057,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "addtional_info",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1016,6 +1084,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break3",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1041,6 +1110,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "No",
"description": "",
"fieldname": "is_opening",
@@ -1070,6 +1140,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:inList([\"Credit Note\", \"Debit Note\"], doc.voucher_type)",
"fieldname": "stock_entry",
"fieldtype": "Link",
@@ -1097,6 +1168,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
@@ -1125,6 +1197,7 @@
"hide_toolbar": 0,
"icon": "icon-file-text",
"idx": 176,
+ "image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
@@ -1132,7 +1205,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-04-06 05:33:21.851581",
+ "modified": "2016-10-03 10:13:49.458343",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry",
@@ -1148,6 +1221,7 @@
"export": 0,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1168,6 +1242,7 @@
"export": 0,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1188,6 +1263,7 @@
"export": 0,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1199,6 +1275,7 @@
"write": 0
}
],
+ "quick_entry": 0,
"read_only": 0,
"read_only_onload": 1,
"search_fields": "voucher_type,posting_date, due_date, cheque_no",
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py
index 637ecda..083ba6f 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.py
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py
@@ -383,6 +383,7 @@
def set_total_amount(self, amt, currency):
self.total_amount = amt
+ self.total_amount_currency = currency
from frappe.utils import money_in_words
self.total_amount_in_words = money_in_words(amt, currency)
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js
index 5e6fc53..6ecd8fa 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.js
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js
@@ -504,6 +504,18 @@
});
},
+ allocate_payment_amount: function(frm) {
+ if(frm.doc.payment_type == 'Internal Transfer'){
+ return
+ }
+
+ if(frm.doc.references.length == 0){
+ frm.events.get_outstanding_documents(frm);
+ }
+
+ frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.received_amount);
+ },
+
allocate_party_amount_against_ref_docs: function(frm, paid_amount) {
var total_positive_outstanding_including_order = 0;
var total_negative_outstanding = 0;
@@ -545,22 +557,24 @@
}
$.each(frm.doc.references || [], function(i, row) {
- row.allocated_amount = 0
+ row.allocated_amount = 0 //If allocate payment amount checkbox is unchecked, set zero to allocate amount
+ if(frm.doc.allocate_payment_amount){
+ if(row.outstanding_amount > 0 && allocated_positive_outstanding > 0) {
+ if(row.outstanding_amount >= allocated_positive_outstanding)
+ row.allocated_amount = allocated_positive_outstanding;
+ else row.allocated_amount = row.outstanding_amount;
- if(row.outstanding_amount > 0 && allocated_positive_outstanding > 0) {
- if(row.outstanding_amount >= allocated_positive_outstanding)
- row.allocated_amount = allocated_positive_outstanding;
- else row.allocated_amount = row.outstanding_amount;
+ allocated_positive_outstanding -= flt(row.allocated_amount);
+ } else if (row.outstanding_amount < 0 && allocated_negative_outstanding) {
+ if(Math.abs(row.outstanding_amount) >= allocated_negative_outstanding)
+ row.allocated_amount = -1*allocated_negative_outstanding;
+ else row.allocated_amount = row.outstanding_amount;
- allocated_positive_outstanding -= flt(row.allocated_amount);
- } else if (row.outstanding_amount < 0 && allocated_negative_outstanding) {
- if(Math.abs(row.outstanding_amount) >= allocated_negative_outstanding)
- row.allocated_amount = -1*allocated_negative_outstanding;
- else row.allocated_amount = row.outstanding_amount;
-
- allocated_negative_outstanding -= Math.abs(flt(row.allocated_amount));
+ allocated_negative_outstanding -= Math.abs(flt(row.allocated_amount));
+ }
}
})
+
frm.refresh_fields()
frm.events.set_total_allocated_amount(frm);
},
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json
index 2057d07..6018571 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.json
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json
@@ -777,6 +777,34 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "default": "1",
+ "depends_on": "eval:in_list(['Pay', 'Receive'], doc.payment_type)",
+ "fieldname": "allocate_payment_amount",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Allocate Payment Amount",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"depends_on": "",
"fieldname": "references",
"fieldtype": "Table",
@@ -1426,7 +1454,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-09-05 11:06:18.183458",
+ "modified": "2016-09-28 18:20:47.625383",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py
index 179a321..7b9bf16 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.py
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py
@@ -669,6 +669,7 @@
pe.paid_to_account_currency = party_account_currency if payment_type=="Pay" else bank.account_currency
pe.paid_amount = paid_amount
pe.received_amount = received_amount
+ pe.allocate_payment_amount = 1
pe.append("references", {
"reference_doctype": dt,
diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py
index 84a8e82..26663fd 100644
--- a/erpnext/accounts/doctype/payment_request/payment_request.py
+++ b/erpnext/accounts/doctype/payment_request/payment_request.py
@@ -65,7 +65,7 @@
data = frappe.db.get_value(self.reference_doctype, self.reference_name,
["company", "customer_name"], as_dict=1)
- controller = get_integration_controller(self.payment_gateway, setup=False)
+ controller = get_integration_controller(self.payment_gateway)
controller.validate_transaction_currency(self.currency)
return controller.get_payment_url(**{
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index 836a2e0..bad511e 100755
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -15,6 +15,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "{supplier_name}",
"fieldname": "title",
"fieldtype": "Data",
@@ -41,6 +42,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 0,
@@ -68,6 +70,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "supplier",
"fieldtype": "Link",
"hidden": 0,
@@ -95,6 +98,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
+ "columns": 0,
"depends_on": "supplier",
"fieldname": "supplier_name",
"fieldtype": "Data",
@@ -122,6 +126,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "bill_no",
"fieldtype": "Data",
@@ -149,6 +154,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "is_paid",
"fieldtype": "Check",
"hidden": 0,
@@ -174,6 +180,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "0",
"fieldname": "is_return",
"fieldtype": "Check",
@@ -184,7 +191,7 @@
"in_list_view": 0,
"label": "Is Return",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
@@ -200,6 +207,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"hidden": 0,
@@ -225,6 +233,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "Today",
"fieldname": "posting_date",
"fieldtype": "Date",
@@ -252,6 +261,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "due_date",
"fieldtype": "Date",
"hidden": 0,
@@ -278,6 +288,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "bill_date",
"fieldtype": "Date",
"hidden": 0,
@@ -304,6 +315,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
@@ -331,6 +343,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
@@ -356,6 +369,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "is_return",
"fieldname": "return_against",
"fieldtype": "Link",
@@ -366,7 +380,7 @@
"in_list_view": 0,
"label": "Return Against Purchase Invoice",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Purchase Invoice",
"permlevel": 0,
"precision": "",
@@ -383,6 +397,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "section_addresses",
"fieldtype": "Section Break",
"hidden": 0,
@@ -408,6 +423,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "supplier_address",
"fieldtype": "Link",
"hidden": 0,
@@ -433,6 +449,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "contact_person",
"fieldtype": "Link",
"hidden": 0,
@@ -458,6 +475,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "",
"fieldname": "address_display",
"fieldtype": "Small Text",
@@ -483,6 +501,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "contact_display",
"fieldtype": "Small Text",
"hidden": 0,
@@ -507,6 +526,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "contact_mobile",
"fieldtype": "Small Text",
"hidden": 0,
@@ -531,6 +551,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "contact_email",
"fieldtype": "Small Text",
"hidden": 0,
@@ -555,6 +576,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "col_break_address",
"fieldtype": "Column Break",
"hidden": 0,
@@ -579,6 +601,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "",
"fieldname": "shipping_address",
"fieldtype": "Link",
@@ -606,6 +629,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "shipping_address_display",
"fieldtype": "Small Text",
"hidden": 0,
@@ -631,6 +655,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "currency_and_price_list",
"fieldtype": "Section Break",
"hidden": 0,
@@ -656,6 +681,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "currency",
"fieldtype": "Link",
"hidden": 0,
@@ -683,6 +709,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "conversion_rate",
"fieldtype": "Float",
@@ -711,6 +738,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break2",
"fieldtype": "Column Break",
"hidden": 0,
@@ -734,6 +762,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "buying_price_list",
"fieldtype": "Link",
"hidden": 0,
@@ -759,6 +788,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "price_list_currency",
"fieldtype": "Link",
"hidden": 0,
@@ -784,6 +814,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "plc_conversion_rate",
"fieldtype": "Float",
"hidden": 0,
@@ -809,6 +840,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "ignore_pricing_rule",
"fieldtype": "Check",
"hidden": 0,
@@ -833,6 +865,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "items_section",
"fieldtype": "Section Break",
"hidden": 0,
@@ -859,6 +892,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "0",
"fieldname": "update_stock",
"fieldtype": "Check",
@@ -885,6 +919,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "items",
"fieldtype": "Table",
"hidden": 0,
@@ -912,6 +947,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_26",
"fieldtype": "Section Break",
"hidden": 0,
@@ -935,6 +971,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_total",
"fieldtype": "Currency",
"hidden": 0,
@@ -961,6 +998,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "base_net_total",
"fieldtype": "Currency",
@@ -989,6 +1027,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_28",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1012,6 +1051,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "total",
"fieldtype": "Currency",
"hidden": 0,
@@ -1038,6 +1078,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "net_total",
"fieldtype": "Currency",
"hidden": 0,
@@ -1065,6 +1106,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "taxes_section",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1091,6 +1133,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "taxes_and_charges",
"fieldtype": "Link",
"hidden": 0,
@@ -1118,6 +1161,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "taxes",
"fieldtype": "Table",
"hidden": 0,
@@ -1145,6 +1189,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "other_charges_calculation",
"fieldtype": "HTML",
"hidden": 0,
@@ -1170,6 +1215,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "totals",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1196,6 +1242,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_taxes_and_charges_added",
"fieldtype": "Currency",
"hidden": 0,
@@ -1223,6 +1270,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_taxes_and_charges_deducted",
"fieldtype": "Currency",
"hidden": 0,
@@ -1250,6 +1298,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_total_taxes_and_charges",
"fieldtype": "Currency",
"hidden": 0,
@@ -1277,6 +1326,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_40",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1301,6 +1351,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "taxes_and_charges_added",
"fieldtype": "Currency",
"hidden": 0,
@@ -1328,6 +1379,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "taxes_and_charges_deducted",
"fieldtype": "Currency",
"hidden": 0,
@@ -1355,6 +1407,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "total_taxes_and_charges",
"fieldtype": "Currency",
"hidden": 0,
@@ -1382,6 +1435,7 @@
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "discount_amount",
+ "columns": 0,
"fieldname": "section_break_44",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1407,6 +1461,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "Grand Total",
"fieldname": "apply_discount_on",
"fieldtype": "Select",
@@ -1434,6 +1489,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_discount_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -1460,6 +1516,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_46",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1484,6 +1541,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "additional_discount_percentage",
"fieldtype": "Float",
"hidden": 0,
@@ -1509,6 +1567,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "discount_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -1535,6 +1594,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_49",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1559,6 +1619,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_grand_total",
"fieldtype": "Currency",
"hidden": 0,
@@ -1586,6 +1647,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "base_in_words",
"fieldtype": "Data",
@@ -1613,6 +1675,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break8",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1638,6 +1701,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "grand_total",
"fieldtype": "Currency",
"hidden": 0,
@@ -1665,6 +1729,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "in_words",
"fieldtype": "Data",
"hidden": 0,
@@ -1691,6 +1756,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "total_advance",
"fieldtype": "Currency",
"hidden": 0,
@@ -1718,6 +1784,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "outstanding_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -1746,6 +1813,7 @@
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "paid_amount",
+ "columns": 0,
"depends_on": "eval:doc.is_paid===1||(doc.advances && doc.advances.length>0)",
"fieldname": "payments_section",
"fieldtype": "Section Break",
@@ -1772,6 +1840,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "mode_of_payment",
"fieldtype": "Link",
"hidden": 0,
@@ -1798,6 +1867,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "cash_bank_account",
"fieldtype": "Link",
"hidden": 0,
@@ -1824,6 +1894,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "col_br_payments",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1848,6 +1919,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "is_paid",
"fieldname": "paid_amount",
"fieldtype": "Currency",
@@ -1875,6 +1947,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_paid_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -1902,6 +1975,7 @@
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "write_off_amount",
+ "columns": 0,
"depends_on": "grand_total",
"fieldname": "write_off",
"fieldtype": "Section Break",
@@ -1928,6 +2002,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "write_off_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -1953,6 +2028,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_write_off_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -1979,6 +2055,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_61",
"fieldtype": "Column Break",
"hidden": 0,
@@ -2003,6 +2080,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:flt(doc.write_off_amount)!=0",
"fieldname": "write_off_account",
"fieldtype": "Link",
@@ -2029,6 +2107,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:flt(doc.write_off_amount)!=0",
"fieldname": "write_off_cost_center",
"fieldtype": "Link",
@@ -2056,6 +2135,7 @@
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "advances",
+ "columns": 0,
"fieldname": "advances_section",
"fieldtype": "Section Break",
"hidden": 0,
@@ -2082,6 +2162,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "get_advances",
"fieldtype": "Button",
"hidden": 0,
@@ -2108,6 +2189,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "advances",
"fieldtype": "Table",
"hidden": 0,
@@ -2136,6 +2218,7 @@
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "terms",
+ "columns": 0,
"fieldname": "terms_section_break",
"fieldtype": "Section Break",
"hidden": 0,
@@ -2161,6 +2244,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "tc_name",
"fieldtype": "Link",
"hidden": 0,
@@ -2186,6 +2270,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "terms",
"fieldtype": "Text Editor",
"hidden": 0,
@@ -2210,6 +2295,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "raw_materials_supplied",
"fieldtype": "Section Break",
"hidden": 0,
@@ -2235,6 +2321,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "No",
"fieldname": "is_subcontracted",
"fieldtype": "Select",
@@ -2262,6 +2349,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "supplier_warehouse",
"fieldtype": "Link",
"hidden": 0,
@@ -2290,6 +2378,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "supplied_items",
"fieldtype": "Table",
"hidden": 0,
@@ -2316,6 +2405,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "printing_settings",
"fieldtype": "Section Break",
"hidden": 0,
@@ -2341,6 +2431,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "letter_head",
"fieldtype": "Link",
"hidden": 0,
@@ -2367,6 +2458,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "select_print_heading",
"fieldtype": "Link",
"hidden": 0,
@@ -2394,6 +2486,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "language",
"fieldtype": "Data",
"hidden": 0,
@@ -2419,6 +2512,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "more_info",
"fieldtype": "Section Break",
"hidden": 0,
@@ -2445,6 +2539,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "credit_to",
"fieldtype": "Link",
@@ -2473,6 +2568,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "party_account_currency",
"fieldtype": "Link",
"hidden": 1,
@@ -2499,6 +2595,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "No",
"description": "",
"fieldname": "is_opening",
@@ -2528,6 +2625,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "against_expense_account",
"fieldtype": "Small Text",
"hidden": 1,
@@ -2554,6 +2652,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_63",
"fieldtype": "Column Break",
"hidden": 0,
@@ -2577,6 +2676,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "posting_time",
"fieldtype": "Time",
"hidden": 0,
@@ -2604,6 +2704,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "remarks",
"fieldtype": "Small Text",
"hidden": 0,
@@ -2630,6 +2731,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Warehouse where you are maintaining stock of rejected items",
"fieldname": "rejected_warehouse",
"fieldtype": "Link",
@@ -2658,6 +2760,7 @@
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "is_recurring",
+ "columns": 0,
"depends_on": "eval:doc.docstatus<2",
"fieldname": "recurring_invoice",
"fieldtype": "Section Break",
@@ -2684,6 +2787,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.docstatus<2",
"description": "",
"fieldname": "is_recurring",
@@ -2710,6 +2814,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.is_recurring==1",
"description": "Select the period when the invoice will be generated automatically",
"fieldname": "recurring_type",
@@ -2737,6 +2842,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.is_recurring==1",
"description": "Start date of current invoice's period",
"fieldname": "from_date",
@@ -2763,6 +2869,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.is_recurring==1",
"description": "End date of current invoice's period",
"fieldname": "to_date",
@@ -2789,6 +2896,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name",
"fieldname": "submit_on_creation",
"fieldtype": "Check",
@@ -2815,6 +2923,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name",
"description": "",
"fieldname": "notify_by_email",
@@ -2842,6 +2951,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.is_recurring==1",
"description": "The day of the month on which auto invoice will be generated e.g. 05, 28 etc",
"fieldname": "repeat_on_day_of_month",
@@ -2868,6 +2978,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.is_recurring==1",
"description": "The date on which recurring invoice will be stop",
"fieldname": "end_date",
@@ -2894,6 +3005,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_82",
"fieldtype": "Column Break",
"hidden": 0,
@@ -2918,6 +3030,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.is_recurring==1",
"description": "The date on which next invoice will be generated. It is generated on submit.",
"fieldname": "next_date",
@@ -2944,6 +3057,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.is_recurring==1",
"description": "The unique id for tracking all recurring invoices. It is generated on submit.",
"fieldname": "recurring_id",
@@ -2970,6 +3084,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.is_recurring==1",
"description": "Enter email id separated by commas, invoice will be mailed automatically on particular date",
"fieldname": "notification_email_address",
@@ -2996,6 +3111,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.is_recurring==1",
"fieldname": "recurring_print_format",
"fieldtype": "Link",
@@ -3032,7 +3148,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-08-24 12:50:15.777689",
+ "modified": "2016-09-23 18:02:45.349273",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
index adc30e2..d741a60 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -58,7 +58,7 @@
self.check_for_closed_status()
self.validate_with_previous_doc()
self.validate_uom_is_integer("uom", "qty")
- self.set_expense_account()
+ self.set_expense_account(for_validate=True)
self.set_against_expense_account()
self.validate_write_off_account()
self.validate_multiple_billing("Purchase Receipt", "pr_detail", "amount", "items")
@@ -155,7 +155,7 @@
super(PurchaseInvoice, self).validate_warehouse()
- def set_expense_account(self):
+ def set_expense_account(self, for_validate=False):
auto_accounting_for_stock = cint(frappe.defaults.get_global_default("auto_accounting_for_stock"))
if auto_accounting_for_stock:
@@ -181,7 +181,7 @@
else:
item.expense_account = stock_not_billed_account
- elif not item.expense_account:
+ elif not item.expense_account and for_validate:
throw(_("Expense account is mandatory for item {0}").format(item.item_code or item.item_name))
def set_against_expense_account(self):
@@ -372,7 +372,7 @@
if flt(item.base_net_amount):
account_currency = get_account_currency(item.expense_account)
- if self.update_stock and self.auto_accounting_for_stock:
+ if self.update_stock and self.auto_accounting_for_stock and item.item_code in stock_items:
val_rate_db_precision = 6 if cint(item.precision("valuation_rate")) <= 6 else 9
# warehouse account
diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py
index 5ed25b4..1d1a122 100644
--- a/erpnext/accounts/doctype/sales_invoice/pos.py
+++ b/erpnext/accounts/doctype/sales_invoice/pos.py
@@ -15,6 +15,7 @@
doc = frappe.new_doc('Sales Invoice')
doc.is_pos = 1;
pos_profile = get_pos_profile(doc.company) or {}
+ if not doc.company: doc.company = pos_profile.get('company')
doc.update_stock = pos_profile.get('update_stock')
if pos_profile.get('name'):
@@ -63,7 +64,7 @@
doc.naming_series = pos_profile.get('naming_series') or 'SINV-'
doc.letter_head = pos_profile.get('letter_head') or company_data.default_letter_head
doc.ignore_pricing_rule = pos_profile.get('ignore_pricing_rule') or 0
- doc.apply_discount_on = pos_profile.get('apply_discount_on') or ''
+ doc.apply_discount_on = pos_profile.get('apply_discount_on') if pos_profile.get('apply_discount') else ''
doc.customer_group = pos_profile.get('customer_group') or get_root('Customer Group')
doc.territory = pos_profile.get('territory') or get_root('Territory')
@@ -235,10 +236,4 @@
si_doc.docstatus = 0
si_doc.flags.ignore_mandatory = True
si_doc.insert()
- make_scheduler_log(e, si_doc.name)
-
-def make_scheduler_log(e, sales_invoice):
- scheduler_log = frappe.new_doc('Scheduler Log')
- scheduler_log.error = e
- scheduler_log.sales_invoice = sales_invoice
- scheduler_log.save(ignore_permissions=True)
\ No newline at end of file
+ frappe.log_error(frappe.get_traceback())
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
index 8e65061..15a7112 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -191,7 +191,7 @@
"in_list_view": 0,
"label": "Is Return",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
@@ -342,6 +342,34 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "project",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 1,
+ "in_list_view": 0,
+ "label": "Project",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "project_name",
+ "oldfieldtype": "Link",
+ "options": "Project",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
@@ -380,7 +408,7 @@
"in_list_view": 0,
"label": "Return Against Sales Invoice",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Sales Invoice",
"permlevel": 0,
"precision": "",
@@ -2878,21 +2906,22 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "project",
+ "depends_on": "",
+ "fieldname": "campaign",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
"in_list_view": 0,
- "label": "Project",
+ "label": "Campaign",
"length": 0,
"no_copy": 0,
- "oldfieldname": "project_name",
+ "oldfieldname": "campaign",
"oldfieldtype": "Link",
- "options": "Project",
+ "options": "Campaign",
"permlevel": 0,
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
@@ -2931,35 +2960,6 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "depends_on": "",
- "fieldname": "campaign",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Campaign",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "campaign",
- "oldfieldtype": "Link",
- "options": "Campaign",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
"fieldname": "source",
"fieldtype": "Link",
"hidden": 0,
@@ -3867,7 +3867,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-09-16 06:09:01.246951",
+ "modified": "2016-09-24 15:54:33.104276",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",
diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py
index 4af197e..392902c 100644
--- a/erpnext/accounts/general_ledger.py
+++ b/erpnext/accounts/general_ledger.py
@@ -168,8 +168,8 @@
if not gl_entries:
gl_entries = frappe.db.sql("""
- select account, posting_date, party_type, party, cost_center, fiscal_year,
- voucher_type, voucher_no, against_voucher_type, against_voucher, cost_center
+ select account, posting_date, party_type, party, cost_center, fiscal_year,voucher_type,
+ voucher_no, against_voucher_type, against_voucher, cost_center, company
from `tabGL Entry`
where voucher_type=%s and voucher_no=%s""", (voucher_type, voucher_no), as_dict=True)
diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js
index de85621..b47d6f2 100644
--- a/erpnext/accounts/page/pos/pos.js
+++ b/erpnext/accounts/page/pos/pos.js
@@ -15,13 +15,11 @@
window.onbeforeunload = function () {
return wrapper.pos.beforeunload()
}
- wrapper.pos.on_refresh_page()
}
erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
init: function(wrapper){
- this.load = true;
this.page = wrapper.page;
this.wrapper = $(wrapper).find('.page-content');
this.set_indicator();
@@ -31,17 +29,6 @@
this.si_docs = this.get_doc_from_localstorage();
},
- on_refresh_page: function() {
- var me = this;
- if(this.load){
- this.load = false;
- }else if(this.connection_status){
- this.onload();
- }else{
- this.create_new();
- }
- },
-
beforeunload: function(e){
if(this.connection_status == false && frappe.get_route()[0] == "pos"){
e = e || window.event;
@@ -106,11 +93,15 @@
me.get_data_from_server(function(){
me.load_data(false);
me.make_customer();
- me.make_item_list();
+ me.make_item_list(true);
me.set_missing_values();
})
});
+ this.page.add_menu_item(__("Sync Offline Invoices"), function(){
+ me.sync_sales_invoice()
+ });
+
this.page.add_menu_item(__("POS Profile"), function() {
frappe.set_route('List', 'POS Profile');
});
@@ -278,7 +269,7 @@
make: function() {
this.make_search();
this.make_customer();
- this.make_item_list();
+ this.make_item_list(true);
this.make_discount_field()
},
@@ -299,7 +290,7 @@
this.search.$input.on("keyup", function() {
setTimeout(function() {
me.items = me.get_items();
- me.make_item_list();
+ me.make_item_list(false);
}, 1000);
});
@@ -367,11 +358,14 @@
get_customers: function(key){
var me = this;
key = key.toLowerCase().trim()
+ var re = new RegExp('%', 'g');
+ var reg = new RegExp(key.replace(re, '\\w*\\s*[a-zA-Z0-9]*'))
+
if(key){
return $.grep(this.customers, function(data) {
- if(data.name.toLowerCase().match(key)
- || data.customer_name.toLowerCase().match(key)
- || (data.customer_group && data.customer_group.toLowerCase().match(key))){
+ if(reg.test(data.name.toLowerCase())
+ || reg.test(data.customer_name.toLowerCase())
+ || (data.customer_group && reg.test(data.customer_group.toLowerCase()))){
return data
}
})
@@ -381,7 +375,7 @@
}
},
- make_item_list: function() {
+ make_item_list: function(index_search) {
var me = this;
if(!this.price_list) {
msgprint(__("Price List not found or disabled"));
@@ -395,7 +389,7 @@
if (this.items) {
$.each(this.items, function(index, obj) {
- if(index < 16){
+ if(!index_search || index < 16){
$(frappe.render_template("pos_item", {
item_code: obj.name,
item_price: format_currency(obj.price_list_rate, obj.currency),
@@ -439,7 +433,9 @@
})
}
- key = this.search.$input.val().toLowerCase();
+ key = this.search.$input.val().toLowerCase();
+ var re = new RegExp('%', 'g');
+ var reg = new RegExp(key.replace(re, '\\w*\\s*[a-zA-Z0-9]*'))
search_status = true
if(key){
@@ -455,8 +451,8 @@
} else if(item.barcode == me.search.$input.val()) {
search_status = false;
return item.barcode == me.search.$input.val();
- } else if((item.item_code.toLowerCase().match(key)) ||
- (item.item_name.toLowerCase().match(key)) || (item.item_group.toLowerCase().match(key))) {
+ } else if(reg.test(item.item_code.toLowerCase()) || reg.test(item.description.toLowerCase()) ||
+ reg.test(item.item_name.toLowerCase()) || reg.test(item.item_group.toLowerCase()) ){
return true
}
}
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
index e1f4f80..f6e1629 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -93,9 +93,10 @@
data = []
for gle in self.get_entries_till(self.filters.report_date, args.get("party_type")):
if self.is_receivable_or_payable(gle, dr_or_cr, future_vouchers):
- outstanding_amount = self.get_outstanding_amount(gle, self.filters.report_date, dr_or_cr)
+ outstanding_amount = flt(self.get_outstanding_amount(gle,
+ self.filters.report_date, dr_or_cr), currency_precision)
+
if abs(outstanding_amount) > 0.1/10**currency_precision:
-
row = [gle.posting_date, gle.party]
# customer / supplier name
@@ -124,6 +125,10 @@
row += get_ageing_data(cint(self.filters.range1), cint(self.filters.range2),
cint(self.filters.range3), self.age_as_on, entry_date, outstanding_amount)
+ # issue 6371-Ageing buckets should not have amounts if due date is not reached
+ if self.filters.ageing_based_on == "Due Date" and getdate(due_date) > getdate(self.filters.report_date):
+ row[-1]=row[-2]=row[-3]=row[-4]=0
+
if self.filters.get(scrub(args.get("party_type"))):
row.append(gle.account_currency)
else:
@@ -214,14 +219,16 @@
conditions, values = self.prepare_conditions(party_type)
if self.filters.get(scrub(party_type)):
- select_fields = "debit_in_account_currency as debit, credit_in_account_currency as credit"
+ select_fields = "sum(debit_in_account_currency) as debit, sum(credit_in_account_currency) as credit"
else:
- select_fields = "debit, credit"
+ select_fields = "sum(debit) as debit, sum(credit) as credit"
- self.gl_entries = frappe.db.sql("""select name, posting_date, account, party_type, party,
- voucher_type, voucher_no, against_voucher_type, against_voucher, account_currency, remarks, {0}
+ self.gl_entries = frappe.db.sql("""select name, posting_date, account, party_type, party,
+ voucher_type, voucher_no, against_voucher_type, against_voucher,
+ account_currency, remarks, {0}
from `tabGL Entry`
where docstatus < 2 and party_type=%s and (party is not null and party != '') {1}
+ group by voucher_type, voucher_no, against_voucher_type, against_voucher, party
order by posting_date, party"""
.format(select_fields, conditions), values, as_dict=True)
diff --git a/erpnext/accounts/report/cash_flow/cash_flow.py b/erpnext/accounts/report/cash_flow/cash_flow.py
index 24c5cd2..182878a 100644
--- a/erpnext/accounts/report/cash_flow/cash_flow.py
+++ b/erpnext/accounts/report/cash_flow/cash_flow.py
@@ -60,7 +60,6 @@
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
for cash_flow_account in cash_flow_accounts:
-
section_data = []
data.append({
"account_name": cash_flow_account['section_header'],
@@ -83,7 +82,8 @@
account_data = get_account_type_based_data(filters.company,
account['account_type'], period_list, filters.accumulated_values)
account_data.update({
- "account_name": account['label'],
+ "account_name": account['label'],
+ "account": account['label'],
"indent": 1,
"parent_account": cash_flow_account['section_header'],
"currency": company_currency
@@ -136,7 +136,7 @@
def add_total_row_account(out, data, label, period_list, currency):
total_row = {
"account_name": "'" + _("{0}").format(label) + "'",
- "account": None,
+ "account": "'" + _("{0}").format(label) + "'",
"currency": currency
}
for row in data:
diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py
index 6b7f490..747eb43 100644
--- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py
+++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py
@@ -34,7 +34,7 @@
total = 0
net_profit_loss = {
"account_name": "'" + _("Net Profit / Loss") + "'",
- "account": None,
+ "account": "'" + _("Net Profit / Loss") + "'",
"warn_if_negative": True,
"currency": frappe.db.get_value("Company", company, "default_currency")
}
diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json
index e48e1dc..7525e44 100644
--- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json
+++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json
@@ -15,6 +15,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 0,
@@ -43,6 +44,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "company",
"fieldtype": "Link",
@@ -72,6 +74,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "For individual supplier",
"fieldname": "vendor",
"fieldtype": "Link",
@@ -99,6 +102,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"hidden": 0,
@@ -126,6 +130,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "transaction_date",
"fieldtype": "Date",
"hidden": 0,
@@ -153,6 +158,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "suppliers_section",
"fieldtype": "Section Break",
"hidden": 0,
@@ -178,6 +184,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "suppliers",
"fieldtype": "Table",
"hidden": 0,
@@ -204,6 +211,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "items_section",
"fieldtype": "Section Break",
"hidden": 0,
@@ -231,6 +239,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "items",
"fieldtype": "Table",
"hidden": 0,
@@ -259,6 +268,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "supplier_response_section",
"fieldtype": "Section Break",
"hidden": 0,
@@ -284,6 +294,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "standard_reply",
"fieldtype": "Link",
"hidden": 0,
@@ -310,6 +321,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "message_for_supplier",
"fieldtype": "Text Editor",
"hidden": 0,
@@ -336,6 +348,7 @@
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "terms",
+ "columns": 0,
"fieldname": "terms_section_break",
"fieldtype": "Section Break",
"hidden": 0,
@@ -363,6 +376,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "tc_name",
"fieldtype": "Link",
"hidden": 0,
@@ -391,6 +405,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "terms",
"fieldtype": "Text Editor",
"hidden": 0,
@@ -418,6 +433,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "printing_settings",
"fieldtype": "Section Break",
"hidden": 0,
@@ -443,6 +459,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "select_print_heading",
"fieldtype": "Link",
"hidden": 0,
@@ -471,6 +488,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "letter_head",
"fieldtype": "Link",
"hidden": 0,
@@ -499,6 +517,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "more_info",
"fieldtype": "Section Break",
"hidden": 0,
@@ -526,6 +545,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "status",
"fieldtype": "Select",
"hidden": 0,
@@ -554,6 +574,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "fiscal_year",
"fieldtype": "Link",
"hidden": 0,
@@ -582,6 +603,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break3",
"fieldtype": "Column Break",
"hidden": 0,
@@ -606,6 +628,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
@@ -639,8 +662,8 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-08-01 08:45:39.777405",
- "modified_by": "Administrator",
+ "modified": "2016-09-29 11:56:57.123429",
+ "modified_by": "neil@frappe.io",
"module": "Buying",
"name": "Request for Quotation",
"name_case": "",
@@ -732,26 +755,6 @@
"cancel": 0,
"create": 0,
"delete": 0,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Supplier",
- "set_user_permissions": 0,
- "share": 0,
- "submit": 0,
- "write": 0
- },
- {
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py
index 482a2ae..78af1ef 100644
--- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py
+++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py
@@ -192,8 +192,6 @@
if isinstance(doc, basestring):
doc = json.loads(doc)
- validate_duplicate_supplier_quotation(doc)
-
try:
sq_doc = frappe.get_doc({
"doctype": "Supplier Quotation",
@@ -245,13 +243,3 @@
args = doc.get('suppliers')[cint(supplier_idx) - 1]
doc.update_supplier_part_no(args)
return doc
-
-@frappe.whitelist()
-def validate_duplicate_supplier_quotation(args):
- data = frappe.db.sql("""select sq.name as name from `tabSupplier Quotation` sq,
- `tabSupplier Quotation Item` sqi where sqi.parent = sq.name and sq.supplier = %(supplier)s
- and sqi.request_for_quotation = %(rfq)s and sq.docstatus < 2""",
- {'supplier': args.get('supplier'), 'rfq': args.get('name')}, as_dict=True)
-
- if data and data[0] and data[0].name:
- frappe.throw(_("Already supplier quotation has created"))
diff --git a/erpnext/config/projects.py b/erpnext/config/projects.py
index e6c9578..87174a4 100644
--- a/erpnext/config/projects.py
+++ b/erpnext/config/projects.py
@@ -19,7 +19,7 @@
},
{
"type": "report",
- "route": "Gantt/Task",
+ "route": "List/Task/Gantt",
"doctype": "Task",
"name": "Gantt Chart",
"description": _("Gantt chart of all tasks.")
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 8927da7..3d2f16b 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -26,6 +26,9 @@
return self.__company_currency
+ def onload(self):
+ self.get("__onload").make_payment_via_journal_entry = frappe.db.get_single_value('Accounts Settings', 'make_payment_via_journal_entry')
+
def validate(self):
if self.get("_action") and self._action != "update_after_submit":
self.set_missing_values(for_validate=True)
@@ -144,7 +147,7 @@
self.conversion_rate = get_exchange_rate(self.currency,
self.company_currency)
- def set_missing_item_details(self):
+ def set_missing_item_details(self, for_validate=False):
"""set missing item values"""
from erpnext.stock.get_item_details import get_item_details
@@ -196,7 +199,7 @@
(1.0 - (flt(item.discount_percentage) / 100.0)), item.precision("rate"))
if self.doctype == "Purchase Invoice":
- self.set_expense_account()
+ self.set_expense_account(for_validate)
def set_taxes(self):
if not self.meta.get_field("taxes"):
diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py
index f7181d7..865514b 100644
--- a/erpnext/controllers/buying_controller.py
+++ b/erpnext/controllers/buying_controller.py
@@ -62,7 +62,7 @@
if getattr(self, "supplier", None):
self.update_if_missing(get_party_details(self.supplier, party_type="Supplier", ignore_permissions=self.flags.ignore_permissions))
- self.set_missing_item_details()
+ self.set_missing_item_details(for_validate)
def set_supplier_from_item_default(self):
if self.meta.get_field("supplier") and not self.supplier:
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index b9b94f5..3f4d12d 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -23,6 +23,7 @@
self.grand_total)
def onload(self):
+ super(SellingController, self).onload()
if self.doctype in ("Sales Order", "Delivery Note", "Sales Invoice"):
for item in self.get("items"):
item.update(get_bin_details(item.item_code,
diff --git a/erpnext/controllers/status_updater.py b/erpnext/controllers/status_updater.py
index 7be6acd..157c385 100644
--- a/erpnext/controllers/status_updater.py
+++ b/erpnext/controllers/status_updater.py
@@ -301,12 +301,7 @@
ref_doc = frappe.get_doc(ref_dt, ref_dn)
ref_doc.db_set("per_billed", per_billed)
-
- if frappe.get_meta(ref_dt).get_field("billing_status"):
- if per_billed < 0.001: billing_status = "Not Billed"
- elif per_billed >= 99.99: billing_status = "Fully Billed"
- else: billing_status = "Partly Billed"
- ref_doc.db_set('billing_status', billing_status)
+ ref_doc.set_status(update=True)
def get_tolerance_for(item_code, item_tolerance={}, global_tolerance=None):
"""
diff --git a/erpnext/controllers/trends.py b/erpnext/controllers/trends.py
index 080d749..d991c15 100644
--- a/erpnext/controllers/trends.py
+++ b/erpnext/controllers/trends.py
@@ -49,10 +49,10 @@
posting_date = 't1.posting_date'
if conditions["based_on_select"] in ["t1.project,", "t2.project,"]:
- cond = 'and '+ conditions["based_on_select"][:-1] +' IS Not NULL'
+ cond = ' and '+ conditions["based_on_select"][:-1] +' IS Not NULL'
if conditions.get('trans') in ['Sales Order', 'Purchase Order']:
- cond += "and t1.status != 'Closed'"
+ cond += " and t1.status != 'Closed'"
year_start_date, year_end_date = frappe.db.get_value("Fiscal Year",
filters.get('fiscal_year'), ["year_start_date", "year_end_date"])
diff --git a/erpnext/docs/assets/img/accounts/account-settings.png b/erpnext/docs/assets/img/accounts/account-settings.png
index 943aa3d..dfe2abe 100644
--- a/erpnext/docs/assets/img/accounts/account-settings.png
+++ b/erpnext/docs/assets/img/accounts/account-settings.png
Binary files differ
diff --git a/erpnext/docs/assets/img/accounts/journal-entry.png b/erpnext/docs/assets/img/accounts/journal-entry.png
index d4a4e21..c6a2a64 100644
--- a/erpnext/docs/assets/img/accounts/journal-entry.png
+++ b/erpnext/docs/assets/img/accounts/journal-entry.png
Binary files differ
diff --git a/erpnext/docs/assets/img/accounts/pos-sales-invoice.png b/erpnext/docs/assets/img/accounts/pos-sales-invoice.png
new file mode 100644
index 0000000..3a115ed
--- /dev/null
+++ b/erpnext/docs/assets/img/accounts/pos-sales-invoice.png
Binary files differ
diff --git a/erpnext/docs/user/manual/en/accounts/index.txt b/erpnext/docs/user/manual/en/accounts/index.txt
index d7c405a..6ba9337 100644
--- a/erpnext/docs/user/manual/en/accounts/index.txt
+++ b/erpnext/docs/user/manual/en/accounts/index.txt
@@ -3,6 +3,7 @@
sales-invoice
point-of-sale-pos-invoice
purchase-invoice
+payments
journal-entry
payment-entry
multi-currency-accounting
diff --git a/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md b/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md
index f8dbe1d..8eefe7f 100644
--- a/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md
+++ b/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md
@@ -62,7 +62,7 @@
On submission of the invoice, the "Fixed Asset Account" will be debited and payable account will be credited. It also updates purchase date, supplier and Purchase Invoice no. in the Asset master.
-## Sale an Asset
+## Sell an Asset
To sale an asset, open the asset record and create a Sales Invoice by clicking on "Sale Asset". On submission of the Sales Invoice, following entries will take place:
diff --git a/erpnext/docs/user/manual/en/accounts/payments.md b/erpnext/docs/user/manual/en/accounts/payments.md
new file mode 100644
index 0000000..7e5aab3
--- /dev/null
+++ b/erpnext/docs/user/manual/en/accounts/payments.md
@@ -0,0 +1,48 @@
+Payment can be made against following transactions.
+
+ 1. Sales Invoice.
+ 2. Purchase Invoice.
+ 3. Sales Order (Advance Payment)
+ 4. Purchase Order (Advance Payment)
+
+In ERPNext, there is two options through which user can capture the payment
+
+ 1. Payment Entry(Default).
+ 2. Journal Entry.
+
+## Payment Entry
+
+####Step 1: Make Payment
+
+On submitting a document against which Payment Entry can be made, you will find Make Payment button.
+
+<img class="screenshot" alt="Making Payment" src="{{docs_base_url}}/assets/img/accounts/payment-entry-1.png">
+
+####Step 2: Payment Entry
+
+<img class="screenshot" alt="Making Payment" src="{{docs_base_url}}/assets/img/accounts/payment-entry-9.png">
+
+For more details about payment entry [check here.](https://frappe.github.io/erpnext/user/manual/en/accounts/payment-entry)
+
+## Journal Entry
+
+To make paymant using journal entry, check below steps
+
+####Step 1: Activate Payment via Journal Entry
+
+Goto Accounts Settings > checked Make Payment via Journal Entry
+
+<img class="screenshot" alt="Making Payment" src="{{docs_base_url}}/assets/img/accounts/account-settings.png">
+
+####Step 2: Make Payment
+
+On submitting a document against which Journal Entry can be made, you will find Make Payment button.
+
+<img class="screenshot" alt="Making Payment" src="{{docs_base_url}}/assets/img/accounts/payment-entry-1.png">
+
+####Step 3: Journal Entry
+
+Save and submit the journal entry to record the payament against the invoice
+<img class="screenshot" alt="Making Payment" src="{{docs_base_url}}/assets/img/accounts/journal-entry.png">
+
+For more details about journal entry [check here.](https://frappe.github.io/erpnext/user/manual/en/accounts/journal-entry)
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/accounts/sales-invoice.md b/erpnext/docs/user/manual/en/accounts/sales-invoice.md
index f9a453e..fb132e7 100644
--- a/erpnext/docs/user/manual/en/accounts/sales-invoice.md
+++ b/erpnext/docs/user/manual/en/accounts/sales-invoice.md
@@ -2,9 +2,9 @@
You can create a Sales Invoice directly from
-> Accounting > Documents > Sales Invoice > New Sales Invoice
+> Accounts > Billing > Sales Invoice > New Sales Invoice
-or Click on Make Invoice at the right hand corner of the Delivery Note.
+or you can Make a new Sales Invoice after you submit the Delivery Note.
<img class="screenshot" alt="Sales Invoice" src="{{docs_base_url}}/assets/img/accounts/sales-invoice.png">
@@ -54,6 +54,16 @@
ERPNext will automatically create new Invoices and mail it to the email ids
you set.
+#### POS Invoices
+
+Consider a scenario where retail transaction is carried out. For e.g: A retail shop.
+If you check the **Is POS** checkbox, then all your **POS Profile** data is fetched
+into the Sales Invoice and you can easily make payments.
+Also, if you check the **Update Stock** the stock will also update automatically,
+without the need of a Delivery Note.
+
+<img class="screenshot" alt="POS Invoice" src="{{docs_base_url}}/assets/img/accounts/pos-sales-invoice.png">
+
* * *
#### "Pro Forma" Invoice
diff --git a/erpnext/docs/user/manual/en/buying/supplier.md b/erpnext/docs/user/manual/en/buying/supplier.md
index 45ec6b1..89107db 100644
--- a/erpnext/docs/user/manual/en/buying/supplier.md
+++ b/erpnext/docs/user/manual/en/buying/supplier.md
@@ -2,7 +2,7 @@
You can create a new Supplier from:
-`Buying > Documents > Supplier > New Supplier`
+`Explore > Supplier > New Supplier`
<img class="screenshot" alt="Supplier Master" src="{{docs_base_url}}/assets/img/buying/supplier-master.png">
diff --git a/erpnext/docs/user/manual/en/selling/setup/product-bundle.md b/erpnext/docs/user/manual/en/selling/setup/product-bundle.md
index fa7f948..123eeaf 100644
--- a/erpnext/docs/user/manual/en/selling/setup/product-bundle.md
+++ b/erpnext/docs/user/manual/en/selling/setup/product-bundle.md
@@ -1,9 +1,7 @@
#Product Bundle
-Product Bundle stands for Sales Bill-of-Material. It's a master where you can list item which are bundled together and
-sold as one item. For instance, when laptop is delivered, you need to ensure that charger, mouse and laptop bag are
-delivered and stock level of these items gets affected. To address this scenario, you can set create Product Bundle for
-the main item, i.e. laptop, and list deliverable items i.e. laptop + charger + other accessories as child items.
+Product Bundle can be seen as something like a "Bill-of-Material" on the Sales side. It's a master where you can list existing items which are bundled together and sold as a set (or bundle). For instance, when you sell a laptop, you need to ensure that charger, mouse and laptop bag are delivered with it and stock levels of these items get affected.
+To address this scenario, you can set create a Product Bundle for the main item, i.e. laptop, and list deliverable items i.e. laptop + charger + mouse + laptop bag as so-called "Child Items".
Following are the steps on how to setup Product Bundle master, and how is it used in the sales transactions.
@@ -17,25 +15,27 @@
###Select Parent Item
-In Product Bundle master, there are two sections. Product Bundle Item and Package Item.
+In Product Bundle master, there are two sections. The "Parent Item" and a List of items to be shipped (Child Items).
-In Product Bundle item, you will select a Parent Item. The parent item must be a <b>non-stock item</b>.
-This is non-stock item because there is no stock maintained for it but only the Package Items.
+The "Parent Item" must be a so called <b>non-stock item</b>. The "Parent Item" is to be seen more like a vessel or virtual item and not a physical product.
+To create a <b>non-stock item</b> you have to unmark "Maintain Stock" in the Item Form.
+This is non-stock item because there is no stock maintained for it but only for the "Child Items".
If you want to maintain stock for the Parent Item, then you must create a regular Bill of Material (BOM)
and package them using a Stock Entry Transactions.
###Select Child Items
In Package Item section, you will list all the child items for which we maintain stock and is delivered to customer.
+Remember: The "Parent Item" is just virtual, so your main product (a laptop in our example here) also has to be listed on the List of Child (or Package) Items
###Product Bundle in the Sales Transactions
-When making Sales transactions like Sales Invoice, Sales Order and Delivery Note,
-Parent Item will be selected in the main item table.
+When making Sales transactions (Sales Invoice, Sales Order, Delivery Note)
+the Parent Item will be selected in the main item table.
<img class="screenshot" alt="Product Bundle" src="{{docs_base_url}}/assets/img/selling/product-bundle.gif">
-On selection on Parent Item in the main item table, its child items will be fetched in Packing List
+On selection of a Parent Item in the main item table, its child items will be fetched in Packing List
table of the transaction. If child item is the serialized item, you will be able to specify its Serial Mo.
in packing List table itself. On submission of transaction, system will reduce the stock level of child items from
warehouse specified in Packing List table.
diff --git a/erpnext/docs/user/videos/learn/data-import-tool.md b/erpnext/docs/user/videos/learn/data-import-tool.md
index 10cd00f..a3272e9 100644
--- a/erpnext/docs/user/videos/learn/data-import-tool.md
+++ b/erpnext/docs/user/videos/learn/data-import-tool.md
@@ -1,8 +1,7 @@
# Data Import Tool
-<iframe width="660" height="371" src="https://www.youtube.com/embed/6wiriRKPhmg" frameborder="0" allowfullscreen></iframe>
+<iframe width="660" height="371" src="https://www.youtube.com/embed/Ta2Xx3QoK3E" frameborder="0" allowfullscreen></iframe>
-**Duration: 3:24**
+**Duration: 6:32**
-This video walks you through on importing data in ERPNext from spreadsheet files. This tools allows you in faster migration of masters and transactions from legacy system into ERPNext. You can also use this tool to export data from ERPNext, and keep it as a backup
-of specific document type.
+This video walks you through on importing data in ERPNext from spreadsheet files. This tools allows you in faster migration of masters and transactions from legacy system into ERPNext. You can also use this tool to export data from ERPNext, and keep it as a backup of specific document type.
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.js b/erpnext/hr/doctype/expense_claim/expense_claim.js
index bcd8bc0..8b3c451 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.js
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.js
@@ -129,9 +129,6 @@
doc.total_sanctioned_amount = 0;
$.each((doc.expenses || []), function(i, d) {
doc.total_claimed_amount += d.claim_amount;
- if(d.sanctioned_amount==null) {
- d.sanctioned_amount = d.claim_amount;
- }
doc.total_sanctioned_amount += d.sanctioned_amount;
});
@@ -144,17 +141,6 @@
cur_frm.cscript.calculate_total(doc,cdt,cdn);
}
-cur_frm.cscript.claim_amount = function(doc,cdt,cdn){
- cur_frm.cscript.calculate_total(doc,cdt,cdn);
-
- var child = locals[cdt][cdn];
- refresh_field("sanctioned_amount", child.name, child.parentfield);
-}
-
-cur_frm.cscript.sanctioned_amount = function(doc,cdt,cdn){
- cur_frm.cscript.calculate_total(doc,cdt,cdn);
-}
-
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
if(cint(frappe.boot.notification_settings && frappe.boot.notification_settings.expense_claim)) {
cur_frm.email_doc(frappe.boot.notification_settings.expense_claim_message);
@@ -172,6 +158,25 @@
}
}
+frappe.ui.form.on("Expense Claim Detail", {
+ claim_amount: function(frm, cdt, cdn) {
+ var child = locals[cdt][cdn];
+ var doc = frm.doc;
+
+ if(!child.sanctioned_amount){
+ frappe.model.set_value(cdt, cdn, 'sanctioned_amount', child.claim_amount)
+ }
+
+ cur_frm.cscript.calculate_total(doc,cdt,cdn);
+ },
+
+ sanctioned_amount: function(frm, cdt, cdn) {
+ var doc = frm.doc;
+ cur_frm.cscript.calculate_total(doc,cdt,cdn);
+ }
+})
+
+
frappe.ui.form.on("Expense Claim", "employee_name", function(frm) {
erpnext.expense_claim.set_title(frm);
});
diff --git a/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js b/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js
index 3cc8dd5..507d070 100644
--- a/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js
+++ b/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js
@@ -3,8 +3,8 @@
frappe.views.calendar["Holiday List"] = {
field_map: {
- "start": "holiday_date",
- "end": "holiday_date",
+ "start": "from_date",
+ "end": "to_date",
"id": "name",
"title": "description",
"allDay": "allDay"
diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py
index 0aabd27..c1a9a06 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.py
+++ b/erpnext/hr/doctype/leave_application/leave_application.py
@@ -97,12 +97,19 @@
.format(formatdate(future_allocation[0].from_date), future_allocation[0].name))
def validate_salary_processed_days(self):
- last_processed_pay_slip = frappe.db.sql("""select start_date, end_date from `tabSalary Slip`
- where docstatus != 2 and employee = %s and ((%s between start_date and end_date) or (%s between start_date and end_date)) order by modified desc limit 1""",(self.employee, self.to_date, self.from_date))
+ if not frappe.db.get_value("Leave Type", self.leave_type, "is_lwp"):
+ return
+
+ last_processed_pay_slip = frappe.db.sql("""
+ select start_date, end_date from `tabSalary Slip`
+ where docstatus != 2 and employee = %s
+ and ((%s between start_date and end_date) or (%s between start_date and end_date))
+ order by modified desc limit 1
+ """,(self.employee, self.to_date, self.from_date))
if last_processed_pay_slip:
- frappe.throw(_("Salary already processed for period between {0} and {1}, Leave application period cannot be between this date range.").
- format(formatdate(last_processed_pay_slip[0][0]), formatdate(last_processed_pay_slip[0][1])))
+ frappe.throw(_("Salary already processed for period between {0} and {1}, Leave application period cannot be between this date range.").format(formatdate(last_processed_pay_slip[0][0]),
+ formatdate(last_processed_pay_slip[0][1])))
def show_block_day_warning(self):
diff --git a/erpnext/hr/doctype/leave_application/leave_application_list.js b/erpnext/hr/doctype/leave_application/leave_application_list.js
index f82dfb2..966d1aa 100644
--- a/erpnext/hr/doctype/leave_application/leave_application_list.js
+++ b/erpnext/hr/doctype/leave_application/leave_application_list.js
@@ -1,5 +1,5 @@
frappe.listview_settings['Leave Application'] = {
- add_fields: ["status", "leave_type", "employee", "employee_name", "total_leave_days", "from_date"],
+ add_fields: ["status", "leave_type", "employee", "employee_name", "total_leave_days", "from_date", "to_date"],
filters:[["status","!=", "Rejected"]],
get_indicator: function(doc) {
return [__(doc.status), frappe.utils.guess_colour(doc.status),
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.js b/erpnext/hr/doctype/salary_slip/salary_slip.js
index 4c60fba..bb27a42 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.js
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.js
@@ -13,6 +13,20 @@
}
}
}
+ frm.set_query("salary_component", "earnings", function() {
+ return {
+ filters: {
+ type: "earning"
+ }
+ }
+ })
+ frm.set_query("salary_component", "deductions", function() {
+ return {
+ filters: {
+ type: "deduction"
+ }
+ }
+ })
},
company: function(frm) {
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.json b/erpnext/hr/doctype/salary_slip/salary_slip.json
index 7a9dc3f..40592c2 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.json
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.json
@@ -961,6 +961,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "depends_on": "",
"fieldname": "earnings",
"fieldtype": "Table",
"hidden": 0,
diff --git a/erpnext/hr/doctype/salary_slip/test_salary_slip.py b/erpnext/hr/doctype/salary_slip/test_salary_slip.py
index c49365b..2287e9c 100644
--- a/erpnext/hr/doctype/salary_slip/test_salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/test_salary_slip.py
@@ -42,12 +42,12 @@
self.assertEquals(ss.total_days_in_month, 31)
self.assertEquals(ss.payment_days, 31)
- self.assertEquals(ss.earnings[0].amount, 0)
- self.assertEquals(ss.earnings[1].amount, 0)
- self.assertEquals(ss.deductions[0].amount, 0)
- self.assertEquals(ss.deductions[1].amount, 0)
- self.assertEquals(ss.gross_pay, 0)
- self.assertEquals(ss.net_pay, 0)
+ self.assertEquals(ss.earnings[0].amount, 5000)
+ self.assertEquals(ss.earnings[1].amount, 3000)
+ self.assertEquals(ss.deductions[0].amount, 5000)
+ self.assertEquals(ss.deductions[1].amount, 2500)
+ self.assertEquals(ss.gross_pay, 10500)
+ self.assertEquals(ss.net_pay, 3000)
def test_salary_slip_with_holidays_excluded(self):
frappe.db.set_value("HR Settings", None, "include_holidays_in_total_working_days", 0)
@@ -59,13 +59,13 @@
self.assertEquals(ss.total_days_in_month, 27)
self.assertEquals(ss.payment_days, 27)
- self.assertEquals(ss.earnings[0].amount, 0)
+ self.assertEquals(ss.earnings[0].amount, 5000)
self.assertEquals(ss.earnings[0].default_amount, 5000)
- self.assertEquals(ss.earnings[1].amount, 0)
- self.assertEquals(ss.deductions[0].amount, 0)
- self.assertEquals(ss.deductions[1].amount, 0)
- self.assertEquals(ss.gross_pay, 0)
- self.assertEquals(ss.net_pay, 0)
+ self.assertEquals(ss.earnings[1].amount, 3000)
+ self.assertEquals(ss.deductions[0].amount, 5000)
+ self.assertEquals(ss.deductions[1].amount, 2500)
+ self.assertEquals(ss.gross_pay, 10500)
+ self.assertEquals(ss.net_pay, 3000)
def test_payment_days(self):
# Holidays not included in working days
@@ -180,6 +180,7 @@
salary_slip.employee_name = frappe.get_value("Employee", {"name":frappe.db.get_value("Employee", {"user_id": user})}, "employee_name")
salary_slip.month = "12"
salary_slip.fiscal_year = "_Test Fiscal Year 2016"
+ salary_slip.posting_date = nowdate()
salary_slip.insert()
# salary_slip.submit()
salary_slip = salary_slip.name
diff --git a/erpnext/hr/doctype/salary_structure/test_salary_structure.py b/erpnext/hr/doctype/salary_structure/test_salary_structure.py
index 5d14ee2..cd7ee47 100644
--- a/erpnext/hr/doctype/salary_structure/test_salary_structure.py
+++ b/erpnext/hr/doctype/salary_structure/test_salary_structure.py
@@ -99,6 +99,7 @@
sal_slip.employee_name = frappe.get_value("Employee", {"name":employee}, "employee_name")
sal_slip.month = "11"
sal_slip.fiscal_year = "_Test Fiscal Year 2016"
+ sal_slip.posting_date = nowdate()
sal_slip.insert()
sal_slip.submit()
return sal_slip
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.py b/erpnext/manufacturing/doctype/production_order/production_order.py
index d598ee2..c94788a 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.py
+++ b/erpnext/manufacturing/doctype/production_order/production_order.py
@@ -55,7 +55,8 @@
if not self.expected_delivery_date:
self.expected_delivery_date = so[0].delivery_date
- self.project = so[0].project
+ if so[0].project:
+ self.project = so[0].project
self.validate_production_order_against_so()
else:
@@ -115,7 +116,7 @@
'''Update status of production order if unknown'''
if not status:
status = self.get_status(status)
-
+
if status != self.status:
self.db_set("status", status)
@@ -240,7 +241,7 @@
holidays[holiday_list] = holiday_list_days
return holidays[holiday_list]
-
+
def make_time_logs(self, open_new=False):
"""Capacity Planning. Plan time logs based on earliest availablity of workstation after
Planned Start Date. Time logs will be created and remain in Draft mode and must be submitted
@@ -261,7 +262,7 @@
if d.workstation and d.status != 'Completed':
last_workstation_idx[d.workstation] = i # set last row index of workstation
self.set_start_end_time_for_workstation(d, workstation_list, last_workstation_idx.get(d.workstation))
-
+
args = self.get_operations_data(d)
add_timesheet_detail(timesheet, args)
original_start_time = d.planned_start_time
@@ -366,7 +367,8 @@
if frappe.db.get_value("Item", self.production_item, "has_variants"):
frappe.throw(_("Production Order cannot be raised against a Item Template"), ItemHasVariantError)
- validate_end_of_life(self.production_item)
+ if self.production_item:
+ validate_end_of_life(self.production_item)
def validate_qty(self):
if not self.qty > 0:
@@ -520,7 +522,7 @@
timesheet.production_order = production_order
return timesheet
-@frappe.whitelist()
+@frappe.whitelist()
def add_timesheet_detail(timesheet, args):
if isinstance(timesheet, unicode):
timesheet = frappe.get_doc('Timesheet', timesheet)
diff --git a/erpnext/manufacturing/doctype/production_order/production_order_list.js b/erpnext/manufacturing/doctype/production_order/production_order_list.js
index cce56cf..762beb0 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order_list.js
+++ b/erpnext/manufacturing/doctype/production_order/production_order_list.js
@@ -1,6 +1,6 @@
frappe.listview_settings['Production Order'] = {
add_fields: ["bom_no", "status", "sales_order", "qty",
- "produced_qty", "expected_delivery_date"],
+ "produced_qty", "expected_delivery_date", "planned_start_date", "planned_end_date"],
filters: [["status", "!=", "Stopped"]],
get_indicator: function(doc) {
if(doc.status==="Submitted") {
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 7968751..bbabcb8 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -282,7 +282,7 @@
erpnext.patches.v7_0.convert_timelogbatch_to_timesheet
erpnext.patches.v7_0.convert_timelog_to_timesheet
erpnext.patches.v7_0.move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet
-erpnext.patches.v7_0.remove_doctypes_and_reports
+erpnext.patches.v7_0.remove_doctypes_and_reports #2016-10-29
erpnext.patches.v7_0.update_maintenance_module_in_doctype
erpnext.patches.v7_0.update_prevdoc_values_for_supplier_quotation_item
erpnext.patches.v7_0.rename_advance_table_fields
@@ -309,6 +309,7 @@
erpnext.patches.v7_0.set_material_request_type_in_item
erpnext.patches.v7_0.rename_examination_to_assessment
erpnext.patches.v7_0.set_portal_settings
+erpnext.patches.v7_0.update_change_amount_account
erpnext.patches.v7_0.repost_future_gle_for_purchase_invoice
erpnext.patches.v7_0.fix_duplicate_icons
erpnext.patches.v7_0.move_employee_parent_to_child_in_salary_structure
@@ -325,7 +326,12 @@
execute:frappe.db.sql("update `tabTimesheet` ts, `tabEmployee` emp set ts.employee_name = emp.employee_name where emp.name = ts.employee and ts.employee_name is null and ts.employee is not null")
erpnext.patches.v7_1.update_lead_source
erpnext.patches.v7_1.fix_link_for_customer_from_lead
+execute:frappe.db.sql("delete from `tabTimesheet Detail` where NOT EXISTS (select name from `tabTimesheet` where name = `tabTimesheet Detail`.parent)")
erpnext.patches.v7_0.update_mode_of_payment_type
execute:frappe.reload_doctype("Salary Slip")
execute:frappe.db.sql("update `tabSalary Slip` set posting_date=creation")
erpnext.patches.v7_1.update_portal_roles
+erpnext.patches.v7_1.set_total_amount_currency_in_je
+finally:erpnext.patches.v7_0.update_timesheet_communications
+erpnext.patches.v7_0.update_status_of_zero_amount_sales_order
+erpnext.patches.v7_1.add_field_for_task_dependent
diff --git a/erpnext/patches/v7_0/create_warehouse_nestedset.py b/erpnext/patches/v7_0/create_warehouse_nestedset.py
index 8190fd7..8ae86f7 100644
--- a/erpnext/patches/v7_0/create_warehouse_nestedset.py
+++ b/erpnext/patches/v7_0/create_warehouse_nestedset.py
@@ -29,10 +29,11 @@
make_warehouse_nestedset(company)
else:
sle_against_companies = frappe.db.sql_list("""select distinct company from `tabStock Ledger Entry`""")
- company = frappe.defaults.get_defaults().company
if len(sle_against_companies) == 1:
- set_company_to_warehouse(company)
+ company = frappe.db.get_value("Company", sle_against_companies[0],
+ fieldname=["name", "abbr"], as_dict=1)
+ set_company_to_warehouse(company.name)
make_warehouse_nestedset(company)
elif len(sle_against_companies) > 1:
diff --git a/erpnext/patches/v7_0/remove_doctypes_and_reports.py b/erpnext/patches/v7_0/remove_doctypes_and_reports.py
index 0a302b1..03461de 100644
--- a/erpnext/patches/v7_0/remove_doctypes_and_reports.py
+++ b/erpnext/patches/v7_0/remove_doctypes_and_reports.py
@@ -5,6 +5,22 @@
frappe.db.sql("""delete from `tabDocType`
where name in('Time Log Batch', 'Time Log Batch Detail', 'Time Log')""")
+ frappe.db.sql("""delete from `tabDocField` where parent in ('Time Log', 'Time Log Batch')""")
+ frappe.db.sql("""update `tabCustom Script` set dt = 'Timesheet' where dt = 'Time Log'""")
+
+ for data in frappe.db.sql(""" select label, fieldname from `tabCustom Field` where dt = 'Time Log'""", as_dict=1):
+ custom_field = frappe.get_doc({
+ 'doctype': 'Custom Field',
+ 'label': data.label,
+ 'dt': 'Timesheet Detail',
+ 'fieldname': data.fieldname,
+ 'fieldtype': data.fieldtype or "Data"
+ }).insert(ignore_permissions=True)
+
+ frappe.db.sql("""delete from `tabCustom Field` where dt = 'Time Log'""")
+ frappe.reload_doc('projects', 'doctype', 'timesheet')
+ frappe.reload_doc('projects', 'doctype', 'timesheet_detail')
+
report = "Daily Time Log Summary"
if frappe.db.exists("Report", report):
- frappe.delete_doc('Report', report)
\ No newline at end of file
+ frappe.delete_doc('Report', report)
diff --git a/erpnext/patches/v7_0/set_portal_settings.py b/erpnext/patches/v7_0/set_portal_settings.py
index 3e3b729..d9b6400 100644
--- a/erpnext/patches/v7_0/set_portal_settings.py
+++ b/erpnext/patches/v7_0/set_portal_settings.py
@@ -9,10 +9,12 @@
def execute():
for dt in ("assessment", "announcement", "course", "fees"):
frappe.reload_doc("schools", "doctype", dt)
-
+
+ frappe.reload_doc('website', 'doctype', 'portal_menu_item')
+
frappe.get_doc('Portal Settings').sync_menu()
if 'schools' in frappe.get_installed_apps():
domainify.setup_domain('Education')
else:
- domainify.setup_sidebar_items(domainify.get_domain('Manufacturing'))
\ No newline at end of file
+ domainify.setup_sidebar_items(domainify.get_domain('Manufacturing'))
diff --git a/erpnext/patches/v7_0/update_change_amount_account.py b/erpnext/patches/v7_0/update_change_amount_account.py
new file mode 100644
index 0000000..1741095
--- /dev/null
+++ b/erpnext/patches/v7_0/update_change_amount_account.py
@@ -0,0 +1,19 @@
+from __future__ import unicode_literals
+import frappe
+from erpnext.accounts.doctype.journal_entry.journal_entry import get_default_bank_cash_account
+
+def execute():
+ frappe.reload_doc('accounts', 'doctype', 'sales_invoice')
+
+ for company in frappe.db.sql("""select company from `tabSales Invoice`
+ where change_amount <> 0 and account_for_change_amount is null group by company""", as_list = 1):
+ cash_account = get_default_bank_cash_account(company[0], 'Cash').get('account')
+ if not cash_account:
+ bank_account = get_default_bank_cash_account(company[0], 'Bank').get('account')
+ cash_account = bank_account
+
+ if cash_account:
+ frappe.db.sql("""update `tabSales Invoice`
+ set account_for_change_amount = %(cash_account)s where change_amount <> 0
+ and company = %(company)s and account_for_change_amount is null""",
+ {'cash_account': cash_account, 'company': company[0]})
diff --git a/erpnext/patches/v7_0/update_status_of_zero_amount_sales_order.py b/erpnext/patches/v7_0/update_status_of_zero_amount_sales_order.py
new file mode 100644
index 0000000..9b2b247
--- /dev/null
+++ b/erpnext/patches/v7_0/update_status_of_zero_amount_sales_order.py
@@ -0,0 +1,7 @@
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+ for data in frappe.get_all('Sales Order', fields = ["name"], filters = [["docstatus", "=", "1"], ["grand_total", "=", "0"]]):
+ sales_order = frappe.get_doc('Sales Order', data.name)
+ sales_order.set_status(update=True, update_modified = False)
\ No newline at end of file
diff --git a/erpnext/patches/v7_0/update_timesheet_communications.py b/erpnext/patches/v7_0/update_timesheet_communications.py
new file mode 100644
index 0000000..203471e
--- /dev/null
+++ b/erpnext/patches/v7_0/update_timesheet_communications.py
@@ -0,0 +1,27 @@
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+ if frappe.db.table_exists("Time Log"):
+ timesheet = frappe.db.sql("""SELECT ts.name AS name, tl.name AS timelogname,
+ tl.modified AS modified, tl.modified_by AS modified_by, tl.creation AS creation, tl.owner AS owner
+ FROM
+ `tabTimesheet` ts, `tabTimesheet Detail` tsd, `tabTime Log` tl
+ WHERE
+ tsd.parent = ts.name AND tl.from_time = tsd.from_time AND tl.to_time = tsd.to_time
+ AND tl.hours = tsd.hours AND tl.billing_rate = tsd.billing_rate AND tsd.idx=1
+ AND tl.docstatus < 2""", as_dict=1)
+
+ for data in timesheet:
+ frappe.db.sql(""" update `tabTimesheet` set creation = %(creation)s,
+ owner = %(owner)s, modified = %(modified)s, modified_by = %(modified_by)s
+ where name = %(name)s""", data)
+
+ frappe.db.sql("""
+ update
+ tabCommunication
+ set
+ reference_doctype = "Timesheet", reference_name = %(timesheet)s
+ where
+ reference_doctype = "Time Log" and reference_name = %(timelog)s
+ """, {'timesheet': data.name, 'timelog': data.timelogname}, auto_commit=1)
diff --git a/erpnext/patches/v7_1/add_field_for_task_dependent.py b/erpnext/patches/v7_1/add_field_for_task_dependent.py
new file mode 100644
index 0000000..96daa13
--- /dev/null
+++ b/erpnext/patches/v7_1/add_field_for_task_dependent.py
@@ -0,0 +1,9 @@
+import frappe
+
+def execute():
+ frappe.reload_doctype('Task')
+ for t in frappe.get_all('Task', fields=['name']):
+ task = frappe.get_doc('Task', t.name)
+ task.update_depends_on()
+ if task.depends_on_tasks:
+ task.db_set('depends_on_tasks', task.depends_on_tasks, update_modified=False)
diff --git a/erpnext/patches/v7_1/set_total_amount_currency_in_je.py b/erpnext/patches/v7_1/set_total_amount_currency_in_je.py
new file mode 100644
index 0000000..eb4a347
--- /dev/null
+++ b/erpnext/patches/v7_1/set_total_amount_currency_in_je.py
@@ -0,0 +1,23 @@
+import frappe
+from erpnext import get_default_currency
+
+def execute():
+ frappe.reload_doc("accounts", "doctype", "journal_entry")
+
+ frappe.db.sql(""" update `tabJournal Entry` set total_amount_currency = %s
+ where ifnull(multi_currency, 0) = 0
+ and (pay_to_recd_from is not null or pay_to_recd_from != "") """, get_default_currency())
+
+ for je in frappe.db.sql(""" select name from `tabJournal Entry` where multi_currency = 1
+ and (pay_to_recd_from is not null or pay_to_recd_from != "")""", as_dict=1):
+
+ doc = frappe.get_doc("Journal Entry", je.name)
+ for d in doc.get('accounts'):
+ if d.party_type and d.party:
+ total_amount_currency = d.account_currency
+
+ elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
+ total_amount_currency = d.account_currency
+
+ frappe.db.set_value("Journal Entry", je.name, "total_amount_currency",
+ total_amount_currency, update_modified=False)
diff --git a/erpnext/portal/doctype/homepage/homepage.js b/erpnext/portal/doctype/homepage/homepage.js
index 100074f..0b07814 100644
--- a/erpnext/portal/doctype/homepage/homepage.js
+++ b/erpnext/portal/doctype/homepage/homepage.js
@@ -2,6 +2,14 @@
// For license information, please see license.txt
frappe.ui.form.on('Homepage', {
+ setup: function(frm) {
+ frm.fields_dict["products"].grid.get_field("item_code").get_query = function(){
+ return {
+ filters: {'show_in_website': 1}
+ }
+ }
+ },
+
refresh: function(frm) {
},
@@ -35,5 +43,12 @@
}
});
}
+ },
+
+ view: function(frm, cdt, cdn){
+ var child= locals[cdt][cdn]
+ if(child.item_code && frm.doc.products_url){
+ window.location.href = frm.doc.products_url + '/' + encodeURIComponent(child.item_code);
+ }
}
});
diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js
index ee2db46..5f48a93 100644
--- a/erpnext/projects/doctype/project/project.js
+++ b/erpnext/projects/doctype/project/project.js
@@ -43,9 +43,8 @@
if(frappe.model.can_read("Task")) {
frm.add_custom_button(__("Gantt Chart"), function() {
- frappe.route_options = {"project": frm.doc.name,
- "start": frm.doc.expected_start_date, "end": frm.doc.expected_end_date};
- frappe.set_route("Gantt", "Task");
+ frappe.route_options = {"project": frm.doc.name};
+ frappe.set_route("List", "Task", "Gantt");
});
}
diff --git a/erpnext/projects/doctype/task/task.json b/erpnext/projects/doctype/task/task.json
index 94ec8a1..46c8746 100644
--- a/erpnext/projects/doctype/task/task.json
+++ b/erpnext/projects/doctype/task/task.json
@@ -9,11 +9,13 @@
"docstatus": 0,
"doctype": "DocType",
"document_type": "Setup",
+ "editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "subject",
"fieldtype": "Data",
"hidden": 0,
@@ -40,6 +42,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
+ "columns": 0,
"fieldname": "project",
"fieldtype": "Link",
"hidden": 0,
@@ -67,6 +70,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break0",
"fieldtype": "Column Break",
"hidden": 0,
@@ -93,6 +97,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
+ "columns": 0,
"fieldname": "status",
"fieldtype": "Select",
"hidden": 0,
@@ -120,6 +125,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "priority",
"fieldtype": "Select",
"hidden": 0,
@@ -147,6 +153,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_10",
"fieldtype": "Section Break",
"hidden": 0,
@@ -171,6 +178,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "exp_start_date",
"fieldtype": "Date",
"hidden": 0,
@@ -197,6 +205,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "0",
"description": "",
"fieldname": "expected_time",
@@ -225,6 +234,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_11",
"fieldtype": "Column Break",
"hidden": 0,
@@ -249,6 +259,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
+ "columns": 0,
"fieldname": "exp_end_date",
"fieldtype": "Date",
"hidden": 0,
@@ -275,6 +286,33 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
+ "fieldname": "progress",
+ "fieldtype": "Percent",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Progress",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "section_break0",
"fieldtype": "Section Break",
"hidden": 0,
@@ -300,6 +338,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "description",
"fieldtype": "Text Editor",
"hidden": 0,
@@ -328,6 +367,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break",
"fieldtype": "Section Break",
"hidden": 0,
@@ -353,6 +393,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "depends_on",
"fieldtype": "Table",
"hidden": 0,
@@ -379,6 +420,33 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
+ "fieldname": "depends_on_tasks",
+ "fieldtype": "Read Only",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "depends_on_tasks",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "actual",
"fieldtype": "Section Break",
@@ -407,6 +475,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "act_start_date",
"fieldtype": "Date",
"hidden": 0,
@@ -433,6 +502,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "",
"description": "",
"fieldname": "actual_time",
@@ -461,6 +531,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_15",
"fieldtype": "Column Break",
"hidden": 0,
@@ -485,6 +556,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "act_end_date",
"fieldtype": "Date",
"hidden": 0,
@@ -511,6 +583,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_17",
"fieldtype": "Section Break",
"hidden": 0,
@@ -535,6 +608,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "total_costing_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -562,6 +636,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "total_expense_claim",
"fieldtype": "Currency",
"hidden": 0,
@@ -588,6 +663,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_20",
"fieldtype": "Column Break",
"hidden": 0,
@@ -612,6 +688,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "total_billing_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -637,6 +714,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "more_details",
"fieldtype": "Section Break",
"hidden": 0,
@@ -661,6 +739,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.status == \"Closed\" || doc.status == \"Pending Review\"",
"fieldname": "review_date",
"fieldtype": "Date",
@@ -688,6 +767,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.status == \"Closed\"",
"fieldname": "closing_date",
"fieldtype": "Date",
@@ -715,6 +795,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_22",
"fieldtype": "Column Break",
"hidden": 0,
@@ -738,6 +819,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
@@ -772,7 +854,7 @@
"istable": 0,
"max_attachments": 5,
"menu_index": 0,
- "modified": "2016-06-20 17:31:00.798534",
+ "modified": "2016-10-03 15:12:56.078675",
"modified_by": "Administrator",
"module": "Projects",
"name": "Task",
@@ -788,6 +870,7 @@
"export": 0,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py
index b918e3a..34b9ed5 100644
--- a/erpnext/projects/doctype/task/task.py
+++ b/erpnext/projects/doctype/task/task.py
@@ -29,6 +29,7 @@
def validate(self):
self.validate_dates()
self.validate_status()
+ self.update_depends_on()
def validate_dates(self):
if self.exp_start_date and self.exp_end_date and getdate(self.exp_start_date) > getdate(self.exp_end_date):
@@ -46,6 +47,12 @@
from frappe.desk.form.assign_to import clear
clear(self.doctype, self.name)
+ def update_depends_on(self):
+ depends_on_tasks = ""
+ for d in self.depends_on:
+ depends_on_tasks += d.task + ","
+ self.depends_on_tasks = depends_on_tasks
+
def on_update(self):
self.check_recursion()
self.reschedule_dependent_tasks()
@@ -156,5 +163,3 @@
and exp_end_date < CURDATE()
and `status` not in ('Closed', 'Cancelled')""")
-
-
diff --git a/erpnext/projects/doctype/task/task_list.js b/erpnext/projects/doctype/task/task_list.js
index d24e1ac..4bfa781 100644
--- a/erpnext/projects/doctype/task/task_list.js
+++ b/erpnext/projects/doctype/task/task_list.js
@@ -1,5 +1,6 @@
frappe.listview_settings['Task'] = {
- add_fields: ["project", "status", "priority", "exp_start_date", "exp_end_date", "subject"],
+ add_fields: ["project", "status", "priority", "exp_start_date",
+ "exp_end_date", "subject", "progress", "depends_on_tasks"],
filters: [["status", "=", "Open"]],
onload: function(listview) {
var method = "erpnext.projects.doctype.task.task.set_multiple_status";
diff --git a/erpnext/projects/doctype/timesheet/test_timesheet.py b/erpnext/projects/doctype/timesheet/test_timesheet.py
index 2708c18..98866ab 100644
--- a/erpnext/projects/doctype/timesheet/test_timesheet.py
+++ b/erpnext/projects/doctype/timesheet/test_timesheet.py
@@ -31,7 +31,7 @@
self.assertEquals(salary_slip.total_working_hours, 2)
self.assertEquals(salary_slip.hour_rate, 50)
- self.assertEquals(salary_slip.net_pay, 50)
+ self.assertEquals(salary_slip.net_pay, 150)
self.assertEquals(salary_slip.timesheets[0].time_sheet, timesheet.name)
self.assertEquals(salary_slip.timesheets[0].working_hours, 2)
diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py
index 3b8f939..60435bc 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.py
+++ b/erpnext/projects/doctype/timesheet/timesheet.py
@@ -163,7 +163,7 @@
def validate_dates(self):
for data in self.time_logs:
- if time_diff_in_hours(data.to_time, data.from_time) < 0:
+ if data.from_time and data.to_time and time_diff_in_hours(data.to_time, data.from_time) < 0:
frappe.throw(_("To date cannot be before from date"))
def validate_time_logs(self):
@@ -345,6 +345,7 @@
target.salary_slip_based_on_timesheet = 1
target.start_date = doc.start_date
target.end_date = doc.end_date
+ target.posting_date = doc.modified
@frappe.whitelist()
def get_activity_cost(employee=None, activity_type=None):
diff --git a/erpnext/projects/doctype/timesheet/timesheet_calendar.js b/erpnext/projects/doctype/timesheet/timesheet_calendar.js
index a41ba38..ad81de6 100644
--- a/erpnext/projects/doctype/timesheet/timesheet_calendar.js
+++ b/erpnext/projects/doctype/timesheet/timesheet_calendar.js
@@ -1,10 +1,10 @@
frappe.views.calendar["Timesheet"] = {
field_map: {
- "start": "from_time",
- "end": "to_time",
+ "start": "start_date",
+ "end": "end_date",
"name": "parent",
- "id": "parent",
- "title": "activity_type",
+ "id": "name",
+ "title": "name",
"allDay": "allDay",
"child_name": "name"
},
diff --git a/erpnext/projects/doctype/timesheet/timesheet_list.js b/erpnext/projects/doctype/timesheet/timesheet_list.js
index c538fa1..1b200f8 100644
--- a/erpnext/projects/doctype/timesheet/timesheet_list.js
+++ b/erpnext/projects/doctype/timesheet/timesheet_list.js
@@ -1,5 +1,5 @@
frappe.listview_settings['Timesheet'] = {
- add_fields: ["status", "total_hours"],
+ add_fields: ["status", "total_hours", "start_date", "end_date"],
get_indicator: function(doc) {
if (doc.status== "Billed") {
return [__("Billed"), "green", "status,=," + "Billed"]
diff --git a/erpnext/public/css/website.css b/erpnext/public/css/website.css
index ab3beb0..2bfcd3e 100644
--- a/erpnext/public/css/website.css
+++ b/erpnext/public/css/website.css
@@ -2,6 +2,9 @@
font-size: 18px;
line-height: 200%;
}
+.web-page-content {
+ margin-bottom: 30px;
+}
.item-stock {
margin-bottom: 10px !important;
}
diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js
index 189b56f..f642da1 100644
--- a/erpnext/public/js/controllers/taxes_and_totals.js
+++ b/erpnext/public/js/controllers/taxes_and_totals.js
@@ -14,11 +14,11 @@
item.total_margin = item.price_list_rate + item.margin_rate_or_amount;
}
- item.rate = flt(item.total_margin , 2);
+ item.rate = flt(item.total_margin , precision("rate", item));
if(item.discount_percentage){
discount_value = flt(item.total_margin) * flt(item.discount_percentage) / 100;
- item.rate = flt((item.total_margin) - (discount_value), precision('rate'));
+ item.rate = flt((item.total_margin) - (discount_value), precision('rate', item));
}
},
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index a928a9a..0244cf3 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -979,7 +979,7 @@
make_payment_entry: function() {
return frappe.call({
- method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_payment_entry",
+ method: cur_frm.cscript.get_method_for_payment(),
args: {
"dt": cur_frm.doc.doctype,
"dn": cur_frm.doc.name
@@ -990,5 +990,18 @@
// cur_frm.refresh_fields()
}
});
+ },
+
+ get_method_for_payment: function(){
+ method = "erpnext.accounts.doctype.payment_entry.payment_entry.get_payment_entry"
+ if(cur_frm.doc.__onload && cur_frm.doc.__onload.make_payment_via_journal_entry){
+ if(in_list(['Sales Invoice', 'Purchase Invoice'], cur_frm.doc.doctype)){
+ method = "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_against_invoice"
+ }else {
+ method= "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_against_order"
+ }
+ }
+
+ return method
}
});
\ No newline at end of file
diff --git a/erpnext/public/js/shopping_cart.js b/erpnext/public/js/shopping_cart.js
index f5819a8..ace7fd8 100644
--- a/erpnext/public/js/shopping_cart.js
+++ b/erpnext/public/js/shopping_cart.js
@@ -10,7 +10,7 @@
$('.navbar li[data-label="User"] a')
.html('<i class="icon-fixed-width icon-user"></i> ' + full_name);
}
-
+
// update login
shopping_cart.show_shoppingcart_dropdown();
shopping_cart.set_cart_count();
@@ -32,7 +32,7 @@
}
});
},
-
+
update_cart: function(opts) {
if(!full_name || full_name==="Guest") {
if(localStorage) {
@@ -50,10 +50,10 @@
},
btn: opts.btn,
callback: function(r) {
- shopping_cart.set_cart_count();
+ shopping_cart.set_cart_count();
if (r.message.shopping_cart_menu) {
$('.shopping-cart-menu').html(r.message.shopping_cart_menu);
- }
+ }
if(opts.callback)
opts.callback(r);
}
@@ -63,11 +63,11 @@
set_cart_count: function() {
var cart_count = getCookie("cart_count");
-
+
if(cart_count) {
- $(".shopping-cart").toggle(true);
- }
-
+ $(".shopping-cart").toggleClass('hidden', true);
+ }
+
var $cart = $('.cart-icon');
var $badge = $cart.find("#cart-count");
@@ -88,7 +88,7 @@
$badge.remove();
}
},
-
+
shopping_cart_update: function(item_code, newVal, cart_dropdown) {
frappe.freeze();
shopping_cart.update_cart({
@@ -103,20 +103,20 @@
$(".cart-tax-items").html(r.message.taxes);
if (cart_dropdown != true) {
$(".cart-icon").hide();
- }
+ }
}
},
});
},
-
-
+
+
bind_dropdown_cart_buttons: function() {
$(".cart-icon").on('click', '.number-spinner button', function () {
var btn = $(this),
input = btn.closest('.number-spinner').find('input'),
oldValue = input.val().trim(),
newVal = 0;
-
+
if (btn.attr('data-dir') == 'up') {
newVal = parseInt(oldValue) + 1;
} else {
@@ -125,11 +125,11 @@
}
}
input.val(newVal);
- var item_code = input.attr("data-item-code");
+ var item_code = input.attr("data-item-code");
shopping_cart.shopping_cart_update(item_code, newVal, true);
return false;
});
-
+
},
-
+
});
diff --git a/erpnext/public/less/website.less b/erpnext/public/less/website.less
index 37d69e0..ce36e5f 100644
--- a/erpnext/public/less/website.less
+++ b/erpnext/public/less/website.less
@@ -8,6 +8,10 @@
line-height: 200%;
}
+.web-page-content {
+ margin-bottom: 30px;
+}
+
.item-stock {
margin-bottom: 10px !important;
}
diff --git a/erpnext/schools/doctype/student_admission/student_admission.js b/erpnext/schools/doctype/student_admission/student_admission.js
index 48f4c46..d7f7454 100644
--- a/erpnext/schools/doctype/student_admission/student_admission.js
+++ b/erpnext/schools/doctype/student_admission/student_admission.js
@@ -8,7 +8,7 @@
frm.refresh_field("route");
}
},
-
+
academic_year: function(frm) {
frm.trigger("program");
}
diff --git a/erpnext/schools/doctype/student_admission/student_admission.json b/erpnext/schools/doctype/student_admission/student_admission.json
index e757ae1..77a3236 100644
--- a/erpnext/schools/doctype/student_admission/student_admission.json
+++ b/erpnext/schools/doctype/student_admission/student_admission.json
@@ -1,8 +1,8 @@
{
"allow_copy": 0,
"allow_import": 0,
- "allow_rename": 0,
- "autoname": "field:route",
+ "allow_rename": 1,
+ "autoname": "",
"beta": 0,
"creation": "2016-09-13 03:05:27.154713",
"custom": 0,
@@ -121,6 +121,32 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "naming_series_for_student_applicant",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Naming Series (for Student Applicant)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "publish",
"fieldtype": "Check",
"hidden": 0,
@@ -189,7 +215,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
- "reqd": 1,
+ "reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -389,7 +415,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-09-15 07:03:55.581346",
+ "modified": "2016-10-04 02:44:28.480942",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Admission",
@@ -406,6 +432,7 @@
"export": 1,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
diff --git a/erpnext/schools/doctype/student_admission/student_admission.py b/erpnext/schools/doctype/student_admission/student_admission.py
index c4384e2..b0c7b55 100644
--- a/erpnext/schools/doctype/student_admission/student_admission.py
+++ b/erpnext/schools/doctype/student_admission/student_admission.py
@@ -11,15 +11,19 @@
website = frappe._dict(
template = "templates/generators/student_admission.html",
condition_field = "publish",
- page_title_field = "route"
+ page_title_field = "title"
)
+ def autoname(self):
+ if not self.title:
+ self.title = self.get_title()
+ self.name = self.title
+
def get_context(self, context):
context.parents = [{'name': 'admissions', 'title': _('All Student Admissions') }]
-
- def validate(self):
- if not self.title:
- self.title = self.program + " admissions for " + self.academic_year
+
+ def get_title(self):
+ return _("Admissions for {0}").format(self.academic_term)
def get_list_context(context):
context.title = _("Student Admissions")
diff --git a/erpnext/schools/doctype/student_applicant/student_applicant.js b/erpnext/schools/doctype/student_applicant/student_applicant.js
index 6857a66..36baa80 100644
--- a/erpnext/schools/doctype/student_applicant/student_applicant.js
+++ b/erpnext/schools/doctype/student_applicant/student_applicant.js
@@ -4,22 +4,22 @@
frm.add_custom_button(__("Approve"), function() {
frm.set_value("application_status", "Approved");
frm.save_or_update();
-
- }).addClass("btn-primary");
-
+
+ }, 'Actions');
+
frm.add_custom_button(__("Reject"), function() {
frm.set_value("application_status", "Rejected");
frm.save_or_update();
- }).addClass("btn-danger");
+ }, 'Actions');
}
-
+
if(frm.doc.application_status== "Approved" && frm.doc.docstatus== 1 ) {
frm.add_custom_button(__("Enroll"), function() {
frm.events.enroll(frm)
}).addClass("btn-primary");
}
},
-
+
enroll: function(frm) {
frappe.model.open_mapped_doc({
method: "erpnext.schools.api.enroll_student",
diff --git a/erpnext/schools/doctype/student_applicant/student_applicant.json b/erpnext/schools/doctype/student_applicant/student_applicant.json
index d926bd9..e60a54e 100644
--- a/erpnext/schools/doctype/student_applicant/student_applicant.json
+++ b/erpnext/schools/doctype/student_applicant/student_applicant.json
@@ -6,10 +6,12 @@
"beta": 0,
"creation": "2015-09-11 11:50:09.740807",
"custom": 0,
+ "default_print_format": "",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 0,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -182,7 +184,7 @@
"label": "Naming Series",
"length": 0,
"no_copy": 0,
- "options": "AP.",
+ "options": "AP",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -282,6 +284,33 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "student_admission",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Student Admission",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Student Admission",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "image",
"fieldtype": "Attach Image",
"hidden": 1,
@@ -891,7 +920,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-09-23 14:15:25.153128",
+ "modified": "2016-10-10 06:19:19.319038",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Applicant",
@@ -908,6 +937,7 @@
"export": 1,
"if_owner": 0,
"import": 1,
+ "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -917,6 +947,27 @@
"share": 1,
"submit": 1,
"write": 1
+ },
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 1,
+ "export": 0,
+ "if_owner": 1,
+ "import": 0,
+ "is_custom": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 0,
+ "role": "Guest",
+ "set_user_permissions": 0,
+ "share": 0,
+ "submit": 0,
+ "write": 0
}
],
"quick_entry": 1,
diff --git a/erpnext/schools/doctype/student_applicant/student_applicant.py b/erpnext/schools/doctype/student_applicant/student_applicant.py
index 01ddefa..047c702 100644
--- a/erpnext/schools/doctype/student_applicant/student_applicant.py
+++ b/erpnext/schools/doctype/student_applicant/student_applicant.py
@@ -8,6 +8,18 @@
from frappe.model.document import Document
class StudentApplicant(Document):
+ def autoname(self):
+ from frappe.model.naming import set_name_by_naming_series
+ if self.student_admission:
+ naming_series = frappe.db.get_value('Student Admission', self.student_admission,
+ 'naming_series_for_student_applicant')
+ print naming_series
+
+ if naming_series:
+ self.naming_series = naming_series
+
+ set_name_by_naming_series(self)
+
def validate(self):
self.title = " ".join(filter(None, [self.first_name, self.middle_name, self.last_name]))
@@ -17,4 +29,4 @@
frappe.throw(_("Cannot change status as student {0} is linked with student application {1}").format(student[0].name, self.name))
def on_payment_authorized(self, *args, **kwargs):
- self.db_set('paid', 1)
\ No newline at end of file
+ self.db_set('paid', 1)
diff --git a/erpnext/schools/doctype/student_applicant/student_applicant_list.js b/erpnext/schools/doctype/student_applicant/student_applicant_list.js
index 43402d8..817a728 100644
--- a/erpnext/schools/doctype/student_applicant/student_applicant_list.js
+++ b/erpnext/schools/doctype/student_applicant/student_applicant_list.js
@@ -1,7 +1,11 @@
frappe.listview_settings['Student Applicant'] = {
- add_fields: [ "application_status"],
+ add_fields: [ "application_status", 'paid'],
+ has_indicator_for_draft: 1,
get_indicator: function(doc) {
- if (doc.application_status=="Applied") {
+ if (doc.paid) {
+ return [__("Paid"), "green", "paid,=,Yes"];
+ }
+ else if (doc.application_status=="Applied") {
return [__("Applied"), "orange", "application_status,=,Applied"];
}
else if (doc.application_status=="Approved") {
diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.json b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.json
index 0612dc0..af28e20 100644
--- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.json
+++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.json
@@ -1,5 +1,5 @@
{
- "add_total_row": 0,
+ "add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-05-03 11:31:05",
"disabled": 0,
@@ -7,7 +7,7 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
- "modified": "2016-01-28 04:22:49.476068",
+ "modified": "2016-10-05 12:26:15.736596",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Person-wise Transaction Summary",
diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py
index e9930f3..0c6914d 100644
--- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py
+++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py
@@ -39,7 +39,7 @@
_("Customer") + ":Link/Customer:140", _("Territory") + ":Link/Territory:100", _("Posting Date") + ":Date:100",
_("Item Code") + ":Link/Item:120", _("Item Group") + ":Link/Item Group:120",
_("Brand") + ":Link/Brand:120", _("Qty") + ":Float:100", _("Amount") + ":Currency:120",
- _("Sales Person") + ":Link/Sales Person:140", _("Contribution %") + ":Float:110",
+ _("Sales Person") + ":Link/Sales Person:140", _("Contribution %") + "::110",
_("Contribution Amount") + ":Currency:140"]
def get_entries(filters):
diff --git a/erpnext/setup/doctype/company/delete_company_transactions.py b/erpnext/setup/doctype/company/delete_company_transactions.py
index 7e1681c..8f058e8 100644
--- a/erpnext/setup/doctype/company/delete_company_transactions.py
+++ b/erpnext/setup/doctype/company/delete_company_transactions.py
@@ -18,7 +18,6 @@
frappe.PermissionError)
delete_bins(company_name)
- delete_time_sheets(company_name)
delete_lead_addresses(company_name)
for doctype in frappe.db.sql_list("""select parent from
@@ -70,14 +69,6 @@
frappe.db.sql("""delete from tabBin where warehouse in
(select name from tabWarehouse where company=%s)""", company_name)
-def delete_time_sheets(company_name):
- # Delete Time Logs as it is linked to Production Order / Project / Task, which are linked to company
- frappe.db.sql("""
- delete from `tabTimesheet`
- where
- company=%(company)s
- """, {"company": company_name})
-
def delete_lead_addresses(company_name):
"""Delete addresses to which leads are linked"""
for lead in frappe.get_all("Lead", filters={"company": company_name}):
diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py
index 7ec04c8..ac999ed 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.py
+++ b/erpnext/setup/doctype/email_digest/email_digest.py
@@ -340,13 +340,13 @@
count = 0
for account in accounts:
balance += (get_balance_on(account, date = self.future_to_date)
- - get_balance_on(account, date = self.future_from_date))
+ - get_balance_on(account, date = self.future_from_date - timedelta(days=1)))
count += (get_count_on(account,fieldname, date = self.future_to_date )
- - get_count_on(account,fieldname, date = self.future_from_date))
+ - get_count_on(account,fieldname, date = self.future_from_date - timedelta(days=1)))
past_balance += (get_balance_on(account, date = self.past_to_date)
- - get_balance_on(account, date = self.past_from_date))
+ - get_balance_on(account, date = self.past_from_date - timedelta(days=1)))
return balance, past_balance, count
diff --git a/erpnext/setup/doctype/email_digest/templates/default.html b/erpnext/setup/doctype/email_digest/templates/default.html
index 0500dc1..78acbd9 100644
--- a/erpnext/setup/doctype/email_digest/templates/default.html
+++ b/erpnext/setup/doctype/email_digest/templates/default.html
@@ -43,7 +43,8 @@
<!-- issue list -->
{% if issue_list %}
-<h4 style="{{ section_head }}">{{ _("Open Issues ") }}<span class="badge">({{ issue_count }})</span></h4>
+<h4 style="{{ section_head }}">{{ _("Open Issues ") }}
+ <span class="badge">({{ issue_count }})</span></h4>
<div>
{% for t in issue_list %}
<div style="{{ line_item }}">
@@ -66,7 +67,8 @@
<!-- project list -->
{% if project_list %}
-<h4 style="{{ section_head }}">{{ _("Open Projects ") }}<span class="badge">({{ project_count }})</span></h4>
+<h4 style="{{ section_head }}">{{ _("Open Projects ") }}
+ <span class="badge">({{ project_count }})</span></h4>
<div>
{% for t in project_list %}
<div style="{{ line_item }}">
@@ -92,7 +94,8 @@
<!-- events -->
{% if events %}
-<h4 style="{{ section_head }}">{{ _("Upcoming Calendar Events ") }}<span class="badge">({{ event_count }})</span></h4>
+<h4 style="{{ section_head }}">{{ _("Upcoming Calendar Events ") }}
+ <span class="badge">({{ event_count }})</span></h4>
<div>
{% for e in events %}
{% if loop.index==1 or events[loop.index-1].date != e.date %}
@@ -124,7 +127,8 @@
<!-- todo list -->
{% if todo_list %}
-<h4 style="{{ section_head }}">{{ _("Open To Do ") }}<span class="badge">({{ todo_count }})</span></h4>
+<h4 style="{{ section_head }}">{{ _("Open To Do ") }}
+ <span class="badge">({{ todo_count }})</span></h4>
<div>
{% for t in todo_list %}
<div style="{{ line_item }}">
diff --git a/erpnext/setup/doctype/naming_series/naming_series.py b/erpnext/setup/doctype/naming_series/naming_series.py
index 33deea4..60a1270 100644
--- a/erpnext/setup/doctype/naming_series/naming_series.py
+++ b/erpnext/setup/doctype/naming_series/naming_series.py
@@ -24,7 +24,8 @@
try:
options = self.get_options(d)
except frappe.DoesNotExistError:
- frappe.pass_does_not_exist_error()
+ frappe.msgprint('Unable to find DocType {0}'.format(d))
+ #frappe.pass_does_not_exist_error()
continue
if options:
diff --git a/erpnext/setup/doctype/notification_control/notification_control.js b/erpnext/setup/doctype/notification_control/notification_control.js
index c8e199b..7f58ede 100644
--- a/erpnext/setup/doctype/notification_control/notification_control.js
+++ b/erpnext/setup/doctype/notification_control/notification_control.js
@@ -9,7 +9,9 @@
frm.set_value("custom_message", frm.doc[frm.events.get_fieldname(frm)]);
},
set_message: function(frm) {
- frm.set_value(frm.events.get_fieldname(frm), frm.doc.custom_message);
+ if(frm.doc.select_transaction && frm.doc.select_transaction !== "") {
+ frm.set_value(frm.events.get_fieldname(frm), frm.doc.custom_message);
+ }
frm.save();
},
get_fieldname: function(frm) {
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.js b/erpnext/setup/doctype/sales_partner/sales_partner.js
index cb66b7f..143bf44 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.js
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.js
@@ -12,9 +12,3 @@
erpnext.utils.render_address_and_contact(cur_frm);
}
}
-
-cur_frm.fields_dict['targets'].grid.get_field("item_group").get_query = function(doc, dt, dn) {
- return{
- filters:{ 'is_group': 0 }
- }
-}
diff --git a/erpnext/setup/doctype/uom/uom.json b/erpnext/setup/doctype/uom/uom.json
index 99f97fe..cea21de 100644
--- a/erpnext/setup/doctype/uom/uom.json
+++ b/erpnext/setup/doctype/uom/uom.json
@@ -1,7 +1,7 @@
{
"allow_copy": 0,
"allow_import": 1,
- "allow_rename": 0,
+ "allow_rename": 1,
"autoname": "field:uom_name",
"beta": 0,
"creation": "2013-01-10 16:34:24",
@@ -15,6 +15,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "uom_name",
"fieldtype": "Data",
"hidden": 0,
@@ -41,6 +42,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Check this to disallow fractions. (for Nos)",
"fieldname": "must_be_whole_number",
"fieldtype": "Check",
@@ -74,7 +76,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-07-25 05:24:25.434534",
+ "modified": "2016-09-23 17:58:21.574996",
"modified_by": "Administrator",
"module": "Setup",
"name": "UOM",
@@ -144,5 +146,6 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "sort_order": "ASC",
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py
index 3337b1f..9971baa 100644
--- a/erpnext/setup/install.py
+++ b/erpnext/setup/install.py
@@ -26,7 +26,8 @@
return False
def set_single_defaults():
- for dt in frappe.db.sql_list("""select name from `tabDocType` where issingle=1"""):
+ for dt in ('Accounts Settings', 'Print Settings', 'HR Settings', 'Buying Settings',
+ 'Selling Settings', 'Stock Settings'):
default_values = frappe.db.sql("""select fieldname, `default` from `tabDocField`
where parent=%s""", dt)
if default_values:
@@ -37,6 +38,8 @@
b.save()
except frappe.MandatoryError:
pass
+ except frappe.ValidationError:
+ pass
frappe.db.set_default("date_format", "dd-mm-yyyy")
diff --git a/erpnext/setup/setup_wizard/install_fixtures.py b/erpnext/setup/setup_wizard/install_fixtures.py
index 0cc3575..a80e6d9 100644
--- a/erpnext/setup/setup_wizard/install_fixtures.py
+++ b/erpnext/setup/setup_wizard/install_fixtures.py
@@ -13,10 +13,6 @@
def install(country=None):
records = [
- dict(doctype='Role', role_name='Supplier', desk_access=0),
- dict(doctype='Role', role_name='Customer', desk_access=0),
- dict(doctype='Role', role_name='Student', desk_access=0),
-
# address template
{'doctype':"Address Template", "country": country},
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json
index 1ab1abe..01924a9 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.json
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.json
@@ -362,7 +362,7 @@
"in_list_view": 0,
"label": "Is Return",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
@@ -389,7 +389,7 @@
"in_list_view": 0,
"label": "Return Against Delivery Note",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Delivery Note",
"permlevel": 0,
"precision": "",
@@ -2908,7 +2908,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-09-16 05:55:36.487662",
+ "modified": "2016-09-23 18:01:54.003673",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note",
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index 454fc70..e9d4cb3 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -567,7 +567,7 @@
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)
- for warehouse in frappe.db.sql("select name from `tabWarehouse`"):
+ for warehouse in frappe.db.sql("select name from `tabWarehouse` where is_group = 0"):
repost_stock(new_name, warehouse[0])
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", existing_allow_negative_stock)
diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py
index 0be2bae..06df636 100644
--- a/erpnext/stock/doctype/material_request/material_request.py
+++ b/erpnext/stock/doctype/material_request/material_request.py
@@ -75,7 +75,7 @@
pc_obj = frappe.get_doc('Purchase Common')
pc_obj.validate_for_items(self)
- self.set_title()
+ # self.set_title()
# self.validate_qty_against_so()
diff --git a/erpnext/stock/doctype/material_request/test_material_request.py b/erpnext/stock/doctype/material_request/test_material_request.py
index ebdfa5a..8f43acd 100644
--- a/erpnext/stock/doctype/material_request/test_material_request.py
+++ b/erpnext/stock/doctype/material_request/test_material_request.py
@@ -66,7 +66,6 @@
"posting_date": "2013-03-01",
"posting_time": "00:00:00",
"purpose": "Material Receipt",
- "fiscal_year": "_Test Fiscal Year 2013",
"items": [
{
"conversion_factor": 1.0,
@@ -79,6 +78,7 @@
"transfer_qty": qty1,
"uom": "_Test UOM 1",
"t_warehouse": warehouse or "_Test Warehouse 1 - _TC",
+ "cost_center": "_Test Cost Center - _TC"
},
{
"conversion_factor": 1.0,
@@ -91,6 +91,7 @@
"transfer_qty": qty2,
"uom": "_Test UOM 1",
"t_warehouse": warehouse or "_Test Warehouse 1 - _TC",
+ "cost_center": "_Test Cost Center - _TC"
}
]
})
diff --git a/erpnext/stock/doctype/material_request_item/material_request_item.json b/erpnext/stock/doctype/material_request_item/material_request_item.json
index dd087c4..f7ca7d9 100644
--- a/erpnext/stock/doctype/material_request_item/material_request_item.json
+++ b/erpnext/stock/doctype/material_request_item/material_request_item.json
@@ -343,7 +343,7 @@
"bold": 1,
"collapsible": 0,
"columns": 2,
- "default": "Today",
+ "default": "",
"fieldname": "schedule_date",
"fieldtype": "Date",
"hidden": 0,
@@ -705,7 +705,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-09-18 14:38:38.517137",
+ "modified": "2016-10-17 04:58:33.317145",
"modified_by": "Administrator",
"module": "Stock",
"name": "Material Request Item",
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
index f10b634..0a6ec9f 100755
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
@@ -9,11 +9,13 @@
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
+ "editable_grid": 1,
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "supplier_section",
"fieldtype": "Section Break",
"hidden": 0,
@@ -39,6 +41,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break0",
"fieldtype": "Column Break",
"hidden": 0,
@@ -65,6 +68,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "{supplier_name}",
"fieldname": "title",
"fieldtype": "Data",
@@ -91,6 +95,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "",
"fieldname": "naming_series",
"fieldtype": "Select",
@@ -119,6 +124,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
+ "columns": 0,
"fieldname": "supplier",
"fieldtype": "Link",
"hidden": 0,
@@ -148,6 +154,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
+ "columns": 0,
"depends_on": "supplier",
"fieldname": "supplier_name",
"fieldtype": "Data",
@@ -173,6 +180,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"hidden": 0,
@@ -199,6 +207,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "Today",
"fieldname": "posting_date",
"fieldtype": "Date",
@@ -228,6 +237,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Time at which materials were received",
"fieldname": "posting_time",
"fieldtype": "Time",
@@ -257,6 +267,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "company",
"fieldtype": "Link",
@@ -287,6 +298,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "is_return",
"fieldtype": "Check",
"hidden": 0,
@@ -296,7 +308,7 @@
"in_list_view": 0,
"label": "Is Return",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
@@ -312,6 +324,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "is_return",
"fieldname": "return_against",
"fieldtype": "Link",
@@ -322,7 +335,7 @@
"in_list_view": 0,
"label": "Return Against Purchase Receipt",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Purchase Receipt",
"permlevel": 0,
"precision": "",
@@ -339,6 +352,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "section_addresses",
"fieldtype": "Section Break",
"hidden": 0,
@@ -364,6 +378,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "supplier_address",
"fieldtype": "Link",
"hidden": 0,
@@ -389,6 +404,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "contact_person",
"fieldtype": "Link",
"hidden": 0,
@@ -414,6 +430,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "",
"fieldname": "address_display",
"fieldtype": "Small Text",
@@ -439,6 +456,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "contact_display",
"fieldtype": "Small Text",
"hidden": 0,
@@ -463,6 +481,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "contact_mobile",
"fieldtype": "Small Text",
"hidden": 0,
@@ -487,6 +506,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "contact_email",
"fieldtype": "Small Text",
"hidden": 0,
@@ -511,6 +531,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "col_break_address",
"fieldtype": "Column Break",
"hidden": 0,
@@ -535,6 +556,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "",
"fieldname": "shipping_address",
"fieldtype": "Link",
@@ -562,6 +584,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "shipping_address_display",
"fieldtype": "Small Text",
"hidden": 0,
@@ -587,6 +610,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "currency_and_price_list",
"fieldtype": "Section Break",
"hidden": 0,
@@ -612,6 +636,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "currency",
"fieldtype": "Link",
"hidden": 0,
@@ -639,6 +664,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Rate at which supplier's currency is converted to company's base currency",
"fieldname": "conversion_rate",
"fieldtype": "Float",
@@ -667,6 +693,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break2",
"fieldtype": "Column Break",
"hidden": 0,
@@ -693,6 +720,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "buying_price_list",
"fieldtype": "Link",
"hidden": 0,
@@ -718,6 +746,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "buying_price_list",
"fieldname": "price_list_currency",
"fieldtype": "Link",
@@ -744,6 +773,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "buying_price_list",
"fieldname": "plc_conversion_rate",
"fieldtype": "Float",
@@ -770,6 +800,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "ignore_pricing_rule",
"fieldtype": "Check",
"hidden": 0,
@@ -794,6 +825,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "items_section",
"fieldtype": "Section Break",
"hidden": 0,
@@ -820,6 +852,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "items",
"fieldtype": "Table",
"hidden": 0,
@@ -847,6 +880,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "get_current_stock",
"fieldtype": "Button",
"hidden": 0,
@@ -873,6 +907,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break0",
"fieldtype": "Section Break",
"hidden": 0,
@@ -897,6 +932,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_total",
"fieldtype": "Currency",
"hidden": 0,
@@ -923,6 +959,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_net_total",
"fieldtype": "Currency",
"hidden": 0,
@@ -952,6 +989,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_27",
"fieldtype": "Column Break",
"hidden": 0,
@@ -975,6 +1013,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "total",
"fieldtype": "Currency",
"hidden": 0,
@@ -1001,6 +1040,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "net_total",
"fieldtype": "Currency",
"hidden": 0,
@@ -1028,6 +1068,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Add / Edit Taxes and Charges",
"fieldname": "taxes_section",
"fieldtype": "Section Break",
@@ -1055,6 +1096,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "taxes_and_charges",
"fieldtype": "Link",
@@ -1083,6 +1125,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "taxes",
"fieldtype": "Table",
"hidden": 0,
@@ -1110,6 +1153,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "other_charges_calculation",
"fieldtype": "HTML",
"hidden": 0,
@@ -1135,6 +1179,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "totals",
"fieldtype": "Section Break",
@@ -1162,6 +1207,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_taxes_and_charges_added",
"fieldtype": "Currency",
"hidden": 0,
@@ -1189,6 +1235,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_taxes_and_charges_deducted",
"fieldtype": "Currency",
"hidden": 0,
@@ -1216,6 +1263,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_total_taxes_and_charges",
"fieldtype": "Currency",
"hidden": 0,
@@ -1243,6 +1291,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break3",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1268,6 +1317,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "taxes_and_charges_added",
"fieldtype": "Currency",
"hidden": 0,
@@ -1295,6 +1345,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "taxes_and_charges_deducted",
"fieldtype": "Currency",
"hidden": 0,
@@ -1322,6 +1373,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "total_taxes_and_charges",
"fieldtype": "Currency",
"hidden": 0,
@@ -1349,6 +1401,7 @@
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "discount_amount",
+ "columns": 0,
"fieldname": "section_break_42",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1374,6 +1427,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "Grand Total",
"fieldname": "apply_discount_on",
"fieldtype": "Select",
@@ -1401,6 +1455,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_discount_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -1427,6 +1482,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_44",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1451,6 +1507,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "additional_discount_percentage",
"fieldtype": "Float",
"hidden": 0,
@@ -1476,6 +1533,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "discount_amount",
"fieldtype": "Currency",
"hidden": 0,
@@ -1502,6 +1560,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_46",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1526,6 +1585,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_grand_total",
"fieldtype": "Currency",
"hidden": 0,
@@ -1553,6 +1613,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "base_in_words",
"fieldtype": "Data",
@@ -1580,6 +1641,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "base_rounded_total",
"fieldtype": "Currency",
"hidden": 0,
@@ -1607,6 +1669,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_50",
"fieldtype": "Column Break",
"hidden": 0,
@@ -1631,6 +1694,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "grand_total",
"fieldtype": "Currency",
"hidden": 0,
@@ -1658,6 +1722,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "in_words",
"fieldtype": "Data",
"hidden": 0,
@@ -1685,6 +1750,7 @@
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "terms",
+ "columns": 0,
"fieldname": "terms_section_break",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1711,6 +1777,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "tc_name",
"fieldtype": "Link",
"hidden": 0,
@@ -1738,6 +1805,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "terms",
"fieldtype": "Text Editor",
"hidden": 0,
@@ -1765,6 +1833,7 @@
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "supplied_items",
+ "columns": 0,
"description": "",
"fieldname": "raw_material_details",
"fieldtype": "Section Break",
@@ -1792,6 +1861,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "No",
"description": "",
"fieldname": "is_subcontracted",
@@ -1821,6 +1891,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "supplier_warehouse",
"fieldtype": "Link",
@@ -1851,6 +1922,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "supplied_items",
"fieldtype": "Table",
"hidden": 0,
@@ -1878,6 +1950,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "bill_no",
"fieldtype": "Data",
"hidden": 1,
@@ -1904,6 +1977,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "bill_date",
"fieldtype": "Date",
"hidden": 1,
@@ -1930,6 +2004,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "more_info",
"fieldtype": "Section Break",
"hidden": 0,
@@ -1956,6 +2031,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"default": "Draft",
"fieldname": "status",
"fieldtype": "Select",
@@ -1986,6 +2062,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Warehouse where you are maintaining stock of rejected items",
"fieldname": "rejected_warehouse",
"fieldtype": "Link",
@@ -2014,6 +2091,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 1,
@@ -2043,6 +2121,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "range",
"fieldtype": "Data",
"hidden": 1,
@@ -2069,6 +2148,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break4",
"fieldtype": "Column Break",
"hidden": 0,
@@ -2095,6 +2175,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "per_billed",
"fieldtype": "Percent",
"hidden": 0,
@@ -2120,6 +2201,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "printing_settings",
"fieldtype": "Section Break",
"hidden": 0,
@@ -2145,6 +2227,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "letter_head",
"fieldtype": "Link",
"hidden": 0,
@@ -2170,6 +2253,7 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "select_print_heading",
"fieldtype": "Link",
"hidden": 0,
@@ -2197,6 +2281,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "language",
"fieldtype": "Data",
"hidden": 0,
@@ -2222,6 +2307,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "other_details",
"fieldtype": "HTML",
"hidden": 1,
@@ -2250,6 +2336,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "instructions",
"fieldtype": "Small Text",
"hidden": 0,
@@ -2276,6 +2363,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "remarks",
"fieldtype": "Small Text",
"hidden": 0,
@@ -2301,6 +2389,7 @@
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "transporter_name",
+ "columns": 0,
"fieldname": "transporter_info",
"fieldtype": "Section Break",
"hidden": 0,
@@ -2326,6 +2415,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "transporter_name",
"fieldtype": "Data",
"hidden": 0,
@@ -2352,6 +2442,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break5",
"fieldtype": "Column Break",
"hidden": 0,
@@ -2377,6 +2468,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "lr_no",
"fieldtype": "Data",
@@ -2406,6 +2498,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "lr_date",
"fieldtype": "Date",
@@ -2444,7 +2537,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-06-30 13:42:23.310309",
+ "modified": "2016-09-23 18:02:17.332333",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt",
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
index 20630b2..6d6ae97 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -4,9 +4,9 @@
from __future__ import unicode_literals
import frappe
-from frappe.utils import flt, cint
+from frappe.utils import flt, cint, nowdate
-from frappe import _
+from frappe import throw, _
import frappe.defaults
from erpnext.controllers.buying_controller import BuyingController
@@ -58,6 +58,10 @@
pc_obj = frappe.get_doc('Purchase Common')
self.check_for_closed_status(pc_obj)
+
+ if self.posting_date > nowdate():
+ throw(_("Posting Date cannot be future date"))
+
def validate_with_previous_doc(self):
super(PurchaseReceipt, self).validate_with_previous_doc({
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 7c9e1e6..85166a6 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -348,6 +348,7 @@
}
cur_frm.cscript.purpose = function(doc, cdt, cdn) {
+ cur_frm.fields_dict.items.grid.refresh();
cur_frm.cscript.toggle_related_fields(doc);
}
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index c70613b..2b031d1 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -75,6 +75,9 @@
frappe.model.set_value(cdt, cdn, "valuation_rate", r.message.rate);
frappe.model.set_value(cdt, cdn, "current_qty", r.message.qty);
frappe.model.set_value(cdt, cdn, "current_valuation_rate", r.message.rate);
+ frappe.model.set_value(cdt, cdn, "current_amount", r.message.rate * r.message.qty);
+ frappe.model.set_value(cdt, cdn, "amount", r.message.rate * r.message.qty);
+
}
});
}
@@ -92,7 +95,15 @@
}
});
}
- }
+ },
+ set_amount_quantity: function(doc, cdt, cdn) {
+ var d = frappe.model.get_doc(cdt, cdn);
+ if (d.qty & d.valuation_rate) {
+ frappe.model.set_value(cdt, cdn, "amount", flt(d.qty) * flt(d.valuation_rate));
+ frappe.model.set_value(cdt, cdn, "quantity_difference", flt(d.qty) - flt(d.current_qty));
+ frappe.model.set_value(cdt, cdn, "amount_difference", flt(d.amount) - flt(d.current_amount));
+ }
+ }
});
frappe.ui.form.on("Stock Reconciliation Item", {
@@ -104,7 +115,14 @@
},
item_code: function(frm, cdt, cdn) {
frm.events.set_valuation_rate_and_qty(frm, cdt, cdn);
+ },
+ qty: function(frm, cdt, cdn) {
+ frm.events.set_amount_quantity(frm, cdt, cdn);
+ },
+ valuation_rate: function(frm, cdt, cdn) {
+ frm.events.set_amount_quantity(frm, cdt, cdn);
}
+
});
erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json
index 291f14d..0c1c10c 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json
@@ -389,7 +389,7 @@
"istable": 0,
"max_attachments": 1,
"menu_index": 0,
- "modified": "2016-09-02 04:09:18.909485",
+ "modified": "2016-10-05 13:03:39.887647",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Reconciliation",
@@ -405,6 +405,7 @@
"export": 0,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
index 0f5cb96..4ab49e5 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
@@ -27,6 +27,7 @@
self.remove_items_with_no_change()
self.validate_data()
self.validate_expense_account()
+ self.set_total_qty_and_amount()
def on_submit(self):
self.update_stock_ledger()
@@ -236,6 +237,13 @@
elif not frappe.db.sql("""select name from `tabStock Ledger Entry` limit 1"""):
if frappe.db.get_value("Account", self.expense_account, "report_type") == "Profit and Loss":
frappe.throw(_("Difference Account must be a Asset/Liability type account, since this Stock Reconciliation is an Opening Entry"), OpeningEntryAccountError)
+
+ def set_total_qty_and_amount(self):
+ for d in self.get("items"):
+ d.amount = flt(d.qty) * flt(d.valuation_rate)
+ d.current_amount = flt(d.current_qty) * flt(d.current_valuation_rate)
+ d.quantity_difference = flt(d.qty) - flt(d.current_qty)
+ d.amount_difference = flt(d.amount) - flt(d.current_amount)
def get_items_for(self, warehouse):
self.items = []
diff --git a/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json b/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json
index efd0dee..5452aa1 100644
--- a/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json
+++ b/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json
@@ -173,7 +173,7 @@
"bold": 0,
"collapsible": 0,
"columns": 2,
- "description": "Do not include symbols (ex. $)",
+ "description": "",
"fieldname": "valuation_rate",
"fieldtype": "Currency",
"hidden": 0,
@@ -200,6 +200,32 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Amount",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_3",
"fieldtype": "Section Break",
"hidden": 0,
@@ -207,6 +233,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "label": "Before reconciliation",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -225,7 +252,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "description": "Before reconciliation",
+ "description": "",
"fieldname": "current_qty",
"fieldtype": "Float",
"hidden": 0,
@@ -277,9 +304,9 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "description": "Before reconciliation",
+ "description": "",
"fieldname": "current_valuation_rate",
- "fieldtype": "Read Only",
+ "fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -298,6 +325,135 @@
"search_index": 0,
"set_only_once": 0,
"unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "",
+ "fieldname": "current_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Current Amount",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "section_break_14",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "quantity_difference",
+ "fieldtype": "Read Only",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Quantity Difference",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_16",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "amount_difference",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Amount Difference",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
}
],
"hide_heading": 0,
@@ -311,7 +467,7 @@
"istable": 1,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-09-05 07:10:19.571562",
+ "modified": "2016-09-28 06:43:53.764287",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Reconciliation Item",
diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py
index f657ebf..8e7941c 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.py
+++ b/erpnext/stock/doctype/warehouse/warehouse.py
@@ -150,7 +150,10 @@
return new_warehouse
def rename_account_for(self, olddn, newdn, merge):
- old_account = self.get_account(olddn)
+ if self.is_group:
+ old_account = self.get_account()
+ else:
+ old_account = self.get_account(olddn)
if old_account:
new_account = None
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 1e3bd8a..e5dd735 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -328,10 +328,11 @@
@frappe.whitelist()
def get_pos_profile(company):
+ condition = "and company = '%s'"%(company) if company else ''
pos_profile = frappe.db.sql("""select * from `tabPOS Profile` where user = %s
- and company = %s""", (frappe.session['user'], company), as_dict=1)
+ {cond}""".format(cond=condition), (frappe.session['user']), as_dict=1)
- if not pos_profile:
+ if not pos_profile and company:
pos_profile = frappe.db.sql("""select * from `tabPOS Profile`
where ifnull(user,'') = '' and company = %s""", company, as_dict=1)
diff --git a/erpnext/stock/stock_balance.py b/erpnext/stock/stock_balance.py
index 22fa12a..096f6c0 100644
--- a/erpnext/stock/stock_balance.py
+++ b/erpnext/stock/stock_balance.py
@@ -230,7 +230,7 @@
pass
def repost_all_stock_vouchers():
- warehouses_with_account = frappe.db.sql_list("""select master_name from tabAccount
+ warehouses_with_account = frappe.db.sql_list("""select warehouse from tabAccount
where ifnull(account_type, '') = 'Stock' and (warehouse is not null and warehouse != '')
and is_group=0""")
@@ -244,7 +244,7 @@
i = 0
for voucher_type, voucher_no in vouchers:
i+=1
- print i, "/", len(vouchers)
+ print i, "/", len(vouchers), voucher_type, voucher_no
try:
for dt in ["Stock Ledger Entry", "GL Entry"]:
frappe.db.sql("""delete from `tab%s` where voucher_type=%s and voucher_no=%s"""%
diff --git a/erpnext/support/doctype/warranty_claim/warranty_claim.js b/erpnext/support/doctype/warranty_claim/warranty_claim.js
index cf9d806..9fed265 100644
--- a/erpnext/support/doctype/warranty_claim/warranty_claim.js
+++ b/erpnext/support/doctype/warranty_claim/warranty_claim.js
@@ -37,7 +37,7 @@
cur_frm.cscript.onload = function(doc,cdt,cdn){
if(!doc.status)
- set_multiple(dt,dn,{status:'Open'});
+ set_multiple(cdt,cdn,{status:'Open'});
}
cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
diff --git a/erpnext/support/doctype/warranty_claim/warranty_claim.py b/erpnext/support/doctype/warranty_claim/warranty_claim.py
index b4427be..a3428a2 100644
--- a/erpnext/support/doctype/warranty_claim/warranty_claim.py
+++ b/erpnext/support/doctype/warranty_claim/warranty_claim.py
@@ -19,7 +19,7 @@
if session['user'] != 'Guest' and not self.customer:
frappe.throw(_("Customer is required"))
- if self.status=="Closed" and \
+ if self.status=="Closed" and not self.resolution_date and \
frappe.db.get_value("Warranty Claim", self.name, "status")!="Closed":
self.resolution_date = now_datetime()
diff --git a/erpnext/templates/emails/request_for_quotation.html b/erpnext/templates/emails/request_for_quotation.html
index aedd8e2..b4dfb88 100644
--- a/erpnext/templates/emails/request_for_quotation.html
+++ b/erpnext/templates/emails/request_for_quotation.html
@@ -4,8 +4,8 @@
<p>{{_("Please click on the following link to set your new password")}}:</p>
<p><a href="{{ update_password_link }}">{{ update_password_link }}</a></p>
{% else %}
-<p>{{_("Request for quotation can be access by clicking following link")}}:</p>
+<p>{{_("The request for quotation can be accessed by clicking on the following link")}}:</p>
<p><a href="{{ rfq_link }}">Submit your Quotation</a></p>
{% endif %}
<p>{{_("Thank you")}},<br>
-{{ user_fullname }}</p>
\ No newline at end of file
+{{ user_fullname }}</p>
diff --git a/erpnext/templates/generators/student_admission.html b/erpnext/templates/generators/student_admission.html
index 7eb9226..ae70df8 100644
--- a/erpnext/templates/generators/student_admission.html
+++ b/erpnext/templates/generators/student_admission.html
@@ -16,38 +16,10 @@
<div>{{ introduction }}</div>
{% endif %}
-{%- if eligibility -%}
-<h3> Eligibility </h3>
-<div>{{ eligibility }}</div>
-{% endif %}
-
-<table class="table table-bordered" style="margin-top: 20px; width: 30%">
- <tr>
- <th> Program</th>
- <td>{{ program }} </td>
- </tr>
- <tr>
- <th> Academic Year</th>
- <td>{{ academic_year }} </td>
- </tr>
- <tr>
- <th> Admission Start Date</th>
- <td>{{ frappe.utils.formatdate(admission_start_date) }}</td>
- </tr>
- <tr>
- <th> Admission End Date</th>
- <td>{{ frappe.utils.formatdate(admission_end_date) }}</td>
- </tr>
- <tr>
- <th> Application Fee</th>
- <td>{{ frappe.utils.fmt_money(application_fee, 2, currency) }}</td>
- </tr>
-</table>
-
{%- if application_form_route -%}
<p>
<a class='btn btn-primary'
- href='/{{ doc.application_form_route }}?program={{ doc.program }}&academic_year={{ doc.academic_year }}&new=1'>
+ href='/{{ doc.application_form_route }}'>
{{ _("Apply Now") }}</a>
</p>
{% endif %}
diff --git a/erpnext/templates/includes/navbar/navbar_items.html b/erpnext/templates/includes/navbar/navbar_items.html
index c7af2fd..f0c780d 100644
--- a/erpnext/templates/includes/navbar/navbar_items.html
+++ b/erpnext/templates/includes/navbar/navbar_items.html
@@ -1,7 +1,7 @@
{% extends 'frappe/templates/includes/navbar/navbar_items.html' %}
{% block navbar_right_extension %}
- <li class="shopping-cart">
+ <li class="shopping-cart hidden">
<div class="cart-icon small">
<a class="dropdown-toggle" href="#" data-toggle="dropdown" id="navLogin">
Cart <span class="badge-wrapper" id="cart-count"></span>
diff --git a/erpnext/templates/includes/rfq.js b/erpnext/templates/includes/rfq.js
index 42dcc3a..46357d4 100644
--- a/erpnext/templates/includes/rfq.js
+++ b/erpnext/templates/includes/rfq.js
@@ -18,6 +18,7 @@
this.change_rate();
this.terms();
this.submit_rfq();
+ this.navigate_quotations();
},
onfocus_select_all: function(){
@@ -89,5 +90,12 @@
}
})
})
+ },
+
+ navigate_quotations: function() {
+ $('.quotations').click(function(){
+ name = $(this).attr('idx')
+ window.location.href = "/quotations/" + encodeURIComponent(name);
+ })
}
})
diff --git a/erpnext/templates/pages/order.py b/erpnext/templates/pages/order.py
index 1a40280..296b907 100644
--- a/erpnext/templates/pages/order.py
+++ b/erpnext/templates/pages/order.py
@@ -14,10 +14,10 @@
context.doc.set_indicator()
context.parents = frappe.form_dict.parents
- context.payment_ref = frappe.db.get_value("Payment Request",
+ context.payment_ref = frappe.db.get_value("Payment Request",
{"reference_name": frappe.form_dict.name}, "name")
context.enabled_checkout = frappe.get_doc("Shopping Cart Settings").enable_checkout
- if not context.doc.has_website_permission("read"):
+ if not frappe.has_website_permission(context.doc):
frappe.throw(_("Not Permitted"), frappe.PermissionError)
diff --git a/erpnext/templates/pages/rfq.html b/erpnext/templates/pages/rfq.html
index a2b6a66..591d046 100644
--- a/erpnext/templates/pages/rfq.html
+++ b/erpnext/templates/pages/rfq.html
@@ -68,6 +68,31 @@
<textarea class="form-control terms-feedback" style="height: 100px;"></textarea>
</div>
</div>
+ <hr>
+ <div class="row">
+ <div class="result">
+ <div class="col-xs-12">
+ <p class="text-muted small">{{ _("Quotations: ") }}</p>
+ {% if doc.rfq_links %}
+ {% for d in doc.rfq_links %}
+ <div class="web-list-item transaction-list-item quotations" idx="{{d.name}}">
+ <div class="row">
+ <div class="col-sm-6">
+ <span class="indicator darkgrey"><a href="/quotations/{{d.name}}">{{d.name}}</a></span>
+ </div>
+ <div class="col-sm-3">
+ <span class="small darkgrey">{{d.status}}</span>
+ </div>
+ <div class="col-sm-3">
+ <span class="small darkgrey">{{d.transaction_date}}</span>
+ </div>
+ </div>
+ </div>
+ {% endfor %}
+ {% endif %}
+ </div>
+ </div>
+ </div>
</div>
</div>
diff --git a/erpnext/templates/pages/rfq.py b/erpnext/templates/pages/rfq.py
index decae41..abc2890 100644
--- a/erpnext/templates/pages/rfq.py
+++ b/erpnext/templates/pages/rfq.py
@@ -4,6 +4,7 @@
from __future__ import unicode_literals
import frappe
from frappe import _
+from frappe.utils import formatdate
from erpnext.controllers.website_list_for_contact import (get_customers_suppliers,
get_party_details)
@@ -13,6 +14,7 @@
context.doc = frappe.get_doc(frappe.form_dict.doctype, frappe.form_dict.name)
context.parents = frappe.form_dict.parents
context.doc.supplier = get_supplier()
+ context.doc.rfq_links = get_link_quotation(context.doc.supplier, context.doc.name)
unauthorized_user(context.doc.supplier)
update_supplier_details(context)
context["title"] = frappe.form_dict.name
@@ -41,4 +43,18 @@
context.doc.currency = supplier_doc.default_currency or frappe.db.get_value("Company", context.doc.company, "default_currency")
context.doc.currency_symbol = frappe.db.get_value("Currency", context.doc.currency, "symbol")
context.doc.number_format = frappe.db.get_value("Currency", context.doc.currency, "number_format")
- context.doc.buying_price_list = supplier_doc.default_price_list or ''
\ No newline at end of file
+ context.doc.buying_price_list = supplier_doc.default_price_list or ''
+
+def get_link_quotation(supplier, rfq):
+ quotation = frappe.db.sql(""" select distinct `tabSupplier Quotation Item`.parent as name,
+ `tabSupplier Quotation`.status, `tabSupplier Quotation`.transaction_date from
+ `tabSupplier Quotation Item`, `tabSupplier Quotation` where `tabSupplier Quotation`.docstatus < 2 and
+ `tabSupplier Quotation Item`.request_for_quotation =%(name)s and
+ `tabSupplier Quotation Item`.parent = `tabSupplier Quotation`.name and
+ `tabSupplier Quotation`.supplier = %(supplier)s order by `tabSupplier Quotation`.creation desc""",
+ {'name': rfq, 'supplier': supplier}, as_dict=1)
+
+ for data in quotation:
+ data.transaction_date = formatdate(data.transaction_date)
+
+ return quotation or None
diff --git a/erpnext/templates/print_formats/includes/item_table_description.html b/erpnext/templates/print_formats/includes/item_table_description.html
index e8a98f0..16e98e0 100644
--- a/erpnext/templates/print_formats/includes/item_table_description.html
+++ b/erpnext/templates/print_formats/includes/item_table_description.html
@@ -3,8 +3,7 @@
{% if doc.in_format_data("image") and doc.get("image") and not doc.is_print_hide("image")-%}
<div class="pull-left" style="width: 20%; margin-right: 10px;">
- <div class="square-image" style="background-image: url('{{ doc.image }}')">
- </div>
+ <img class="print-item-image" src="{{ doc.image }}" alt="">
</div>
{%- endif %}
diff --git a/erpnext/translations/fr.csv b/erpnext/translations/fr.csv
index 6292472..577bdf7 100644
--- a/erpnext/translations/fr.csv
+++ b/erpnext/translations/fr.csv
@@ -413,7 +413,7 @@
DocType: Account,Cost of Goods Sold,Coût des marchandises vendues
DocType: Purchase Invoice,Yearly,Annuel
apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +225,Please enter Cost Center,S'il vous plaît entrer Centre de coûts
-DocType: Journal Entry Account,Sales Order,Bon de commande
+DocType: Journal Entry Account,Sales Order,commande client
apps/erpnext/erpnext/accounts/report/gross_profit/gross_profit.py +68,Avg. Selling Rate,Moy. Taux de vente
DocType: Assessment,Examiner Name,Nom de l'examinateur
apps/erpnext/erpnext/utilities/transaction_base.py +149,Quantity cannot be a fraction in row {0},La quantité ne peut pas être une fraction à la ligne {0}
@@ -1007,7 +1007,7 @@
DocType: GL Entry,Against,Contre
DocType: Item,Default Selling Cost Center,Coût des marchandises vendues
DocType: Sales Partner,Implementation Partner,Partenaire de mise en œuvre
-apps/erpnext/erpnext/controllers/selling_controller.py +231,Sales Order {0} is {1},Bon de commande {0} est {1}
+apps/erpnext/erpnext/controllers/selling_controller.py +231,Sales Order {0} is {1},commande client {0} est {1}
DocType: Opportunity,Contact Info,Information de contact
apps/erpnext/erpnext/config/stock.py +299,Making Stock Entries,Faire des entrées stock
DocType: Packing Slip,Net Weight UOM,Unité de mesure Poids Net
@@ -1152,7 +1152,7 @@
,Accounts Payable Summary,Le résumé des comptes à payer
apps/erpnext/erpnext/accounts/doctype/gl_entry/gl_entry.py +196,Not authorized to edit frozen Account {0},N'êtes pas autorisé à modifier le compte gelé {0}
DocType: Journal Entry,Get Outstanding Invoices,Obtenez les factures impayées
-apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py +62,Sales Order {0} is not valid,Bon de commande {0} invalide
+apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py +62,Sales Order {0} is not valid,commande client {0} invalide
apps/erpnext/erpnext/setup/doctype/company/company.py +185,"Sorry, companies cannot be merged","Désolé , les entreprises ne peuvent pas être fusionnés"
apps/erpnext/erpnext/stock/doctype/material_request/material_request.py +139,"The total Issue / Transfer quantity {0} in Material Request {1} \
cannot be greater than requested quantity {2} for Item {3}",La quantité Problème / transfert total {0} dans Material Request {1} \ ne peut pas être supérieure à la quantité demandée {2} pour le poste {3}
@@ -1607,7 +1607,7 @@
apps/erpnext/erpnext/controllers/buying_controller.py +300,Row #{0}: Rejected Warehouse is mandatory against rejected Item {1},Row # {0}: Entrepôt Rejeté est obligatoire contre Item rejeté {1}
apps/erpnext/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +731,Payment,Paiement
DocType: Production Order Operation,Actual Time and Cost,Temps réel et coût
-apps/erpnext/erpnext/stock/doctype/material_request/material_request.py +54,Material Request of maximum {0} can be made for Item {1} against Sales Order {2},Demande de Matériel d'un maximum de {0} peut être faite pour l'article {1} par rapport au bon de commande {2}
+apps/erpnext/erpnext/stock/doctype/material_request/material_request.py +54,Material Request of maximum {0} can be made for Item {1} against Sales Order {2},Demande de Matériel d'un maximum de {0} peut être faite pour l'article {1} par rapport au commande client {2}
DocType: Employee,Salutation,Titre
DocType: Pricing Rule,Brand,Marque
DocType: Course,Course Abbreviation,Abréviation de cours
@@ -1883,7 +1883,7 @@
DocType: Quality Inspection,In Process,En cours
DocType: Authorization Rule,Itemwise Discount,Remise (par Article)
apps/erpnext/erpnext/config/accounts.py +69,Tree of financial accounts.,Arbre des comptes financiers.
-apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py +334,{0} against Sales Order {1},{0} contre le bon de commande de vente {1}
+apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py +334,{0} against Sales Order {1},{0} contre le commande client de vente {1}
DocType: Account,Fixed Asset,Actifs immobilisés
apps/erpnext/erpnext/config/stock.py +304,Serialized Inventory,Inventaire sérialisé
DocType: Activity Type,Default Billing Rate,Prix facturation par défaut
@@ -2182,7 +2182,7 @@
DocType: Purchase Receipt Item,Recd Quantity,Quantité reçue
apps/erpnext/erpnext/schools/doctype/program_enrollment/program_enrollment.py +54,Fee Records Created - {0},Records Fee Créé - {0}
DocType: Asset Category Account,Asset Category Account,Catégorie d'actif compte
-apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py +103,Cannot produce more Item {0} than Sales Order quantity {1},Ne peut pas produire plus d'article {0} que de la qté du bon de commande {1}
+apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py +103,Cannot produce more Item {0} than Sales Order quantity {1},Ne peut pas produire plus d'article {0} que de la qté du commande client {1}
apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py +504,Stock Entry {0} is not submitted,Entrée stock {0} est pas soumis
DocType: Payment Reconciliation,Bank / Cash Account,Banque et liquidités
DocType: Tax Rule,Billing City,Ville de facturation
@@ -2532,7 +2532,7 @@
DocType: Program Enrollment Tool,Get Students,Obtenez étudiants
DocType: Serial No,Under Warranty,Sous garantie
apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +490,[Error],[Erreur]
-DocType: Sales Order,In Words will be visible once you save the Sales Order.,En Toutes Lettres. Sera visible une fois que vous enregistrerez le bon de commande.
+DocType: Sales Order,In Words will be visible once you save the Sales Order.,En Toutes Lettres. Sera visible une fois que vous enregistrerez le commande client.
,Employee Birthday,Anniversaire de l'employé
apps/erpnext/erpnext/controllers/status_updater.py +175,Limit Crossed,Limite Crossed
apps/erpnext/erpnext/setup/setup_wizard/industry_type.py +55,Venture Capital,Capital Risque
@@ -2769,7 +2769,7 @@
apps/erpnext/erpnext/accounts/page/pos/pos.js +1190,Please select customer,S'il vous plaît sélectionner client
DocType: C-Form,I,I
DocType: Company,Asset Depreciation Cost Center,Asset Centre Amortissements
-DocType: Sales Order Item,Sales Order Date,Date du bon de Commande
+DocType: Sales Order Item,Sales Order Date,Date du commande client
DocType: Sales Invoice Item,Delivered Qty,Qté livrée
DocType: Production Planning Tool,"If checked, all the children of each production item will be included in the Material Requests.","Si elle est cochée, tous les enfants de chaque élément de production seront inclus dans les demandes de matériel."
apps/erpnext/erpnext/stock/doctype/warehouse/warehouse.py +86,Warehouse {0}: Company is mandatory,Entrepôt {0}: Société est obligatoire
@@ -3459,7 +3459,7 @@
apps/erpnext/erpnext/accounts/report/sales_register/sales_register.py +69,Customer Id,Client Id
apps/erpnext/erpnext/hr/doctype/employee_attendance_tool/employee_attendance_tool.js +176,Mark Absent,Marquer absent
DocType: Journal Entry Account,Exchange Rate,Taux de change
-apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +471,Sales Order {0} is not submitted,Bon de commande {0} n'a pas été transmis
+apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +471,Sales Order {0} is not submitted,commande client {0} n'a pas été transmis
DocType: Homepage,Tag Line,Tag ligne
DocType: Fee Component,Fee Component,Component Fee
apps/erpnext/erpnext/buying/doctype/purchase_order/purchase_order.js +857,Add items from,Ajouter des articles de
diff --git a/patches.txt b/patches.txt
deleted file mode 100644
index 8f127fe..0000000
--- a/patches.txt
+++ /dev/null
@@ -1 +0,0 @@
-bench.patches.v3.deprecate_old_config