Merge pull request #14329 from pratu16x7/hub-fixes
[hub][minor] remove links #14309
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..aa3a104
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,68 @@
+---
+name: Bug report
+about: Create a report to help us improve
+
+---
+
+Issue: Bug report
+
+Our project, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
+
+**Do the checklist before filing an issue:**
+ - [ ] Have a usage question? Ask your question on [Discuss Forum](https://discuss.erpnext.com). We use [Discuss Forum](https://discuss.erpnext.com) for usage question and GitHub for bugs.
+ - [ ] Can you replicate the issue?
+ - [ ] Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome
+
+**Describe the bug** :chart_with_downwards_trend:
+A clear and concise description of what the bug is.
+
+**To Reproduce** :page_with_curl:
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior** :chart_with_upwards_trend:
+A clear and concise description of what you expected to happen.
+
+**Screenshots** :crystal_ball:
+If applicable, add screenshots to help explain your problem.
+
+**Desktop (please complete the following information):** :cyclone:
+ - OS:
+ - [ ] Linux
+ - [ ] macOS
+ - [ ] Windows
+ - [ ] Others? Please mention:
+ - Browser:
+ - [ ] Safari
+ - [ ] Chrome
+ - [ ] Firefox
+ - [ ] Other? Please mention:
+
+**Smartphone (please complete the following information):** :iphone: :computer:
+ - Device:
+ - [ ] iPhone
+ - [ ] Android
+ - Browser:
+ - [ ] Safari
+ - [ ] Chrome
+ - [ ] Firefox
+ - [ ] Other? Please mention:
+
+**Version Information**
+- Which branch are you on?
+ - [ ] `master` :star2:
+ - [ ] `develop` :fire:
+- Frappe Version:
+- ERPNext Version:
+
+**Additional context** :page_facing_up:
+Add any other context about the problem here.
+
+**Possible Solution** :bookmark_tabs:
+Any idea what might be causing the issue. Or if you have a proposed solution to the problem,
+
+**Please don't be intimidated by the long list of options you've fill. Try to fill out as much as you can. Remember, the more the information the easier it is for us to replicate and fix the issue** :grin:
+
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..e09e5e9
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,21 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+
+---
+
+Issue: Feature Request
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
+
+
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..8e2bd85
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,28 @@
+Pull-Request
+
+- [ ] Have you followed the guidelines in our Contributing document?
+- [ ] Have you checked to ensure there aren't other open [Pull Requests](../pulls) for the same update/change?
+- [ ] Have you lint your code locally prior to submission?
+- [ ] Have you successfully run tests with your changes locally?
+- [ ] Does your commit message have an explanation for your changes and why you'd like us to include them?
+- [ ] Docs have been added / updated
+- [ ] Tests for the changes have been added (for bug fixes / features)
+- [ ] Did you modify the existing test cases? If yes, why?
+
+---
+
+What type of a PR is this?
+
+- [ ] Changes to Existing Features
+- [ ] New Feature Submissions
+- [ ] Bug Fix
+- [ ] Breaking Change
+
+---
+
+- Motivation and Context (What existing problem does the pull request solve):
+- Related Issue:
+- Screenshots (if applicable, remember, a picture tells a thousand words):
+
+**Please don't be intimidated by the long list of options you've fill. Try to fill out as much as you can. Remember, the more the information the easier it is for us to test and get your pull request merged** :grin:
+
diff --git a/.gitignore b/.gitignore
index 68272c7..2b52a49 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,9 @@
dist/
erpnext/docs/current
*.swp
+<<<<<<< HEAD
*.swo
__pycache__
*~
+=======
+>>>>>>> master
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 28212c5..b9e3cfc 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -5,7 +5,7 @@
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
-__version__ = '10.1.35'
+__version__ = '10.1.36'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/bank_account/__init__.py b/erpnext/accounts/doctype/bank_account/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/accounts/doctype/bank_account/__init__.py
diff --git a/erpnext/accounts/doctype/bank_account/bank_account.js b/erpnext/accounts/doctype/bank_account/bank_account.js
new file mode 100644
index 0000000..5ac41e4
--- /dev/null
+++ b/erpnext/accounts/doctype/bank_account/bank_account.js
@@ -0,0 +1,28 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.ui.form.on('Bank Account', {
+ setup: function(frm) {
+ frm.set_query("account", function() {
+ return {
+ filters: {
+ 'account_type': 'Bank',
+ 'company': frm.doc.company,
+ 'is_group': 0
+ }
+ };
+ });
+ },
+ refresh: function(frm) {
+ frappe.dynamic_link = { doc: frm.doc, fieldname: 'name', doctype: 'Bank Account' }
+
+ frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
+
+ if (frm.doc.__islocal) {
+ frappe.contacts.clear_address_and_contact(frm);
+ }
+ else {
+ frappe.contacts.render_address_and_contact(frm);
+ }
+ }
+});
diff --git a/erpnext/accounts/doctype/bank_account/bank_account.json b/erpnext/accounts/doctype/bank_account/bank_account.json
new file mode 100644
index 0000000..4f84cbb
--- /dev/null
+++ b/erpnext/accounts/doctype/bank_account/bank_account.json
@@ -0,0 +1,533 @@
+{
+ "allow_copy": 0,
+ "allow_guest_to_view": 0,
+ "allow_import": 0,
+ "allow_rename": 1,
+ "autoname": "field:account_name",
+ "beta": 0,
+ "creation": "2017-05-29 21:35:13.136357",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Setup",
+ "editable_grid": 0,
+ "engine": "InnoDB",
+ "fields": [
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "account_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 1,
+ "in_list_view": 1,
+ "in_standard_filter": 1,
+ "label": "Account Name",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 1,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Account",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "company",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 1,
+ "label": "Company",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "bank",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Bank",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Bank",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_7",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 1,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "bank_account_no",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Bank Account No",
+ "length": 30,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "iban",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "IBAN",
+ "length": 25,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "branch_code",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Branch Code",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "swift_number",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "SWIFT number",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "address_and_contact",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Address and Contact",
+ "length": 0,
+ "no_copy": 0,
+ "options": "fa fa-map-marker",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "address_html",
+ "fieldtype": "HTML",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Address HTML",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "website",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Website",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_12",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "contact_html",
+ "fieldtype": "HTML",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Contact HTML",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ }
+ ],
+ "has_web_view": 0,
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2018-05-30 17:44:06.032697",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Bank Account",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Accounts Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ },
+ {
+ "amend": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Accounts User",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ }
+ ],
+ "quick_entry": 0,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "search_fields": "bank,account",
+ "show_name_in_global_search": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_changes": 1,
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/bank_account/bank_account.py b/erpnext/accounts/doctype/bank_account/bank_account.py
new file mode 100644
index 0000000..e3aef15
--- /dev/null
+++ b/erpnext/accounts/doctype/bank_account/bank_account.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.model.document import Document
+from frappe.contacts.address_and_contact import load_address_and_contact, delete_contact_and_address
+
+class BankAccount(Document):
+ def onload(self):
+ """Load address and contacts in `__onload`"""
+ load_address_and_contact(self)
+
+ def on_trash(self):
+ delete_contact_and_address('BankAccount', self.name)
diff --git a/erpnext/accounts/doctype/bank_account/test_bank_account.js b/erpnext/accounts/doctype/bank_account/test_bank_account.js
new file mode 100644
index 0000000..c20a799
--- /dev/null
+++ b/erpnext/accounts/doctype/bank_account/test_bank_account.js
@@ -0,0 +1,23 @@
+/* eslint-disable */
+// rename this file from _test_[name] to test_[name] to activate
+// and remove above this line
+
+QUnit.test("test: Bank Account", function (assert) {
+ let done = assert.async();
+
+ // number of asserts
+ assert.expect(1);
+
+ frappe.run_serially([
+ // insert a new Bank Account
+ () => frappe.tests.make('Bank Account', [
+ // values to be set
+ {key: 'value'}
+ ]),
+ () => {
+ assert.equal(cur_frm.doc.key, 'value');
+ },
+ () => done()
+ ]);
+
+});
diff --git a/erpnext/accounts/doctype/bank_account/test_bank_account.py b/erpnext/accounts/doctype/bank_account/test_bank_account.py
new file mode 100644
index 0000000..43a3298
--- /dev/null
+++ b/erpnext/accounts/doctype/bank_account/test_bank_account.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+import frappe
+import unittest
+
+# test_records = frappe.get_test_records('Bank Account')
+
+class TestBankAccount(unittest.TestCase):
+ pass
diff --git a/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.js b/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.js
index f7ffc6c..2a44cb3 100644
--- a/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.js
+++ b/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.js
@@ -1,20 +1,33 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
+cur_frm.add_fetch('bank_account','account','account');
+cur_frm.add_fetch('bank_account','bank_account_no','bank_account_no');
+cur_frm.add_fetch('bank_account','iban','iban');
+cur_frm.add_fetch('bank_account','branch_code','branch_code');
+cur_frm.add_fetch('bank_account','swift_number','swift_number');
+
frappe.ui.form.on('Bank Guarantee', {
setup: function(frm) {
- cur_frm.set_query("account", function() {
+ frm.set_query("bank", function() {
return {
- "filters": {
- "account_type": "Bank",
- "is_group": 0
+ filters: {
+ company: frm.doc.company
}
};
});
- cur_frm.set_query("project", function() {
+ frm.set_query("bank_account", function() {
return {
- "filters": {
- "customer": cur_frm.doc.customer
+ filters: {
+ company: frm.doc.company,
+ bank: frm.doc.bank
+ }
+ }
+ });
+ frm.set_query("project", function() {
+ return {
+ filters: {
+ customer: frm.doc.customer
}
};
});
@@ -60,4 +73,4 @@
var end_date = frappe.datetime.add_days(cur_frm.doc.start_date, cur_frm.doc.validity - 1);
cur_frm.set_value("end_date", end_date);
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.json b/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.json
index b3cd157..0d21cab 100644
--- a/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.json
+++ b/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.json
@@ -1,807 +1,1055 @@
{
- "allow_copy": 0,
- "allow_guest_to_view": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "autoname": "BG-.#####",
- "beta": 0,
- "creation": "2016-12-17 10:43:35.731631",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Document",
- "editable_grid": 1,
- "engine": "InnoDB",
+ "allow_copy": 0,
+ "allow_guest_to_view": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "autoname": "BG-.#####",
+ "beta": 0,
+ "creation": "2016-12-17 10:43:35.731631",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Document",
+ "editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "bg_type",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Bank Guarantee Type",
- "length": 0,
- "no_copy": 0,
- "options": "\nReceiving\nProviding",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "bg_type",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Bank Guarantee Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "\nReceiving\nProviding",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "reference_doctype",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Reference Document Type",
- "length": 0,
- "no_copy": 0,
- "options": "DocType",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "reference_doctype",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Reference Document Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "DocType",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "reference_docname",
- "fieldtype": "Dynamic Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Reference Document Name",
- "length": 0,
- "no_copy": 0,
- "options": "reference_doctype",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "reference_docname",
+ "fieldtype": "Dynamic Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Reference Document Name",
+ "length": 0,
+ "no_copy": 0,
+ "options": "reference_doctype",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "eval: doc.bg_type == \"Receiving\"",
- "fieldname": "customer",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Customer",
- "length": 0,
- "no_copy": 0,
- "options": "Customer",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval: doc.bg_type == \"Receiving\"",
+ "fieldname": "customer",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Customer",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Customer",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "eval: doc.bg_type == \"Providing\"",
- "fieldname": "supplier",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Supplier",
- "length": 0,
- "no_copy": 0,
- "options": "Supplier",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval: doc.bg_type == \"Providing\"",
+ "fieldname": "supplier",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Supplier",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Supplier",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 1,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "project",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Project",
- "length": 0,
- "no_copy": 0,
- "options": "Project",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "project",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Project",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Project",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_6",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_6",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "account",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Bank Account",
- "length": 0,
- "no_copy": 0,
- "options": "Account",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Amount",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Amount",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "start_date",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Start Date",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "start_date",
- "fieldtype": "Date",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Start Date",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "",
+ "fieldname": "validity",
+ "fieldtype": "Int",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Validity in Days",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "",
- "fieldname": "validity",
- "fieldtype": "Int",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Validity in Days",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "end_date",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "End Date",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "end_date",
- "fieldtype": "Date",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "End Date",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "bank_account_info",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Bank Account Info",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 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_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "bank",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Bank",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Bank",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "more_information",
- "fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Clauses and Conditions",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "bank_account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Bank Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Bank Account",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "margin_details",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Other Details",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Account",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "bank_guarantee_number",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Bank Guarantee Number",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "bank_account_no",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Bank Account No",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_17",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "iban",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "IBAN",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "branch_code",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Branch Code",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "swift_number",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "SWIFT number",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 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_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "more_information",
+ "fieldtype": "Text Editor",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Clauses and Conditions",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "margin_details",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Other Details",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "bank_guarantee_number",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Bank Guarantee Number",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 1
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "name_of_beneficiary",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Name of Beneficiary",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "name_of_beneficiary",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Name of Beneficiary",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "name_of_bank",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Name of Bank",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_19",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_19",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "margin_money",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Margin Money",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "margin_money",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Margin Money",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "",
+ "depends_on": "",
+ "fieldname": "charges",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Charges Incurred",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "",
- "depends_on": "",
- "fieldname": "charges",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Charges Incurred",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "",
+ "fieldname": "fixed_deposit_number",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Fixed Deposit Number",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "",
- "fieldname": "fixed_deposit_number",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Fixed Deposit Number",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
- {
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "amended_from",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Amended From",
- "length": 0,
- "no_copy": 1,
- "options": "Bank Guarantee",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "amended_from",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Amended From",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Bank Guarantee",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
}
- ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 0,
- "idx": 0,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 1,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2018-05-08 06:27:08.959864",
- "modified_by": "Administrator",
- "module": "Accounts",
- "name": "Bank Guarantee",
- "name_case": "",
- "owner": "Administrator",
+ ],
+ "has_web_view": 0,
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "is_submittable": 1,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2018-05-30 17:35:43.391115",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Bank Guarantee",
+ "name_case": "",
+ "owner": "Administrator",
"permissions": [
{
- "amend": 0,
- "cancel": 0,
- "create": 1,
- "delete": 0,
- "email": 1,
- "export": 1,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Accounts User",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 1,
+ "amend": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 0,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Accounts User",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 1,
"write": 1
- },
+ },
{
- "amend": 0,
- "cancel": 1,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 1,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Accounts Manager",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 1,
+ "amend": 0,
+ "cancel": 1,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Accounts Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 1,
"write": 1
}
- ],
- "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "search_fields": "customer",
- "show_name_in_global_search": 0,
- "sort_field": "modified",
- "sort_order": "DESC",
- "title_field": "customer",
- "track_changes": 0,
+ ],
+ "quick_entry": 1,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "search_fields": "customer",
+ "show_name_in_global_search": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "title_field": "customer",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/bank_guarantee/test_bank_guarantee.js b/erpnext/accounts/doctype/bank_guarantee/test_bank_guarantee.js
new file mode 100644
index 0000000..0c60920
--- /dev/null
+++ b/erpnext/accounts/doctype/bank_guarantee/test_bank_guarantee.js
@@ -0,0 +1,23 @@
+/* eslint-disable */
+// rename this file from _test_[name] to test_[name] to activate
+// and remove above this line
+
+QUnit.test("test: Bank Guarantee", function (assert) {
+ let done = assert.async();
+
+ // number of asserts
+ assert.expect(1);
+
+ frappe.run_serially([
+ // insert a new Bank Guarantee
+ () => frappe.tests.make('Bank Guarantee', [
+ // values to be set
+ {key: 'value'}
+ ]),
+ () => {
+ assert.equal(cur_frm.doc.key, 'value');
+ },
+ () => done()
+ ]);
+
+});
diff --git a/erpnext/accounts/doctype/bank_guarantee/test_bank_guarantee.py b/erpnext/accounts/doctype/bank_guarantee/test_bank_guarantee.py
new file mode 100644
index 0000000..816743a
--- /dev/null
+++ b/erpnext/accounts/doctype/bank_guarantee/test_bank_guarantee.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+import frappe
+import unittest
+
+class TestBankGuarantee(unittest.TestCase):
+ pass
diff --git a/erpnext/accounts/doctype/budget/budget.json b/erpnext/accounts/doctype/budget/budget.json
index 7c273ee..63322a7 100644
--- a/erpnext/accounts/doctype/budget/budget.json
+++ b/erpnext/accounts/doctype/budget/budget.json
@@ -13,6 +13,7 @@
"fields": [
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -46,6 +47,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -78,6 +80,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -111,6 +114,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -144,6 +148,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -176,6 +181,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -206,6 +212,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -239,6 +246,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -270,6 +278,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -301,6 +310,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -332,6 +342,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -366,6 +377,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -400,6 +412,38 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_13",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -431,6 +475,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -465,6 +510,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -499,6 +545,38 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "section_break_16",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -530,6 +608,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -564,6 +643,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -598,6 +678,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -640,7 +721,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2018-05-15 19:26:13.840265",
+ "modified": "2018-05-31 00:21:23.449225",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget",
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index 7ea33bf..b62a0f0 100755
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -3712,6 +3712,65 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "group_same_items",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Group same items",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_112",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "select_print_heading",
"fieldtype": "Link",
"hidden": 0,
@@ -4264,7 +4323,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2018-05-17 12:53:46.687257",
+ "modified": "2018-05-28 02:38:40.310899",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",
diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py
index 86491f8..43a0d01 100755
--- a/erpnext/accounts/doctype/sales_invoice/pos.py
+++ b/erpnext/accounts/doctype/sales_invoice/pos.py
@@ -158,9 +158,8 @@
# Get items based on the item groups defined in the POS profile
for d in pos_profile.get('item_groups'):
args_list.extend([d.name for d in get_child_nodes('Item Group', d.item_group)])
- cond = "and i.item_group in (%s)" % (', '.join(['%s'] * len(args_list)))
-
- args_list = [company] + args_list
+ if args_list:
+ cond = "and i.item_group in (%s)" % (', '.join(['%s'] * len(args_list)))
return frappe.db.sql("""
select
@@ -172,7 +171,7 @@
where
i.disabled = 0 and i.has_variants = 0 and i.is_sales_item = 1
{cond}
- """.format(cond=cond), tuple(args_list), as_dict=1)
+ """.format(cond=cond), tuple([company] + args_list), as_dict=1)
def get_item_groups(pos_profile):
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index c35242e..92fc610 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -400,10 +400,21 @@
from frappe.desk.form.load import get_communication_data
out = {}
+ fields = 'date(creation), count(name)'
+ after = add_years(None, -1).strftime('%Y-%m-%d')
+ group_by='group by date(creation)'
+
data = get_communication_data(doctype, name,
- fields = 'date(creation), count(name)',
- after = add_years(None, -1).strftime('%Y-%m-%d'),
- group_by='group by date(creation)', as_dict=False)
+ fields=fields, after=after, group_by=group_by, as_dict=False)
+
+ # fetch and append data from Activity Log
+ data += frappe.db.sql("""select {fields}
+ from `tabActivity Log`
+ where reference_doctype='{doctype}' and reference_name='{name}'
+ and status!='Success' and creation > {after}
+ {group_by} order by creation desc
+ """.format(doctype=doctype, name=name, fields=fields,
+ group_by=group_by, after=after), as_dict=False)
timeline_items = dict(data)
diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
index 710099e..72661ff 100644
--- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
+++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
@@ -49,7 +49,7 @@
row += [
d.credit_to, d.mode_of_payment, d.project, d.company, d.purchase_order,
- purchase_receipt, expense_account, d.stock_qty, d.stock_uom, d.base_net_rate, d.base_net_amount
+ purchase_receipt, expense_account, d.stock_qty, d.stock_uom, d.base_net_amount / d.stock_qty, d.base_net_amount
]
total_tax = 0
@@ -120,8 +120,7 @@
`tabPurchase Invoice Item`.`project`, `tabPurchase Invoice Item`.`purchase_order`,
`tabPurchase Invoice Item`.`purchase_receipt`, `tabPurchase Invoice Item`.`po_detail`,
`tabPurchase Invoice Item`.`expense_account`, `tabPurchase Invoice Item`.`stock_qty`,
- `tabPurchase Invoice Item`.`stock_uom`, `tabPurchase Invoice Item`.`base_net_rate`,
- `tabPurchase Invoice Item`.`base_net_amount`,
+ `tabPurchase Invoice Item`.`stock_uom`, `tabPurchase Invoice Item`.`base_net_amount`,
`tabPurchase Invoice`.supplier_name, `tabPurchase Invoice`.mode_of_payment {0}
from `tabPurchase Invoice`, `tabPurchase Invoice Item`
where `tabPurchase Invoice`.name = `tabPurchase Invoice Item`.`parent` and
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
index caa5fc5..27f24bf 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
@@ -2279,6 +2279,65 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "group_same_items",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Group same items",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_72",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "letter_head",
"fieldtype": "Link",
"hidden": 0,
@@ -2602,7 +2661,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2018-05-17 12:57:42.384971",
+ "modified": "2018-05-28 02:45:48.616334",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation",
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index e3f7d1e..76be942 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -102,7 +102,8 @@
self.validate_non_invoice_documents_schedule()
def before_print(self):
- if self.doctype in ['Purchase Order', 'Sales Order']:
+ if self.doctype in ['Purchase Order', 'Sales Order', 'Sales Invoice', 'Purchase Invoice',
+ 'Supplier Quotation', 'Purchase Receipt', 'Delivery Note', 'Quotation']:
if self.get("group_same_items"):
self.group_similar_items()
@@ -684,6 +685,7 @@
if item.item_code in group_item_qty:
item.qty = group_item_qty[item.item_code]
item.amount = group_item_amount[item.item_code]
+ item.rate = flt(flt(item.amount)/flt(item.qty), item.precision("rate"))
del group_item_qty[item.item_code]
else:
duplicate_list.append(item)
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index d1a75a9..a595b4b 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -38,6 +38,7 @@
self.manipulate_grand_total_for_inclusive_tax()
self.calculate_totals()
self._cleanup()
+ self.calculate_total_net_weight()
def validate_conversion_rate(self):
# validate conversion rate
@@ -329,6 +330,13 @@
self.set_rounded_total()
+ def calculate_total_net_weight(self):
+ if self.doc.meta.get_field('total_net_weight'):
+ self.doc.total_net_weight = 0.0
+ for d in self.doc.items:
+ if d.total_weight:
+ self.doc.total_net_weight += d.total_weight
+
def set_rounded_total(self):
if self.doc.meta.get_field("rounded_total"):
if self.doc.is_rounded_total_disabled():
diff --git a/erpnext/docs/assets/img/accounts/make-inter-company-invoice.png b/erpnext/docs/assets/img/accounts/make-inter-company-invoice.png
new file mode 100644
index 0000000..af55847
--- /dev/null
+++ b/erpnext/docs/assets/img/accounts/make-inter-company-invoice.png
Binary files differ
diff --git a/erpnext/docs/assets/img/accounts/make-internal-customer.png b/erpnext/docs/assets/img/accounts/make-internal-customer.png
new file mode 100644
index 0000000..cf7e040
--- /dev/null
+++ b/erpnext/docs/assets/img/accounts/make-internal-customer.png
Binary files differ
diff --git a/erpnext/docs/assets/img/accounts/make-internal-supplier.png b/erpnext/docs/assets/img/accounts/make-internal-supplier.png
new file mode 100644
index 0000000..598eb65
--- /dev/null
+++ b/erpnext/docs/assets/img/accounts/make-internal-supplier.png
Binary files differ
diff --git a/erpnext/docs/assets/img/articles/allowance-percentage-1.png b/erpnext/docs/assets/img/articles/allowance-percentage-1.png
deleted file mode 100644
index 4fbed90..0000000
--- a/erpnext/docs/assets/img/articles/allowance-percentage-1.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/articles/allowance-percentage-2.png b/erpnext/docs/assets/img/articles/allowance-percentage-2.png
deleted file mode 100644
index a7b9688..0000000
--- a/erpnext/docs/assets/img/articles/allowance-percentage-2.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/articles/limit-1.png b/erpnext/docs/assets/img/articles/limit-1.png
new file mode 100644
index 0000000..5e3cb27
--- /dev/null
+++ b/erpnext/docs/assets/img/articles/limit-1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/articles/limit-2.png b/erpnext/docs/assets/img/articles/limit-2.png
new file mode 100644
index 0000000..ffa72b3
--- /dev/null
+++ b/erpnext/docs/assets/img/articles/limit-2.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/employee-job-profile.png b/erpnext/docs/assets/img/human-resources/employee-job-profile.png
new file mode 100644
index 0000000..a0decd4
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/employee-job-profile.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/employee-view.gif b/erpnext/docs/assets/img/human-resources/employee-view.gif
new file mode 100644
index 0000000..52633d0
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/employee-view.gif
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/employee.png b/erpnext/docs/assets/img/human-resources/employee.png
index ec2e70e..0120a76 100644
--- a/erpnext/docs/assets/img/human-resources/employee.png
+++ b/erpnext/docs/assets/img/human-resources/employee.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/supplier1.1.png b/erpnext/docs/assets/img/human-resources/supplier1.1.png
new file mode 100644
index 0000000..48aa485
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/supplier1.1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/manufacturing/manufacturing-settings.png b/erpnext/docs/assets/img/manufacturing/manufacturing-settings.png
new file mode 100644
index 0000000..dd37fee
--- /dev/null
+++ b/erpnext/docs/assets/img/manufacturing/manufacturing-settings.png
Binary files differ
diff --git a/erpnext/docs/assets/img/manufacturing/scrap-1.png b/erpnext/docs/assets/img/manufacturing/scrap-1.png
new file mode 100644
index 0000000..3be19e3
--- /dev/null
+++ b/erpnext/docs/assets/img/manufacturing/scrap-1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/manufacturing/scrap-2.gif b/erpnext/docs/assets/img/manufacturing/scrap-2.gif
new file mode 100644
index 0000000..0b9d42e
--- /dev/null
+++ b/erpnext/docs/assets/img/manufacturing/scrap-2.gif
Binary files differ
diff --git a/erpnext/docs/assets/img/project/profitability-analysis.png b/erpnext/docs/assets/img/project/profitability-analysis.png
new file mode 100644
index 0000000..2c43adf
--- /dev/null
+++ b/erpnext/docs/assets/img/project/profitability-analysis.png
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project-1.1.png b/erpnext/docs/assets/img/project/project-1.1.png
new file mode 100644
index 0000000..ea23665
--- /dev/null
+++ b/erpnext/docs/assets/img/project/project-1.1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project-1.png b/erpnext/docs/assets/img/project/project-1.png
new file mode 100644
index 0000000..f416cd6
--- /dev/null
+++ b/erpnext/docs/assets/img/project/project-1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project-2.png b/erpnext/docs/assets/img/project/project-2.png
new file mode 100644
index 0000000..cadb20d
--- /dev/null
+++ b/erpnext/docs/assets/img/project/project-2.png
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project-budgeting.png b/erpnext/docs/assets/img/project/project-budgeting.png
new file mode 100644
index 0000000..989cff2
--- /dev/null
+++ b/erpnext/docs/assets/img/project/project-budgeting.png
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project-expense-claim-1.png b/erpnext/docs/assets/img/project/project-expense-claim-1.png
new file mode 100644
index 0000000..3ed5955
--- /dev/null
+++ b/erpnext/docs/assets/img/project/project-expense-claim-1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project-expense-claim-2.png b/erpnext/docs/assets/img/project/project-expense-claim-2.png
new file mode 100644
index 0000000..380a9a6
--- /dev/null
+++ b/erpnext/docs/assets/img/project/project-expense-claim-2.png
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project-percent-complete.png b/erpnext/docs/assets/img/project/project-percent-complete.png
deleted file mode 100644
index cebfde3..0000000
--- a/erpnext/docs/assets/img/project/project-percent-complete.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project-portal-2.png b/erpnext/docs/assets/img/project/project-portal-2.png
new file mode 100644
index 0000000..f86d707
--- /dev/null
+++ b/erpnext/docs/assets/img/project/project-portal-2.png
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project-portal-user.png b/erpnext/docs/assets/img/project/project-portal-user.png
new file mode 100644
index 0000000..c12f203
--- /dev/null
+++ b/erpnext/docs/assets/img/project/project-portal-user.png
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project-portal.gif b/erpnext/docs/assets/img/project/project-portal.gif
new file mode 100644
index 0000000..a89fb0b
--- /dev/null
+++ b/erpnext/docs/assets/img/project/project-portal.gif
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project-profitability-1.png b/erpnext/docs/assets/img/project/project-profitability-1.png
new file mode 100644
index 0000000..1928ee2
--- /dev/null
+++ b/erpnext/docs/assets/img/project/project-profitability-1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project-profitability-2.png b/erpnext/docs/assets/img/project/project-profitability-2.png
new file mode 100644
index 0000000..39ba059
--- /dev/null
+++ b/erpnext/docs/assets/img/project/project-profitability-2.png
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project.png b/erpnext/docs/assets/img/project/project.png
deleted file mode 100644
index c6bcd92..0000000
--- a/erpnext/docs/assets/img/project/project.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_cost_center.png b/erpnext/docs/assets/img/project/project_cost_center.png
deleted file mode 100644
index 09bd557..0000000
--- a/erpnext/docs/assets/img/project/project_cost_center.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_costing.png b/erpnext/docs/assets/img/project/project_costing.png
deleted file mode 100644
index c55976d..0000000
--- a/erpnext/docs/assets/img/project/project_costing.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_expense_claim_link.png b/erpnext/docs/assets/img/project/project_expense_claim_link.png
deleted file mode 100644
index 077cea1..0000000
--- a/erpnext/docs/assets/img/project/project_expense_claim_link.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_gantt_chart.png b/erpnext/docs/assets/img/project/project_gantt_chart.png
deleted file mode 100644
index 3eba443..0000000
--- a/erpnext/docs/assets/img/project/project_gantt_chart.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_sales_order.png b/erpnext/docs/assets/img/project/project_sales_order.png
deleted file mode 100644
index ff4030d..0000000
--- a/erpnext/docs/assets/img/project/project_sales_order.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_task.png b/erpnext/docs/assets/img/project/project_task.png
deleted file mode 100644
index 88f1e68..0000000
--- a/erpnext/docs/assets/img/project/project_task.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_task_grid.png b/erpnext/docs/assets/img/project/project_task_grid.png
deleted file mode 100644
index 935fba6..0000000
--- a/erpnext/docs/assets/img/project/project_task_grid.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_task_list.png b/erpnext/docs/assets/img/project/project_task_list.png
deleted file mode 100644
index 2a59caf..0000000
--- a/erpnext/docs/assets/img/project/project_task_list.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_time_log_link.png b/erpnext/docs/assets/img/project/project_time_log_link.png
deleted file mode 100644
index 08ac36c..0000000
--- a/erpnext/docs/assets/img/project/project_time_log_link.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_time_log_list.png b/erpnext/docs/assets/img/project/project_time_log_list.png
deleted file mode 100644
index 3b3724b..0000000
--- a/erpnext/docs/assets/img/project/project_time_log_list.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_total_expense_claim.png b/erpnext/docs/assets/img/project/project_total_expense_claim.png
deleted file mode 100644
index cbd3c01..0000000
--- a/erpnext/docs/assets/img/project/project_total_expense_claim.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_view_expense_claim.png b/erpnext/docs/assets/img/project/project_view_expense_claim.png
deleted file mode 100644
index 32056ca..0000000
--- a/erpnext/docs/assets/img/project/project_view_expense_claim.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_view_gantt_chart.png b/erpnext/docs/assets/img/project/project_view_gantt_chart.png
deleted file mode 100644
index 7039a45..0000000
--- a/erpnext/docs/assets/img/project/project_view_gantt_chart.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_view_task.png b/erpnext/docs/assets/img/project/project_view_task.png
deleted file mode 100644
index dfdff8b..0000000
--- a/erpnext/docs/assets/img/project/project_view_task.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/project/project_view_time_log.png b/erpnext/docs/assets/img/project/project_view_time_log.png
deleted file mode 100644
index dbf184e..0000000
--- a/erpnext/docs/assets/img/project/project_view_time_log.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/stock/customer-warehouse-2.png b/erpnext/docs/assets/img/stock/customer-warehouse-2.png
new file mode 100644
index 0000000..d44f88f
--- /dev/null
+++ b/erpnext/docs/assets/img/stock/customer-warehouse-2.png
Binary files differ
diff --git a/erpnext/docs/assets/img/stock/customer-warehouse.gif b/erpnext/docs/assets/img/stock/customer-warehouse.gif
new file mode 100644
index 0000000..c587b98
--- /dev/null
+++ b/erpnext/docs/assets/img/stock/customer-warehouse.gif
Binary files differ
diff --git a/erpnext/docs/user/manual/en/accounts/index.txt b/erpnext/docs/user/manual/en/accounts/index.txt
index 61e0db4..3b84be9 100644
--- a/erpnext/docs/user/manual/en/accounts/index.txt
+++ b/erpnext/docs/user/manual/en/accounts/index.txt
@@ -4,6 +4,7 @@
point-of-sale-pos-invoice
point-of-sales
purchase-invoice
+inter-company-invoices
payments
journal-entry
inter-company-journal-entry
diff --git a/erpnext/docs/user/manual/en/accounts/inter-company-invoices.md b/erpnext/docs/user/manual/en/accounts/inter-company-invoices.md
new file mode 100644
index 0000000..ed2ec42
--- /dev/null
+++ b/erpnext/docs/user/manual/en/accounts/inter-company-invoices.md
@@ -0,0 +1,32 @@
+
+# Inter Company Invoices
+
+Along with creating Purchase Invoices or Sales Invoices for a single company, you can create inter-linked invoices for multiple companies.
+
+Such as, you can create a Purchase Invoice for a company say 'Company ABC', and create a Sales Invoice against this Purchase Invoice for a company say 'Company XYZ' and link them together.
+
+#### To create Inter Company Invoices as mentioned in the above process, you need to follow the below steps:
+
+ - Go to the Customer list, select the customer which you would want to choose for the inter-linked invoices, enable the checkbox, **Is Internal Customer** as shown below:
+
+ <img class="screenshot" alt="Internal Customer" src="{{docs_base_url}}/assets/img/accounts/make-internal-customer.png">
+
+ - Along with that, add the company which the Customer represents, i.e. the company for which the Sales Invoice will be created.
+ - Next, fill up the child table **Allowed To Transact With** as shown in the image and add the company against which you will be creating a Purchase Invoice, which will be linked with the Sales Invoice created using this Customer.
+ - *Easy peasy, right?* Now, you need to follow the similar procedure for setting up a Supplier for inter-linked invoices. And, in the **Represents Company** field, add the company which you added in the child table **Allowed To Transact With** for the Customer.
+ - And, in the child table **Allowed To Transact With** for the Supplier, add the company which the Customer represents or against which you are going to make an inter-linked Purchase Invoice. You can refer the below image to avoid any confusion.
+
+ <img class="screenshot" alt="Internal Supplier" src="{{docs_base_url}}/assets/img/accounts/make-internal-supplier.png">
+
+- Now, create a new Sales Invoice, fill up the fields, and remember to select the Customer who is an internal customer and company which the Customer represents.
+- Submit the Invoice.
+
+ <img class="screenshot" alt="Inter company invoice" src="{{docs_base_url}}/assets/img/accounts/make-inter-company-invoice.png">
+
+- Under the **Make** button dropdown, you will find a link **Inter Company Invoice**, on clicking the link, you will be routed to a new Purchase Invoice form page.
+- Here, the supplier and company will be auto-fetched depending on the company you selected in the Sales Invoice. ***Remember**: There can only be a single Internal Supplier or Customer per company.*
+- Submit the invoice, done! Now, both the invoices are inter-linked. *Also, on cancelling any of the invoices, the link will break as well.*
+
+You can follow the same process to create a Purchase Invoice and then an inter-linked Sales Invoice from the submitted Purchase Invoice.
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/accounts/pricing-rule.md b/erpnext/docs/user/manual/en/accounts/pricing-rule.md
index c4a3eb9..02c6c8b 100644
--- a/erpnext/docs/user/manual/en/accounts/pricing-rule.md
+++ b/erpnext/docs/user/manual/en/accounts/pricing-rule.md
@@ -11,7 +11,7 @@
3. Items categorized under specific Item Group has same selling or buying price.
-4. Customers balonging to specific Customer Group should get ### selling price, ot % of Discount on Items.
+4. Customers balonging to specific Customer Group should get ### selling price, or % of Discount on Items.
5. Supplier's categorized under specific Supplier Type should have ### buying rate applied.
@@ -106,4 +106,4 @@
For more details about pricing rule [Click Here](/docs/user/manual/en/selling/articles/adding-margin.html)
-<!-- markdown -->
\ No newline at end of file
+<!-- markdown -->
diff --git a/erpnext/docs/user/manual/en/buying/supplier.md b/erpnext/docs/user/manual/en/buying/supplier.md
index f116c88..2f8a154 100644
--- a/erpnext/docs/user/manual/en/buying/supplier.md
+++ b/erpnext/docs/user/manual/en/buying/supplier.md
@@ -6,18 +6,11 @@
`Explore > Supplier > New Supplier`
-<img class="screenshot" alt="Supplier Master" src="{{docs_base_url}}/assets/img/buying/supplier-master.png">
-
-<div>
- <div class='embed-container'>
- <iframe src='https://www.youtube.com/embed//zsrrVDk6VBs?start=213' frameborder='0' allowfullscreen>
- </iframe>
- </div>
-</div>
+<img class="screenshot" alt="Supplier Master" src="{{docs_base_url}}/assets/img/buying/supplier1.1.png">
### Contacts and Addresses
-Contacts and Addresses in ERPNext are stored separately so that you can create multiple Contacts and Addresses for a Suppliers. Once Supplier is saved, you will find option to create Contact and Address for that Supplier.
+Contacts and Addresses in ERPNext are stored separately so that you can create multiple Contacts and Addresses for a Suppliers. Once Supplier is saved, you will find the option to create Contact and Address for that Supplier.
<img class="screenshot" alt="Supplier Master" src="{{docs_base_url}}/assets/img/buying/supplier-new-address-contact.png">
@@ -37,8 +30,12 @@
You can add multiple companies in your ERPNext instance, and one Supplier can be used across multiple companies. In this case, you should define Companywise Payable Account for the Supplier in the "Default Payable Accounts" table.
-<iframe width="660" height="371" src="https://www.youtube.com/embed/anoGi_RpQ20" frameborder="0" allowfullscreen></iframe>
-(Check from 2:20)
+<div>
+ <div class='embed-container'>
+ <iframe src='https://www.youtube.com/embed//zsrrVDk6VBs?start=213' frameborder='0' allowfullscreen>
+ </iframe>
+ </div>
+</div>
### Place Supplier On Hold
In the Supplier form, check the "Block Supplier" checkbox. Next, choose the "Hold Type".
diff --git a/erpnext/docs/user/manual/en/customize-erpnext/custom-scripts/custom-script-examples/fetch value in child table field b/erpnext/docs/user/manual/en/customize-erpnext/custom-scripts/custom-script-examples/fetch value in child table field
new file mode 100644
index 0000000..8caf8f5
--- /dev/null
+++ b/erpnext/docs/user/manual/en/customize-erpnext/custom-scripts/custom-script-examples/fetch value in child table field
@@ -0,0 +1,17 @@
+## Example to fetch value in a child table field from master doctype
+
+
+### Sample Script to fetch expiry_date field from Batch doctype to Sales Invoice Item table
+
+Step 1: Create Custom Script for _**Sales Invoice**_ (parent) doctype
+
+Step 2: Script as below & Save
+
+```
+frappe.ui.form.on("Sales Invoice Item", "batch_no", function(frm, cdt, cdn) {
+ var d = locals[cdt][cdn];
+ frappe.db.get_value("Batch", {"name": d.batch_no}, "expiry_date", function(value) {
+ d.expiry_date = value.expiry_date;
+ });
+});
+```
diff --git a/erpnext/docs/user/manual/en/human-resources/employee.md b/erpnext/docs/user/manual/en/human-resources/employee.md
index 092d11d..c6aed24 100644
--- a/erpnext/docs/user/manual/en/human-resources/employee.md
+++ b/erpnext/docs/user/manual/en/human-resources/employee.md
@@ -1,6 +1,20 @@
# Employee
-There are many fields you can add in your Employee records.
+An individual who works part-time or full-time under a contract of employment, and has recognized rights and duties is your Employee.
+
+In ERPNext, you can manage Employee master. The Employee master captures demographics, personal and professional details.
+
+<img class="screenshot" alt="Employee" src="{{docs_base_url}}/assets/img/human-resources/employee-view.gif">
+
+You can further use this Employee master for performing various HR functions like:
+
+1. Processing Payroll
+1. Leave Allocation and Application
+1. Employee Advance and Expense Claim
+1. Loan Application
+1. Performance Appraisal
+
+### New Employee
To create new Employee go to:
@@ -8,6 +22,14 @@
<img class="screenshot" alt="Employee" src="{{docs_base_url}}/assets/img/human-resources/employee.png">
+### Employee Deputation
+
+Once an Employee is created, you can update Department, Designation, Employee to whom he/she will report to etc.
+
+<img class="screenshot" alt="Employee" src="{{docs_base_url}}/assets/img/human-resources/employee-job-profile.png">
+
+<hr>
+
<div class="embed-container">
<iframe src="https://www.youtube.com/embed/kkwOzeU4wFU?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
diff --git a/erpnext/docs/user/manual/en/manufacturing/articles/scrap-management.md b/erpnext/docs/user/manual/en/manufacturing/articles/scrap-management.md
new file mode 100644
index 0000000..25c1eea
--- /dev/null
+++ b/erpnext/docs/user/manual/en/manufacturing/articles/scrap-management.md
@@ -0,0 +1,23 @@
+# Production Scrap Management
+
+Scrap means waste that either has no economic value or only the value of its basic material content recoverable through recycling.
+
+Scrap is generally availed at the end of the manufacture process. Also you can find some products that are damaged or that are unusable due to expiry or for some other reason, which needs to be scraped.
+
+In ERPNext, at the end of manufacturing process, scrap items are accounted in the scrap warehouse.s
+
+### Scrap in Bill of Materials
+
+You can update estimated scrap quantity of an item in the BOM, Scrap table. If required, you can reselect a raw-material item as scrap.
+
+<img class="screenshot" alt="Scrap in BOM" src="{{docs_base_url}}/assets/img/manufacturing/scrap-1.png">
+
+### Scrap in Manufacture Entry
+
+When production is completed, Finish / Manufacture Entry is created against a Production Order. In this entry, scrap item is fetched in the Item table, with only Target Warehouse updated for it. Ensure that Valuation Rate is updated for this item for the accounts posting purposes.
+
+<img class="screenshot" alt="Scrap in Manufacture Entry" src="{{docs_base_url}}/assets/img/manufacturing/scrap-2.gif">
+
+> Scrap from the BOM will only work if Manufacture Entry is created based on BOM, and not based on Material Transfer. This is configurable from Manufacturing Settings.
+
+<img class="screenshot" alt="Manufacturing Settings" src="{{docs_base_url}}/assets/img/manufacturing/manufacturing-settings.png">
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/projects/index.txt b/erpnext/docs/user/manual/en/projects/index.txt
index 2f450ac..11f5901 100644
--- a/erpnext/docs/user/manual/en/projects/index.txt
+++ b/erpnext/docs/user/manual/en/projects/index.txt
@@ -1,7 +1,9 @@
tasks
project
-time-log-batch
+timesheet
+project-customer-portal
+project-profitability
+project-expense-claims
activity-type
activity-cost
articles
-timesheet
diff --git a/erpnext/docs/user/manual/en/projects/project-customer-portal.md b/erpnext/docs/user/manual/en/projects/project-customer-portal.md
new file mode 100644
index 0000000..24ea099
--- /dev/null
+++ b/erpnext/docs/user/manual/en/projects/project-customer-portal.md
@@ -0,0 +1,21 @@
+# Project from Customer Portal
+
+If you are doing a Project for a Customer, then Customer will need to be updated on its progress on timely bases. In ERPNext, since it is a Customer Portal feature, you can let Customer update oneself on the Project's progress via Customer Portal.
+
+### Add User as a Website User
+
+For a Customer to be able to access Project from the portal, should be added as a Website User. A Customer can also sign up from the Login Page of your ERPNext account, using the same Email ID as mentioned in the Contact master. Or you can invite that User from the Contact master.
+
+<img class="screenshot" alt="Customer in Project" src="{{docs_base_url}}/assets/img/project/project-portal-2.png">
+
+### Add Customer and User in Project
+
+In the Project master, check Customer Details section. Select a Customer and Sales Order associated with this Project.
+
+<img class="screenshot" alt="Customer in Project" src="{{docs_base_url}}/assets/img/project/project-portal-user.png">
+
+### Portal View of Project
+
+When a Customer logins from the Portal, he/she will be able to view all the Task for that Project. Also, the customer will be able to update the status of the Tasks or comment when needed.
+
+<img class="screenshot" alt="Customer in Project" src="{{docs_base_url}}/assets/img/project/project-portal.gif">
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/projects/project-expense-claims.md b/erpnext/docs/user/manual/en/projects/project-expense-claims.md
new file mode 100644
index 0000000..76e0389
--- /dev/null
+++ b/erpnext/docs/user/manual/en/projects/project-expense-claims.md
@@ -0,0 +1,15 @@
+# Project and Managing Expenses
+
+The Employees working on the Project incur various expenses, sometimes from their own pocket. In ERPNext, then can claim such expenses using [Expense Claim](/docs/user/manual/en/human-resources/expense-claim.html)
+
+In this Expense Claim, they can also select a Project for which that expense was incurred.
+
+Based on the Expense Claims made for a particular project, total Expense Claim Amount is updated in the Project master, under project costing section.
+
+* You can create an Expense Claims directly and link it to the Project.
+
+<img class="screenshot" alt="Project - Link Expense Claim" src="{{docs_base_url}}/assets/img/project/project-expense-claim-1.png">
+
+* Total amount of Expense Claims booked against a project is shown under 'Total Expense Claim' in the Project Costing Section
+
+<img class="screenshot" alt="Project - Total Expense Claim" src="{{docs_base_url}}/assets/img/project/project-expense-claim-2.png">
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/projects/project-profitability.md b/erpnext/docs/user/manual/en/projects/project-profitability.md
new file mode 100644
index 0000000..cea7050
--- /dev/null
+++ b/erpnext/docs/user/manual/en/projects/project-profitability.md
@@ -0,0 +1,36 @@
+# Project Profitability
+
+Project and related activities are generally active for longer time periods. While developments happen on the Project, there are various income and expense incurred against it. Hence, it becomes important to track the Profitability of a Project and ensure that you don't overspend.
+
+### Project in Sales Transactions
+
+You can link a Project in all the sales transactions like Sales Order, Delivery Note, Sales Invoice, and Payment. Linking Project with the sales transactions will help you in tracking income received against that Project.
+
+In sales transactions, Project field is generally available in the More Information section.
+
+<img class="screenshot" alt="Project in Sales" src="{{docs_base_url}}/assets/img/project/project-profitability-1.png">
+
+
+#### Project in Purchase Transactions
+
+The project can also be linked to the purchase transactions like Purchase Order, Purchase Receipt, and Purchase Invoice.
+
+In the purchase transactions, Project's link field is available in the Item table. This is because you could be procuring material for multiple Projects from the same purchase entry.
+
+<img class="screenshot" alt="Project in Purchases" src="{{docs_base_url}}/assets/img/project/project-profitability-2.png">
+
+### Budgeting against Project
+
+You can create Budget for a Project as well. The expense limit defined in the Budget master will be validated in the expense transactions.
+
+<img class="screenshot" alt="Project Budgeting" src="{{docs_base_url}}/assets/img/project/project-budgeting.png">
+
+### Project Profitability
+
+Based on the all the income and expense entries created for the Project, you can get its profitability.
+
+> Accounts > Profitability Analysis
+
+Filter report based on Project to check Projectwise Profitability.
+
+<img class="screenshot" alt="Project Profitability" src="{{docs_base_url}}/assets/img/project/profitability-analysis.png">
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/projects/project.md b/erpnext/docs/user/manual/en/projects/project.md
index 82f0e6d..a8091b8 100644
--- a/erpnext/docs/user/manual/en/projects/project.md
+++ b/erpnext/docs/user/manual/en/projects/project.md
@@ -1,13 +1,20 @@
# Project
-Project management in ERPNext is Task driven. You can create Project and assign multiple Tasks against it.
+The project is an individual or collaborative enterprise, possibly involving research or design, that is carefully planned, usually by a project team, to achieve a particular aim
-<img class="screenshot" alt="Project" src="{{docs_base_url}}/assets/img/project/project.png">
+In ERPNext, Project management in is Task driven. You can a create Project and divide into multiple and assignable Tasks.
-<div class="embed-container">
- <iframe src="https://www.youtube.com/embed/gCzShu9Niu4?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen>
- </iframe>
-</div>
+<img class="screenshot" alt="Project" src="{{docs_base_url}}/assets/img/project/project-1.1.png">
+
+### Managing Tasks
+
+The project is generally has a broader scope, and hence not assignable to an individual. Hence, you can divide the Project into multiple Tasks. These can be assigned to an individual and tracked better.
+
+These Tasks can be created from a Project itself or a [Task](/docs/user/manual/en/projects/tasks.html) can be created separately as well.
+
+<img class="screenshot" alt="Project" src="{{docs_base_url}}/assets/img/project/project-1.png">
+
+### Task Completion
You can also track % Completion of a Project using different methods.
@@ -15,100 +22,39 @@
2. Task Progress
3. Task Weight
-<img class="screenshot" alt="Project" src="{{docs_base_url}}/assets/img/project/project-percent-complete.png">
+<img class="screenshot" alt="Project 2" src="{{docs_base_url}}/assets/img/project/project-2.png">
Some examples of how the % Completion is calculated based on Tasks.
-<img class="screenshot" alt="Project" src="{{docs_base_url}}/assets/img/project/percent-complete-calc.png">
+<img class="screenshot" alt="Project 3" src="{{docs_base_url}}/assets/img/project/percent-complete-calc.png">
-<img class="screenshot" alt="Project" src="{{docs_base_url}}/assets/img/project/percent-complete-formula.png">
+<img class="screenshot" alt="Project 4" src="{{docs_base_url}}/assets/img/project/percent-complete-formula.png">
-### Managing tasks
-Project can be divided into multiple Tasks.
-Task can be created via Project document itself or can be created via [Task](/docs/user/manual/en/projects/tasks.html)
-
-<img class="screenshot" alt="Project" src="{{docs_base_url}}/assets/img/project/project_task.png">
-
-* To view Task made against a Project click on 'Tasks'
-
-<img class="screenshot" alt="Project - View Task" src="{{docs_base_url}}/assets/img/project/project_view_task.png">
-
-<img class="screenshot" alt="Project - Task List" src="{{docs_base_url}}/assets/img/project/project_task_list.png">
-
-* You can also view the Tasks from the Project document itself
-
-<img class="screenshot" alt="Project - Task Grid" src="{{docs_base_url}}/assets/img/project/project_task_grid.png">
-
-* To add Weights to Tasks you can follow the below steps
-
-<img class="screenshot" alt="Project - Task Grid" src="{{docs_base_url}}/assets/img/project/tasks.png">
-<img class="screenshot" alt="Project - Task Grid" src="{{docs_base_url}}/assets/img/project/task-weights.png">
-
-
-### Managing time
-
-ERPNext uses [Time Log](/docs/user/manual/en/projects/time-log.html) to track the progress of a Project.
-You can create Time Logs against each task.
-The Actual Start and End Time along with the costing shall then be updated based on the Time Log.
-
-* To view Time Log made against a Project click on 'Time Logs'
-
-<img class="screenshot" alt="Project - View Time Log" src="{{docs_base_url}}/assets/img/project/project_view_time_log.png">
-
-<img class="screenshot" alt="Project - Time Log List" src="{{docs_base_url}}/assets/img/project/project_time_log_list.png">
-
-* You can also create a Time Log directlly and link it to the Project.
-
-<img class="screenshot" alt="Project - Link Time Log" src="{{docs_base_url}}/assets/img/project/project_time_log_link.png">
-
-### Managing expenses
-
-You can book [Expense Claim](/docs/user/manual/en/human-resources/expense-claim.html) against a project task.
-The system shall update the total amount from expense claims in the project costing section.
-
-* To view Expense Claims made against a Project click on 'Expense Claims'
-
-<img class="screenshot" alt="Project - View Expense Claim" src="{{docs_base_url}}/assets/img/project/project_view_expense_claim.png">
-
-* You can also create a Expense Claims directlly and link it to the Project.
-
-<img class="screenshot" alt="Project - Link Expense Claim" src="{{docs_base_url}}/assets/img/project/project_expense_claim_link.png">
-
-* Total amount of Expense Claims booked against a project is shown under 'Total Expense Claim' in the Project Costing Section
-
-<img class="screenshot" alt="Project - Total Expense Claim" src="{{docs_base_url}}/assets/img/project/project_total_expense_claim.png">
-
-### Cost Center
-
-You can make a [Cost Center](/docs/user/manual/en/accounts/setup/cost-center.html) against a Project or use an existing cost center to track all expenses made against that project.
-
-<img class="screenshot" alt="Project - Cost Center" src="{{docs_base_url}}/assets/img/project/project_cost_center.png">
-
-###Project Costing
+### Project Costing
The Project Costing section helps you track the time, expenses and purchases incurred against the project.
<img class="screenshot" alt="Project - Costing" src="{{docs_base_url}}/assets/img/project/project_costing.png">
-* The Total Cost is composed of the costing amount from timesheets, the total cost from expense claims and the total cost from purchase invoices created against this project.
+* The Total Cost is composed of the costing amount from timesheets, the total cost of expense claims and the total cost of purchase invoices created against this project.
* The Gross Margin is the difference between Total Billed Amount and the Total Cost Amount for this project.
-###Billing
+### Gantt Chart
-You can make/link a [Sales Order](/docs/user/manual/en/selling/sales-order.html) against a project. Once linked you can use the standard sales module to bill your customer against the Project.
+ERPNext gives you an illustrated view of tasks scheduled for that project in Gantt Chart View.
-<img class="screenshot" alt="Project - Sales Order" src="{{docs_base_url}}/assets/img/project/project_sales_order.png">
+* To view Gantt chart against a project, go to the Task list and Apply filter on the Project.
-###Gantt Chart
+<img class="screenshot" alt="Project Gantt" src="{{docs_base_url}}/assets/img/project/project-1.1.png">
-A Gantt Chart illustrates a project schedule.
-ERPNext gives you a illustrated view of tasks scheduled against that project in Gantt Chart View.
+### Project Help Video
-* To view gantt chart against a project, go to that project and click on 'Gantt Chart'
+This is a tutorial video on how to manage Project and associate Tasks in ERPNext.
-<img class="screenshot" alt="Project - View Gantt Chart" src="{{docs_base_url}}/assets/img/project/project_view_gantt_chart.png">
+<div class="embed-container">
+ <iframe src="https://www.youtube.com/embed/gCzShu9Niu4?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen>
+ </iframe>
+</div>
-<img class="screenshot" alt="Project - Gantt Chart" src="{{docs_base_url}}/assets/img/project/project_gantt_chart.png">
-
-{next}
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/projects/time-log-batch.md b/erpnext/docs/user/manual/en/projects/time-log-batch.md
deleted file mode 100644
index 6904f4e..0000000
--- a/erpnext/docs/user/manual/en/projects/time-log-batch.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# Time Log Batch
-
-You can bill Time Logs by batching them together. This gives you the flexiblity to manage your customer billing in the way you want. To create a new Time Sheet, go to
-
-> Projects > Time Sheet > New Time Sheet
-
-OR
-
-Just open your Time Log list and check the Items to you want to add to the Time Log. Then click on "Make Time Sheet" button and these Time Logs will be selected.
-
-<img class="screenshot" alt="Time Log - Drag Calender" src="{{docs_base_url}}/assets/img/project/time_sheet.gif">
-
-###Making Sales Invoice
-
-* After submitting the Time Sheet, "Make Invoice" button shall appear.
-
-<img class="screenshot" alt="Time Log - Drag Calender" src="{{docs_base_url}}/assets/img/project/time_sheet_make_invoice.png">
-
-* Click on that button to raise a Sales Invoice against the Time Sheet.
-
-<img class="screenshot" alt="Time Log - Drag Calender" src="{{docs_base_url}}/assets/img/project/time_sheet_sales_invoice.png">
-
-* When you "Submit" the Sales Invoice, the Sales Invoice number will get updated in the Time Logs and Time Sheet and their status will change to "Billed".
-
-{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/stock/articles/allow-over-delivery-billing-against-sales-order-upto-certain-limit.md b/erpnext/docs/user/manual/en/stock/articles/allow-over-delivery-billing-against-sales-order-upto-certain-limit.md
index 9b140a6..f5a589d 100644
--- a/erpnext/docs/user/manual/en/stock/articles/allow-over-delivery-billing-against-sales-order-upto-certain-limit.md
+++ b/erpnext/docs/user/manual/en/stock/articles/allow-over-delivery-billing-against-sales-order-upto-certain-limit.md
@@ -1,22 +1,24 @@
#Allow Over Delivery/Billing
-While creating Delivery Note, system validates if item's Qty mentined is same as in the Sales Order. If Item Qty has been increased, you will get over-delivery validation. If you want to be able to deliver more items than mentioned in the Sales Order, you should update "Allow over delivery or receipt upto this percent" in the Item master.
+When creating a Delivery Note, system validates if item's qty is same as in the Sales Order. If item's qty has been increased, you will get the validation message of over-delivery or receipt.
-<img alt="Item wise Allowance percentage" class="screenshot" src="{{docs_base_url}}/assets/img/articles/allowance-percentage-1.png">
+Considering the case fo sales, if you want to be able to deliver more items than mentioned in the Sales Order, you should update "Allow over delivery or receipt upto this percent" in the Item master.
-Item's and Rate is also validated when creating Sales Invoice from Sales Order. Also when creating Purchase Receipt and Purchaes Invoice from Purchase Order. Updating "Allow over delivery or receipt upto this percent" will be affective in all sales and purchase transactions.
+<img alt="Itemised Limit Percentage" class="screenshot" src="{{docs_base_url}}/assets/img/articles/limit-1.png">
-For example, if you have ordered 100 units of an item, and if item's over receipt percent is 50%, then you are allowed to make Purchase Receipt for upto 150 units.
+When creating an invoice, item's rate is also validated based on the preceding transaction like Sales Order. This also applies when creating Purchase Receipt or Purchaes Invoice from Purchase Order. Updating "Allow over delivery or receipt upto this percent" will be affective in all sales and purchase transactions.
+
+For example, if you have ordered 100 units of an item, and if item's over receipt percent is 50, then you are allowed to make Purchase Receipt for upto 150 units.
Update global value for "Allow over delivery or receipt upto this percent" from Stock Settings. Value updated here will be applicable for all the items.
1. Go to `Stock > Setup > Stock Settings`
-2. Set `Allowance Percentage`.
+2. Set `Limit Percentage`.
3. Save Stock Settings.
-<img alt="Item wise Allowance percentage" class="screenshot" src="{{docs_base_url}}/assets/img/articles/allowance-percentage-2.png">
+<img alt="Item wise Allowance percentage" class="screenshot" src="{{docs_base_url}}/assets/img/articles/limit-2.png">
<!-- markdown -->
diff --git a/erpnext/docs/user/manual/en/stock/articles/material-transfer-from-delivery-note.md b/erpnext/docs/user/manual/en/stock/articles/material-transfer-from-delivery-note.md
new file mode 100644
index 0000000..02bdadf
--- /dev/null
+++ b/erpnext/docs/user/manual/en/stock/articles/material-transfer-from-delivery-note.md
@@ -0,0 +1,29 @@
+# Material Transfer from Delivery Note
+
+In ERPNext, you can create Material Transfer entry from [Stock Entry](/docs/user/manual/en/stock/stock-entry.html) document. However, there are some scenarios in the Material Transfer where it needs to be presented as a Delivery Note.
+
+### Scenarios
+
+1. One of the examples is when you transfer a Material from your stores to project site, however, you need to present it as a Delivery Note to the client.
+
+2. Also, there are statutory requirements where taxes are to be applied on each transfer of Material. It is easier to manage in a transaction like Delivery Note, than in the Stock Entry.
+
+Considering these scenarios, the provision of Material Transfer has been added in the Delivery Note as well. Following are the steps to use Delivery Note for creating Material Transfer entry.
+
+### Steps
+
+#### Enable Customer Warehouse
+
+Delivery Note Item doctype as a hidden field of Customer Warehouse. You can enable it from [Customize Form](/docs/user/manual/en/customize-erpnext/customize-form.html). Here is the quick demonstration of the same.
+
+<img class="screenshot" alt="Delivery Note Material Transfer" src="{{docs_base_url}}/assets/img/stock/customer-warehouse.gif">
+
+### Select Warehouses
+
+When creating a Delivery Note for Material Transfer, for an item select source Warehouse as From Warehouse.
+
+In the Customer Warehouse, select a Warehouse where Material is to be transferred or select a target warehouse.
+
+<img class="screenshot" alt="Delivery Note Material Transfer" src="{{docs_base_url}}/assets/img/stock/customer-warehouse-2.png">
+
+On the submission of a Delivery Note, item's stock will be deducted from "From Warehouse" and added to the "Customer Warehouse".
\ No newline at end of file
diff --git a/erpnext/docs/user/videos/learn/advance-payments.md b/erpnext/docs/user/videos/learn/advance-payments.md
index f08053f..5abcd83 100644
--- a/erpnext/docs/user/videos/learn/advance-payments.md
+++ b/erpnext/docs/user/videos/learn/advance-payments.md
@@ -1,7 +1,7 @@
# Advance Payment
-<iframe width="660" height="371" src="https://www.youtube.com/embed/J46-6qtyZ9U" frameborder="0" allowfullscreen></iframe>
+<iframe width="660" height="371" src="https://www.youtube.com/embed/3wiIXId6dzg" frameborder="0" allowfullscreen></iframe>
-**Duration: 2:52**
+**Duration: 3:11**
In sales and purchase transaction, generally advance payments are involved. This tutorial covers how you can create advance payment entries against Sales Order and Purchase Order, and adjust the same in the final invoice.
\ No newline at end of file
diff --git a/erpnext/docs/user/videos/learn/discounts.md b/erpnext/docs/user/videos/learn/discounts.md
new file mode 100644
index 0000000..e4668bb
--- /dev/null
+++ b/erpnext/docs/user/videos/learn/discounts.md
@@ -0,0 +1,7 @@
+# Applying Discounts
+
+<iframe width="660" height="371" src="https://www.youtube.com/embed/0850LAIPUBU" frameborder="0" allowfullscreen></iframe>
+
+**Duration: 2:23**
+
+This is a video tutorial on how to apply discounts in the sales and purchase transactions.
\ No newline at end of file
diff --git a/erpnext/docs/user/videos/learn/email-account.md b/erpnext/docs/user/videos/learn/email-account.md
index 0ac4e98..b2b40d6 100644
--- a/erpnext/docs/user/videos/learn/email-account.md
+++ b/erpnext/docs/user/videos/learn/email-account.md
@@ -1,7 +1,7 @@
# Email Account
-<iframe width="660" height="371" src="https://www.youtube.com/embed/YFYe0DrB95o" frameborder="0" allowfullscreen></iframe>
+<iframe width="660" height="371" src="https://www.youtube.com/embed/ChsFbIuG06g" frameborder="0" allowfullscreen></iframe>
-**Duration: 2:27**
+**Duration: 4:00**
This video walks you through setting up Email Account for incoming and outgoing emails. For hosted users, outgoing email gateway is set by default. Based on incoming email, you can have new document (like Issue, Lead etc.) auto-created, and have email received on these id's appended to specified document.
diff --git a/erpnext/docs/user/videos/learn/email-inbox.md b/erpnext/docs/user/videos/learn/email-inbox.md
new file mode 100644
index 0000000..dd69bb8
--- /dev/null
+++ b/erpnext/docs/user/videos/learn/email-inbox.md
@@ -0,0 +1,7 @@
+# Email Inbox
+
+<iframe width="660" height="371" src="https://www.youtube.com/embed/KkKwtRwGvKw" frameborder="0" allowfullscreen></iframe>
+
+**Duration: 2:51**
+
+This is video tutorial on how a user can configure an Email Inbox for his/her ID. Email Inbox is integrated well with other functionalities like Support Issues, Opportuniies and Communication.
\ No newline at end of file
diff --git a/erpnext/docs/user/videos/learn/employee-advance.md b/erpnext/docs/user/videos/learn/employee-advance.md
new file mode 100644
index 0000000..48b9f08
--- /dev/null
+++ b/erpnext/docs/user/videos/learn/employee-advance.md
@@ -0,0 +1,7 @@
+# Employee Advance
+
+<iframe width="660" height="371" src="https://www.youtube.com/embed/ja-zY0-7NsQ" frameborder="0" allowfullscreen></iframe>
+
+**Duration: 3:46**
+
+In this video, we will learn how an advance amount is given to an Employee, and how to adjust the same against an Expense Claim.
\ No newline at end of file
diff --git a/erpnext/docs/user/videos/learn/index.md b/erpnext/docs/user/videos/learn/index.md
index f10061c..fde6b48 100644
--- a/erpnext/docs/user/videos/learn/index.md
+++ b/erpnext/docs/user/videos/learn/index.md
@@ -79,9 +79,17 @@
Opening Account Balances</a>
<span class="text-muted pull-right">4:40</span>
</li>
+ <li><a href="/docs/user/videos/learn/opening-invoice-creation-tool.html">
+ Opening Invoices Creation Tool</a>
+ <span class="text-muted pull-right">2:30</span>
+ </li>
<li><a href="/docs/user/videos/learn/email-account.html">
Email Account</a>
- <span class="text-muted pull-right">2:27</span>
+ <span class="text-muted pull-right">4:00</span>
+ </li>
+ <li><a href="/docs/user/videos/learn/email-inbox.html">
+ Email Inbox</a>
+ <span class="text-muted pull-right">2:51</span>
</li>
<li><a href="/docs/user/videos/learn/file-manager.html">
File Manager</a>
@@ -119,6 +127,14 @@
Drop Ship</a>
<span class="text-muted pull-right">2:26</span>
</li>
+ <li><a href="/docs/user/videos/learn/pricing-rule.html">
+ Pricing Rule</a>
+ <span class="text-muted pull-right">3:56</span>
+ </li>
+ <li><a href="/docs/user/videos/learn/discounts.html">
+ Discounts</a>
+ <span class="text-muted pull-right">2:23</span>
+ </li>
</ul>
<br>
<h3>Buying</h3>
@@ -143,6 +159,14 @@
Taxes</a>
<span class="text-muted pull-right">5:13</span>
</li>
+ <li><a href="/docs/user/videos/learn/pricing-rule.html">
+ Pricing Rule</a>
+ <span class="text-muted pull-right">3:56</span>
+ </li>
+ <li><a href="/docs/user/videos/learn/discounts.html">
+ Discounts</a>
+ <span class="text-muted pull-right">2:23</span>
+ </li>
</ul>
<br>
<h3>Stock</h3>
@@ -201,12 +225,16 @@
</li>
<li><a href="/docs/user/videos/learn/advance-payments.html">
Advance Payments</a>
- <span class="text-muted pull-right">2:52</span>
+ <span class="text-muted pull-right">3:11</span>
</li>
<li><a href="/docs/user/videos/learn/budgeting.html">
Budgeting</a>
<span class="text-muted pull-right">3:26</span>
</li>
+ <li><a href="/docs/user/videos/learn/subscription.html">
+ Subscription Management</a>
+ <span class="text-muted pull-right">2:09</span>
+ </li>
</ul>
<br>
<h3>Manufacturing</h3>
@@ -245,6 +273,10 @@
Expense Claims</a>
<span class="text-muted pull-right">2:52</span>
</li>
+ <li><a href="/docs/user/videos/learn/employee-advance.html">
+ Employee Advance</a>
+ <span class="text-muted pull-right">3:46</span>
+ </li>
</ul>
<br>
<h3>Retail</h3>
diff --git a/erpnext/docs/user/videos/learn/index.txt b/erpnext/docs/user/videos/learn/index.txt
index 956703b..116ac6c 100644
--- a/erpnext/docs/user/videos/learn/index.txt
+++ b/erpnext/docs/user/videos/learn/index.txt
@@ -42,4 +42,10 @@
services
distributors
manufacturing-make-to-order
-manufacturing-enigneer-to-order
\ No newline at end of file
+manufacturing-enigneer-to-order
+opening-invoice-creation-tool
+pricing-rule
+discounts
+email-inbox
+subscription
+employee-advance
\ No newline at end of file
diff --git a/erpnext/docs/user/videos/learn/opening-invoice-creation-tool.md b/erpnext/docs/user/videos/learn/opening-invoice-creation-tool.md
new file mode 100644
index 0000000..0670fa1
--- /dev/null
+++ b/erpnext/docs/user/videos/learn/opening-invoice-creation-tool.md
@@ -0,0 +1,7 @@
+# Opening Invoices Creation Tool
+
+<iframe width="660" height="371" src="https://www.youtube.com/embed/vfWmugaO1zw" frameborder="0" allowfullscreen></iframe>
+
+**Duration: 2:30**
+
+An important on-boarding step for an E R P software includes updating opening sales and purchase invoices. In E R P Next, it is made simple with Opening Invoices Creation Tool. You can use this tool for quickly creatio opening Sales and Purchase Invoices.
\ No newline at end of file
diff --git a/erpnext/docs/user/videos/learn/payment-terms.md b/erpnext/docs/user/videos/learn/payment-terms.md
index 1832b7f..a3821a8 100644
--- a/erpnext/docs/user/videos/learn/payment-terms.md
+++ b/erpnext/docs/user/videos/learn/payment-terms.md
@@ -5,10 +5,8 @@
</iframe>
</div>
-**Duration: 2:55**
+**Duration: 2:56**
This tutorial shows you how to set payment terms in ERPNext. Payment Terms help in defining the multiple payment slabs during sales or purchase transactions.
In Payment Terms you can define the breakup of the payment to be received (or made) in terms of different payment modes and the period after the due date. You can also create templates to quickly load the payment terms in a transaction.
-
-
diff --git a/erpnext/docs/user/videos/learn/pricing-rule.md b/erpnext/docs/user/videos/learn/pricing-rule.md
new file mode 100644
index 0000000..fcc808a
--- /dev/null
+++ b/erpnext/docs/user/videos/learn/pricing-rule.md
@@ -0,0 +1,8 @@
+# Pricing Rule
+
+<iframe width="660" height="371" src="https://www.youtube.com/embed/y-9BIWZ5x8Q" frameborder="0" allowfullscreen></iframe>
+
+**Duration: 3:56**
+
+If you apply discounts on the item based on certain conditions, you can use Pricing Rule to define these conditions. In the Pricing Rule, you define criterias based on these parameters for the auto application
+of discount or margin.
diff --git a/erpnext/docs/user/videos/learn/product-bundle.md b/erpnext/docs/user/videos/learn/product-bundle.md
index c17456a..c63fe89 100644
--- a/erpnext/docs/user/videos/learn/product-bundle.md
+++ b/erpnext/docs/user/videos/learn/product-bundle.md
@@ -1,6 +1,6 @@
# Product Bundle
-<iframe width="660" height="371" src="https://www.youtube.com/embed/yk3kPrRyRRc" frameborder="0" allowfullscreen></iframe>
+<iframe width="660" height="371" src="https://www.youtube.com/embed/dxv78E3UF0U" frameborder="0" allowfullscreen></iframe>
**Duration: 2:31**
diff --git a/erpnext/docs/user/videos/learn/serialized-inventory.md b/erpnext/docs/user/videos/learn/serialized-inventory.md
index e3b97e1..da2c036 100644
--- a/erpnext/docs/user/videos/learn/serialized-inventory.md
+++ b/erpnext/docs/user/videos/learn/serialized-inventory.md
@@ -1,8 +1,8 @@
# Serialized Inventory
-<iframe width="660" height="371" src="https://www.youtube.com/embed/gvOVlEwFDAk" frameborder="0" allowfullscreen></iframe>
+<iframe width="660" height="371" src="https://www.youtube.com/embed/Q4tYKYTbVek" frameborder="0" allowfullscreen></iframe>
-**Duration: 4:11**
+**Duration: 5:33**
If an Item is serialized, a Serial Number (Serial No) record is maintained for each unit of that Item. This information is helpful in tracking the location of the Serial No, its warranty and end-of-life (expiry) information.
diff --git a/erpnext/docs/user/videos/learn/subscription.md b/erpnext/docs/user/videos/learn/subscription.md
new file mode 100644
index 0000000..8193e58
--- /dev/null
+++ b/erpnext/docs/user/videos/learn/subscription.md
@@ -0,0 +1,7 @@
+# Subscription Management
+
+<iframe width="660" height="371" src="https://www.youtube.com/embed/CRQfGiMm3_U" frameborder="0" allowfullscreen></iframe>
+
+**Duration: 2:09**
+
+In this video, we will learn about subscription management in ERPNext. Let's suppose you have to create a purchase invoice every month for paying the property rent. You should only create first Purchase Invoice manually, and then create a Subscription for it, so that purchase invoice is auto-created for subsequent each month.
\ No newline at end of file
diff --git a/erpnext/healthcare/doctype/consultation/consultation.py b/erpnext/healthcare/doctype/consultation/consultation.py
index b647c2e..ace5ac0 100755
--- a/erpnext/healthcare/doctype/consultation/consultation.py
+++ b/erpnext/healthcare/doctype/consultation/consultation.py
@@ -5,7 +5,7 @@
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
-from frappe.utils import getdate
+from frappe.utils import getdate, cstr
import json
from erpnext.healthcare.doctype.healthcare_settings.healthcare_settings import get_receivable_account, get_income_account
@@ -120,7 +120,7 @@
def set_subject_field(consultation):
subject = "No Diagnosis "
if(consultation.diagnosis):
- subject = "Diagnosis: "+ str(consultation.diagnosis)+". "
+ subject = "Diagnosis: \n"+ cstr(consultation.diagnosis)+". "
if(consultation.drug_prescription):
subject +="\nDrug(s) Prescribed. "
if(consultation.test_prescription):
diff --git a/erpnext/healthcare/doctype/lab_test/lab_test.py b/erpnext/healthcare/doctype/lab_test/lab_test.py
index c910d7c..4e07ed6 100644
--- a/erpnext/healthcare/doctype/lab_test/lab_test.py
+++ b/erpnext/healthcare/doctype/lab_test/lab_test.py
@@ -6,7 +6,7 @@
import frappe
from frappe.model.document import Document
import json
-from frappe.utils import getdate
+from frappe.utils import getdate, cstr
from erpnext.healthcare.doctype.healthcare_settings.healthcare_settings import get_receivable_account
from frappe import _
@@ -228,9 +228,10 @@
return employee
def insert_lab_test_to_medical_record(doc):
- subject = str(doc.test_name)
+ subject = cstr(doc.test_name)
if(doc.test_comment):
- subject += ", "+str(doc.test_comment)
+ subject += ", \n"+ cstr(doc.test_comment)
+
medical_record = frappe.new_doc("Patient Medical Record")
medical_record.patient = doc.patient
medical_record.subject = subject
diff --git a/erpnext/healthcare/doctype/vital_signs/vital_signs.py b/erpnext/healthcare/doctype/vital_signs/vital_signs.py
index 41d9258..bf4dace 100644
--- a/erpnext/healthcare/doctype/vital_signs/vital_signs.py
+++ b/erpnext/healthcare/doctype/vital_signs/vital_signs.py
@@ -5,6 +5,7 @@
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
+from frappe.utils import cstr
class VitalSigns(Document):
def on_submit(self):
@@ -33,16 +34,16 @@
def set_subject_field(doc):
subject = ""
if(doc.temperature):
- subject += "Temperature: "+ str(doc.temperature)+".\n"
+ subject += "Temperature: \n"+ cstr(doc.temperature)+". "
if(doc.pulse):
- subject += "Pulse: "+ str(doc.pulse)+".\n"
+ subject += "Pulse: \n"+ cstr(doc.pulse)+". "
if(doc.respiratory_rate):
- subject += "Respiratory Rate: "+ str(doc.respiratory_rate)+".\n"
+ subject += "Respiratory Rate: \n"+ cstr(doc.respiratory_rate)+". "
if(doc.bp):
- subject += "BP: "+ str(doc.bp)+".\n"
+ subject += "BP: \n"+ cstr(doc.bp)+". "
if(doc.bmi):
- subject += "BMI: "+ str(doc.bmi)+".\n"
+ subject += "BMI: \n"+ cstr(doc.bmi)+". "
if(doc.nutrition_note):
- subject += "Note: "+ str(doc.nutrition_note)+"."
+ subject += "Note: \n"+ cstr(doc.nutrition_note)+". "
return subject
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 938f7fa..815e2eb 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -238,7 +238,8 @@
"erpnext.assets.doctype.asset.asset.make_post_gl_entry"
],
"monthly": [
- "erpnext.accounts.doctype.sales_invoice.sales_invoice.booked_deferred_revenue"
+ "erpnext.accounts.doctype.sales_invoice.sales_invoice.booked_deferred_revenue",
+ "erpnext.hr.utils.allocate_earned_leaves"
]
}
diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.py b/erpnext/hr/doctype/leave_allocation/leave_allocation.py
index 8432cfe..7cffa4c 100755
--- a/erpnext/hr/doctype/leave_allocation/leave_allocation.py
+++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.py
@@ -43,16 +43,16 @@
def on_update_after_submit(self):
self.validate_new_leaves_allocated_value()
self.set_total_leaves_allocated()
-
+
frappe.db.set(self,'carry_forwarded_leaves', flt(self.carry_forwarded_leaves))
frappe.db.set(self,'total_leaves_allocated',flt(self.total_leaves_allocated))
-
+
self.validate_against_leave_applications()
def validate_period(self):
if date_diff(self.to_date, self.from_date) <= 0:
frappe.throw(_("To date cannot be before from date"))
-
+
def validate_lwp(self):
if frappe.db.get_value("Leave Type", self.leave_type, "is_lwp"):
frappe.throw(_("Leave Type {0} cannot be allocated since it is leave without pay").format(self.leave_type))
@@ -66,45 +66,45 @@
leave_allocation = frappe.db.sql("""
select name from `tabLeave Allocation`
where employee=%s and leave_type=%s and docstatus=1
- and to_date >= %s and from_date <= %s""",
+ and to_date >= %s and from_date <= %s""",
(self.employee, self.leave_type, self.from_date, self.to_date))
if leave_allocation:
frappe.msgprint(_("{0} already allocated for Employee {1} for period {2} to {3}")
.format(self.leave_type, self.employee, formatdate(self.from_date), formatdate(self.to_date)))
-
+
frappe.throw(_('Reference') + ': <a href="#Form/Leave Allocation/{0}">{0}</a>'
.format(leave_allocation[0][0]), OverlapError)
-
+
def validate_back_dated_allocation(self):
future_allocation = frappe.db.sql("""select name, from_date from `tabLeave Allocation`
- where employee=%s and leave_type=%s and docstatus=1 and from_date > %s
+ where employee=%s and leave_type=%s and docstatus=1 and from_date > %s
and carry_forward=1""", (self.employee, self.leave_type, self.to_date), as_dict=1)
-
+
if future_allocation:
frappe.throw(_("Leave cannot be allocated before {0}, as leave balance has already been carry-forwarded in the future leave allocation record {1}")
- .format(formatdate(future_allocation[0].from_date), future_allocation[0].name),
+ .format(formatdate(future_allocation[0].from_date), future_allocation[0].name),
BackDatedAllocationError)
def set_total_leaves_allocated(self):
- self.carry_forwarded_leaves = get_carry_forwarded_leaves(self.employee,
+ self.carry_forwarded_leaves = get_carry_forwarded_leaves(self.employee,
self.leave_type, self.from_date, self.carry_forward)
-
+
self.total_leaves_allocated = flt(self.carry_forwarded_leaves) + flt(self.new_leaves_allocated)
-
- if not self.total_leaves_allocated:
- frappe.throw(_("Total leaves allocated is mandatory"))
+
+ if not self.total_leaves_allocated and not frappe.db.get_value("Leave Type", self.leave_type, "is_earned_leave"):
+ frappe.throw(_("Total leaves allocated is mandatory for Leave Type {0}".format(self.leave_type)))
def validate_total_leaves_allocated(self):
# Adding a day to include To Date in the difference
date_difference = date_diff(self.to_date, self.from_date) + 1
if date_difference < self.total_leaves_allocated:
frappe.throw(_("Total allocated leaves are more than days in the period"), OverAllocationError)
-
+
def validate_against_leave_applications(self):
- leaves_taken = get_approved_leaves_for_period(self.employee, self.leave_type,
+ leaves_taken = get_approved_leaves_for_period(self.employee, self.leave_type,
self.from_date, self.to_date)
-
+
if flt(leaves_taken) > flt(self.total_leaves_allocated):
if frappe.db.get_value("Leave Type", self.leave_type, "allow_negative"):
frappe.msgprint(_("Note: Total allocated leaves {0} shouldn't be less than already approved leaves {1} for the period").format(self.total_leaves_allocated, leaves_taken))
@@ -137,10 +137,10 @@
@frappe.whitelist()
def get_carry_forwarded_leaves(employee, leave_type, date, carry_forward=None):
carry_forwarded_leaves = 0
-
+
if carry_forward:
validate_carry_forward(leave_type)
-
+
previous_allocation = frappe.db.sql("""
select name, from_date, to_date, total_leaves_allocated
from `tabLeave Allocation`
@@ -148,14 +148,13 @@
order by to_date desc limit 1
""", (employee, leave_type, date), as_dict=1)
if previous_allocation:
- leaves_taken = get_approved_leaves_for_period(employee, leave_type,
+ leaves_taken = get_approved_leaves_for_period(employee, leave_type,
previous_allocation[0].from_date, previous_allocation[0].to_date)
-
+
carry_forwarded_leaves = flt(previous_allocation[0].total_leaves_allocated) - flt(leaves_taken)
-
+
return carry_forwarded_leaves
-
+
def validate_carry_forward(leave_type):
if not frappe.db.get_value("Leave Type", leave_type, "is_carry_forward"):
frappe.throw(_("Leave Type {0} cannot be carry-forwarded").format(leave_type))
-
diff --git a/erpnext/hr/doctype/leave_application/test_leave_application.py b/erpnext/hr/doctype/leave_application/test_leave_application.py
index b4f4c1c..5506d60 100644
--- a/erpnext/hr/doctype/leave_application/test_leave_application.py
+++ b/erpnext/hr/doctype/leave_application/test_leave_application.py
@@ -7,7 +7,7 @@
from erpnext.hr.doctype.leave_application.leave_application import LeaveDayBlockedError, OverlapError, NotAnOptionalHoliday, get_leave_balance_on
from frappe.permissions import clear_user_permissions_for_doctype
-from frappe.utils import add_days, nowdate, now_datetime
+from frappe.utils import add_days, nowdate, now_datetime, get_datetime
test_dependencies = ["Leave Allocation", "Leave Block List"]
@@ -387,25 +387,32 @@
self.assertRaises(frappe.ValidationError, leave_application.insert)
- # def test_earned_leave(self):
- # leave_period = get_leave_period()
- # employee = get_employee()
- #
- # leave_type = frappe.get_doc(dict(
- # leave_type_name = 'Test Earned Leave Type',
- # doctype = 'Leave Type',
- # is_earned_leave = 1,
- # earned_leave_frequency = 'Monthly',
- # rounding = 0.5
- # )).insert()
- #
- # allocate_leaves(employee, leave_period, leave_type.name, 0, eligible_leaves = 12)
- #
- # # this method will be called by scheduler
- # allocate_earned_leaves(leave_type.name, leave_period, as_on = half_of_leave_period)
- #
- # self.assertEqual(get_leave_balance(employee, leave_period, leave_type.name), 6)
+ def test_earned_leave(self):
+ leave_period = get_leave_period()
+ employee = get_employee()
+ leave_type = frappe.get_doc(dict(
+ leave_type_name = 'Test Earned Leave Type',
+ doctype = 'Leave Type',
+ is_earned_leave = 1,
+ earned_leave_frequency = 'Monthly',
+ rounding = 0.5,
+ max_leaves_allowed = 6
+ )).insert()
+ leave_policy = frappe.get_doc({
+ "doctype": "Leave Policy",
+ "leave_policy_details": [{"leave_type": leave_type.name, "annual_allocation": 6}]
+ }).insert()
+ frappe.db.set_value("Employee", employee.name, "leave_policy", leave_policy.name)
+
+ allocate_leaves(employee, leave_period, leave_type.name, 0, eligible_leaves = 12)
+
+ from erpnext.hr.utils import allocate_earned_leaves
+ i = 0
+ while(i<14):
+ allocate_earned_leaves()
+ i += 1
+ self.assertEqual(get_leave_balance_on(employee.name, leave_type.name, nowdate()), 6)
def make_allocation_record(employee=None, leave_type=None):
frappe.db.sql("delete from `tabLeave Allocation`")
diff --git a/erpnext/hr/doctype/leave_period/leave_period.py b/erpnext/hr/doctype/leave_period/leave_period.py
index 4097169..39001ee 100644
--- a/erpnext/hr/doctype/leave_period/leave_period.py
+++ b/erpnext/hr/doctype/leave_period/leave_period.py
@@ -71,7 +71,8 @@
allocation.leave_type = leave_type
allocation.from_date = self.from_date
allocation.to_date = self.to_date
- allocation.new_leaves_allocated = new_leaves_allocated
+ '''Earned Leaves are allocated by scheduler, initially allocate 0'''
+ allocation.new_leaves_allocated = new_leaves_allocated if not frappe.db.get_value("Leave Type", leave_type, "is_earned_leave") else 0
allocation.leave_period = self.name
if self.carry_forward_leaves:
if frappe.db.get_value("Leave Type", leave_type, "is_carry_forward"):
diff --git a/erpnext/hr/doctype/leave_type/leave_type.json b/erpnext/hr/doctype/leave_type/leave_type.json
index ef66a0a..8f7b5a8 100644
--- a/erpnext/hr/doctype/leave_type/leave_type.json
+++ b/erpnext/hr/doctype/leave_type/leave_type.json
@@ -584,7 +584,7 @@
"default": "0.5",
"depends_on": "is_earned_leave",
"fieldname": "rounding",
- "fieldtype": "Float",
+ "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -595,6 +595,7 @@
"label": "Rounding",
"length": 0,
"no_copy": 0,
+ "options": "0.5\n1.0",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -620,7 +621,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2018-05-08 18:32:51.803472",
+ "modified": "2018-06-03 18:32:51.803472",
"modified_by": "Administrator",
"module": "HR",
"name": "Leave Type",
diff --git a/erpnext/hr/utils.py b/erpnext/hr/utils.py
index 20fe666..4e937c6 100644
--- a/erpnext/hr/utils.py
+++ b/erpnext/hr/utils.py
@@ -4,7 +4,7 @@
from __future__ import unicode_literals
import frappe
from frappe import _
-from frappe.utils import formatdate, format_datetime, getdate, get_datetime, nowdate
+from frappe.utils import formatdate, format_datetime, getdate, get_datetime, nowdate, flt
from frappe.model.document import Document
from frappe.desk.form import assign_to
@@ -241,3 +241,52 @@
pd.parent=pp.name where pd.start_date<=%s and pd.end_date>= %s
and pp.company=%s""", (from_date, to_date, company), as_dict=1)
return payroll_period[0] if payroll_period else None
+
+
+def allocate_earned_leaves():
+ '''Allocate earned leaves to Employees'''
+ e_leave_types = frappe.get_all("Leave Type",
+ fields=["name", "max_leaves_allowed", "earned_leave_frequency", "rounding"],
+ filters={'is_earned_leave' : 1})
+ today = getdate()
+ divide_by_frequency = {"Yearly": 1, "Quarterly": 4, "Monthly": 12}
+ if e_leave_types:
+ for e_leave_type in e_leave_types:
+ leave_allocations = frappe.db.sql("""select name, employee, from_date, to_date from `tabLeave Allocation` where '{0}'
+ between from_date and to_date and docstatus=1 and leave_type='{1}'"""
+ .format(today, e_leave_type.name), as_dict=1)
+ for allocation in leave_allocations:
+ leave_policy = get_employee_leave_policy(allocation.employee)
+ if not leave_policy:
+ continue
+ if not e_leave_type.earned_leave_frequency == "Monthly":
+ if not check_frequency_hit(allocation.from_date, today, e_leave_type.earned_leave_frequency):
+ continue
+ annual_allocation = frappe.db.sql("""select annual_allocation from `tabLeave Policy Detail`
+ where parent=%s and leave_type=%s""", (leave_policy.name, e_leave_type.name))
+ if annual_allocation and annual_allocation[0]:
+ earned_leaves = flt(annual_allocation[0][0]) / divide_by_frequency[e_leave_type.earned_leave_frequency]
+ if e_leave_type.rounding == "0.5":
+ earned_leaves = round(earned_leaves * 2) / 2
+ else:
+ earned_leaves = round(earned_leaves)
+
+ allocated_leaves = frappe.db.get_value('Leave Allocation', allocation.name, 'total_leaves_allocated')
+ new_allocation = flt(allocated_leaves) + flt(earned_leaves)
+ new_allocation = new_allocation if new_allocation <= e_leave_type.max_leaves_allowed else e_leave_type.max_leaves_allowed
+ frappe.db.set_value('Leave Allocation', allocation.name, 'total_leaves_allocated', new_allocation)
+
+def check_frequency_hit(from_date, to_date, frequency):
+ '''Return True if current date matches frequency'''
+ from_dt = get_datetime(from_date)
+ to_dt = get_datetime(to_date)
+ from dateutil import relativedelta
+ rd = relativedelta.relativedelta(to_dt, from_dt)
+ months = rd.months
+ if frequency == "Quarterly":
+ if not months % 3:
+ return True
+ elif frequency == "Yearly":
+ if not months % 12:
+ return True
+ return False
diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json
index 0c0c870..461b9ab 100644
--- a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json
+++ b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json
@@ -1,539 +1,585 @@
{
- "allow_copy": 0,
- "allow_guest_to_view": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "beta": 0,
- "creation": "2014-11-27 14:12:07.542534",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Document",
- "editable_grid": 0,
- "engine": "InnoDB",
+ "allow_copy": 0,
+ "allow_guest_to_view": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "beta": 0,
+ "creation": "2014-11-27 14:12:07.542534",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Document",
+ "editable_grid": 0,
+ "engine": "InnoDB",
"fields": [
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "capacity_planning",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Capacity Planning",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "capacity_planning",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Capacity Planning",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "Disables creation of time logs against Work Orders. Operations shall not be tracked against Work Order",
- "fieldname": "disable_capacity_planning",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Disable Capacity Planning and Time Tracking",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "Disables creation of time logs against Work Orders. Operations shall not be tracked against Work Order",
+ "fieldname": "disable_capacity_planning",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Disable Capacity Planning and Time Tracking",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "Plan time logs outside Workstation Working Hours.",
- "fieldname": "allow_overtime",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Allow Overtime",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "Plan time logs outside Workstation Working Hours.",
+ "fieldname": "allow_overtime",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Allow Overtime",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "",
- "fieldname": "allow_production_on_holidays",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Allow Production on Holidays",
- "length": 0,
- "no_copy": 0,
- "options": "",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "",
+ "fieldname": "allow_production_on_holidays",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Allow Production on Holidays",
+ "length": 0,
+ "no_copy": 0,
+ "options": "",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_3",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "30",
- "description": "Try planning operations for X days in advance.",
- "fieldname": "capacity_planning_for_days",
- "fieldtype": "Int",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Capacity Planning For (Days)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "30",
+ "description": "Try planning operations for X days in advance.",
+ "fieldname": "capacity_planning_for_days",
+ "fieldtype": "Int",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Capacity Planning For (Days)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "Default 10 mins",
- "fieldname": "mins_between_operations",
- "fieldtype": "Int",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Time Between Operations (in mins)",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "Default 10 mins",
+ "fieldname": "mins_between_operations",
+ "fieldtype": "Int",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Time Between Operations (in mins)",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "section_break_6",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "section_break_6",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "over_production_allowance_percentage",
- "fieldtype": "Percent",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Over Production Allowance Percentage",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "overproduction_percentage_for_sales_order",
+ "fieldtype": "Percent",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Overproduction Percentage For Sales Order",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "BOM",
- "fieldname": "backflush_raw_materials_based_on",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Backflush Raw Materials Based On",
- "length": 0,
- "no_copy": 0,
- "options": "BOM\nMaterial Transferred for Manufacture",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "overproduction_percentage_for_work_order",
+ "fieldtype": "Percent",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Overproduction Percentage For Work Order",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "Allow multiple Material Consumption against a Work Order",
- "fieldname": "material_consumption",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Allow Multiple Material Consumption",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "BOM",
+ "fieldname": "backflush_raw_materials_based_on",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Backflush Raw Materials Based On",
+ "length": 0,
+ "no_copy": 0,
+ "options": "BOM\nMaterial Transferred for Manufacture",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "Update BOM cost automatically via Scheduler, based on latest valuation rate / price list rate / last purchase rate of raw materials.",
- "fieldname": "update_bom_costs_automatically",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Update BOM Cost Automatically",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "Allow multiple Material Consumption against a Work Order",
+ "fieldname": "material_consumption",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Allow Multiple Material Consumption",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_11",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "description": "Update BOM cost automatically via Scheduler, based on latest valuation rate / price list rate / last purchase rate of raw materials.",
+ "fieldname": "update_bom_costs_automatically",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Update BOM Cost Automatically",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "default_wip_warehouse",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Default Work In Progress Warehouse",
- "length": 0,
- "no_copy": 0,
- "options": "Warehouse",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_11",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "default_fg_warehouse",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Default Finished Goods Warehouse",
- "length": 0,
- "no_copy": 0,
- "options": "Warehouse",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "default_wip_warehouse",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Default Work In Progress Warehouse",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Warehouse",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "default_fg_warehouse",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Default Finished Goods Warehouse",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Warehouse",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
"unique": 0
}
- ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 0,
- "icon": "icon-wrench",
- "idx": 0,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 1,
- "istable": 0,
- "max_attachments": 0,
- "menu_index": 0,
- "modified": "2018-03-28 13:56:31.187520",
- "modified_by": "Administrator",
- "module": "Manufacturing",
- "name": "Manufacturing Settings",
- "name_case": "",
- "owner": "Administrator",
+ ],
+ "has_web_view": 0,
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "icon": "icon-wrench",
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "is_submittable": 0,
+ "issingle": 1,
+ "istable": 0,
+ "max_attachments": 0,
+ "menu_index": 0,
+ "modified": "2018-05-28 00:46:25.310621",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Manufacturing Settings",
+ "name_case": "",
+ "owner": "Administrator",
"permissions": [
{
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 0,
- "email": 0,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 0,
- "read": 1,
- "report": 0,
- "role": "Manufacturing Manager",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
+ "amend": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "role": "Manufacturing Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
"write": 1
}
- ],
- "quick_entry": 0,
- "read_only": 0,
- "read_only_onload": 0,
- "show_name_in_global_search": 0,
- "sort_field": "modified",
- "sort_order": "DESC",
- "track_changes": 1,
+ ],
+ "quick_entry": 0,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "show_name_in_global_search": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js
index a9c1491..672ec26 100644
--- a/erpnext/manufacturing/doctype/work_order/work_order.js
+++ b/erpnext/manufacturing/doctype/work_order/work_order.js
@@ -158,15 +158,15 @@
added_min = 0.5;
}
message = title;
-
// pending qty
if(!frm.doc.skip_transfer){
var pending_complete = frm.doc.material_transferred_for_manufacturing - frm.doc.produced_qty;
if(pending_complete) {
var title = __('{0} items in progress', [pending_complete]);
+ var width = ((pending_complete / frm.doc.qty * 100) - added_min);
bars.push({
'title': title,
- 'width': ((pending_complete / frm.doc.qty * 100) - added_min) + '%',
+ 'width': (width > 100 ? "99.5" : width) + '%',
'progress_class': 'progress-bar-warning'
})
message = message + '. ' + title;
@@ -356,7 +356,7 @@
erpnext.work_order.make_se(frm, 'Manufacture');
});
- if(doc.material_transferred_for_manufacturing==doc.qty) {
+ if(doc.material_transferred_for_manufacturing>=doc.qty) {
// all materials transferred for manufacturing, make this primary
finish_btn.addClass('btn-primary');
}
diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py
index 1cb215a..d10fd21 100644
--- a/erpnext/manufacturing/doctype/work_order/work_order.py
+++ b/erpnext/manufacturing/doctype/work_order/work_order.py
@@ -133,7 +133,7 @@
so_qty = flt(so_item_qty) + flt(dnpi_qty)
allowance_percentage = flt(frappe.db.get_single_value("Manufacturing Settings",
- "over_production_allowance_percentage"))
+ "overproduction_percentage_for_sales_order"))
if total_qty > so_qty + (allowance_percentage/100 * so_qty):
frappe.throw(_("Cannot produce more Item {0} than Sales Order quantity {1}")
@@ -168,7 +168,7 @@
if stock_entries:
status = "In Process"
produced_qty = stock_entries.get("Manufacture")
- if flt(produced_qty) == flt(self.qty):
+ if flt(produced_qty) >= flt(self.qty):
status = "Completed"
else:
status = 'Cancelled'
@@ -179,15 +179,20 @@
"""Update **Manufactured Qty** and **Material Transferred for Qty** in Work Order
based on Stock Entry"""
+ allowance_percentage = flt(frappe.db.get_single_value("Manufacturing Settings",
+ "overproduction_percentage_for_work_order"))
+
for purpose, fieldname in (("Manufacture", "produced_qty"),
("Material Transfer for Manufacture", "material_transferred_for_manufacturing")):
+
qty = flt(frappe.db.sql("""select sum(fg_completed_qty)
from `tabStock Entry` where work_order=%s and docstatus=1
and purpose=%s""", (self.name, purpose))[0][0])
- if qty > self.qty:
+ completed_qty = self.qty + (allowance_percentage/100 * self.qty)
+ if qty > completed_qty:
frappe.throw(_("{0} ({1}) cannot be greater than planned quantity ({2}) in Work Order {3}").format(\
- self.meta.get_label(fieldname), qty, self.qty, self.name), StockOverProductionError)
+ self.meta.get_label(fieldname), qty, completed_qty, self.name), StockOverProductionError)
self.db_set(fieldname, qty)
diff --git a/erpnext/manufacturing/report/bom_variance_report/__init__.py b/erpnext/manufacturing/report/bom_variance_report/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/manufacturing/report/bom_variance_report/__init__.py
diff --git a/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.js b/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.js
new file mode 100644
index 0000000..97ba7b9
--- /dev/null
+++ b/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.js
@@ -0,0 +1,29 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+/* eslint-disable */
+
+frappe.query_reports["BOM Variance Report"] = {
+ "filters": [
+ {
+ "fieldname":"bom_no",
+ "label": __("BOM No"),
+ "fieldtype": "Link",
+ "options": "BOM"
+ },
+ {
+ "fieldname":"work_order",
+ "label": __("Work Order"),
+ "fieldtype": "Link",
+ "options": "Work Order",
+ "get_query": function() {
+ var bom_no = frappe.query_report_filters_by_name.bom_no.get_value();
+ return{
+ query: "erpnext.manufacturing.report.bom_variance_report.bom_variance_report.get_work_orders",
+ filters: {
+ 'bom_no': bom_no
+ }
+ }
+ }
+ },
+ ]
+}
diff --git a/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.json b/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.json
new file mode 100644
index 0000000..91ed11e
--- /dev/null
+++ b/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.json
@@ -0,0 +1,32 @@
+{
+ "add_total_row": 0,
+ "creation": "2018-05-28 16:22:24.040106",
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 0,
+ "is_standard": "Yes",
+ "letter_head": "Gadgets International",
+ "modified": "2018-05-28 16:22:24.040106",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "BOM Variance Report",
+ "owner": "Administrator",
+ "ref_doctype": "Stock Entry",
+ "report_name": "BOM Variance Report",
+ "report_type": "Script Report",
+ "roles": [
+ {
+ "role": "Manufacturing Manager"
+ },
+ {
+ "role": "Stock Manager"
+ },
+ {
+ "role": "Stock User"
+ },
+ {
+ "role": "Manufacturing User"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.py b/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.py
new file mode 100644
index 0000000..c5627e0
--- /dev/null
+++ b/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.py
@@ -0,0 +1,107 @@
+# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe import _
+
+def execute(filters=None):
+ columns, data = [], []
+ columns = get_columns(filters)
+ data = get_data(filters)
+ return columns, data
+
+def get_columns(filters):
+ columns = [{
+ "label": _("Work Order"),
+ "fieldname": "work_order",
+ "fieldtype": "Link",
+ "options": "Work Order",
+ "width": 120
+ }]
+
+ if not filters.get('bom_no'):
+ columns.extend([
+ {
+ "label": _("BOM No"),
+ "fieldname": "bom_no",
+ "fieldtype": "Link",
+ "options": "BOM",
+ "width": 180
+ }
+ ])
+
+ columns.extend([
+ {
+ "label": _("Finished Good"),
+ "fieldname": "production_item",
+ "fieldtype": "Link",
+ "options": "Item",
+ "width": 120
+ },
+ {
+ "label": _("Ordered Qty"),
+ "fieldname": "qty",
+ "fieldtype": "Float",
+ "width": 120
+ },
+ {
+ "label": _("Produced Qty"),
+ "fieldname": "produced_qty",
+ "fieldtype": "Float",
+ "width": 120
+ },
+ {
+ "label": _("Raw Material"),
+ "fieldname": "raw_material_code",
+ "fieldtype": "Link",
+ "options": "Item",
+ "width": 120
+ },
+ {
+ "label": _("Required Qty"),
+ "fieldname": "required_qty",
+ "fieldtype": "Float",
+ "width": 120
+ },
+ {
+ "label": _("Consumed Qty"),
+ "fieldname": "consumed_qty",
+ "fieldtype": "Float",
+ "width": 120
+ }
+ ])
+
+ return columns
+
+def get_data(filters):
+ cond = "1=1"
+
+ if filters.get('bom_no') and not filters.get('work_order'):
+ cond += " and bom_no = '%s'" % filters.get('bom_no')
+
+ if filters.get('work_order'):
+ cond += " and name = '%s'" % filters.get('work_order')
+
+ results = []
+ for d in frappe.db.sql(""" select name as work_order, qty, produced_qty, production_item, bom_no
+ from `tabWork Order` where produced_qty > qty and docstatus = 1 and {0}""".format(cond), as_dict=1):
+ results.append(d)
+
+ for data in frappe.get_all('Work Order Item', fields=["item_code as raw_material_code",
+ "required_qty", "consumed_qty"], filters={'parent': d.work_order, 'parenttype': 'Work Order'}):
+ results.append(data)
+
+ return results
+
+@frappe.whitelist()
+def get_work_orders(doctype, txt, searchfield, start, page_len, filters):
+ cond = "1=1"
+ if filters.get('bom_no'):
+ cond += " and bom_no = '%s'" % filters.get('bom_no')
+
+ return frappe.db.sql("""select name from `tabWork Order`
+ where name like %(name)s and {0} and produced_qty > qty and docstatus = 1
+ order by name limit {1}, {2}""".format(cond, start, page_len),{
+ 'name': "%%%s%%" % txt
+ }, as_list=1)
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 97c6dd6..06ff4b5 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -542,3 +542,5 @@
erpnext.patches.v11_0.check_buying_selling_in_currency_exchange
erpnext.patches.v11_0.refactor_erpnext_shopify
erpnext.patches.v11_0.move_item_defaults_to_child_table_for_multicompany
+erpnext.patches.v11_0.rename_overproduction_percent_field
+erpnext.patches.v10_0.update_status_in_purchase_receipt
diff --git a/erpnext/patches/v10_0/update_status_in_purchase_receipt.py b/erpnext/patches/v10_0/update_status_in_purchase_receipt.py
new file mode 100644
index 0000000..69e2bb8
--- /dev/null
+++ b/erpnext/patches/v10_0/update_status_in_purchase_receipt.py
@@ -0,0 +1,7 @@
+import frappe
+
+def execute():
+ frappe.reload_doc("stock", "doctype", "purchase_receipt")
+ frappe.db.sql('''
+ UPDATE `tabPurchase Receipt` SET status = "Completed" WHERE per_billed = 100 AND docstatus = 1
+ ''')
\ No newline at end of file
diff --git a/erpnext/patches/v11_0/rename_overproduction_percent_field.py b/erpnext/patches/v11_0/rename_overproduction_percent_field.py
new file mode 100644
index 0000000..077829f
--- /dev/null
+++ b/erpnext/patches/v11_0/rename_overproduction_percent_field.py
@@ -0,0 +1,10 @@
+# Copyright (c) 2018, Frappe and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+from frappe.model.utils.rename_field import rename_field
+import frappe
+
+def execute():
+ frappe.reload_doc('manufacturing', 'doctype', 'manufacturing_settings')
+ rename_field('Manufacturing Settings', 'over_production_allowance_percentage', 'overproduction_percentage_for_sales_order')
\ No newline at end of file
diff --git a/erpnext/public/images/hub_logo.svg b/erpnext/public/images/hub_logo.svg
index 1612c6d..4af4821 100644
--- a/erpnext/public/images/hub_logo.svg
+++ b/erpnext/public/images/hub_logo.svg
@@ -1,37 +1,112 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
<svg
- viewBox="0 0 87.312496 91.397155"
- class="hub-icon"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="330"
height="345.43808"
- width="330">
+ viewBox="0 0 87.312496 91.397155"
+ version="1.1"
+ id="svg4635"
+ inkscape:version="0.92.2 5c3e80d, 2017-08-06"
+ sodipodi:docname="hub-logo.svg"
+ inkscape:export-filename="/home/raghu/Desktop/hub-logo.png"
+ inkscape:export-xdpi="95.878258"
+ inkscape:export-ydpi="95.878258">
+ <defs
+ id="defs4629" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.7"
+ inkscape:cx="234.27717"
+ inkscape:cy="167.57445"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ units="px"
+ inkscape:window-width="1920"
+ inkscape:window-height="1149"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata4632">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Reproduction" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Distribution" />
+ <cc:requires
+ rdf:resource="http://creativecommons.org/ns#Notice" />
+ <cc:requires
+ rdf:resource="http://creativecommons.org/ns#Attribution" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://creativecommons.org/ns#ShareAlike" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
<g
- transform="translate(121.51931,-138.66452)"
- id="layer1">
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(121.51931,-138.66452)">
<rect
- ry="13.229166"
- y="142.74918"
- x="-121.51931"
- height="87.3125"
- width="87.3125"
- id="rect828"
+ rx="13.229166"
+ inkscape:export-ydpi="96"
+ inkscape:export-xdpi="96"
+ inkscape:export-filename="/home/raghu/Desktop/send/hub-02.png"
style="opacity:1;vector-effect:none;fill:#89da29;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
- rx="13.229166" />
+ id="rect828"
+ width="87.3125"
+ height="87.3125"
+ x="-121.51931"
+ y="142.74918"
+ ry="13.229166" />
<path
- id="path830"
+ style="opacity:1;vector-effect:none;fill:#63c923;fill-opacity:1;stroke:none;stroke-width:3.96875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ clip-path="none"
d="m -121.51931,202.96343 v 13.86892 c 0,7.32897 5.90017,13.22917 13.22916,13.22917 h 60.854162 c 6.610072,0 12.056133,-4.80013 13.061216,-11.1187 -43.339761,0.1608 -54.359752,-16.03276 -87.144538,-15.97939 z"
- clip-path="none"
- style="opacity:1;vector-effect:none;fill:#63c923;fill-opacity:1;stroke:none;stroke-width:3.96875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ id="path830"
+ inkscape:connector-curvature="0" />
<path
- id="path832"
+ style="opacity:1;vector-effect:none;fill:#59b81c;fill-opacity:1;stroke:none;stroke-width:3.96875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ clip-path="none"
d="m -34.20681,202.96343 c -32.784694,-0.0533 -43.804846,16.14019 -87.14455,15.97939 1.00509,6.31857 6.45115,11.1187 13.06122,11.1187 h 60.854164 c 7.328992,0 13.229166,-5.9002 13.229166,-13.22917 z"
- clip-path="none"
- style="opacity:1;vector-effect:none;fill:#59b81c;fill-opacity:1;stroke:none;stroke-width:3.96875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
+ id="path832"
+ inkscape:connector-curvature="0" />
<path
- style="opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.79375005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ id="path834"
d="m -84.351263,175.75725 c -1.30945,0 -2.376091,1.06665 -2.376091,2.37608 v 10.02885 0.001 c 0.06583,4.83083 4.01156,8.73477 8.857351,8.73486 4.8718,5e-5 8.846821,-3.94421 8.871295,-8.81134 v -0.001 -9.95288 c 0,-1.30943 -1.066113,-2.37557 -2.375589,-2.37557 -1.309396,0 -2.376064,1.06614 -2.376064,2.37557 v 9.8888 c 0,2.26045 -1.858169,4.10983 -4.119642,4.10983 -2.263616,0 -4.105699,-1.82766 -4.105699,-4.08968 v -9.90844 c 0,-1.30943 -1.066138,-2.37608 -2.375561,-2.37608 z m -20.887107,0.0925 c -1.30943,0 -2.37609,1.06717 -2.37609,2.3766 v 16.45119 c 0,1.30944 1.06666,2.37609 2.37609,2.37609 1.30945,0 2.37556,-1.06665 2.37556,-2.37609 v -5.97327 h 8.22534 v 5.97327 c 0,1.30944 1.066641,2.37609 2.376091,2.37609 1.309423,0 2.375561,-1.06665 2.375561,-2.37609 v -16.45119 c 0,-1.30943 -1.066138,-2.3766 -2.375561,-2.3766 -1.30945,0 -2.376091,1.06717 -2.376091,2.3766 v 5.72627 h -8.22534 v -5.72627 c 0,-1.30943 -1.06611,-2.3766 -2.37556,-2.3766 z m 41.77419,0 c -0.654712,0 -1.248675,0.26711 -1.678967,0.69764 -0.05368,0.0537 -0.105119,0.10983 -0.153458,0.16846 v 5.3e-4 c -0.04839,0.0586 -0.09427,0.11929 -0.136949,0.18242 v 5.3e-4 c -0.256381,0.37936 -0.406691,0.83617 -0.406691,1.32705 v 16.45119 c 0,0.1635 0.01693,0.3242 0.04858,0.47852 0.09512,0.46331 0.32594,0.87828 0.64852,1.20096 0.161369,0.16136 0.345308,0.29938 0.547264,0.40928 v 0 c 0.134567,0.0732 0.276781,0.13403 0.425318,0.18035 v 0 c 0.148537,0.0463 0.303186,0.0783 0.462518,0.0946 v 0 c 0.07959,0.008 0.160708,0.0124 0.242358,0.0124 h 8.33181 c 0.08747,0 0.167931,-0.0145 0.251142,-0.0238 l 0.09509,0.005 c 0.06019,0.003 0.119407,0.005 0.178779,0.006 h 0.0037 0.0048 c 3.578305,-2e-5 6.487954,-2.90916 6.487981,-6.48747 v -0.001 c -0.0026,-1.51334 -0.578009,-2.9475 -1.540484,-4.10673 0.962448,-1.15892 1.537785,-2.59314 1.540484,-4.10621 v -0.001 c -2.7e-5,-3.57831 -2.909676,-6.48744 -6.487981,-6.48746 h -0.533294 z m 8.865103,4.75062 c 0.96393,0 1.736831,0.77394 1.736831,1.73788 0,0.96394 -0.772901,1.73684 -1.736831,1.73684 v 0 h -0.532792 -5.955718 v -3.47317 h 5.956248 z m 0,8.21552 v 0 c 0.963507,5.3e-4 1.735799,0.77373 1.735799,1.73736 0,0.96394 -0.772901,1.73684 -1.736831,1.73684 h -0.0048 l -0.533294,0.0119 h -5.951591 v -3.4742 h 5.959846 z"
- id="path834" />
+ style="opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.79375005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
+ inkscape:connector-curvature="0" />
<path
- id="path838"
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#63c923;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:7.93750048;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m -77.859375,138.66406 c -9.653316,0 -18.439915,3.93483 -24.767575,10.28125 a 3.9691471,3.9691471 0 1 0 5.621091,5.60352 c 4.899576,-4.9141 11.6422,-7.94727 19.146484,-7.94727 7.501101,0 14.241542,3.03098 19.140625,7.94141 a 3.9691471,3.9691471 0 1 0 5.619141,-5.60547 c -6.327038,-6.34169 -15.110547,-10.27344 -24.759766,-10.27344 z"
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#63c923;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:7.93750048;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
+ id="path838"
+ inkscape:connector-curvature="0" />
</g>
</svg>
diff --git a/erpnext/public/js/hub/hub_factory.js b/erpnext/public/js/hub/hub_factory.js
index 01f55a3..6451e1d 100644
--- a/erpnext/public/js/hub/hub_factory.js
+++ b/erpnext/public/js/hub/hub_factory.js
@@ -35,7 +35,7 @@
});
}
});
- } else {
+ } else if (!route[3]){
frappe.require(assets['Form'], () => {
erpnext.hub.pages[page_name] = new erpnext.hub[page+'Page']({
unique_id: route[2],
@@ -44,6 +44,15 @@
hub_settings: this.hub_settings
});
});
+ } else {
+ frappe.require(assets['List'], () => {
+ frappe.route_options = {};
+ frappe.route_options["company_name"] = route[2]
+ erpnext.hub.pages[page_name] = new erpnext.hub['ItemListing']({
+ parent: this.make_page(true, page_name),
+ hub_settings: this.hub_settings
+ });
+ });
}
window.hub_page = erpnext.hub.pages[page_name];
} else {
diff --git a/erpnext/public/js/hub/hub_listing.js b/erpnext/public/js/hub/hub_listing.js
index e08f97c..0ff7970 100644
--- a/erpnext/public/js/hub/hub_listing.js
+++ b/erpnext/public/js/hub/hub_listing.js
@@ -58,12 +58,7 @@
label: __('Favourites'),
action: () => frappe.set_route('Hub', 'Favourites'),
standard: true
- },
- // {
- // label: __('Toggle Sidebar'),
- // action: () => this.toggle_side_bar(),
- // standard: true
- // }
+ }
];
return items;
@@ -85,7 +80,15 @@
});
}
- setup_view() { }
+ setup_view() {
+ if(frappe.route_options){
+ const filters = [];
+ for (let field in frappe.route_options) {
+ var value = frappe.route_options[field];
+ this.page.fields_dict[field].set_value(value);
+ }
+ }
+ }
get_args() {
return {
@@ -110,18 +113,7 @@
this.data_dict = {};
}
- freeze(toggle) {
- // if(!this.$freeze) return;
- // this.$freeze.toggle(toggle);
- // if (this.$freeze.find('.image-view-container').length) return;
-
- // const html = Array.from(new Array(4)).map(d => this.card_html({
- // name: 'Loading...',
- // item_name: 'Loading...'
- // })).join('');
-
- // this.$freeze.html(`<div class="image-view-container border-top">${html}</div>`);
- }
+ freeze(toggle) { }
render() {
this.data_dict = {};
@@ -529,7 +521,7 @@
(${reviewLength})
</div>
<div class="list-row-col">
- <a href="${'#Hub/Company/'+company_name}"><p>${ company_name }</p></a>
+ <a href="${'#Hub/Company/'+company_name+'/Items'}"><p>${ company_name }</p></a>
</div>
</div>
<div class="image-view-body">
diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js
index 78def26..eabb81e 100644
--- a/erpnext/public/js/utils/serial_no_batch_selector.js
+++ b/erpnext/public/js/utils/serial_no_batch_selector.js
@@ -55,11 +55,13 @@
},
get_query: function() {
return {
- filters: {
- is_group: 0,
- company: me.frm.doc.company
- }
- };
+ query: "erpnext.controllers.queries.warehouse_query",
+ filters: [
+ ["Bin", "item_code", "=", me.item_code],
+ ["Warehouse", "is_group", "=", 0],
+ ["Warehouse", "company", "=", me.frm.doc.company]
+ ]
+ }
}
},
{fieldtype:'Column Break'},
diff --git a/erpnext/regional/report/gstr_1/gstr_1.js b/erpnext/regional/report/gstr_1/gstr_1.js
index 3a63527..b2c8aed 100644
--- a/erpnext/regional/report/gstr_1/gstr_1.js
+++ b/erpnext/regional/report/gstr_1/gstr_1.js
@@ -12,6 +12,21 @@
"default": frappe.defaults.get_user_default("Company")
},
{
+ "fieldname":"company_address",
+ "label": __("Address"),
+ "fieldtype": "Link",
+ "options": "Address",
+ "get_query": function() {
+ var company = frappe.query_report_filters_by_name.company.get_value();
+ if (company) {
+ return {
+ "query": 'frappe.contacts.doctype.address.address.address_query',
+ "filters": { link_doctype: 'Company', link_name: company}
+ };
+ }
+ }
+ },
+ {
"fieldname":"from_date",
"label": __("From Date"),
"fieldtype": "Date",
diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py
index 2c128e7..690fbbc 100644
--- a/erpnext/regional/report/gstr_1/gstr_1.py
+++ b/erpnext/regional/report/gstr_1/gstr_1.py
@@ -102,7 +102,8 @@
for opts in (("company", " and company=%(company)s"),
("from_date", " and posting_date>=%(from_date)s"),
- ("to_date", " and posting_date<=%(to_date)s")):
+ ("to_date", " and posting_date<=%(to_date)s"),
+ ("company_address", " and company_address=%(company_address)s")):
if self.filters.get(opts[0]):
conditions += opts[1]
diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json
index cf7916b..6dc2c00 100644
--- a/erpnext/selling/doctype/quotation/quotation.json
+++ b/erpnext/selling/doctype/quotation/quotation.json
@@ -2549,8 +2549,8 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "select_print_heading",
- "fieldtype": "Link",
+ "fieldname": "group_same_items",
+ "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -2558,18 +2558,16 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Print Heading",
+ "label": "Group same items",
"length": 0,
- "no_copy": 1,
- "oldfieldname": "select_print_heading",
- "oldfieldtype": "Link",
- "options": "Print Heading",
+ "no_copy": 0,
"permlevel": 0,
+ "precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 1,
+ "report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -2608,6 +2606,38 @@
},
{
"allow_bulk_edit": 0,
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "select_print_heading",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Print Heading",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "select_print_heading",
+ "oldfieldtype": "Link",
+ "options": "Print Heading",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 1,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3005,8 +3035,8 @@
"istable": 0,
"max_attachments": 1,
"menu_index": 0,
- "modified": "2018-05-17 12:56:20.830562",
- "modified_by": "Administrator",
+ "modified": "2018-05-28 03:23:15.354674",
+ "modified_by": "Administrator",
"module": "Selling",
"name": "Quotation",
"owner": "Administrator",
diff --git a/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.py b/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.py
index e7bb5b4..fd5bc4e 100644
--- a/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.py
+++ b/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.py
@@ -98,7 +98,7 @@
END as qty,
CASE
WHEN so.status = "Closed" THEN sum(soi.delivered_qty * soi.conversion_factor * soi.base_net_rate * (st.allocated_percentage/100))
- ELSE soi.base_net_amount * (st.allocated_percentage/100))
+ ELSE sum(soi.base_net_amount * (st.allocated_percentage/100))
END as amount
from
`tabSales Order Item` soi, `tabSales Order` so, `tabSales Team` st
diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py
index 5b4f4b5..9d13657 100644
--- a/erpnext/stock/doctype/batch/batch.py
+++ b/erpnext/stock/doctype/batch/batch.py
@@ -86,8 +86,13 @@
def autoname(self):
"""Generate random ID for batch if not specified"""
if not self.batch_id:
- if frappe.db.get_value('Item', self.item, 'create_new_batch'):
- if batch_uses_naming_series():
+ create_new_batch, batch_number_series = frappe.db.get_value('Item', self.item,
+ ['create_new_batch', 'batch_number_series'])
+
+ if create_new_batch:
+ if batch_number_series:
+ self.batch_id = make_autoname(batch_number_series)
+ elif batch_uses_naming_series():
self.batch_id = self.get_name_from_naming_series()
else:
self.batch_id = get_name_from_hash()
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json
index 92219e7..12e5b39 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.json
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.json
@@ -3290,6 +3290,36 @@
},
{
"allow_bulk_edit": 0,
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "group_same_items",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Group same items",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -3851,7 +3881,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2018-05-17 12:55:36.474198",
+ "modified": "2018-05-28 03:03:35.035396",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note",
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index 8886f33..1df07a2 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -82,6 +82,8 @@
for f in fieldname:
toggle_print_hide(self.meta if key == "parent" else item_meta, f)
+ super(DeliveryNote, self).before_print()
+
def set_actual_qty(self):
for d in self.get('items'):
if d.item_code and d.warehouse:
diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json
index c4a3fc1..b7c90d0 100644
--- a/erpnext/stock/doctype/item/item.json
+++ b/erpnext/stock/doctype/item/item.json
@@ -17,6 +17,7 @@
"fields": [
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -49,6 +50,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -80,6 +82,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
@@ -113,6 +116,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -147,6 +151,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
@@ -179,6 +184,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -209,6 +215,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -243,6 +250,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -274,6 +282,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -308,6 +317,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -337,6 +347,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -368,6 +379,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -399,6 +411,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
@@ -434,6 +447,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -465,6 +479,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -498,6 +513,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -530,6 +546,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -564,6 +581,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -596,6 +614,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -627,6 +646,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -660,6 +680,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -692,6 +713,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -723,6 +745,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -755,6 +778,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -789,6 +813,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -820,6 +845,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -854,6 +880,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -887,6 +914,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -919,6 +947,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -951,6 +980,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -984,6 +1014,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1016,6 +1047,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1048,6 +1080,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -1081,6 +1114,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1114,6 +1148,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -1146,6 +1181,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1181,6 +1217,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -1214,6 +1251,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1249,6 +1287,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1282,6 +1321,41 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:doc.has_batch_no==1 && doc.create_new_batch==1",
+ "description": "Example: ABCD.#####. If series is set and Batch No is not mentioned in transactions, then automatic batch number will be created based on this series. If you always want to explicitly mention Batch No for this item, leave this blank. Note: this setting will take priority over the Naming Series Prefix in Stock Settings.",
+ "fieldname": "batch_number_series",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Batch Number Series",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 1,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1314,6 +1388,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1346,6 +1421,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1379,6 +1455,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1409,6 +1486,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1445,6 +1523,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1477,6 +1556,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -1510,6 +1590,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1545,6 +1626,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1579,6 +1661,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1612,6 +1695,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -1643,6 +1727,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1675,6 +1760,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -1707,6 +1793,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1739,6 +1826,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1771,6 +1859,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1806,6 +1895,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1837,6 +1927,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1868,6 +1959,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1902,6 +1994,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1935,6 +2028,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -1967,6 +2061,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -1998,6 +2093,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2030,6 +2126,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2061,6 +2158,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2094,6 +2192,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2126,6 +2225,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -2157,6 +2257,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2189,6 +2290,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2219,6 +2321,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2251,6 +2354,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -2283,6 +2387,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2315,6 +2420,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2347,6 +2453,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2380,6 +2487,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2413,6 +2521,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -2444,6 +2553,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2475,6 +2585,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2508,6 +2619,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2538,6 +2650,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2570,6 +2683,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -2601,6 +2715,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2634,6 +2749,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -2666,6 +2782,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2700,6 +2817,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -2732,6 +2850,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2766,6 +2885,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2797,6 +2917,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2830,6 +2951,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -2863,6 +2985,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2897,6 +3020,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2932,6 +3056,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2962,6 +3087,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -2992,6 +3118,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -3023,6 +3150,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3054,6 +3182,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3086,6 +3215,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3118,6 +3248,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3150,6 +3281,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3183,6 +3315,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3216,6 +3349,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3247,6 +3381,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3276,6 +3411,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3309,6 +3445,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3342,6 +3479,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
@@ -3374,6 +3512,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3405,6 +3544,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3437,6 +3577,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3468,6 +3609,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3499,6 +3641,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3531,6 +3674,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3564,6 +3708,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
@@ -3596,6 +3741,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3628,6 +3774,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
@@ -3660,6 +3807,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3692,6 +3840,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3725,6 +3874,7 @@
},
{
"allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -3768,7 +3918,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 1,
- "modified": "2018-05-16 16:35:09.518294",
+ "modified": "2018-05-28 14:18:03.234070",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item",
diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py
index 5649b3d..fc53794 100644
--- a/erpnext/stock/doctype/packed_item/packed_item.py
+++ b/erpnext/stock/doctype/packed_item/packed_item.py
@@ -53,7 +53,8 @@
pi.qty = flt(qty)
pi.description = description
if not pi.warehouse:
- pi.warehouse = item.default_warehouse or main_item_row.warehouse
+ pi.warehouse = (main_item_row.warehouse
+ if (doc.get('is_pos') or not item.default_warehouse) else item.default_warehouse)
if not pi.batch_no:
pi.batch_no = cstr(main_item_row.get("batch_no"))
if not pi.target_warehouse:
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
index 9bd2ebb..f94e5a5 100755
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
@@ -3105,10 +3105,69 @@
},
{
"allow_bulk_edit": 0,
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "group_same_items",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Group same items",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "column_break_97",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "other_details",
"fieldtype": "HTML",
"hidden": 1,
@@ -3377,7 +3436,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2018-05-17 13:05:05.772877",
+ "modified": "2018-05-28 02:59:59.609643",
"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 17afba0..fa441b5 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -122,6 +122,8 @@
self.update_prevdoc_status()
if self.per_billed < 100:
self.update_billing_status()
+ else:
+ self.status = "Completed"
# Updating stock ledger should always be called after updating prevdoc status,
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 7452da8..359d834 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -156,6 +156,29 @@
})
}, __("Get items from"));
}
+ if (frm.doc.docstatus===0 && frm.doc.purpose == "Material Issue") {
+ frm.add_custom_button(__('Expired Batches'), function() {
+ frappe.call({
+ method: "erpnext.stock.doctype.stock_entry.stock_entry.get_expired_batch_items",
+ callback: function(r) {
+ if (!r.exc && r.message) {
+ frm.set_value("items", []);
+ r.message.forEach(function(element) {
+ let d = frm.add_child("items");
+ d.item_code = element.item;
+ d.s_warehouse = element.warehouse;
+ d.qty = element.qty;
+ d.uom = element.stock_uom;
+ d.conversion_factor = 1;
+ d.batch_no = element.batch_no;
+ d.transfer_qty = element.qty;
+ frm.refresh_fields();
+ });
+ }
+ }
+ });
+ }, __("Get items from"));
+ }
if (frm.doc.company) {
frm.trigger("toggle_display_account_head");
@@ -350,7 +373,7 @@
target_warehouse_address: function(frm) {
erpnext.utils.get_address_display(frm, 'target_warehouse_address', 'target_address_display', false);
- },
+ }
})
frappe.ui.form.on('Stock Entry Detail', {
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index 3862854..412331e 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -252,10 +252,13 @@
def check_if_operations_completed(self):
"""Check if Time Sheets are completed against before manufacturing to capture operating costs."""
prod_order = frappe.get_doc("Work Order", self.work_order)
+ allowance_percentage = flt(frappe.db.get_single_value("Manufacturing Settings",
+ "overproduction_percentage_for_work_order"))
for d in prod_order.get("operations"):
total_completed_qty = flt(self.fg_completed_qty) + flt(prod_order.produced_qty)
- if total_completed_qty > flt(d.completed_qty):
+ completed_qty = d.completed_qty + (allowance_percentage/100 * d.completed_qty)
+ if total_completed_qty > flt(completed_qty):
frappe.throw(_("Row #{0}: Operation {1} is not completed for {2} qty of finished goods in Work Order # {3}. Please update operation status via Time Logs")
.format(d.idx, d.operation, total_completed_qty, self.work_order), OperationsNotCompleteError)
@@ -469,8 +472,11 @@
def validate_finished_goods(self):
"""validation: finished good quantity should be same as manufacturing quantity"""
items_with_target_warehouse = []
+ allowance_percentage = flt(frappe.db.get_single_value("Manufacturing Settings",
+ "overproduction_percentage_for_work_order"))
+
for d in self.get('items'):
- if self.purpose != "Subcontract" and d.bom_no and flt(d.transfer_qty) != flt(self.fg_completed_qty) and (d.t_warehouse != getattr(self, "pro_doc", frappe._dict()).scrap_warehouse):
+ if self.purpose != "Subcontract" and d.bom_no and flt(d.transfer_qty) > flt(self.fg_completed_qty) and (d.t_warehouse != getattr(self, "pro_doc", frappe._dict()).scrap_warehouse):
frappe.throw(_("Quantity in row {0} ({1}) must be same as manufactured quantity {2}"). \
format(d.idx, d.transfer_qty, self.fg_completed_qty))
@@ -478,8 +484,14 @@
items_with_target_warehouse.append(d.item_code)
if self.work_order and self.purpose == "Manufacture":
- production_item = frappe.db.get_value("Work Order",
- self.work_order, "production_item")
+ production_item, wo_qty = frappe.db.get_value("Work Order",
+ self.work_order, ["production_item", "qty"])
+
+ allowed_qty = wo_qty + (allowance_percentage/100 * wo_qty)
+ if self.fg_completed_qty > allowed_qty:
+ frappe.throw(_("For quantity {0} should not be grater than work order quantity {1}")
+ .format(flt(self.fg_completed_qty), wo_qty))
+
if production_item not in items_with_target_warehouse:
frappe.throw(_("Finished Item {0} must be entered for Manufacture type entry")
.format(production_item))
@@ -1154,6 +1166,15 @@
return ret
@frappe.whitelist()
+def get_expired_batch_items():
+ return frappe.db.sql("""select b.item, sum(sle.actual_qty) as qty, sle.batch_no, sle.warehouse, sle.stock_uom\
+ from `tabBatch` b, `tabStock Ledger Entry` sle
+ where b.expiry_date <= %s
+ and b.expiry_date is not NULL
+ and b.batch_id = sle.batch_no
+ group by sle.warehouse, sle.item_code, sle.batch_no""",(nowdate()), as_dict=1)
+
+@frappe.whitelist()
def get_warehouse_details(args):
if isinstance(args, string_types):
args = json.loads(args)
diff --git a/erpnext/stock/report/stock_ledger/stock_ledger.py b/erpnext/stock/report/stock_ledger/stock_ledger.py
index 1a91ab4..ec95561 100644
--- a/erpnext/stock/report/stock_ledger/stock_ledger.py
+++ b/erpnext/stock/report/stock_ledger/stock_ledger.py
@@ -56,7 +56,7 @@
item_conditions_sql = ''
if items:
item_conditions_sql = 'and sle.item_code in ({})'\
- .format(', '.join(['"' + frappe.db.escape(i,percent=False) + '"' for i in items]))
+ .format(', '.join(['"' + frappe.db.escape(i) + '"' for i in items]))
return frappe.db.sql("""select concat_ws(" ", posting_date, posting_time) as date,
item_code, warehouse, actual_qty, qty_after_transaction, incoming_rate, valuation_rate,
diff --git a/erpnext/templates/pages/help.html b/erpnext/templates/pages/help.html
index f7568d5..a49268a 100644
--- a/erpnext/templates/pages/help.html
+++ b/erpnext/templates/pages/help.html
@@ -55,7 +55,7 @@
<p><a href="/issues">{{ _("See all open tickets") }}</a></p>
</div>
-<a href="/issues?new=1" class="btn btn-primary btn-new btn-sm">
+<a href="/issues?new=1" class="btn btn-default btn-new btn-sm">
{{ _("Open a new ticket") }}
</a>
diff --git a/erpnext/templates/pages/help.py b/erpnext/templates/pages/help.py
index 754a09c..c484d25 100644
--- a/erpnext/templates/pages/help.py
+++ b/erpnext/templates/pages/help.py
@@ -19,7 +19,7 @@
context.topics = topics_data[:3]
# Issues
- context.issues = frappe.get_list("Issue")[:3]
+ context.issues = frappe.get_list("Issue", fields=["name", "status", "subject", "modified"])[:3]
def get_forum_posts(s):
response = requests.get(s.forum_url + '/' + s.get_latest_query)
diff --git a/erpnext/utilities/page/leaderboard/leaderboard.js b/erpnext/utilities/page/leaderboard/leaderboard.js
index 6e4db1b..5563fb0 100644
--- a/erpnext/utilities/page/leaderboard/leaderboard.js
+++ b/erpnext/utilities/page/leaderboard/leaderboard.js
@@ -85,7 +85,7 @@
this.$sidebar_list.on('click', 'li', function(e) {
let $li = $(this);
- let doctype = $li.find('span').html();
+ let doctype = $li.find('span').attr("doctype-value");
me.options.selected_company = frappe.defaults.get_default('company');
me.options.selected_doctype = doctype;
@@ -172,7 +172,7 @@
$container.find(".leaderboard-list").html(me.render_list_view(res.message));
} else {
me.$graph_area.hide();
- me.message = "No items found.";
+ me.message = __("No items found.");
$container.find(".leaderboard-list").html(me.render_list_view());
}
},
@@ -301,7 +301,7 @@
get_sidebar_item: function(item) {
return $(`<li class="strong module-sidebar-item">
<a class="module-link">
- <span>${ item }</span></a>
+ <span doctype-value="${item}">${ __(item) }</span></a>
</li>`);
}
});