Merge pull request #5265 from ShashaQin/patch-46
Update opportunity.py
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index fdc30d2..0000000
--- a/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,29 +0,0 @@
-### Issue Description
-
-Description...
-
----
-
-### Checklist
-
-- [ ] This is a bug report / feature request and not just a problem I am facing.
- (Go to https://discuss.erpnext.com for help)
-- [ ] I have searched https://github.com/frappe/erpnext/issues and didn't find a similar issue
-- [ ] I have mentioned steps to reproduce the issue
-- [ ] I have added screenshots / video / mockups
-- [ ] I have not edited the code of Frappe and ERPNext
-- [ ] I have mentioned a python error traceback or javascript error [optional]
-
----
-
-### Specs
-
-- ERPNext version:
-- Frappe version:
-- Operating System:
-- Browser:
-- Language:
-
----
-
-> **Note:** If you are reporting a security issue, please send a private email to <info@frappe.io>
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index abb0e23..0000000
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,14 +0,0 @@
-### Pull Request Description
-
-Describe your pull request here with screenshots. Optionally, link the issue that this pull request fixes.
-
----
-
-### Checklist
-
-- [ ] Documentation
-- [ ] Front-end Testing
-- [ ] Test Cases
-- [ ] Blog Post / Help
-- [ ] Awesome! We are good for merging.
-
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index ed2d7c5..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,68 +0,0 @@
-# Contributing to Frappe / ERPNext
-
-## Questions
-
-If you have questions on how to use ERPNext or want help in customization or debugging of your scripts, please post on https://discuss.erpnext.com. This is only for bug reports and feature requests.
-
-## Reporting issues
-
-We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems. Please read the following guidelines before opening any issue.
-
-1. **Search for existing issues:** We want to avoid duplication, and you'd help us out a lot by first checking if someone else has reported the same issue. The issue may have already been resolved with a fix available.
-1. **Report each issue separately:** Don't club multiple, unreleated issues in one note.
-1. **Mention the version number:** Please mention the application, browser and platform version numbers.
-
-### Issues
-
-1. **Share as much information as possible:** Include operating system and version, browser and version, when did you last update ERPNext, how is it customized, etc. where appropriate. Also include steps to reproduce the bug.
-1. **Include Screenshots if possible:** Consider adding screenshots annotated with what goes wrong.
-1. **Find and post the trace for bugs:** If you are reporting an issue from the browser, Open the Javascript Console and paste us any error messages you see.
-1. **Security Issues:** If you are reporting a security issue, please send a private email to <info@frappe.io>.
-
-
-### Feature Requests
-
-1. We need as much information you can to consider a feature request.
-1. Think about **how** you want us to build the feature. Consider including:
- 1. Mockups (wireframes of features)
- 1. Screenshots (annotated with what should change)
- 1. Screenshots from other products if you want us to implement features present in other products.
-1. Basically, the more you help us, the faster your request is likely to be completed.
-1. A one line feature request like **Implement Capacity Planning** will be closed.
-
-## Pull Requests
-
-General guidelines for sending pull requests:
-
-#### Don't Repeat Yourself (DRY)
-
-We believe that the most effective way to manage a product like this is to ensure that
-there is minimum repetition of code. So before contributing a function, please make sure
-that such a feature or function does not exist else where. If it does, the try and extend
-that function to accommodate your use case.
-
-#### Don't create new DocTypes Unless Absolutely Necessary
-
-DocTypes are easy to create but hard to maintain. If you find that there is a another DocType with a similar functionality, then please try and extend that functionality. For example, by adding a "type" field to classify the new type of record.
-
-#### Tabs or spaces?
-
-Tabs!
-
-#### Release Checklist
-
-- Describe, in detail, what is in the pull request
-- How to use the new feature?
-- Test cases
-- Change log
-- Manual Pull Request Link
-- Screencast. Should include:
- - New Forms
- - Linked Forms
- - Linked Reports
- - Print Views
-
-### Copyright
-
-Please see README.md
-
diff --git a/erpnext/__version__.py b/erpnext/__version__.py
index 93ce6d8..4cc1cec 100644
--- a/erpnext/__version__.py
+++ b/erpnext/__version__.py
@@ -1,2 +1,2 @@
from __future__ import unicode_literals
-__version__ = '6.27.11'
+__version__ = '6.27.17'
diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py
index 104bef7..a551d06 100644
--- a/erpnext/accounts/doctype/account/account.py
+++ b/erpnext/accounts/doctype/account/account.py
@@ -87,7 +87,7 @@
return
existing_is_group = frappe.db.get_value("Account", self.name, "is_group")
- if self.is_group != existing_is_group:
+ if cint(self.is_group) != cint(existing_is_group):
if self.check_gle_exists():
throw(_("Account with existing transaction cannot be converted to ledger"))
elif self.is_group:
diff --git a/erpnext/accounts/doctype/asset/asset.js b/erpnext/accounts/doctype/asset/asset.js
index 0dfdb21..0479a4e 100644
--- a/erpnext/accounts/doctype/asset/asset.js
+++ b/erpnext/accounts/doctype/asset/asset.js
@@ -24,6 +24,7 @@
refresh: function(frm) {
frappe.ui.form.trigger("Asset", "is_existing_asset");
+ frm.toggle_display("next_depreciation_date", frm.doc.docstatus < 1);
if (frm.doc.docstatus==1) {
if (frm.doc.status=='Submitted' && !frm.doc.is_existing_asset && !frm.doc.purchase_invoice) {
@@ -32,6 +33,10 @@
});
}
if (in_list(["Submitted", "Partially Depreciated", "Fully Depreciated"], frm.doc.status)) {
+ frm.add_custom_button("Transfer Asset", function() {
+ erpnext.asset.transfer_asset(frm);
+ });
+
frm.add_custom_button("Scrap Asset", function() {
erpnext.asset.scrap_asset(frm);
});
@@ -45,9 +50,56 @@
erpnext.asset.restore_asset(frm);
});
}
+
+ frm.trigger("show_graph");
}
},
+ show_graph: function(frm) {
+ var x_intervals = ["x", frm.doc.purchase_date];
+ var asset_values = ["Asset Value", frm.doc.gross_purchase_amount];
+ var last_depreciation_date = frm.doc.purchase_date;
+
+ if(frm.doc.opening_accumulated_depreciation) {
+ last_depreciation_date = frappe.datetime.add_months(frm.doc.next_depreciation_date,
+ -1*frm.doc.frequency_of_depreciation);
+
+ x_intervals.push(last_depreciation_date);
+ asset_values.push(flt(frm.doc.gross_purchase_amount) -
+ flt(frm.doc.opening_accumulated_depreciation));
+ }
+
+ $.each(frm.doc.schedules || [], function(i, v) {
+ x_intervals.push(v.schedule_date);
+ asset_value = flt(frm.doc.gross_purchase_amount) - flt(v.accumulated_depreciation_amount);
+ if(v.journal_entry) {
+ last_depreciation_date = v.schedule_date;
+ asset_values.push(asset_value)
+ } else {
+ if (in_list(["Scrapped", "Sold"], frm.doc.status)) {
+ asset_values.push(null)
+ } else {
+ asset_values.push(asset_value)
+ }
+ }
+ })
+
+ if(in_list(["Scrapped", "Sold"], frm.doc.status)) {
+ x_intervals.push(frm.doc.disposal_date);
+ asset_values.push(0);
+ last_depreciation_date = frm.doc.disposal_date;
+ }
+
+ frm.dashboard.reset();
+ frm.dashboard.add_graph({
+ x: 'x',
+ columns: [x_intervals, asset_values],
+ regions: {
+ 'Asset Value': [{'start': last_depreciation_date, 'style':'dashed'}]
+ }
+ });
+ },
+
is_existing_asset: function(frm) {
frm.toggle_enable("supplier", frm.doc.is_existing_asset);
frm.toggle_reqd("next_depreciation_date", !frm.doc.is_existing_asset);
@@ -112,4 +164,55 @@
}
})
})
+}
+
+erpnext.asset.transfer_asset = function(frm) {
+ var dialog = new frappe.ui.Dialog({
+ title: __("Transfer Asset"),
+ fields: [
+ {
+ "label": __("Target Warehouse"),
+ "fieldname": "target_warehouse",
+ "fieldtype": "Link",
+ "options": "Warehouse",
+ "get_query": function () {
+ return {
+ filters: [["Warehouse", "company", "in", ["", cstr(frm.doc.company)]]]
+ }
+ },
+ "reqd": 1
+ },
+ {
+ "label": __("Date"),
+ "fieldname": "transfer_date",
+ "fieldtype": "Datetime",
+ "reqd": 1,
+ "default": frappe.datetime.now_datetime()
+ }
+ ]
+ });
+
+ dialog.set_primary_action(__("Transfer"), function() {
+ args = dialog.get_values();
+ if(!args) return;
+ dialog.hide();
+ return frappe.call({
+ type: "GET",
+ method: "erpnext.accounts.doctype.asset.asset.transfer_asset",
+ args: {
+ args: {
+ "asset": frm.doc.name,
+ "transaction_date": args.transfer_date,
+ "source_warehouse": frm.doc.warehouse,
+ "target_warehouse": args.target_warehouse,
+ "company": frm.doc.company
+ }
+ },
+ freeze: true,
+ callback: function(r) {
+ cur_frm.reload_doc();
+ }
+ })
+ });
+ dialog.show();
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/asset/asset.json b/erpnext/accounts/doctype/asset/asset.json
index 70c1c16..c272a58 100644
--- a/erpnext/accounts/doctype/asset/asset.json
+++ b/erpnext/accounts/doctype/asset/asset.json
@@ -97,7 +97,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
- "in_list_view": 0,
+ "in_list_view": 1,
"label": "Status",
"length": 0,
"no_copy": 1,
@@ -114,6 +114,31 @@
"unique": 0
},
{
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "image",
+ "fieldtype": "Attach Image",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Image",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -706,13 +731,14 @@
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 72,
+ "image_field": "image",
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-04-20 18:09:07.573716",
+ "modified": "2016-04-22 11:15:40.055518",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset",
diff --git a/erpnext/accounts/doctype/asset/asset.py b/erpnext/accounts/doctype/asset/asset.py
index da229fe..23bb08b 100644
--- a/erpnext/accounts/doctype/asset/asset.py
+++ b/erpnext/accounts/doctype/asset/asset.py
@@ -190,4 +190,17 @@
"qty": 1
})
si.set_missing_values()
- return si
\ No newline at end of file
+ return si
+
+@frappe.whitelist()
+def transfer_asset(args):
+ import json
+ args = json.loads(args)
+ movement_entry = frappe.new_doc("Asset Movement")
+ movement_entry.update(args)
+ movement_entry.insert()
+ movement_entry.submit()
+
+ frappe.db.commit()
+
+ frappe.msgprint(_("Asset Movement record {0} created").format("<a href='#Form/Asset Movement/{0}'>{0}</a>".format(movement_entry.name)))
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/asset_movement/__init__.py b/erpnext/accounts/doctype/asset_movement/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/accounts/doctype/asset_movement/__init__.py
diff --git a/erpnext/accounts/doctype/asset_movement/asset_movement.js b/erpnext/accounts/doctype/asset_movement/asset_movement.js
new file mode 100644
index 0000000..680eedc
--- /dev/null
+++ b/erpnext/accounts/doctype/asset_movement/asset_movement.js
@@ -0,0 +1,15 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.ui.form.on('Asset Movement', {
+ onload: function(frm) {
+ frm.add_fetch("asset", "warehouse", "source_warehouse");
+
+ frm.set_query("target_warehouse", function() {
+ return {
+ filters: [["Warehouse", "company", "in", ["", cstr(frm.doc.company)]]]
+ }
+ })
+
+ }
+});
diff --git a/erpnext/accounts/doctype/asset_movement/asset_movement.json b/erpnext/accounts/doctype/asset_movement/asset_movement.json
new file mode 100644
index 0000000..59b8823
--- /dev/null
+++ b/erpnext/accounts/doctype/asset_movement/asset_movement.json
@@ -0,0 +1,274 @@
+{
+ "allow_copy": 0,
+ "allow_import": 1,
+ "allow_rename": 0,
+ "autoname": "AM-.#####",
+ "creation": "2016-04-25 18:00:23.559973",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "",
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "asset",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Asset",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Asset",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "transaction_date",
+ "fieldtype": "Datetime",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Transaction Date",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "company",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Company",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_4",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "source_warehouse",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Source Warehouse",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Warehouse",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "target_warehouse",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Target Warehouse",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Warehouse",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "amended_from",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Amended From",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Asset Movement",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ }
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 1,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2016-04-25 19:14:08.853429",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Asset Movement",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 1,
+ "apply_user_permissions": 0,
+ "cancel": 1,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "System Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 1,
+ "write": 1
+ },
+ {
+ "amend": 1,
+ "apply_user_permissions": 0,
+ "cancel": 1,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Accounts Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 1,
+ "write": 1
+ },
+ {
+ "amend": 1,
+ "apply_user_permissions": 0,
+ "cancel": 1,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Stock Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 1,
+ "write": 1
+ }
+ ],
+ "quick_entry": 1,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/asset_movement/asset_movement.py b/erpnext/accounts/doctype/asset_movement/asset_movement.py
new file mode 100644
index 0000000..574c499
--- /dev/null
+++ b/erpnext/accounts/doctype/asset_movement/asset_movement.py
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe import _
+from frappe.model.document import Document
+
+class AssetMovement(Document):
+ def validate(self):
+ self.validate_asset()
+ self.validate_warehouses()
+
+ def validate_asset(self):
+ status, company = frappe.db.get_value("Asset", self.asset, ["status", "company"])
+ if status in ("Draft", "Scrapped", "Sold"):
+ frappe.throw(_("{0} asset cannot be transferred").format(status))
+
+ if company != self.company:
+ frappe.throw(_("Asset {0} does not belong to company {1}").format(self.asset, self.company))
+
+ def validate_warehouses(self):
+ if not self.source_warehouse:
+ self.source_warehouse = frappe.db.get_value("Asset", self.asset, "warehouse")
+
+ if self.source_warehouse == self.target_warehouse:
+ frappe.throw(_("Source and Target Warehouse cannot be same"))
+
+ def on_submit(self):
+ self.set_latest_warehouse_in_asset()
+
+ def on_cancel(self):
+ self.set_latest_warehouse_in_asset()
+
+ def set_latest_warehouse_in_asset(self):
+ latest_movement_entry = frappe.db.sql("""select target_warehouse from `tabAsset Movement`
+ where asset=%s and docstatus=1 and company=%s
+ order by transaction_date desc limit 1""", (self.asset, self.company))
+
+ if latest_movement_entry:
+ warehouse = latest_movement_entry[0][0]
+ else:
+ warehouse = frappe.db.sql("""select source_warehouse from `tabAsset Movement`
+ where asset=%s and docstatus=2 and company=%s
+ order by transaction_date asc limit 1""", (self.asset, self.company))[0][0]
+
+ frappe.db.set_value("Asset", self.asset, "warehouse", warehouse)
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/asset_movement/test_asset_movement.py b/erpnext/accounts/doctype/asset_movement/test_asset_movement.py
new file mode 100644
index 0000000..9880efc
--- /dev/null
+++ b/erpnext/accounts/doctype/asset_movement/test_asset_movement.py
@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+import frappe
+from frappe.utils import now
+import unittest
+from erpnext.accounts.doctype.asset.test_asset import create_asset
+
+
+class TestAssetMovement(unittest.TestCase):
+ def test_movement(self):
+ asset = create_asset()
+
+ if asset.docstatus == 0:
+ asset.submit()
+
+ movement1 = create_asset_movement(asset, target_warehouse="_Test Warehouse 1 - _TC")
+ self.assertEqual(frappe.db.get_value("Asset", asset.name, "warehouse"), "_Test Warehouse 1 - _TC")
+
+ movement2 = create_asset_movement(asset, target_warehouse="_Test Warehouse 2 - _TC")
+ self.assertEqual(frappe.db.get_value("Asset", asset.name, "warehouse"), "_Test Warehouse 2 - _TC")
+
+ movement1.cancel()
+ self.assertEqual(frappe.db.get_value("Asset", asset.name, "warehouse"), "_Test Warehouse 2 - _TC")
+
+ movement2.cancel()
+ self.assertEqual(frappe.db.get_value("Asset", asset.name, "warehouse"), "_Test Warehouse - _TC")
+
+ asset.load_from_db()
+ asset.cancel()
+ frappe.delete_doc("Asset", asset.name)
+
+
+def create_asset_movement(asset, target_warehouse, transaction_date=None):
+ if not transaction_date:
+ transaction_date = now()
+
+ movement = frappe.new_doc("Asset Movement")
+ movement.update({
+ "asset": asset.name,
+ "transaction_date": transaction_date,
+ "target_warehouse": target_warehouse,
+ "company": asset.company
+ })
+
+ movement.insert()
+ movement.submit()
+
+ return movement
diff --git a/erpnext/accounts/doctype/c_form/c_form.js b/erpnext/accounts/doctype/c_form/c_form.js
index eed81cb..92cdb63 100644
--- a/erpnext/accounts/doctype/c_form/c_form.js
+++ b/erpnext/accounts/doctype/c_form/c_form.js
@@ -3,12 +3,12 @@
//c-form js file
// -----------------------------
-frappe.require("assets/erpnext/js/utils.js");
+
cur_frm.fields_dict.invoices.grid.get_field("invoice_no").get_query = function(doc) {
return {
filters: {
- "docstatus": 1,
+ "docstatus": 1,
"customer": doc.customer,
"company": doc.company,
"c_form_applicable": 'Yes',
diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py
index c3f399d..2fd838b 100644
--- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py
+++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py
@@ -41,6 +41,11 @@
def on_update(self):
check_duplicate_fiscal_year(self)
+
+ def on_trash(self):
+ global_defaults = frappe.get_doc("Global Defaults")
+ if global_defaults.current_fiscal_year == self.name:
+ frappe.throw(_("You cannot delete Fiscal Year {0}. Fiscal Year {0} is set as default in Global Settings").format(self.name))
def validate_overlap(self):
existing_fiscal_years = frappe.db.sql("""select name from `tabFiscal Year`
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js
index fc29bc7..bc337a1 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.js
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js
@@ -3,7 +3,7 @@
frappe.provide("erpnext.accounts");
frappe.provide("erpnext.journal_entry");
-frappe.require("assets/erpnext/js/utils.js");
+
frappe.ui.form.on("Journal Entry", {
refresh: function(frm) {
diff --git a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json
index 6befedc..26519ac 100644
--- a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json
+++ b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json
@@ -17,6 +17,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Mode of Payment",
@@ -26,6 +27,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -37,10 +39,37 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "type",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Cash\nBank\nGeneral",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
"fieldname": "accounts",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Accounts",
@@ -50,6 +79,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -68,7 +98,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:50.335559",
+ "modified": "2016-04-26 11:48:17.411796",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Mode of Payment",
@@ -115,6 +145,9 @@
"write": 0
}
],
+ "quick_entry": 1,
"read_only": 0,
- "read_only_onload": 0
+ "read_only_onload": 0,
+ "sort_order": "ASC",
+ "track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.json b/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.json
index 5659f1f..9255eda 100644
--- a/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.json
+++ b/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.json
@@ -13,9 +13,10 @@
"bold": 0,
"collapsible": 0,
"fieldname": "invoice_type",
- "fieldtype": "Data",
+ "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Invoice Type",
@@ -24,6 +25,7 @@
"options": "Sales Invoice\nPurchase Invoice\nJournal Entry",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -36,17 +38,19 @@
"bold": 0,
"collapsible": 0,
"fieldname": "invoice_number",
- "fieldtype": "Data",
+ "fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Invoice Number",
"length": 0,
"no_copy": 0,
- "options": "",
+ "options": "invoice_type",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -62,6 +66,7 @@
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Invoice Date",
@@ -69,6 +74,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -84,6 +90,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "",
@@ -91,6 +98,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -106,6 +114,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Amount",
@@ -113,6 +122,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -128,6 +138,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Outstanding Amount",
@@ -135,6 +146,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -145,21 +157,24 @@
],
"hide_heading": 0,
"hide_toolbar": 0,
+ "idx": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:51.516537",
+ "modified": "2016-04-29 05:47:14.124370",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation Invoice",
"name_case": "",
"owner": "Administrator",
"permissions": [],
+ "quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
- "sort_order": "DESC"
+ "sort_order": "DESC",
+ "track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_tool/payment_tool.js b/erpnext/accounts/doctype/payment_tool/payment_tool.js
index e15694c..8d8e0ce 100644
--- a/erpnext/accounts/doctype/payment_tool/payment_tool.js
+++ b/erpnext/accounts/doctype/payment_tool/payment_tool.js
@@ -146,6 +146,10 @@
c.total_amount = d.invoice_amount;
c.outstanding_amount = d.outstanding_amount;
+ if (in_list(['Sales Invoice', 'Purchase Invoice'], d.voucher_type)){
+ c.due_date = d.due_date
+ }
+
if (frm.doc.set_payment_amount) {
c.payment_amount = d.outstanding_amount;
}
@@ -202,7 +206,7 @@
}
frappe.call({
- method: 'erpnext.accounts.doctype.payment_tool.payment_tool.get_against_voucher_amount',
+ method: 'erpnext.accounts.doctype.payment_tool.payment_tool.get_against_voucher_details',
args: {
"against_voucher_type": row.against_voucher_type,
"against_voucher_no": row.against_voucher_no,
diff --git a/erpnext/accounts/doctype/payment_tool/payment_tool.py b/erpnext/accounts/doctype/payment_tool/payment_tool.py
index ef8ffb1..5c5b393 100644
--- a/erpnext/accounts/doctype/payment_tool/payment_tool.py
+++ b/erpnext/accounts/doctype/payment_tool/payment_tool.py
@@ -20,15 +20,15 @@
jv.company = self.company
jv.cheque_no = self.reference_no
jv.cheque_date = self.reference_date
-
- party_account_currency, party_account_type = frappe.db.get_value("Account", self.party_account,
+
+ party_account_currency, party_account_type = frappe.db.get_value("Account", self.party_account,
["account_currency", "account_type"])
-
+
bank_account_currency, bank_account_type = None, None
if self.payment_account:
- bank_account_currency, bank_account_type = frappe.db.get_value("Account", self.payment_account,
+ bank_account_currency, bank_account_type = frappe.db.get_value("Account", self.payment_account,
["account_currency", "account_type"])
-
+
if not self.total_payment_amount:
frappe.throw(_("Please enter Payment Amount in atleast one row"))
@@ -36,11 +36,11 @@
if not frappe.db.get_value(v.against_voucher_type, {"name": v.against_voucher_no}):
frappe.throw(_("Row {0}: {1} is not a valid {2}").format(v.idx, v.against_voucher_no,
v.against_voucher_type))
-
+
if v.payment_amount:
exchange_rate = get_exchange_rate(self.party_account, party_account_currency,
self.company, v.against_voucher_type, v.against_voucher_no)
-
+
d1 = jv.append("accounts")
d1.account = self.party_account
d1.party_type = self.party_type
@@ -56,7 +56,7 @@
d1.reference_name = v.against_voucher_no
d1.is_advance = 'Yes' \
if v.against_voucher_type in ['Sales Order', 'Purchase Order'] else 'No'
-
+
amount = flt(d1.debit_in_account_currency) - flt(d1.credit_in_account_currency)
if bank_account_currency == party_account_currency:
total_payment_amount += amount
@@ -65,27 +65,27 @@
d2 = jv.append("accounts")
if self.payment_account:
- bank_account_currency, bank_account_type = frappe.db.get_value("Account", self.payment_account,
+ bank_account_currency, bank_account_type = frappe.db.get_value("Account", self.payment_account,
["account_currency", "account_type"])
-
+
d2.account = self.payment_account
d2.account_currency = bank_account_currency
d2.account_type = bank_account_type
- d2.exchange_rate = get_exchange_rate(self.payment_account, bank_account_currency, self.company,
- debit=(abs(total_payment_amount) if total_payment_amount < 0 else 0),
+ d2.exchange_rate = get_exchange_rate(self.payment_account, bank_account_currency, self.company,
+ debit=(abs(total_payment_amount) if total_payment_amount < 0 else 0),
credit=(total_payment_amount if total_payment_amount > 0 else 0))
d2.account_balance = get_balance_on(self.payment_account)
-
+
amount_field_bank = 'debit_in_account_currency' if total_payment_amount < 0 \
else 'credit_in_account_currency'
-
+
d2.set(amount_field_bank, abs(total_payment_amount))
-
+
company_currency = frappe.db.get_value("Company", self.company, "default_currency")
if party_account_currency != company_currency or \
(bank_account_currency and bank_account_currency != company_currency):
jv.multi_currency = 1
-
+
jv.set_amounts_in_company_currency()
jv.set_total_debit_credit()
@@ -150,7 +150,7 @@
return order_list
@frappe.whitelist()
-def get_against_voucher_amount(against_voucher_type, against_voucher_no, party_account, company):
+def get_against_voucher_details(against_voucher_type, against_voucher_no, party_account, company):
party_account_currency = get_account_currency(party_account)
company_currency = frappe.db.get_value("Company", company, "default_currency")
ref_field = "base_grand_total" if party_account_currency == company_currency else "grand_total"
diff --git a/erpnext/accounts/doctype/payment_tool_detail/payment_tool_detail.json b/erpnext/accounts/doctype/payment_tool_detail/payment_tool_detail.json
index 765aa93..66447b0 100644
--- a/erpnext/accounts/doctype/payment_tool_detail/payment_tool_detail.json
+++ b/erpnext/accounts/doctype/payment_tool_detail/payment_tool_detail.json
@@ -16,14 +16,16 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
- "in_list_view": 1,
+ "in_list_view": 0,
"label": "Against Voucher Type",
"length": 0,
"no_copy": 0,
"options": "DocType",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"print_width": "",
"read_only": 0,
"report_hide": 0,
@@ -41,6 +43,7 @@
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Against Voucher No",
@@ -49,6 +52,7 @@
"options": "against_voucher_type",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -60,10 +64,36 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "due_date",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Due Date",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
"fieldname": "column_break_3",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -71,6 +101,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -86,6 +117,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Total Amount",
@@ -94,6 +126,7 @@
"options": "party_account_currency",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -109,6 +142,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Outstanding Amount",
@@ -117,6 +151,7 @@
"options": "party_account_currency",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -132,6 +167,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Payment Amount",
@@ -140,6 +176,7 @@
"options": "party_account_currency",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -150,13 +187,14 @@
],
"hide_heading": 0,
"hide_toolbar": 0,
+ "idx": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:51.626386",
+ "modified": "2016-05-05 06:22:24.736160",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Tool Detail",
diff --git a/erpnext/accounts/doctype/payments/__init__.py b/erpnext/accounts/doctype/payments/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/accounts/doctype/payments/__init__.py
diff --git a/erpnext/accounts/doctype/payments/payments.json b/erpnext/accounts/doctype/payments/payments.json
new file mode 100644
index 0000000..d52fb15
--- /dev/null
+++ b/erpnext/accounts/doctype/payments/payments.json
@@ -0,0 +1,191 @@
+{
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "beta": 0,
+ "creation": "2016-05-08 23:49:38.842621",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "",
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "mode_of_payment",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Mode of Payment",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Mode of Payment",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "0.0",
+ "depends_on": "eval:parent.doctype == 'Sales Invoice'",
+ "fieldname": "amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Amount",
+ "length": 0,
+ "no_copy": 0,
+ "options": "currency",
+ "permlevel": 0,
+ "precision": "2",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_3",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Account",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "type",
+ "fieldtype": "Read Only",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "mode_of_payment.type",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "base_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Base Amount (Company Currency)",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ }
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 1,
+ "max_attachments": 0,
+ "modified": "2016-05-09 00:14:18.975568",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Payments",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [],
+ "quick_entry": 1,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payments/payments.py b/erpnext/accounts/doctype/payments/payments.py
new file mode 100644
index 0000000..15cf0b2
--- /dev/null
+++ b/erpnext/accounts/doctype/payments/payments.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.model.document import Document
+
+class Payments(Document):
+ pass
diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.json b/erpnext/accounts/doctype/pos_profile/pos_profile.json
index 6d395af..8f25ba9 100644
--- a/erpnext/accounts/doctype/pos_profile/pos_profile.json
+++ b/erpnext/accounts/doctype/pos_profile/pos_profile.json
@@ -3,6 +3,7 @@
"allow_import": 0,
"allow_rename": 0,
"autoname": "hash",
+ "beta": 0,
"creation": "2013-05-24 12:15:51",
"custom": 0,
"docstatus": 0,
@@ -16,6 +17,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Applicable for User",
@@ -26,6 +28,7 @@
"options": "User",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -41,6 +44,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Series",
@@ -51,6 +55,7 @@
"options": "[Select]",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -62,37 +67,13 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "fieldname": "warehouse",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Warehouse",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "warehouse",
- "oldfieldtype": "Link",
- "options": "Warehouse",
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
"default": "1",
"description": "",
"fieldname": "update_stock",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Update Stock",
@@ -100,6 +81,60 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "update_stock",
+ "fieldname": "warehouse",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Warehouse",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "warehouse",
+ "oldfieldtype": "Link",
+ "options": "Warehouse",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "ignore_pricing_rule",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Ignore Pricing Rule",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -115,6 +150,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -122,6 +158,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -137,6 +174,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Customer",
@@ -147,6 +185,7 @@
"options": "Customer",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -162,6 +201,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Company",
@@ -172,6 +212,7 @@
"options": "Company",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -187,6 +228,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Currency",
@@ -197,6 +239,7 @@
"options": "Currency",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -208,19 +251,70 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "fieldname": "mode_of_payment",
- "fieldtype": "Link",
+ "fieldname": "allow_partial_payment",
+ "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
- "label": "Mode of Payment",
+ "label": "Allow Partial Payment",
"length": 0,
"no_copy": 0,
- "options": "Mode of Payment",
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "section_break_11",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "payments",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Payments",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Payments",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -236,6 +330,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -243,6 +338,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -258,6 +354,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Print Format",
@@ -267,6 +364,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -282,6 +380,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Letter Head",
@@ -292,6 +391,7 @@
"options": "Letter Head",
"permlevel": 0,
"print_hide": 1,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -307,6 +407,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Print Heading",
@@ -317,6 +418,7 @@
"options": "Print Heading",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -332,6 +434,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Terms and Conditions",
@@ -342,6 +445,7 @@
"options": "Terms and Conditions",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -357,6 +461,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -364,6 +469,33 @@
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "customer_group",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Customer Group",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Customer Group",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -380,6 +512,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Territory",
@@ -390,6 +523,7 @@
"options": "Territory",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -405,6 +539,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Price List",
@@ -415,6 +550,60 @@
"options": "Price List",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "apply_discount",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Apply Discount",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "Grand Total",
+ "depends_on": "apply_discount",
+ "fieldname": "apply_discount_on",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Apply Discount On",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Grand Total\nNet Total",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -430,6 +619,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -437,6 +627,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -448,10 +639,12 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "depends_on": "",
"fieldname": "write_off_account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Account",
@@ -461,6 +654,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -476,6 +670,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Cost Center",
@@ -485,6 +680,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -500,6 +696,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Taxes and Charges",
@@ -510,6 +707,7 @@
"options": "Sales Taxes and Charges Template",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -525,6 +723,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -532,6 +731,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -547,6 +747,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Cash/Bank Account",
@@ -557,6 +758,7 @@
"options": "Account",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -572,6 +774,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Income Account",
@@ -582,6 +785,7 @@
"options": "Account",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -598,6 +802,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Expense Account",
@@ -606,6 +811,7 @@
"options": "Account",
"permlevel": 0,
"print_hide": 1,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -621,6 +827,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Cost Center",
@@ -631,6 +838,7 @@
"options": "Cost Center",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -649,7 +857,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:51.741253",
+ "modified": "2016-05-09 00:00:30.610878",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Profile",
@@ -696,9 +904,11 @@
"write": 0
}
],
+ "quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
- "title_field": "user"
+ "title_field": "user",
+ "track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py
index 98a8509..634d63c 100644
--- a/erpnext/accounts/doctype/pos_profile/pos_profile.py
+++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py
@@ -5,6 +5,7 @@
import frappe
from frappe import msgprint, _
from frappe.utils import cint
+from erpnext.accounts.doctype.sales_invoice.sales_invoice import set_account_for_mode_of_payment
from frappe.model.document import Document
@@ -36,6 +37,9 @@
"company": self.company, "name": link_dn}):
frappe.throw(_("{0} does not belong to Company {1}").format(link_dn, self.company))
+ def before_save(self):
+ set_account_for_mode_of_payment(self)
+
def on_update(self):
self.set_defaults()
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
index c534415..923514d 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -129,7 +129,7 @@
paid_amount: function() {
this.set_in_company_currency(this.frm.doc, ["paid_amount"]);
- this.write_off_outstanding_amount();
+ this.write_off_amount();
this.frm.refresh_fields();
},
diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py
index 62a9f52..0cf17da 100644
--- a/erpnext/accounts/doctype/sales_invoice/pos.py
+++ b/erpnext/accounts/doctype/sales_invoice/pos.py
@@ -2,50 +2,186 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
-import frappe
+import frappe, json
+from frappe import _
+from frappe.utils import nowdate
+from erpnext.setup.utils import get_exchange_rate
+from erpnext.stock.get_item_details import get_pos_profile
+from erpnext.controllers.accounts_controller import get_taxes_and_charges
@frappe.whitelist()
-def get_items(price_list, sales_or_purchase, item=None):
- condition = ""
- order_by = ""
- args = {"price_list": price_list}
+def get_pos_data():
+ doc = frappe.new_doc('Sales Invoice')
+ doc.update_stock = 1;
+ doc.is_pos = 1;
+ pos_profile = get_pos_profile(doc.company)
- if item:
- # search serial no
- item_code = frappe.db.sql("""select name as serial_no, item_code
- from `tabSerial No` where name=%s""", (item), as_dict=1)
- if item_code:
- item_code[0]["name"] = item_code[0]["item_code"]
- return item_code
+ if not pos_profile:
+ frappe.throw(_("Create pos profile first"))
- # search barcode
- item_code = frappe.db.sql("""select name, item_code from `tabItem`
- where barcode=%s""",
- (item), as_dict=1)
- if item_code:
- item_code[0]["barcode"] = item
- return item_code
+ pos_profile = frappe.get_doc('POS Profile', pos_profile.name)
+ update_pos_profile_data(doc, pos_profile)
+ update_multi_mode_option(doc, pos_profile)
- condition += " and ((CONCAT(i.name, i.item_name) like %(name)s) or (i.variant_of like %(name)s) or (i.item_group like %(name)s))"
- order_by = """if(locate(%(_name)s, i.name), locate(%(_name)s, i.name), 99999),
- if(locate(%(_name)s, i.item_name), locate(%(_name)s, i.item_name), 99999),
- if(locate(%(_name)s, i.variant_of), locate(%(_name)s, i.variant_of), 99999),
- if(locate(%(_name)s, i.item_group), locate(%(_name)s, i.item_group), 99999),"""
- args["name"] = "%%%s%%" % frappe.db.escape(item)
- args["_name"] = item.replace("%", "")
+ return {
+ 'doc': doc,
+ 'items': get_items(doc, pos_profile),
+ 'customers': get_customers(pos_profile),
+ 'pricing_rules': get_pricing_rules(doc),
+ 'mode_of_payment': get_mode_of_payment(doc),
+ 'print_template': frappe.db.get_value('Print Format', pos_profile.print_format, 'html') or '',
+ 'meta': {
+ 'invoice': frappe.get_meta('Sales Invoice'),
+ 'items': frappe.get_meta('Sales Invoice Item'),
+ 'taxes': frappe.get_meta('Sales Taxes and Charges')
+ }
+ }
- # locate function is used to sort by closest match from the beginning of the value
- return frappe.db.sql("""select i.name, i.item_name, i.image,
- item_det.price_list_rate, item_det.currency
- from `tabItem` i LEFT JOIN
- (select item_code, price_list_rate, currency from
- `tabItem Price` where price_list=%(price_list)s) item_det
- ON
- (item_det.item_code=i.name or item_det.item_code=i.variant_of)
- where
- i.has_variants = 0 and
- {condition}
- order by
- {order_by}
- i.name
- limit 24""".format(condition=condition, order_by=order_by), args, as_dict=1)
+def update_pos_profile_data(doc, pos_profile):
+ company_data = frappe.db.get_value('Company', doc.company, '*', as_dict=1)
+
+ doc.taxes_and_charges = pos_profile.taxes_and_charges
+ if doc.taxes_and_charges:
+ update_tax_table(doc)
+
+ doc.currency = pos_profile.currency or company_data.default_currency
+ doc.conversion_rate = 1.0
+ if doc.currency != company_data.default_currency:
+ doc.conversion_rate = get_exchange_rate(doc.currency, company_data.default_currency)
+ doc.selling_price_list = pos_profile.selling_price_list or frappe.db.get_value('Selling Settings', None, 'selling_price_list')
+ doc.naming_series = pos_profile.naming_series or 'SINV-'
+ doc.letter_head = pos_profile.letter_head or company_data.default_letter_head
+ doc.ignore_pricing_rule = pos_profile.ignore_pricing_rule
+ doc.apply_discount_on = pos_profile.apply_discount_on
+ doc.customer_group = pos_profile.customer_group or get_root('Customer Group')
+ doc.territory = pos_profile.territory or get_root('Territory')
+
+def get_root(table):
+ root = frappe.db.sql(""" select name from `tab%(table)s` having
+ min(lft)"""%{'table': table}, as_dict=1)
+
+ return root[0].name
+
+def update_multi_mode_option(doc, pos_profile):
+ from frappe.model import default_fields
+
+ for payment_mode in pos_profile.payments:
+ payment_mode = payment_mode.as_dict()
+
+ for fieldname in default_fields:
+ if fieldname in payment_mode:
+ del payment_mode[fieldname]
+
+ doc.append('payments', payment_mode)
+
+def update_tax_table(doc):
+ taxes = get_taxes_and_charges('Sales Taxes and Charges Template', doc.taxes_and_charges)
+ for tax in taxes:
+ doc.append('taxes', tax)
+
+def get_items(doc, pos_profile):
+ item_list = []
+ for item in frappe.get_all("Item", fields=["*"], filters={'disabled': 0, 'has_variants': 0}):
+ item_doc = frappe.get_doc('Item', item.name)
+ if item_doc.taxes:
+ item.taxes = json.dumps(dict(([d.tax_type, d.tax_rate] for d in
+ item_doc.get("taxes"))))
+
+ item.price_list_rate = frappe.db.get_value('Item Price', {'item_code': item.name,
+ 'price_list': doc.selling_price_list}, 'price_list_rate') or 0
+ item.default_warehouse = pos_profile.warehouse or item.default_warehouse or None
+ item.expense_account = pos_profile.expense_account or item.expense_account
+ item.income_account = pos_profile.income_account or item_doc.income_account
+ item.cost_center = pos_profile.cost_center or item_doc.selling_cost_center
+ item.actual_qty = frappe.db.get_value('Bin', {'item_code': item.name,
+ 'warehouse': item.default_warehouse}, 'actual_qty') or 0
+ item.serial_nos = frappe.db.sql_list("""select name from `tabSerial No` where warehouse= %(warehouse)s
+ and item_code = %(item_code)s""", {'warehouse': item.default_warehouse, 'item_code': item.item_code})
+ item_list.append(item)
+
+ return item_list
+
+def get_customers(pos_profile):
+ filters = {'disabled': 0}
+ if pos_profile.customer:
+ filters.update({'name': pos_profile.customer})
+
+ return frappe.get_all("Customer", fields=["*"], filters = filters)
+
+def get_pricing_rules(doc):
+ if doc.ignore_pricing_rule == 0:
+ return frappe.db.sql(""" Select * from `tabPricing Rule` where docstatus < 2 and disable = 0
+ and selling = 1 and ifnull(company, '') in (%(company)s, '') and
+ ifnull(for_price_list, '') in (%(price_list)s, '') and %(date)s between
+ ifnull(valid_from, '2000-01-01') and ifnull(valid_upto, '2500-12-31') order by priority desc, name desc""",
+ {'company': doc.company, 'price_list': doc.selling_price_list, 'date': nowdate()}, as_dict=1)
+
+def get_mode_of_payment(doc):
+ return frappe.get_all('Mode of Payment Account', fields = ['distinct parent'], filters={'company': doc.company})
+
+@frappe.whitelist()
+def make_invoice(doc_list):
+ if isinstance(doc_list, basestring):
+ doc_list = json.loads(doc_list)
+
+ name_list = []
+
+ for docs in doc_list:
+ for name, doc in docs.items():
+ validate_customer(doc)
+ validate_item(doc)
+ si_doc = frappe.new_doc('Sales Invoice')
+ si_doc.offline_pos_name = name
+ si_doc.update(doc)
+ submit_invoice(si_doc)
+ name_list.append(name)
+
+ return name_list
+
+def validate_customer(doc):
+ if not frappe.db.get_value('Customer', doc.get('customer')):
+ customer_doc = frappe.new_doc('Customer')
+ customer_doc.customer_name = doc.get('customer')
+ customer_doc.customer_type = 'Company'
+ customer_doc.customer_group = doc.get('customer_group')
+ customer_doc.territory = doc.get('territory')
+ customer_doc.save(ignore_permissions = True)
+ frappe.db.commit()
+ doc['customer'] = customer_doc.name
+
+ return doc
+
+def validate_item(doc):
+ for item in doc.get('items'):
+ if not frappe.db.exists('Item', item.get('item_code')):
+ item_doc = frappe.new_doc('Item')
+ item_doc.name = item.get('item_code')
+ item_doc.item_code = item.get('item_code')
+ item_doc.item_name = item.get('item_name')
+ item_doc.description = item.get('description')
+ item_doc.default_warehouse = item.get('warehouse')
+ item_doc.stock_uom = item.get('stock_uom')
+ item_doc.item_group = item.get('item_group')
+ item_doc.save(ignore_permissions=True)
+ frappe.db.commit()
+
+def submit_invoice(si_doc):
+ try:
+ si_doc.insert()
+ si_doc.submit()
+ except Exception, e:
+ if frappe.message_log: frappe.message_log.pop()
+ frappe.db.rollback()
+ save_invoice(e, si_doc)
+
+def save_invoice(e, si_doc):
+ si_doc.docstatus = 0
+ si_doc.name = ''
+ si_doc.save(ignore_permissions=True)
+ make_scheduler_log(e, si_doc.name)
+
+def make_scheduler_log(e, sales_invoice):
+ scheduler_log = frappe.new_doc('Scheduler Log')
+ scheduler_log.error = e
+ scheduler_log.sales_invoice = sales_invoice
+ scheduler_log.save(ignore_permissions=True)
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index c3c91a0..45c918c 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -17,17 +17,6 @@
this.frm.set_df_property("debit_to", "print_hide", 0);
}
- // toggle to pos view if is_pos is 1 in user_defaults
- if ((is_null(this.frm.doc.is_pos) && cint(frappe.defaults.get_user_default("is_pos"))===1) || this.frm.doc.is_pos) {
- if(this.frm.doc.__islocal && !this.frm.doc.amended_from && !this.frm.doc.customer) {
- this.frm.set_value("is_pos", 1);
- this.is_pos(function() {
- if (cint(frappe.defaults.get_user_defaults("fs_pos_view"))===1)
- erpnext.pos.toggle(me.frm, true);
- });
- }
- }
-
erpnext.queries.setup_queries(this.frm, "Warehouse", function() {
return erpnext.queries.warehouse(me.frm.doc);
});
@@ -149,39 +138,6 @@
this.get_terms();
},
- is_pos: function(doc, dt, dn, callback_fn) {
- cur_frm.cscript.hide_fields(this.frm.doc);
- if(cur_frm.doc.__missing_values_set) return;
- if(cint(this.frm.doc.is_pos)) {
- if(!this.frm.doc.company) {
- this.frm.set_value("is_pos", 0);
- msgprint(__("Please specify Company to proceed"));
- } else {
- var me = this;
- return this.frm.call({
- doc: me.frm.doc,
- method: "set_missing_values",
- callback: function(r) {
- if(!r.exc) {
- if(r.message && r.message.print_format) {
- cur_frm.pos_print_format = r.message.print_format;
- }
- cur_frm.doc.__missing_values_set = true;
- me.frm.script_manager.trigger("update_stock");
- frappe.model.set_default_values(me.frm.doc);
- me.set_dynamic_labels();
- me.calculate_taxes_and_totals();
- if(callback_fn) callback_fn();
- frappe.after_ajax(function() {
- cur_frm.doc.__missing_values_set = false;
- })
- }
- }
- });
- }
- }
- },
-
customer: function() {
var me = this;
if(this.frm.updating_party_details) return;
@@ -245,11 +201,6 @@
this.write_off_outstanding_amount_automatically();
},
- paid_amount: function() {
- this.set_in_company_currency(this.frm.doc, ["paid_amount"]);
- this.write_off_outstanding_amount_automatically();
- },
-
items_add: function(doc, cdt, cdn) {
var row = frappe.get_doc(cdt, cdn);
this.frm.script_manager.copy_from_first_row("items", row, ["income_account", "cost_center"]);
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
index 6678583..9da4aae 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -3,6 +3,7 @@
"allow_import": 1,
"allow_rename": 0,
"autoname": "naming_series:",
+ "beta": 0,
"creation": "2013-05-24 19:29:05",
"custom": 0,
"default_print_format": "Standard",
@@ -198,6 +199,31 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "offline_pos_name",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Offline POS Name",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"hidden": 0,
@@ -656,6 +682,32 @@
{
"allow_on_submit": 0,
"bold": 0,
+ "collapsible": 0,
+ "fieldname": "territory",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Territory",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Territory",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
"collapsible": 1,
"depends_on": "customer",
"fieldname": "currency_and_price_list",
@@ -1941,7 +1993,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
- "collapsible_depends_on": "paid_amount",
+ "collapsible_depends_on": "",
"depends_on": "eval:doc.is_pos===1||(doc.advances && doc.advances.length>0)",
"fieldname": "payments_section",
"fieldtype": "Section Break",
@@ -1971,7 +2023,7 @@
"depends_on": "is_pos",
"fieldname": "cash_bank_account",
"fieldtype": "Link",
- "hidden": 0,
+ "hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
@@ -1996,9 +2048,34 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "depends_on": "is_pos",
- "fieldname": "column_break3",
- "fieldtype": "Column Break",
+ "fieldname": "payments",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Payments",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Payments",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "section_break_84",
+ "fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -2007,6 +2084,7 @@
"length": 0,
"no_copy": 0,
"permlevel": 0,
+ "precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
@@ -2014,35 +2092,6 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
- "unique": 0,
- "width": "50%"
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "is_pos",
- "fieldname": "paid_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Paid Amount",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "paid_amount",
- "oldfieldtype": "Currency",
- "options": "currency",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
"unique": 0
},
{
@@ -2074,6 +2123,110 @@
{
"allow_on_submit": 0,
"bold": 0,
+ "collapsible": 0,
+ "fieldname": "base_change_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Base Change Amount (Company Currency)",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "column_break_86",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "is_pos",
+ "fieldname": "paid_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Paid Amount",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "paid_amount",
+ "oldfieldtype": "Currency",
+ "options": "currency",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "change_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Change Amount",
+ "length": 0,
+ "no_copy": 1,
+ "options": "currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
"collapsible": 1,
"collapsible_depends_on": "write_off_amount",
"depends_on": "grand_total",
@@ -3443,7 +3596,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-04-14 13:01:01.748816",
+ "modified": "2016-05-09 15:03:33.236351",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",
@@ -3530,6 +3683,7 @@
"write": 0
}
],
+ "quick_entry": 1,
"read_only": 0,
"read_only_onload": 1,
"search_fields": "posting_date, due_date, customer, base_grand_total, outstanding_amount",
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index c241288..952cce6 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -64,8 +64,8 @@
self.validate_fixed_asset()
self.set_income_account_for_fixed_assets()
- if cint(self.is_pos):
- self.validate_pos()
+ # if cint(self.is_pos):
+ # self.validate_pos()
if cint(self.update_stock):
self.validate_dropship_item()
@@ -83,6 +83,18 @@
self.validate_multiple_billing("Delivery Note", "dn_detail", "amount", "items")
self.update_packing_list()
+ def before_save(self):
+ set_account_for_mode_of_payment(self)
+
+ def update_change_amount(self):
+ self.base_paid_amount = 0.0
+ if self.paid_amount:
+ self.base_paid_amount = flt(self.paid_amount * self.conversion_rate, self.precision("base_paid_amount"))
+ self.change_amount = self.base_change_amount = 0.0
+ if self.paid_amount > self.grand_total:
+ self.change_amount = flt(self.paid_amount - self.grand_total, self.precision("change_amount"))
+ self.base_change_amount = flt(self.change_amount * self.conversion_rate, self.precision("base_change_amount"))
+
def on_submit(self):
if not self.recurring_id:
frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype,
@@ -588,8 +600,7 @@
gl_entries += super(SalesInvoice, self).get_gl_entries()
def make_pos_gl_entries(self, gl_entries):
- if cint(self.is_pos) and self.cash_bank_account and self.paid_amount:
- bank_account_currency = get_account_currency(self.cash_bank_account)
+ if cint(self.is_pos) and self.paid_amount:
# POS, make payment entries
gl_entries.append(
self.get_gl_dict({
@@ -597,22 +608,43 @@
"party_type": "Customer",
"party": self.customer,
"against": self.cash_bank_account,
- "credit": self.base_paid_amount,
- "credit_in_account_currency": self.base_paid_amount \
- if self.party_account_currency==self.company_currency else self.paid_amount,
+ "credit": flt(self.base_paid_amount - self.base_change_amount),
+ "credit_in_account_currency": flt(self.base_paid_amount - self.base_change_amount) \
+ if self.party_account_currency==self.company_currency else flt(self.paid_amount - self.change_amount),
"against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype,
}, self.party_account_currency)
)
- gl_entries.append(
- self.get_gl_dict({
- "account": self.cash_bank_account,
- "against": self.customer,
- "debit": self.base_paid_amount,
- "debit_in_account_currency": self.base_paid_amount \
- if bank_account_currency==self.company_currency else self.paid_amount
- }, bank_account_currency)
- )
+
+ cash_account = ''
+ for payment_mode in self.payments:
+ if payment_mode.type == 'Cash':
+ cash_account = payment_mode.account
+
+ if payment_mode.base_amount > 0:
+ payment_mode_account_currency = get_account_currency(payment_mode.account)
+ gl_entries.append(
+ self.get_gl_dict({
+ "account": payment_mode.account,
+ "against": self.customer,
+ "debit": payment_mode.base_amount,
+ "debit_in_account_currency": payment_mode.base_amount \
+ if payment_mode_account_currency==self.company_currency else payment_mode.amount
+ }, payment_mode_account_currency)
+ )
+
+ if self.change_amount:
+ cash_account = cash_account or self.payments[0].account
+ cash_account_currency = get_account_currency(cash_account)
+ gl_entries.append(
+ self.get_gl_dict({
+ "account": cash_account,
+ "against": self.customer,
+ "credit": self.base_change_amount,
+ "credit_in_account_currency": self.base_change_amount \
+ if payment_mode_account_currency==self.company_currency else self.change_amount
+ }, payment_mode_account_currency)
+ )
def make_write_off_gl_entry(self, gl_entries):
# write off entries, applicable if only pos
@@ -667,9 +699,12 @@
def get_list_context(context=None):
from erpnext.controllers.website_list_for_contact import get_list_context
list_context = get_list_context(context)
- list_context["title"] = _("My Invoices")
- list_context["show_sidebar"] = True
- list_context["show_search"] = True
+ list_context.update({
+ 'show_sidebar': True,
+ 'show_search': True,
+ 'no_breadcrumbs': True,
+ 'title': _('Invoices'),
+ })
return list_context
@frappe.whitelist()
@@ -677,7 +712,7 @@
account = frappe.db.get_value("Mode of Payment Account",
{"parent": mode_of_payment, "company": company}, "default_account")
if not account:
- frappe.msgprint(_("Please set default Cash or Bank account in Mode of Payment {0}").format(mode_of_payment))
+ frappe.throw(_("Please set default Cash or Bank account in Mode of Payment {0}").format(mode_of_payment))
return {
"account": account
}
@@ -734,4 +769,9 @@
@frappe.whitelist()
def make_sales_return(source_name, target_doc=None):
from erpnext.controllers.sales_and_purchase_return import make_return_doc
- return make_return_doc("Sales Invoice", source_name, target_doc)
\ No newline at end of file
+ return make_return_doc("Sales Invoice", source_name, target_doc)
+
+def set_account_for_mode_of_payment(self):
+ for data in self.payments:
+ if not data.account:
+ data.account = get_bank_cash_account(data.mode_of_payment, self.company).get("account")
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
index bac24d8..7208c2a 100644
--- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
@@ -441,17 +441,45 @@
self.make_pos_profile()
self._insert_purchase_receipt()
-
pos = copy.deepcopy(test_records[1])
pos["is_pos"] = 1
pos["update_stock"] = 1
- pos["cash_bank_account"] = "_Test Bank - _TC"
- pos["paid_amount"] = 600.0
+ pos["payments"] = [{'mode_of_payment': 'Bank Draft', 'account': '_Test Bank - _TC', 'amount': 300},
+ {'mode_of_payment': 'Cash', 'account': 'Cash - _TC', 'amount': 300}]
si = frappe.copy_doc(pos)
si.insert()
si.submit()
+
+ self.assertEquals(si.paid_amount, 600.0)
+ self.pos_gl_entry(si, pos, 300)
+
+ def test_make_pos_invoice(self):
+ from erpnext.accounts.doctype.sales_invoice.pos import make_invoice
+
+ set_perpetual_inventory()
+
+ self.make_pos_profile()
+ self._insert_purchase_receipt()
+
+ pos = copy.deepcopy(test_records[1])
+ pos["is_pos"] = 1
+ pos["update_stock"] = 1
+ pos["payments"] = [{'mode_of_payment': 'Bank Draft', 'account': '_Test Bank - _TC', 'amount': 300},
+ {'mode_of_payment': 'Cash', 'account': 'Cash - _TC', 'amount': 330}]
+
+ invoice_data = [{'09052016142': pos}]
+ si = make_invoice(invoice_data)
+ self.assertEquals(si[0], '09052016142')
+
+ sales_invoice = frappe.get_all('Sales Invoice', fields =["*"], filters = {'offline_pos_name': '09052016142', 'docstatus': 1})
+ si = frappe.get_doc('Sales Invoice', sales_invoice[0].name)
+ self.assertEquals(si.grand_total, 630.0)
+
+ self.pos_gl_entry(si, pos, 330)
+
+ def pos_gl_entry(self, si, pos, cash_amount):
# check stock ledger entries
sle = frappe.db.sql("""select * from `tabStock Ledger Entry`
where voucher_type = 'Sales Invoice' and voucher_no = %s""",
@@ -467,7 +495,7 @@
self.assertTrue(gl_entries)
stock_in_hand = frappe.db.get_value("Account", {"warehouse": "_Test Warehouse - _TC"})
-
+
expected_gl_entries = sorted([
[si.debit_to, 630.0, 0.0],
[pos["items"][0]["income_account"], 0.0, 500.0],
@@ -475,8 +503,9 @@
[pos["taxes"][1]["account_head"], 0.0, 50.0],
[stock_in_hand, 0.0, abs(sle.stock_value_difference)],
[pos["items"][0]["expense_account"], abs(sle.stock_value_difference), 0.0],
- [si.debit_to, 0.0, 600.0],
- ["_Test Bank - _TC", 600.0, 0.0]
+ [si.debit_to, 0.0, si.paid_amount],
+ ["_Test Bank - _TC", 300.0, 0.0],
+ ["Cash - _TC", cash_amount, 0.0]
])
for i, gle in enumerate(sorted(gl_entries, key=lambda gle: gle.account)):
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js
index 222682e..ec906f8 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.js
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.js
@@ -232,7 +232,7 @@
$(fd.tax_rate.wrapper).toggle(false);
$(fd.warehouse.wrapper).toggle(false);
} else {
- $(fd.account_type.wrapper).toggle(true);
+ $(fd.account_type.wrapper).toggle(node.root ? false : true);
fd.account_type.$input.trigger("change");
}
});
@@ -243,9 +243,6 @@
$(fd.warehouse.wrapper).toggle(fd.account_type.get_value()==='Warehouse');
})
- // root type if root
- $(fd.root_type.wrapper).toggle(node.root);
-
// create
d.set_primary_action(__("Create New"), function() {
var btn = this;
@@ -262,10 +259,10 @@
v.company = me.company;
if(node.root) {
- v.is_root = true;
+ v.is_root = 1;
v.parent_account = null;
} else {
- v.is_root = false;
+ v.is_root = 0;
v.root_type = null;
}
@@ -289,6 +286,11 @@
}
$(fd.is_group.input).prop("checked", false).change();
+
+ // In case of root, show root type and hide account_type, is_group
+ $(fd.root_type.wrapper).toggle(node.root);
+ $(fd.is_group.wrapper).toggle(!node.root);
+
d.show();
},
diff --git a/erpnext/accounts/page/financial_analytics/financial_analytics.js b/erpnext/accounts/page/financial_analytics/financial_analytics.js
index ef373aa..c892738 100644
--- a/erpnext/accounts/page/financial_analytics/financial_analytics.js
+++ b/erpnext/accounts/page/financial_analytics/financial_analytics.js
@@ -12,7 +12,7 @@
};
-frappe.require("assets/erpnext/js/account_tree_grid.js");
+{% include "erpnext/public/js/account_tree_grid.js" %}
erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
filters: [
diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js
index df7757b..04dd580 100644
--- a/erpnext/accounts/page/pos/pos.js
+++ b/erpnext/accounts/page/pos/pos.js
@@ -1,46 +1,843 @@
+frappe.provide("erpnext.pos");
+{% include "erpnext/public/js/controllers/taxes_and_totals.js" %}
+
frappe.pages['pos'].on_page_load = function(wrapper) {
var page = frappe.ui.make_app_page({
parent: wrapper,
- title: __('Start Point-of-Sale (POS)'),
+ title: 'Point of Sale',
single_column: true
});
-
- page.main.html(frappe.render_template("pos_page", {}));
-
- var pos_type = frappe.ui.form.make_control({
- parent: page.main.find(".select-type"),
- df: {
- fieldtype: "Select",
- options: [
- {label: __("Billing (Sales Invoice)"), value:"Sales Invoice"},
- {value:"Sales Order"},
- {value:"Delivery Note"},
- {value:"Quotation"},
- {value:"Purchase Order"},
- {value:"Purchase Receipt"},
- {value:"Purchase Invoice"},
- ],
- fieldname: "pos_type"
- },
- only_input: true
- });
-
- pos_type.refresh();
-
- pos_type.set_input("Sales Invoice");
-
- page.main.find(".btn-primary").on("click", function() {
- erpnext.open_as_pos = true;
- new_doc(pos_type.get_value());
- });
-
- $.ajax({
- url: "/api/resource/POS Profile",
- success: function(data) {
- if(!data.data.length) {
- page.main.find(".pos-setting-message").removeClass('hide');
- }
- }
- })
-
+
+ wrapper = $(wrapper).find('.page-content')
+ new erpnext.pos.PointOfSale(page, wrapper)
}
+
+erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
+ init: function(page, wrapper){
+ this.page = page;
+ this.wrapper = wrapper;
+ this.set_indicator();
+ this.onload();
+ this.make_menu_list();
+ this.set_interval_for_si_sync();
+ this.si_docs = this.get_doc_from_localstorage();
+ },
+
+ check_internet_connection: function(){
+ var me = this;
+ //Check Internet connection after every 30 seconds
+ setInterval(function(){
+ me.set_indicator();
+ }, 30000)
+ },
+
+ set_indicator: function(){
+ var me = this;
+ // navigator.onLine
+ this.page.set_indicator("Offline", "grey")
+ frappe.call({
+ method:"frappe.handler.ping",
+ callback: function(r){
+ if(r.message){
+ me.connection_status = true;
+ me.page.set_indicator("Online", "green")
+ }
+ }
+ })
+ },
+
+ onload: function(){
+ var me = this;
+
+ this.get_data_from_server(function(){
+ me.create_new();
+ });
+
+ this.check_internet_connection();
+ },
+
+ make_menu_list: function(){
+ var me = this;
+
+ this.page.add_menu_item(__("Unsync Records"), function(){
+ me.show_unsync_invoice_list()
+ });
+
+ this.page.add_menu_item(__("Sync Master Data"), function(){
+ me.get_data_from_server()
+ });
+
+ this.page.add_menu_item(__("New Sales Invoice"), function() {
+ me.create_new()
+ })
+ },
+
+ show_unsync_invoice_list: function(){
+ var me = this;
+ this.si_docs = this.get_doc_from_localstorage();
+
+ this.list_dialog = new frappe.ui.Dialog({
+ title: 'Invoice List'
+ });
+
+ this.list_dialog.show();
+ this.list_body = this.list_dialog.body;
+ $(this.list_body).append('<div class="row list-row list-row-head pos-invoice-list">\
+ <div class="col-xs-6">Customer</div>\
+ <div class="col-xs-3 text-right">Grand Total</div>\
+ <div class="col-xs-3 text-right">Status</div>\
+ </div>')
+
+ $.each(this.si_docs, function(index, data){
+ for(key in data) {
+ $(frappe.render_template("pos_invoice_list", {
+ name: key,
+ customer: data[key].customer,
+ grand_total: data[key].grand_total,
+ status: (data[key].docstatus == 1) ? 'Submitted' : 'Draft'
+ })).appendTo($(me.list_body));
+ }
+ })
+
+ $(this.list_body).find('.list-row').click(function() {
+ me.name = $(this).attr('invoice-name')
+ doc_data = me.get_invoice_doc(me.si_docs)
+ if(doc_data){
+ me.frm.doc = doc_data[0][me.name];
+ me.refresh();
+ me.disable_input_field();
+ me.list_dialog.hide();
+ }
+ })
+ },
+
+ get_invoice_doc: function(si_docs){
+ var me = this;
+ this.si_docs = this.get_doc_from_localstorage();
+
+ return $.grep(this.si_docs, function(data){
+ for(key in data){
+ return key == me.name
+ }
+ })
+ },
+
+ get_data_from_server: function(callback){
+ var me = this;
+ frappe.call({
+ method: "erpnext.accounts.doctype.sales_invoice.pos.get_pos_data",
+ freeze: true,
+ callback: function(r){
+ window.items = r.message.items;
+ window.customers = r.message.customers;
+ window.pricing_rules = r.message.pricing_rules;
+ window.meta = r.message.meta;
+ window.print_template = r.message.print_template;
+ localStorage.setItem('doc', JSON.stringify(r.message.doc));
+ if(callback){
+ callback();
+ }
+ }
+ })
+ },
+
+ create_new: function(){
+ this.frm = {}
+ var me = this;
+ this.name = '';
+ this.frm.doc = JSON.parse(localStorage.getItem('doc'))
+ this.load_data();
+ this.setup();
+ },
+
+ load_data: function(){
+ this.items = window.items;
+ this.customers = window.customers;
+ this.pricing_rules = window.pricing_rules;
+
+ $.each(window.meta, function(i, data){
+ frappe.meta.sync(data)
+ })
+
+ this.print_template = frappe.render_template("print_template",
+ {content: window.print_template, title:"POS"})
+ },
+
+ setup: function(){
+ this.wrapper.html(frappe.render_template("pos", this.frm.doc));
+ this.set_transaction_defaults("Customer");
+ this.make();
+ this.set_primary_action();
+ },
+
+ set_transaction_defaults: function(party) {
+ var me = this;
+ this.party = party;
+ this.price_list = (party == "Customer" ?
+ this.frm.doc.selling_price_list : this.frm.doc.buying_price_list);
+ this.price_list_field = (party == "Customer" ? "selling_price_list" : "buying_price_list");
+ this.sales_or_purchase = (party == "Customer" ? "Sales" : "Purchase");
+ },
+
+ make: function() {
+ this.make_search();
+ this.make_customer();
+ this.make_item_list();
+ this.make_discount_field()
+ },
+
+ make_search: function() {
+ var me = this;
+ this.search = frappe.ui.form.make_control({
+ df: {
+ "fieldtype": "Data",
+ "label": "Item",
+ "fieldname": "pos_item",
+ "placeholder": "Search Item"
+ },
+ parent: this.wrapper.find(".search-area"),
+ only_input: true,
+ });
+
+ this.search.make_input();
+ this.search.$input.on("keyup", function() {
+ setTimeout(function() {
+ me.items = me.get_items();
+ me.make_item_list();
+ }, 1000);
+ });
+
+ this.party_field = frappe.ui.form.make_control({
+ df: {
+ "fieldtype": "Data",
+ "options": this.party,
+ "label": this.party,
+ "fieldname": this.party.toLowerCase(),
+ "placeholder": this.party
+ },
+ parent: this.wrapper.find(".party-area"),
+ only_input: true,
+ });
+
+ this.party_field.make_input();
+ },
+
+ make_customer: function() {
+ var me = this;
+
+ if(this.customers.length == 1){
+ this.party_field.$input.val(this.customers[0].name);
+ this.frm.doc.customer = this.customers[0].name;
+ }
+
+ this.party_field.$input.autocomplete({
+ source: function (request, response) {
+ me.customer_data = me.get_customers(request.term)
+ response($.map(me.customer_data, function(data){
+ return {label: data.name, value: data.name,
+ customer_group: data.customer_group, territory: data.territory}
+ }))
+ },
+ change: function(event, ui){
+ if(ui.item){
+ me.frm.doc.customer = ui.item.label;
+ me.frm.doc.customer_name = ui.item.customer_name;
+ me.frm.doc.customer_group = ui.item.customer_group;
+ me.frm.doc.territory = ui.item.territory;
+ }else{
+ me.frm.doc.customer = me.party_field.$input.val();
+ }
+ me.refresh();
+ }
+ })
+ },
+
+ get_customers: function(key){
+ var me = this;
+ key = key.toLowerCase()
+ return $.grep(this.customers, function(data) {
+ if(data.name.toLowerCase().match(key) || data.customer_name.toLowerCase().match(key)
+ || data.customer_group.toLowerCase().match(key)){
+ return data
+ }
+ })
+ },
+
+ make_item_list: function() {
+ var me = this;
+ if(!this.price_list) {
+ msgprint(__("Price List not found or disabled"));
+ return;
+ }
+
+ me.item_timeout = null;
+
+ var $wrap = me.wrapper.find(".item-list");
+ me.wrapper.find(".item-list").empty();
+
+ if (this.items) {
+ $.each(this.items, function(index, obj) {
+ if(index < 16){
+ $(frappe.render_template("pos_item", {
+ item_code: obj.name,
+ item_price: format_currency(obj.price_list_rate, obj.currency),
+ item_name: obj.name===obj.item_name ? "" : obj.item_name,
+ item_image: obj.image ? "url('" + obj.image + "')" : null,
+ color: frappe.get_palette(obj.item_name),
+ abbr: frappe.get_abbr(obj.item_name)
+ })).tooltip().appendTo($wrap);
+ }
+ });
+ }
+
+ if(this.items.length == 1){
+ this.search.$input.val("");
+ this.add_to_cart();
+ }
+
+ // if form is local then allow this function
+ $(me.wrapper).find("div.pos-item").on("click", function() {
+ me.customer_validate();
+ if(me.frm.doc.docstatus==0) {
+ me.items = me.get_items($(this).attr("data-item-code"))
+ me.add_to_cart();
+ }
+ });
+ },
+
+ get_items: function(item_code){
+ // To search item as per the key enter
+
+ var me = this;
+ this.item_serial_no = {}
+
+ if(item_code){
+ return $.grep(window.items, function(item){
+ if(item.item_code == item_code ){
+ return true
+ }
+ })
+ }
+
+ key = this.search.$input.val().toLowerCase();
+
+ if(key){
+ return $.grep(window.items, function(item){
+ if( (item.item_code.toLowerCase().match(key)) ||
+ (item.item_name.toLowerCase().match(key)) || (item.item_group.toLowerCase().match(key)) ){
+ return true
+ }else if(item.barcode){
+ return item.barcode == me.search.$input.val()
+ } else if (in_list(item.serial_nos, me.search.$input.val())){
+ me.item_serial_no[item.item_code] = me.search.$input.val()
+ return true
+ }
+ })
+ }else{
+ return window.items;
+ }
+ },
+
+ update_qty: function() {
+ var me = this;
+
+ $(this.wrapper).find(".pos-item-qty").on("change", function(){
+ var item_code = $(this).parents(".pos-bill-item").attr("data-item-code");
+ me.update_qty_against_item_code(item_code, $(this).val());
+ })
+
+ $(this.wrapper).find("[data-action='increase-qty']").on("click", function(){
+ var item_code = $(this).parents(".pos-bill-item").attr("data-item-code");
+ var qty = flt($(this).parents(".pos-bill-item").find('.pos-item-qty').val()) + 1;
+ me.update_qty_against_item_code(item_code, qty);
+ })
+
+ $(this.wrapper).find("[data-action='decrease-qty']").on("click", function(){
+ var item_code = $(this).parents(".pos-bill-item").attr("data-item-code");
+ var qty = flt($(this).parents(".pos-bill-item").find('.pos-item-qty').val()) - 1;
+ me.update_qty_against_item_code(item_code, qty);
+ })
+ },
+
+ update_qty_against_item_code: function(item_code, qty){
+ var me = this;
+ if(qty < 0){
+ frappe.throw(__("Quantity must be positive"));
+ }
+
+ this.remove_item = []
+ $.each(this.frm.doc["items"] || [], function(i, d) {
+ if (d.item_code == item_code) {
+ d.qty = flt(qty);
+ d.amount = flt(d.rate) * flt(d.qty);
+ if(d.qty==0){
+ me.remove_item.push(d.idx)
+ }
+ }
+ });
+ this.remove_zero_qty_item();
+ this.refresh();
+ },
+
+ remove_zero_qty_item: function(){
+ var me = this;
+ idx = 0
+ this.items = []
+ idx = 0
+ $.each(this.frm.doc["items"] || [], function(i, d) {
+ if(!in_list(me.remove_item, d.idx)){
+ d.idx = idx;
+ me.items.push(d);
+ idx++;
+ }
+ });
+
+ this.frm.doc["items"] = this.items;
+ },
+
+ make_discount_field: function(){
+ var me = this;
+
+ this.wrapper.find('input.discount-percentage').on("change", function() {
+ me.frm.doc.additional_discount_percentage = flt($(this).val(), precision("additional_discount_percentage"));
+ total = me.frm.doc.grand_total
+
+ if(me.frm.doc.apply_discount_on == 'Net Total'){
+ total = me.frm.doc.net_total
+ }
+
+ me.frm.doc.discount_amount = flt(total*flt(me.frm.doc.additional_discount_percentage) / 100, precision("discount_amount"));
+ me.wrapper.find('input.discount-amount').val(me.frm.doc.discount_amount)
+ me.refresh();
+ });
+
+ this.wrapper.find('input.discount-amount').on("change", function() {
+ me.frm.doc.discount_amount = flt($(this).val(), precision("discount_amount"));
+ me.frm.doc.additional_discount_percentage = 0.0;
+ me.wrapper.find('input.discount-percentage').val(0);
+ me.refresh();
+ });
+ },
+
+ customer_validate: function(){
+ var me = this;
+
+ if(!this.frm.doc.customer){
+ frappe.throw(__("Please select customer"))
+ }
+ },
+
+ add_to_cart: function() {
+ var me = this;
+ var caught = false;
+ var no_of_items = me.wrapper.find(".pos-bill-item").length;
+
+ this.validate_serial_no()
+ this.validate_warehouse();
+
+ if (no_of_items != 0) {
+ $.each(this.frm.doc["items"] || [], function(i, d) {
+ if (d.item_code == me.items[0].item_code) {
+ caught = true;
+ d.qty += 1;
+ d.amount = flt(d.rate) * flt(d.qty)
+ if(me.item_serial_no.length){
+ d.serial_no += '\n' + me.item_serial_no[d.item_code]
+ }
+ }
+ });
+ }
+
+ // if item not found then add new item
+ if (!caught)
+ this.add_new_item_to_grid();
+
+ this.refresh();
+ },
+
+ add_new_item_to_grid: function() {
+ var me = this;
+ this.child = frappe.model.add_child(this.frm.doc, this.frm.doc.doctype + " Item", "items");
+ this.child.item_code = this.items[0].item_code;
+ this.child.item_name = this.items[0].item_name;
+ this.child.stock_uom = this.items[0].stock_uom;
+ this.child.description = this.items[0].description;
+ this.child.qty = 1;
+ this.child.item_group = this.items[0].item_group;
+ this.child.cost_center = this.items[0].cost_center;
+ this.child.income_account = this.items[0].income_account;
+ this.child.warehouse = this.items[0].default_warehouse;
+ this.child.price_list_rate = flt(this.items[0].price_list_rate, 9) / flt(this.frm.doc.conversion_rate, 9);
+ this.child.rate = flt(this.items[0].price_list_rate, 9) / flt(this.frm.doc.conversion_rate, 9);
+ this.child.actual_qty = this.items[0].actual_qty;
+ this.child.amount = flt(this.child.qty) * flt(this.child.rate);
+ this.child.serial_no = this.item_serial_no[this.child.item_code];
+ },
+
+ refresh: function() {
+ var me = this;
+ this.refresh_fields();
+ this.update_qty();
+ this.set_primary_action();
+ },
+ refresh_fields: function() {
+ this.apply_pricing_rule();
+ this.discount_amount_applied = false;
+ this._calculate_taxes_and_totals();
+ this.calculate_discount_amount();
+ this.show_items_in_item_cart();
+ this.set_taxes();
+ this.calculate_outstanding_amount();
+ this.set_totals();
+ },
+
+ get_company_currency: function() {
+ return erpnext.get_currency(this.frm.doc.company);
+ },
+
+ show_item_wise_taxes: function(){
+ return null;
+ },
+
+ show_items_in_item_cart: function() {
+ var me = this;
+ var $items = this.wrapper.find(".items").empty();
+ me.frm.doc.net_total = 0.0
+ $.each(this.frm.doc.items|| [], function(i, d) {
+ $(frappe.render_template("pos_bill_item", {
+ item_code: d.item_code,
+ item_name: (d.item_name===d.item_code || !d.item_name) ? "" : ("<br>" + d.item_name),
+ qty: d.qty,
+ actual_qty: d.actual_qty,
+ projected_qty: d.projected_qty,
+ rate: format_currency(d.rate, me.frm.doc.currency),
+ amount: format_currency(d.amount, me.frm.doc.currency)
+ })).appendTo($items);
+ });
+
+ this.wrapper.find("input.pos-item-qty").on("focus", function() {
+ $(this).select();
+ });
+ },
+
+ set_taxes: function(){
+ var me = this;
+ me.frm.doc.total_taxes_and_charges = 0.0
+
+ var taxes = this.frm.doc.taxes || [];
+ $(this.wrapper)
+ .find(".tax-area").toggleClass("hide", (taxes && taxes.length) ? false : true)
+ .find(".tax-table").empty();
+
+ $.each(taxes, function(i, d) {
+ if (d.tax_amount && cint(d.included_in_print_rate) == 0) {
+ $(frappe.render_template("pos_tax_row", {
+ description: d.description,
+ tax_amount: format_currency(flt(d.tax_amount_after_discount_amount),
+ me.frm.doc.currency)
+ })).appendTo(me.wrapper.find(".tax-table"));
+ }
+ });
+ },
+
+ set_totals: function() {
+ var me = this;
+ this.wrapper.find(".net-total").text(format_currency(me.frm.doc.total, me.frm.doc.currency));
+ this.wrapper.find(".grand-total").text(format_currency(me.frm.doc.grand_total, me.frm.doc.currency));
+ },
+
+ set_primary_action: function() {
+ var me = this;
+
+ if (this.frm.doc.docstatus==0 && this.frm.doc.outstanding_amount > 0) {
+ this.page.set_primary_action(__("Pay"), function() {
+ me.validate()
+ me.create_invoice();
+ me.make_payment();
+ });
+ }else if(this.frm.doc.docstatus == 0){
+ this.page.set_primary_action(__("Submit"), function() {
+ frappe.confirm(__("Do you really want to submit the invoice?"), function () {
+ me.write_off_amount()
+ })
+ })
+ }else if(this.frm.doc.docstatus == 1){
+ this.page.set_primary_action(__("Print"), function() {
+ html = frappe.render(me.print_template, me.frm.doc)
+ frappe.require("/assets/js/print_format_v3.min.js", function() {
+ w = _p.preview(html);
+ setTimeout(function(){
+ w.print();
+ }, 1000)
+ });
+ })
+ }
+ },
+
+ write_off_amount: function(){
+ var me = this;
+ var value = 0.0;
+
+ if(this.frm.doc.outstanding_amount > 0){
+ dialog = new frappe.ui.Dialog({
+ title: 'Write Off Amount',
+ fields: [
+ {fieldtype: "Currency", fieldname: "write_off_amount", label: __("Amount"), reqd: 1},
+ ]
+ });
+
+ dialog.show();
+
+ dialog.fields_dict.write_off_amount.$input.change(function(){
+ value = dialog.get_values()
+ })
+
+ dialog.set_primary_action(__("Submit"), function(){
+ me.frm.doc.write_off_amount = value.write_off_amount;
+ me.calculate_outstanding_amount();
+ dialog.hide();
+ me.change_status();
+ })
+ }else{
+ me.change_status();
+ }
+ },
+
+ change_status: function(){
+ if(this.frm.doc.docstatus == 0){
+ this.frm.doc.docstatus = 1;
+ this.update_invoice();
+ this.disable_input_field();
+ }
+ },
+
+ disable_input_field: function(){
+ var pointer_events = 'inherit'
+ $(this.wrapper).find('input').attr("disabled", false);
+
+ if(this.frm.doc.docstatus == 1){
+ pointer_events = 'none'
+ $(this.wrapper).find('input').attr("disabled", true);
+ }
+
+ $(this.wrapper).find('.pos-bill-wrapper').css('pointer-events', pointer_events);
+ $(this.wrapper).find('.pos-items-section').css('pointer-events', pointer_events);
+ this.set_primary_action();
+ },
+
+ create_invoice: function(){
+ var me = this;
+ var invoice_data = {}
+ this.si_docs = this.get_doc_from_localstorage();
+ if(this.name){
+ this.update_invoice()
+ }else{
+ this.name = $.now();
+ invoice_data[this.name] = this.frm.doc
+ this.si_docs.push(invoice_data)
+ this.update_localstorage();
+ this.set_primary_action();
+ }
+ },
+
+ update_invoice: function(){
+ var me = this;
+ this.si_docs = this.get_doc_from_localstorage();
+ $.each(this.si_docs, function(index, data){
+ for(key in data){
+ if(key == me.name){
+ me.si_docs[index][key] = me.frm.doc
+ me.update_localstorage();
+ }
+ }
+ })
+ },
+
+ update_localstorage: function(){
+ try{
+ localStorage.setItem('sales_invoice_doc', JSON.stringify(this.si_docs));
+ }catch(e){
+ frappe.throw(__("LocalStorage is full , did not save"))
+ }
+ },
+
+ get_doc_from_localstorage: function(){
+ return JSON.parse(localStorage.getItem('sales_invoice_doc')) || [];
+ },
+
+ set_interval_for_si_sync: function(){
+ var me = this;
+ setInterval(function(){
+ me.sync_sales_invoice()
+ }, 6000)
+ },
+
+ sync_sales_invoice: function(){
+ var me = this;
+ this.si_docs = this.get_submitted_invoice()
+
+ if(this.connection_status && this.si_docs.length){
+ frappe.call({
+ method: "erpnext.accounts.doctype.sales_invoice.pos.make_invoice",
+ args: {
+ doc_list: me.si_docs
+ },
+ callback: function(r){
+ if(r.message){
+ me.removed_items = r.message;
+ me.remove_doc_from_localstorage();
+ }
+ }
+ })
+ }
+ },
+
+ get_submitted_invoice: function(){
+ invoices = []
+ docs = this.get_doc_from_localstorage()
+ if(docs){
+ invoices = $.map(docs, function(data){
+ for(key in data){
+ if(data[key].docstatus == 1){
+ return data
+ }
+ }
+ });
+ }
+
+ return invoices
+ },
+
+ remove_doc_from_localstorage: function(){
+ var me = this;
+ this.si_docs = this.get_doc_from_localstorage();
+ if(this.removed_items){
+ $.each(this.si_docs, function(index, data){
+ for(key in data){
+ if(in_list(me.removed_items, key)){
+ me.si_docs.splice(index)
+ }
+ }
+ })
+ this.update_localstorage();
+ }
+ },
+
+ validate: function(){
+ var me = this;
+ this.customer_validate();
+ this.item_validate();
+ },
+
+ item_validate: function(){
+ if(this.frm.doc.items.length == 0){
+ frappe.throw(__("Select items to save the invoice"))
+ }
+ },
+
+ validate_serial_no: function(){
+ var me = this;
+ var item_code = serial_no = '';
+ for (key in this.item_serial_no){
+ item_code = key;
+ serial_no = me.item_serial_no[key]
+ }
+
+ if(item_code && serial_no){
+ $.each(this.frm.doc.items, function(index, data){
+ if(data.item_code == item_code){
+ if(in_list(data.serial_no.split('\n'), serial_no)){
+ frappe.throw(__(repl("Serial no %(serial_no)s is already taken", {
+ 'serial_no': serial_no
+ })))
+ }
+ }
+ })
+ }
+ },
+
+ apply_pricing_rule: function(){
+ var me = this;
+ $.each(this.frm.doc["items"], function(n, item) {
+ pricing_rule = me.get_pricing_rule(item)
+ me.validate_pricing_rule(pricing_rule)
+ if(pricing_rule.length){
+ item.margin_type = pricing_rule[0].margin_type;
+ item.price_list_rate = pricing_rule[0].price || item.price_list_rate;
+ item.margin_rate_or_amount = pricing_rule[0].margin_rate_or_amount;
+ item.discount_percentage = pricing_rule[0].discount_percentage || 0.0;
+ me.apply_pricing_rule_on_item(item)
+ }
+ })
+ },
+
+ get_pricing_rule: function(item){
+ var me = this;
+ return $.grep(this.pricing_rules, function(data){
+ if(data.item_code == item.item_code || in_list(['All Item Groups', item.item_group], data.item_group)) {
+ if(in_list(['Customer', 'Customer Group', 'Territory'], data.applicable_for)){
+ return me.validate_condition(data)
+ }else{
+ return true
+ }
+ }
+ })
+ },
+
+ validate_condition: function(data){
+ //This method check condition based on applicable for
+ condition = this.get_mapper_for_pricing_rule(data)[data.applicable_for]
+ if(in_list(condition[1], condition[0])){
+ return true
+ }
+ },
+
+ get_mapper_for_pricing_rule: function(data){
+ return {
+ 'Customer': [data.customer, [this.doc.customer]],
+ 'Customer Group': [data.customer_group, [this.doc.customer_group, 'All Customer Groups']],
+ 'Territory': [data.territory, [this.doc.territory, 'All Territories']],
+ }
+ },
+
+ validate_pricing_rule: function(pricing_rule){
+ //This method validate duplicate pricing rule
+ var pricing_rule_name = '';
+ var priority = 0;
+ var pricing_rule_list = [];
+ var priority_list = []
+
+ if(pricing_rule.length > 1){
+
+ $.each(pricing_rule, function(index, data){
+ pricing_rule_name += data.name + ','
+ priority_list.push(data.priority)
+ if(priority <= data.priority){
+ priority = data.priority
+ pricing_rule_list.push(data)
+ }
+ })
+
+ count = 0
+ $.each(priority_list, function(index, value){
+ if(value == priority){
+ count++
+ }
+ })
+
+ if(priority == 0 || count > 1){
+ frappe.throw(__(repl("Multiple Price Rules exists with same criteria, please resolve conflict by assigning priority. Price Rules: %(pricing_rule)s", {
+ 'pricing_rule': pricing_rule_name
+ })))
+ }
+
+ return pricing_rule_list
+ }
+ },
+
+ validate_warehouse: function(){
+ if(!this.items[0].default_warehouse){
+ frappe.throw(__("Deafault warehouse is required for selected item"))
+ }
+ }
+})
\ No newline at end of file
diff --git a/erpnext/accounts/party_status.py b/erpnext/accounts/party_status.py
index ff095b1..5a638e5 100644
--- a/erpnext/accounts/party_status.py
+++ b/erpnext/accounts/party_status.py
@@ -37,6 +37,7 @@
party = frappe.get_doc(party_type, name)
filters = get_filters_for(doc.doctype)
+ party.flags.ignore_mandatory = True
status = None
if filters:
diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.html b/erpnext/accounts/report/accounts_payable/accounts_payable.html
index d3020b2..07f9e47 100644
--- a/erpnext/accounts/report/accounts_payable/accounts_payable.html
+++ b/erpnext/accounts/report/accounts_payable/accounts_payable.html
@@ -1 +1 @@
-{% include "accounts/report/accounts_receivable/accounts_receivable.html" %}
+{% include "erpnext/accounts/report/accounts_receivable/accounts_receivable.html" %}
diff --git a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.html b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.html
index d3020b2..07f9e47 100644
--- a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.html
+++ b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.html
@@ -1 +1 @@
-{% include "accounts/report/accounts_receivable/accounts_receivable.html" %}
+{% include "erpnext/accounts/report/accounts_receivable/accounts_receivable.html" %}
diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.html b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.html
index d3020b2..07f9e47 100644
--- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.html
+++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.html
@@ -1 +1 @@
-{% include "accounts/report/accounts_receivable/accounts_receivable.html" %}
+{% include "erpnext/accounts/report/accounts_receivable/accounts_receivable.html" %}
diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.html b/erpnext/accounts/report/balance_sheet/balance_sheet.html
index d4ae54d..14dc0a6 100644
--- a/erpnext/accounts/report/balance_sheet/balance_sheet.html
+++ b/erpnext/accounts/report/balance_sheet/balance_sheet.html
@@ -1 +1 @@
-{% include "accounts/report/financial_statements.html" %}
+{% include "erpnext/accounts/report/financial_statements.html" %}
diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.js b/erpnext/accounts/report/balance_sheet/balance_sheet.js
index 933b40e..a20d47c 100644
--- a/erpnext/accounts/report/balance_sheet/balance_sheet.js
+++ b/erpnext/accounts/report/balance_sheet/balance_sheet.js
@@ -1,6 +1,8 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/financial_statements.js");
+frappe.require("assets/erpnext/js/financial_statements.js", function() {
+ frappe.query_reports["Balance Sheet"] = erpnext.financial_statements;
+});
-frappe.query_reports["Balance Sheet"] = erpnext.financial_statements;
+
diff --git a/erpnext/accounts/report/cash_flow/cash_flow.js b/erpnext/accounts/report/cash_flow/cash_flow.js
index 464bd17..f5ddd15 100644
--- a/erpnext/accounts/report/cash_flow/cash_flow.js
+++ b/erpnext/accounts/report/cash_flow/cash_flow.js
@@ -1,12 +1,12 @@
// Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
-frappe.require("assets/erpnext/js/financial_statements.js");
+frappe.require("assets/erpnext/js/financial_statements.js", function() {
+ frappe.query_reports["Cash Flow"] = erpnext.financial_statements;
-frappe.query_reports["Cash Flow"] = erpnext.financial_statements;
-
-frappe.query_reports["Cash Flow"]["filters"].push({
- "fieldname": "accumulated_values",
- "label": __("Accumulated Values"),
- "fieldtype": "Check"
-})
\ No newline at end of file
+ frappe.query_reports["Cash Flow"]["filters"].push({
+ "fieldname": "accumulated_values",
+ "label": __("Accumulated Values"),
+ "fieldtype": "Check"
+ });
+});
\ No newline at end of file
diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js
index 941aa87..bad826e 100644
--- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js
+++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js
@@ -34,6 +34,12 @@
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("Company")
+ },
+ {
+ "fieldname":"mode_of_payment",
+ "label": __("Mode of Payment"),
+ "fieldtype": "Link",
+ "options": "Mode of Payment"
}
]
}
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 f1e706e..d6bbee5 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
@@ -14,7 +14,7 @@
item_list = get_items(filters)
aii_account_map = get_aii_accounts()
if item_list:
- item_tax, tax_accounts = get_tax_accounts(item_list, columns)
+ item_row_tax, tax_accounts = get_tax_accounts(item_list, columns)
columns.append({
"fieldname": "currency",
@@ -23,7 +23,7 @@
"width": 80
})
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
- print company_currency
+
data = []
for d in item_list:
purchase_receipt = None
@@ -35,11 +35,11 @@
expense_account = d.expense_account or aii_account_map.get(d.company)
row = [d.item_code, d.item_name, d.item_group, d.parent, d.posting_date, d.supplier,
- d.supplier_name, d.credit_to, d.project, d.company, d.purchase_order,
+ d.supplier_name, d.credit_to, d.mode_of_payment, d.project, d.company, d.purchase_order,
purchase_receipt, expense_account, d.qty, d.base_net_rate, d.base_net_amount]
for tax in tax_accounts:
- row.append(item_tax.get(d.parent, {}).get(d.item_code, {}).get(tax, 0))
+ row.append(item_row_tax.get(d.name, {}).get(tax, 0))
total_tax = sum(row[last_col:])
row += [total_tax, d.base_net_amount + total_tax, company_currency]
@@ -53,7 +53,8 @@
return [_("Item Code") + ":Link/Item:120", _("Item Name") + "::120",
_("Item Group") + ":Link/Item Group:100", _("Invoice") + ":Link/Purchase Invoice:120",
_("Posting Date") + ":Date:80", _("Supplier") + ":Link/Supplier:120",
- "Supplier Name::120", "Payable Account:Link/Account:120", _("Project") + ":Link/Project:80",
+ "Supplier Name::120", "Payable Account:Link/Account:120",
+ _("Mode of Payment") + ":Link/Mode of Payment:80", _("Project") + ":Link/Project:80",
_("Company") + ":Link/Company:100", _("Purchase Order") + ":Link/Purchase Order:100",
_("Purchase Receipt") + ":Link/Purchase Receipt:100", _("Expense Account") + ":Link/Account:140",
_("Qty") + ":Float:120", _("Rate") + ":Currency/currency:120", _("Amount") + ":Currency/currency:120"
@@ -66,7 +67,8 @@
("supplier", " and pi.supplier = %(supplier)s"),
("item_code", " and pi_item.item_code = %(item_code)s"),
("from_date", " and pi.posting_date>=%(from_date)s"),
- ("to_date", " and pi.posting_date<=%(to_date)s")):
+ ("to_date", " and pi.posting_date<=%(to_date)s"),
+ ("mode_of_payment", " and ifnull(mode_of_payment, '') = %(mode_of_payment)s")):
if filters.get(opts[0]):
conditions += opts[1]
@@ -76,29 +78,40 @@
conditions = get_conditions(filters)
match_conditions = frappe.build_match_conditions("Purchase Invoice")
- return frappe.db.sql("""select pi_item.parent, pi.posting_date, pi.credit_to, pi.company,
- pi.supplier, pi.remarks, pi.base_net_total, pi_item.item_code, pi_item.item_name, pi_item.item_group,
- pi_item.project, pi_item.purchase_order, pi_item.purchase_receipt, pi_item.po_detail,
- pi_item.expense_account, pi_item.qty, pi_item.base_net_rate, pi_item.base_net_amount, pi.supplier_name
+ return frappe.db.sql("""
+ select
+ pi_item.name, pi_item.parent, pi.posting_date, pi.credit_to, pi.company,
+ pi.supplier, pi.remarks, pi.base_net_total, pi_item.item_code, pi_item.item_name,
+ pi_item.item_group, pi_item.project, pi_item.purchase_order, pi_item.purchase_receipt,
+ pi_item.po_detail, pi_item.expense_account, pi_item.qty, pi_item.base_net_rate,
+ pi_item.base_net_amount, pi.supplier_name, pi.mode_of_payment
from `tabPurchase Invoice` pi, `tabPurchase Invoice Item` pi_item
where pi.name = pi_item.parent and pi.docstatus = 1 %s %s
- order by pi.posting_date desc, pi_item.item_code desc""" % (conditions, match_conditions), filters, as_dict=1)
+ order by pi.posting_date desc, pi_item.item_code desc
+ """ % (conditions, match_conditions), filters, as_dict=1)
def get_aii_accounts():
return dict(frappe.db.sql("select name, stock_received_but_not_billed from tabCompany"))
def get_tax_accounts(item_list, columns):
import json
- item_tax = {}
+ item_row_tax = {}
tax_accounts = []
- invoice_wise_items = {}
+ invoice_item_row = {}
+ item_row_map = {}
for d in item_list:
- invoice_wise_items.setdefault(d.parent, []).append(d)
+ invoice_item_row.setdefault(d.parent, []).append(d)
+ item_row_map.setdefault(d.parent, {}).setdefault(d.item_code, []).append(d)
- tax_details = frappe.db.sql("""select parent, account_head, item_wise_tax_detail, charge_type, base_tax_amount_after_discount_amount
- from `tabPurchase Taxes and Charges` where parenttype = 'Purchase Invoice'
- and docstatus = 1 and (account_head is not null and account_head != '') and category in ('Total', 'Valuation and Total')
- and parent in (%s)""" % ', '.join(['%s']*len(invoice_wise_items)), tuple(invoice_wise_items.keys()))
+ tax_details = frappe.db.sql("""
+ select
+ parent, account_head, item_wise_tax_detail, charge_type, base_tax_amount_after_discount_amount
+ from `tabPurchase Taxes and Charges`
+ where parenttype = 'Purchase Invoice' and docstatus = 1
+ and (account_head is not null and account_head != '')
+ and category in ('Total', 'Valuation and Total')
+ and parent in (%s)
+ """ % ', '.join(['%s']*len(invoice_item_row)), tuple(invoice_item_row.keys()))
for parent, account_head, item_wise_tax_detail, charge_type, tax_amount in tax_details:
if account_head not in tax_accounts:
@@ -107,19 +120,26 @@
if item_wise_tax_detail:
try:
item_wise_tax_detail = json.loads(item_wise_tax_detail)
- for item, tax_amount in item_wise_tax_detail.items():
- item_tax.setdefault(parent, {}).setdefault(item, {})[account_head] = \
- flt(tax_amount[1]) if isinstance(tax_amount, list) else flt(tax_amount)
-
+
+ for item_code, tax_amount in item_wise_tax_detail.items():
+ tax_amount = flt(tax_amount[1]) if isinstance(tax_amount, list) else flt(tax_amount)
+
+ item_net_amount = sum([flt(d.base_net_amount)
+ for d in item_row_map.get(parent, {}).get(item_code, [])])
+
+ for d in item_row_map.get(parent, {}).get(item_code, []):
+ item_tax_amount = flt((tax_amount * d.base_net_amount) / item_net_amount) if item_net_amount else 0
+ item_row_tax.setdefault(d.name, {})[account_head] = item_tax_amount
+
except ValueError:
continue
elif charge_type == "Actual" and tax_amount:
- for d in invoice_wise_items.get(parent, []):
- item_tax.setdefault(parent, {}).setdefault(d.item_code, {})[account_head] = \
- (tax_amount * d.base_net_amount) / d.base_net_total
+ for d in invoice_item_row.get(parent, []):
+ item_row_tax.setdefault(d.name, {})[account_head] = \
+ flt((tax_amount * d.base_net_amount) / d.base_net_total)
tax_accounts.sort()
columns += [account_head + ":Currency/currency:80" for account_head in tax_accounts]
columns += ["Total Tax:Currency/currency:80", "Total:Currency/currency:80"]
- return item_tax, tax_accounts
+ return item_row_tax, tax_accounts
diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.js b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.js
index d322406..142a55f 100644
--- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.js
+++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.js
@@ -28,6 +28,12 @@
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("Company")
+ },
+ {
+ "fieldname":"mode_of_payment",
+ "label": __("Mode of Payment"),
+ "fieldtype": "Link",
+ "options": "Mode of Payment"
}
]
}
diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
index 2401202..6fc7349 100644
--- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
+++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
@@ -13,7 +13,7 @@
item_list = get_items(filters)
if item_list:
- item_tax, tax_accounts = get_tax_accounts(item_list, columns)
+ item_row_tax, tax_accounts = get_tax_accounts(item_list, columns)
columns.append({
"fieldname": "currency",
"label": _("Currency"),
@@ -32,11 +32,11 @@
from `tabDelivery Note Item` where docstatus=1 and so_detail=%s""", d.so_detail))
row = [d.item_code, d.item_name, d.item_group, d.parent, d.posting_date, d.customer, d.customer_name,
- d.customer_group, d.debit_to, d.territory, d.project, d.company, d.sales_order,
+ d.customer_group, d.debit_to, d.mode_of_payment, d.territory, d.project, d.company, d.sales_order,
delivery_note, d.income_account, d.qty, d.base_net_rate, d.base_net_amount]
for tax in tax_accounts:
- row.append(item_tax.get(d.parent, {}).get(d.item_code, {}).get(tax, 0))
+ row.append(item_row_tax.get(d.name, {}).get(tax, 0))
total_tax = sum(row[last_col:])
row += [total_tax, d.base_net_amount + total_tax, company_currency]
@@ -51,7 +51,8 @@
_("Item Group") + ":Link/Item Group:100", _("Invoice") + ":Link/Sales Invoice:120",
_("Posting Date") + ":Date:80", _("Customer") + ":Link/Customer:120",
_("Customer Name") + "::120", _("Customer Group") + ":Link/Customer Group:120",
- _("Receivable Account") + ":Link/Account:120", _("Territory") + ":Link/Territory:80",
+ _("Receivable Account") + ":Link/Account:120",
+ _("Mode of Payment") + ":Link/Mode of Payment:80", _("Territory") + ":Link/Territory:80",
_("Project") + ":Link/Project:80", _("Company") + ":Link/Company:100",
_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100",
_("Income Account") + ":Link/Account:140", _("Qty") + ":Float:120",
@@ -65,7 +66,8 @@
("customer", " and si.customer = %(customer)s"),
("item_code", " and si_item.item_code = %(item_code)s"),
("from_date", " and si.posting_date>=%(from_date)s"),
- ("to_date", " and si.posting_date<=%(to_date)s")):
+ ("to_date", " and si.posting_date<=%(to_date)s"),
+ ("mode_of_payment", " and ifnull(mode_of_payment, '') = %(mode_of_payment)s")):
if filters.get(opts[0]):
conditions += opts[1]
@@ -73,49 +75,66 @@
def get_items(filters):
conditions = get_conditions(filters)
- return frappe.db.sql("""select si_item.parent, si.posting_date, si.debit_to, si.project,
- si.customer, si.remarks, si.territory, si.company, si.base_net_total, si_item.item_code, si_item.item_name,
- si_item.item_group, si_item.sales_order, si_item.delivery_note, si_item.income_account,
- si_item.qty, si_item.base_net_rate, si_item.base_net_amount, si.customer_name,
- si.customer_group, si_item.so_detail
+ return frappe.db.sql("""
+ select
+ si_item.name, si_item.parent, si.posting_date, si.debit_to, si.project,
+ si.customer, si.remarks, si.territory, si.company, si.base_net_total,
+ si_item.item_code, si_item.item_name, si_item.item_group, si_item.sales_order,
+ si_item.delivery_note, si_item.income_account, si_item.qty,
+ si_item.base_net_rate, si_item.base_net_amount, si.customer_name,
+ si.customer_group, si_item.so_detail, si.mode_of_payment
from `tabSales Invoice` si, `tabSales Invoice Item` si_item
where si.name = si_item.parent and si.docstatus = 1 %s
order by si.posting_date desc, si_item.item_code desc""" % conditions, filters, as_dict=1)
def get_tax_accounts(item_list, columns):
import json
- item_tax = {}
+ item_row_tax = {}
tax_accounts = []
- invoice_wise_items = {}
+ invoice_item_row = {}
+ item_row_map = {}
for d in item_list:
- invoice_wise_items.setdefault(d.parent, []).append(d)
+ invoice_item_row.setdefault(d.parent, []).append(d)
+ item_row_map.setdefault(d.parent, {}).setdefault(d.item_code, []).append(d)
- tax_details = frappe.db.sql("""select parent, account_head, item_wise_tax_detail,
- charge_type, base_tax_amount_after_discount_amount
- from `tabSales Taxes and Charges` where parenttype = 'Sales Invoice'
- and docstatus = 1 and (account_head is not null and account_head != '')
- and parent in (%s)""" % ', '.join(['%s']*len(invoice_wise_items)),
- tuple(invoice_wise_items.keys()))
+ tax_details = frappe.db.sql("""
+ select
+ parent, account_head, item_wise_tax_detail,
+ charge_type, base_tax_amount_after_discount_amount
+ from `tabSales Taxes and Charges`
+ where
+ parenttype = 'Sales Invoice' and docstatus = 1
+ and (account_head is not null and account_head != '')
+ and parent in (%s)
+ """ % ', '.join(['%s']*len(invoice_item_row)), tuple(invoice_item_row.keys()))
for parent, account_head, item_wise_tax_detail, charge_type, tax_amount in tax_details:
if account_head not in tax_accounts:
tax_accounts.append(account_head)
-
+
if item_wise_tax_detail:
try:
item_wise_tax_detail = json.loads(item_wise_tax_detail)
- for item, tax_amount in item_wise_tax_detail.items():
- item_tax.setdefault(parent, {}).setdefault(item, {})[account_head] = \
- flt(tax_amount[1]) if isinstance(tax_amount, list) else flt(tax_amount)
+
+ for item_code, tax_amount in item_wise_tax_detail.items():
+ tax_amount = flt(tax_amount[1]) if isinstance(tax_amount, list) else flt(tax_amount)
+
+ item_net_amount = sum([flt(d.base_net_amount)
+ for d in item_row_map.get(parent, {}).get(item_code, [])])
+
+ for d in item_row_map.get(parent, {}).get(item_code, []):
+ item_tax_amount = flt((tax_amount * d.base_net_amount) / item_net_amount) if item_net_amount else 0
+ item_row_tax.setdefault(d.name, {})[account_head] = item_tax_amount
+
except ValueError:
continue
elif charge_type == "Actual" and tax_amount:
- for d in invoice_wise_items.get(parent, []):
- item_tax.setdefault(parent, {}).setdefault(d.item_code, {})[account_head] = \
+ for d in invoice_item_row.get(parent, []):
+ item_row_tax.setdefault(d.name, {})[account_head] = \
flt((tax_amount * d.base_net_amount) / d.base_net_total)
tax_accounts.sort()
columns += [account_head + ":Currency/currency:80" for account_head in tax_accounts]
columns += ["Total Tax:Currency/currency:80", "Total:Currency/currency:80"]
- return item_tax, tax_accounts
+ return item_row_tax, tax_accounts
diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.html b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.html
index d4ae54d..14dc0a6 100644
--- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.html
+++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.html
@@ -1 +1 @@
-{% include "accounts/report/financial_statements.html" %}
+{% include "erpnext/accounts/report/financial_statements.html" %}
diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.js b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.js
index 98a972b..91ec9d9 100644
--- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.js
+++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.js
@@ -1,15 +1,12 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/financial_statements.js");
+frappe.require("assets/erpnext/js/financial_statements.js", function() {
+ frappe.query_reports["Profit and Loss Statement"] = $.extend({}, erpnext.financial_statements);
-frappe.query_reports["Profit and Loss Statement"] = $.extend({}, erpnext.financial_statements);
-
-frappe.query_reports["Profit and Loss Statement"]["filters"].push({
- "fieldname": "accumulated_values",
- "label": __("Accumulated Values"),
- "fieldtype": "Check"
-});
-
-console.log(frappe.query_reports["Profit and Loss Statement"]);
-
+ frappe.query_reports["Profit and Loss Statement"]["filters"].push({
+ "fieldname": "accumulated_values",
+ "label": __("Accumulated Values"),
+ "fieldtype": "Check"
+ });
+});
\ No newline at end of file
diff --git a/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.js b/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.js
index 4b34ae5..cc00b2a 100644
--- a/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.js
+++ b/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.js
@@ -1,8 +1,8 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/purchase_trends_filters.js");
-
-frappe.query_reports["Purchase Invoice Trends"] = {
- filters: get_filters()
- }
\ No newline at end of file
+frappe.require("assets/erpnext/js/purchase_trends_filters.js", function() {
+ frappe.query_reports["Purchase Invoice Trends"] = {
+ filters: get_filters()
+ }
+});
\ No newline at end of file
diff --git a/erpnext/accounts/report/purchase_register/purchase_register.js b/erpnext/accounts/report/purchase_register/purchase_register.js
index 15300c3..d32f7b6 100644
--- a/erpnext/accounts/report/purchase_register/purchase_register.js
+++ b/erpnext/accounts/report/purchase_register/purchase_register.js
@@ -28,6 +28,12 @@
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("Company")
+ },
+ {
+ "fieldname":"mode_of_payment",
+ "label": __("Mode of Payment"),
+ "fieldtype": "Link",
+ "options": "Mode of Payment"
}
]
}
diff --git a/erpnext/accounts/report/purchase_register/purchase_register.py b/erpnext/accounts/report/purchase_register/purchase_register.py
index 7934bf2..9a90f2f 100644
--- a/erpnext/accounts/report/purchase_register/purchase_register.py
+++ b/erpnext/accounts/report/purchase_register/purchase_register.py
@@ -33,7 +33,7 @@
row = [inv.name, inv.posting_date, inv.supplier, inv.supplier_name,
supplier_details.get(inv.supplier),
- inv.credit_to, ", ".join(project), inv.bill_no, inv.bill_date, inv.remarks,
+ inv.credit_to, inv.mode_of_payment, ", ".join(project), inv.bill_no, inv.bill_date, inv.remarks,
", ".join(purchase_order), ", ".join(purchase_receipt), company_currency]
# map expense values
@@ -64,10 +64,10 @@
def get_columns(invoice_list):
"""return columns based on filters"""
columns = [
- _("Invoice") + ":Link/Purchase Invoice:120",
- _("Posting Date") + ":Date:80", _("Supplier Id") + "::120",
- _("Supplier Name") + "::120", _("Supplier Type") + ":Link/Supplier Type:120",
- _("Payable Account") + ":Link/Account:120", _("Project") + ":Link/Project:80",
+ _("Invoice") + ":Link/Purchase Invoice:120", _("Posting Date") + ":Date:80",
+ _("Supplier Id") + "::120", _("Supplier Name") + "::120",
+ _("Supplier Type") + ":Link/Supplier Type:120", _("Payable Account") + ":Link/Account:120",
+ _("Mode of Payment") + ":Link/Mode of Payment:80", _("Project") + ":Link/Project:80",
_("Bill No") + "::120", _("Bill Date") + ":Date:80", _("Remarks") + "::150",
_("Purchase Order") + ":Link/Purchase Order:100",
_("Purchase Receipt") + ":Link/Purchase Receipt:100",
@@ -114,21 +114,29 @@
if filters.get("from_date"): conditions += " and posting_date>=%(from_date)s"
if filters.get("to_date"): conditions += " and posting_date<=%(to_date)s"
+
+ if filters.get("mode_of_payment"): conditions += " and ifnull(mode_of_payment, '') = %(mode_of_payment)s"
return conditions
def get_invoices(filters):
conditions = get_conditions(filters)
- return frappe.db.sql("""select name, posting_date, credit_to, supplier, supplier_name,
- bill_no, bill_date, remarks, base_net_total, base_grand_total, outstanding_amount
- from `tabPurchase Invoice` where docstatus = 1 %s
+ return frappe.db.sql("""
+ select
+ name, posting_date, credit_to, supplier, supplier_name, bill_no, bill_date, remarks,
+ base_net_total, base_grand_total, outstanding_amount, mode_of_payment
+ from `tabPurchase Invoice`
+ where docstatus = 1 %s
order by posting_date desc, name desc""" % conditions, filters, as_dict=1)
def get_invoice_expense_map(invoice_list):
- expense_details = frappe.db.sql("""select parent, expense_account, sum(base_net_amount) as amount
- from `tabPurchase Invoice Item` where parent in (%s) group by parent, expense_account""" %
- ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)
+ expense_details = frappe.db.sql("""
+ select parent, expense_account, sum(base_net_amount) as amount
+ from `tabPurchase Invoice Item`
+ where parent in (%s)
+ group by parent, expense_account
+ """ % ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)
invoice_expense_map = {}
for d in expense_details:
@@ -138,9 +146,12 @@
return invoice_expense_map
def get_invoice_tax_map(invoice_list, invoice_expense_map, expense_accounts):
- tax_details = frappe.db.sql("""select parent, account_head, sum(base_tax_amount_after_discount_amount) as tax_amount
- from `tabPurchase Taxes and Charges` where parent in (%s) group by parent, account_head""" %
- ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)
+ tax_details = frappe.db.sql("""
+ select parent, account_head, sum(base_tax_amount_after_discount_amount) as tax_amount
+ from `tabPurchase Taxes and Charges`
+ where parent in (%s) and category in ('Total', 'Valuation and Total')
+ group by parent, account_head
+ """ % ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)
invoice_tax_map = {}
for d in tax_details:
@@ -156,10 +167,11 @@
return invoice_expense_map, invoice_tax_map
def get_invoice_po_pr_map(invoice_list):
- pi_items = frappe.db.sql("""select parent, purchase_order, purchase_receipt, po_detail,
- project from `tabPurchase Invoice Item` where parent in (%s)
- and (ifnull(purchase_order, '') != '' or ifnull(purchase_receipt, '') != '')""" %
- ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)
+ pi_items = frappe.db.sql("""
+ select parent, purchase_order, purchase_receipt, po_detail, project
+ from `tabPurchase Invoice Item`
+ where parent in (%s) and (ifnull(purchase_order, '') != '' or ifnull(purchase_receipt, '') != '')
+ """ % ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)
invoice_po_pr_map = {}
for d in pi_items:
diff --git a/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.js b/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.js
index 471e7ba..0f92223 100644
--- a/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.js
+++ b/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.js
@@ -1,8 +1,8 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/sales_trends_filters.js");
-
-frappe.query_reports["Sales Invoice Trends"] = {
- filters: get_filters()
- }
\ No newline at end of file
+frappe.require("assets/erpnext/js/sales_trends_filters.js", function() {
+ frappe.query_reports["Sales Invoice Trends"] = {
+ filters: get_filters()
+ }
+});
\ No newline at end of file
diff --git a/erpnext/accounts/report/sales_register/sales_register.js b/erpnext/accounts/report/sales_register/sales_register.js
index 4764255..d7aac5a 100644
--- a/erpnext/accounts/report/sales_register/sales_register.js
+++ b/erpnext/accounts/report/sales_register/sales_register.js
@@ -28,6 +28,12 @@
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("Company")
+ },
+ {
+ "fieldname":"mode_of_payment",
+ "label": __("Mode of Payment"),
+ "fieldtype": "Link",
+ "options": "Mode of Payment"
}
]
}
diff --git a/erpnext/accounts/report/sales_register/sales_register.py b/erpnext/accounts/report/sales_register/sales_register.py
index d09cfc1..663c5c9 100644
--- a/erpnext/accounts/report/sales_register/sales_register.py
+++ b/erpnext/accounts/report/sales_register/sales_register.py
@@ -33,7 +33,7 @@
row = [inv.name, inv.posting_date, inv.customer, inv.customer_name,
customer_map.get(inv.customer, {}).get("customer_group"),
customer_map.get(inv.customer, {}).get("territory"),
- inv.debit_to, inv.project, inv.remarks,
+ inv.debit_to, inv.mode_of_payment, inv.project, inv.remarks,
", ".join(sales_order), ", ".join(delivery_note), company_currency]
# map income values
@@ -65,9 +65,11 @@
def get_columns(invoice_list):
"""return columns based on filters"""
columns = [
- _("Invoice") + ":Link/Sales Invoice:120", _("Posting Date") + ":Date:80", _("Customer Id") + "::120",
- _("Customer Name") + "::120", _("Customer Group") + ":Link/Customer Group:120", _("Territory") + ":Link/Territory:80",
- _("Receivable Account") + ":Link/Account:120", _("Project") +":Link/Project:80", _("Remarks") + "::150",
+ _("Invoice") + ":Link/Sales Invoice:120", _("Posting Date") + ":Date:80",
+ _("Customer Id") + "::120", _("Customer Name") + "::120",
+ _("Customer Group") + ":Link/Customer Group:120", _("Territory") + ":Link/Territory:80",
+ _("Receivable Account") + ":Link/Account:120", _("Mode of Payment") + ":Link/Mode of Payment:80",
+ _("Project") +":Link/Project:80", _("Remarks") + "::150",
_("Sales Order") + ":Link/Sales Order:100", _("Delivery Note") + ":Link/Delivery Note:100",
{
"fieldname": "currency",
@@ -110,13 +112,15 @@
if filters.get("from_date"): conditions += " and posting_date >= %(from_date)s"
if filters.get("to_date"): conditions += " and posting_date <= %(to_date)s"
+
+ if filters.get("mode_of_payment"): conditions += " and ifnull(mode_of_payment, '') = %(mode_of_payment)s"
return conditions
def get_invoices(filters):
conditions = get_conditions(filters)
- return frappe.db.sql("""select name, posting_date, debit_to, project, customer,
- customer_name, remarks, base_net_total, base_grand_total, base_rounded_total, outstanding_amount
+ return frappe.db.sql("""select name, posting_date, debit_to, project, customer, customer_name, remarks,
+ base_net_total, base_grand_total, base_rounded_total, outstanding_amount, mode_of_payment
from `tabSales Invoice`
where docstatus = 1 %s order by posting_date desc, name desc""" %
conditions, filters, as_dict=1)
diff --git a/erpnext/accounts/report/trial_balance/trial_balance.html b/erpnext/accounts/report/trial_balance/trial_balance.html
index d4ae54d..14dc0a6 100644
--- a/erpnext/accounts/report/trial_balance/trial_balance.html
+++ b/erpnext/accounts/report/trial_balance/trial_balance.html
@@ -1 +1 @@
-{% include "accounts/report/financial_statements.html" %}
+{% include "erpnext/accounts/report/financial_statements.html" %}
diff --git a/erpnext/accounts/report/trial_balance/trial_balance.js b/erpnext/accounts/report/trial_balance/trial_balance.js
index 97c8f6c..a20b1cb 100644
--- a/erpnext/accounts/report/trial_balance/trial_balance.js
+++ b/erpnext/accounts/report/trial_balance/trial_balance.js
@@ -1,65 +1,66 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/financial_statements.js");
-
-frappe.query_reports["Trial Balance"] = {
- "filters": [
- {
- "fieldname": "company",
- "label": __("Company"),
- "fieldtype": "Link",
- "options": "Company",
- "default": frappe.defaults.get_user_default("Company"),
- "reqd": 1
- },
- {
- "fieldname": "fiscal_year",
- "label": __("Fiscal Year"),
- "fieldtype": "Link",
- "options": "Fiscal Year",
- "default": frappe.defaults.get_user_default("fiscal_year"),
- "reqd": 1,
- "on_change": function(query_report) {
- var fiscal_year = query_report.get_values().fiscal_year;
- if (!fiscal_year) {
- return;
+frappe.require("assets/erpnext/js/financial_statements.js", function() {
+ frappe.query_reports["Trial Balance"] = {
+ "filters": [
+ {
+ "fieldname": "company",
+ "label": __("Company"),
+ "fieldtype": "Link",
+ "options": "Company",
+ "default": frappe.defaults.get_user_default("Company"),
+ "reqd": 1
+ },
+ {
+ "fieldname": "fiscal_year",
+ "label": __("Fiscal Year"),
+ "fieldtype": "Link",
+ "options": "Fiscal Year",
+ "default": frappe.defaults.get_user_default("fiscal_year"),
+ "reqd": 1,
+ "on_change": function(query_report) {
+ var fiscal_year = query_report.get_values().fiscal_year;
+ if (!fiscal_year) {
+ return;
+ }
+ frappe.model.with_doc("Fiscal Year", fiscal_year, function(r) {
+ var fy = frappe.model.get_doc("Fiscal Year", fiscal_year);
+ query_report.filters_by_name.from_date.set_input(fy.year_start_date);
+ query_report.filters_by_name.to_date.set_input(fy.year_end_date);
+ query_report.trigger_refresh();
+ });
}
- frappe.model.with_doc("Fiscal Year", fiscal_year, function(r) {
- var fy = frappe.model.get_doc("Fiscal Year", fiscal_year);
- query_report.filters_by_name.from_date.set_input(fy.year_start_date);
- query_report.filters_by_name.to_date.set_input(fy.year_end_date);
- query_report.trigger_refresh();
- });
- }
- },
- {
- "fieldname": "from_date",
- "label": __("From Date"),
- "fieldtype": "Date",
- "default": frappe.defaults.get_user_default("year_start_date"),
- },
- {
- "fieldname": "to_date",
- "label": __("To Date"),
- "fieldtype": "Date",
- "default": frappe.defaults.get_user_default("year_end_date"),
- },
- {
- "fieldname": "with_period_closing_entry",
- "label": __("Period Closing Entry"),
- "fieldtype": "Check",
- "default": 1
- },
- {
- "fieldname": "show_zero_values",
- "label": __("Show zero values"),
- "fieldtype": "Check"
- },
- ],
- "formatter": erpnext.financial_statements.formatter,
- "tree": true,
- "name_field": "account",
- "parent_field": "parent_account",
- "initial_depth": 3
-}
+ },
+ {
+ "fieldname": "from_date",
+ "label": __("From Date"),
+ "fieldtype": "Date",
+ "default": frappe.defaults.get_user_default("year_start_date"),
+ },
+ {
+ "fieldname": "to_date",
+ "label": __("To Date"),
+ "fieldtype": "Date",
+ "default": frappe.defaults.get_user_default("year_end_date"),
+ },
+ {
+ "fieldname": "with_period_closing_entry",
+ "label": __("Period Closing Entry"),
+ "fieldtype": "Check",
+ "default": 1
+ },
+ {
+ "fieldname": "show_zero_values",
+ "label": __("Show zero values"),
+ "fieldtype": "Check"
+ },
+ ],
+ "formatter": erpnext.financial_statements.formatter,
+ "tree": true,
+ "name_field": "account",
+ "parent_field": "parent_account",
+ "initial_depth": 3
+ }
+});
+
diff --git a/erpnext/accounts/report/trial_balance/trial_balance.py b/erpnext/accounts/report/trial_balance/trial_balance.py
index e53d47e..a51e9b0 100644
--- a/erpnext/accounts/report/trial_balance/trial_balance.py
+++ b/erpnext/accounts/report/trial_balance/trial_balance.py
@@ -161,6 +161,8 @@
def prepare_data(accounts, filters, total_row, parent_children_map):
data = []
+ company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
+
for d in accounts:
has_value = False
row = {
@@ -169,7 +171,8 @@
"parent_account": d.parent_account,
"indent": d.indent,
"from_date": filters.from_date,
- "to_date": filters.to_date
+ "to_date": filters.to_date,
+ "currency": company_currency
}
prepare_opening_and_closing(d)
@@ -201,37 +204,50 @@
"fieldname": "opening_debit",
"label": _("Opening (Dr)"),
"fieldtype": "Currency",
+ "options": "currency",
"width": 120
},
{
"fieldname": "opening_credit",
"label": _("Opening (Cr)"),
"fieldtype": "Currency",
+ "options": "currency",
"width": 120
},
{
"fieldname": "debit",
"label": _("Debit"),
"fieldtype": "Currency",
+ "options": "currency",
"width": 120
},
{
"fieldname": "credit",
"label": _("Credit"),
"fieldtype": "Currency",
+ "options": "currency",
"width": 120
},
{
"fieldname": "closing_debit",
"label": _("Closing (Dr)"),
"fieldtype": "Currency",
+ "options": "currency",
"width": 120
},
{
"fieldname": "closing_credit",
"label": _("Closing (Cr)"),
"fieldtype": "Currency",
+ "options": "currency",
"width": 120
+ },
+ {
+ "fieldname": "currency",
+ "label": _("Currency"),
+ "fieldtype": "Link",
+ "options": "Currency",
+ "hidden": 1
}
]
diff --git a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py
index ceabaab..58222ac 100644
--- a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py
+++ b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py
@@ -21,7 +21,7 @@
def get_data(filters, show_party_name):
party_name_field = "customer_name" if filters.get("party_type")=="Customer" else "supplier_name"
parties = frappe.get_all(filters.get("party_type"), fields = ["name", party_name_field], order_by="name")
-
+ company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
opening_balances = get_opening_balances(filters)
balances_within_period = get_balances_within_period(filters)
@@ -57,6 +57,10 @@
"closing_credit": closing_credit
})
+ row.update({
+ "currency": company_currency
+ })
+
has_value = False
if (opening_debit or opening_credit or debit or credit or closing_debit or closing_credit):
has_value =True
@@ -69,7 +73,8 @@
data.append({
"party": "'" + _("Totals") + "'",
"debit": total_debit,
- "credit": total_credit
+ "credit": total_credit,
+ "currency": company_currency
})
return data
@@ -138,37 +143,50 @@
"fieldname": "opening_debit",
"label": _("Opening (Dr)"),
"fieldtype": "Currency",
+ "options": "currency",
"width": 120
},
{
"fieldname": "opening_credit",
"label": _("Opening (Cr)"),
"fieldtype": "Currency",
+ "options": "currency",
"width": 120
},
{
"fieldname": "debit",
"label": _("Debit"),
"fieldtype": "Currency",
+ "options": "currency",
"width": 120
},
{
"fieldname": "credit",
"label": _("Credit"),
"fieldtype": "Currency",
+ "options": "currency",
"width": 120
},
{
"fieldname": "closing_debit",
"label": _("Closing (Dr)"),
"fieldtype": "Currency",
+ "options": "currency",
"width": 120
},
{
"fieldname": "closing_credit",
"label": _("Closing (Cr)"),
"fieldtype": "Currency",
+ "options": "currency",
"width": 120
+ },
+ {
+ "fieldname": "currency",
+ "label": _("Currency"),
+ "fieldtype": "Link",
+ "options": "Currency",
+ "hidden": 1
}
]
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 06197eb..077fcb4 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -4,7 +4,7 @@
from __future__ import unicode_literals
import frappe
-from frappe.utils import nowdate, cstr, flt, now, getdate, add_months
+from frappe.utils import nowdate, cstr, flt, cint, now, getdate, add_months
from frappe import throw, _
from frappe.utils import formatdate
import frappe.desk.reportview
@@ -129,12 +129,13 @@
if not args:
args = frappe.local.form_dict
args.pop("cmd")
-
+
ac = frappe.new_doc("Account")
ac.update(args)
ac.old_parent = ""
ac.freeze_account = "No"
- if ac.get("is_root"):
+ if cint(ac.get("is_root")):
+ ac.parent_account = None
ac.flags.ignore_mandatory = True
ac.insert()
@@ -473,7 +474,8 @@
'posting_date': d.posting_date,
'invoice_amount': flt(d.invoice_amount),
'payment_amount': flt(d.payment_amount),
- 'outstanding_amount': flt(d.invoice_amount - d.payment_amount, precision)
+ 'outstanding_amount': flt(d.invoice_amount - d.payment_amount, precision),
+ 'due_date': frappe.db.get_value(d.voucher_type, d.voucher_no, "due_date")
})
return outstanding_invoices
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index b38b90e..8617a26 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -4,9 +4,8 @@
frappe.provide("erpnext.buying");
cur_frm.cscript.tax_table = "Purchase Taxes and Charges";
-{% include 'erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.js' %}
-frappe.require("assets/erpnext/js/controllers/transaction.js");
+{% include 'erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.js' %}
cur_frm.email_field = "contact_email";
@@ -129,12 +128,12 @@
item.rejected_qty = flt(item.received_qty - item.qty, precision("rejected_qty", item));
}
}
-
+
this._super(doc, cdt, cdn);
this.conversion_factor(doc, cdt, cdn);
-
+
},
-
+
received_qty: function(doc, cdt, cdn) {
var item = frappe.get_doc(cdt, cdn);
frappe.model.round_floats_in(item, ["qty", "received_qty"]);
@@ -142,7 +141,7 @@
item.qty = (item.qty < item.received_qty) ? item.qty : item.received_qty;
this.qty(doc, cdt, cdn);
},
-
+
rejected_qty: function(doc, cdt, cdn) {
var item = frappe.get_doc(cdt, cdn);
frappe.model.round_floats_in(item, ["received_qty", "rejected_qty"]);
@@ -152,7 +151,7 @@
__(frappe.meta.get_label(item.doctype, "received_qty", item.name))]));
item.qty = item.rejected_qty = 0.0;
} else {
-
+
item.qty = flt(item.received_qty - item.rejected_qty, precision("qty", item));
}
@@ -236,7 +235,7 @@
erpnext.utils.get_address_display(this.frm, "shipping_address",
"shipping_address_display", is_your_company_address=true)
},
-
+
tc_name: function() {
this.get_terms();
}
diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
index b8002dd..7218531 100644
--- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
+++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
@@ -4,7 +4,7 @@
{% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %};
-frappe.require("assets/erpnext/js/utils.js");
+
frappe.ui.form.on("Request for Quotation",{
setup: function(frm){
diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js
index db8ab02..d502a3d 100644
--- a/erpnext/buying/doctype/supplier/supplier.js
+++ b/erpnext/buying/doctype/supplier/supplier.js
@@ -3,7 +3,6 @@
frappe.ui.form.on("Supplier", {
before_load: function(frm) {
- frm.hide_first = true;
frappe.setup_language_field(frm);
},
refresh: function(frm) {
diff --git a/erpnext/buying/doctype/supplier/supplier.json b/erpnext/buying/doctype/supplier/supplier.json
index 26a2c98..ca95bbb 100644
--- a/erpnext/buying/doctype/supplier/supplier.json
+++ b/erpnext/buying/doctype/supplier/supplier.json
@@ -93,6 +93,32 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "country",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Country",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Country",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
"fieldname": "image",
"fieldtype": "Attach Image",
"hidden": 1,
@@ -685,7 +711,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-04-13 05:47:43.797061",
+ "modified": "2016-04-28 17:36:44.742525",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier",
@@ -832,6 +858,7 @@
"write": 0
}
],
+ "quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "supplier_name, supplier_type",
diff --git a/erpnext/buying/doctype/supplier/test_records.json b/erpnext/buying/doctype/supplier/test_records.json
index f335d5c..d2b3995 100644
--- a/erpnext/buying/doctype/supplier/test_records.json
+++ b/erpnext/buying/doctype/supplier/test_records.json
@@ -1,6 +1,12 @@
[
{
"doctype": "Supplier",
+ "supplier_name": "_Test Supplier with Country",
+ "supplier_type": "_Test Supplier Type",
+ "country": "Greece"
+ },
+ {
+ "doctype": "Supplier",
"supplier_name": "_Test Supplier",
"supplier_type": "_Test Supplier Type"
},
diff --git a/erpnext/buying/doctype/supplier/test_supplier.py b/erpnext/buying/doctype/supplier/test_supplier.py
index a7a65f1..1d089e7 100644
--- a/erpnext/buying/doctype/supplier/test_supplier.py
+++ b/erpnext/buying/doctype/supplier/test_supplier.py
@@ -70,3 +70,18 @@
frappe.db.set_value("Supplier", "_Test Supplier", "disabled", 0)
po.save()
+
+
+ def test_supplier_country(self):
+ # Test that country field exists in Supplier DocType
+ supplier = frappe.get_doc('Supplier', '_Test Supplier with Country')
+ self.assertTrue('country' in supplier.as_dict())
+
+ # Test if test supplier field record is 'Greece'
+ self.assertEqual(supplier.country, "Greece")
+
+ # Test update Supplier instance country value
+ supplier = frappe.get_doc('Supplier', '_Test Supplier')
+ supplier.country = 'Greece'
+ supplier.save()
+ self.assertEqual(supplier.country, "Greece")
diff --git a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js
index dcf1df1..f7fe90f 100644
--- a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js
+++ b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js
@@ -1,8 +1,8 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/purchase_trends_filters.js");
-
-frappe.query_reports["Purchase Order Trends"] = {
- filters: get_filters()
- }
\ No newline at end of file
+frappe.require("assets/erpnext/js/purchase_trends_filters.js", function() {
+ frappe.query_reports["Purchase Order Trends"] = {
+ filters: get_filters()
+ }
+});
\ No newline at end of file
diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py
index 72ed0f9..d0629e7 100644
--- a/erpnext/config/accounts.py
+++ b/erpnext/config/accounts.py
@@ -221,6 +221,11 @@
"name": "Period Closing Voucher",
"description": _("Close Balance Sheet and book Profit or Loss.")
},
+ {
+ "type": "doctype",
+ "name": "Asset Movement",
+ "description": _("Transfer an asset from one warehouse to another")
+ },
]
},
{
diff --git a/erpnext/config/setup.py b/erpnext/config/setup.py
index a660942..5ad6403 100644
--- a/erpnext/config/setup.py
+++ b/erpnext/config/setup.py
@@ -79,11 +79,6 @@
"items": [
{
"type": "doctype",
- "name": "Features Setup",
- "description": _("Show / Hide features like Serial Nos, POS etc.")
- },
- {
- "type": "doctype",
"name": "Authorization Rule",
"description": _("Create rules to restrict transactions based on values.")
},
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 204c236..2ede901 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -33,6 +33,7 @@
if self.meta.get_field("currency"):
self.calculate_taxes_and_totals()
+
if not self.meta.get_field("is_return") or not self.is_return:
self.validate_value("base_grand_total", ">=", 0)
@@ -54,17 +55,19 @@
if not self.get("__islocal"):
validate_recurring_document(self)
convert_to_recurring(self, self.get("posting_date") or self.get("transaction_date"))
-
- self.validate_paid_amount()
-
+
+ if self.doctype == 'Purchase Invoice':
+ self.validate_paid_amount()
+
def validate_paid_amount(self):
if hasattr(self, "is_pos") or hasattr(self, "is_paid"):
is_paid = self.get("is_pos") or self.get("is_paid")
if cint(is_paid) == 1:
- if flt(self.paid_amount) == 0:
+ if flt(self.paid_amount) == 0 and flt(self.outstanding_amount) > 0:
if self.cash_bank_account:
self.paid_amount = flt(flt(self.grand_total) - flt(self.write_off_amount),
self.precision("paid_amount"))
+ self.base_paid_amount = flt(self.paid_amount * self.conversion_rate, self.precision("base_paid_amount"))
else:
# show message that the amount is not paid
self.paid_amount = 0
@@ -72,9 +75,6 @@
else:
frappe.db.set(self,'paid_amount',0)
- frappe.db.set(self, 'base_paid_amount',
- flt(self.paid_amount*self.conversion_rate, self.precision("base_paid_amount")))
-
def on_update_after_submit(self):
if self.meta.get_field("is_recurring"):
validate_recurring_document(self)
@@ -510,7 +510,7 @@
elif asset.status in ("Scrapped", "Cancelled", "Sold"):
frappe.throw(_("Row #{0}: Asset {1} cannot be submitted, it is already {2}")
.format(d.idx, d.asset, asset.status))
-
+
@frappe.whitelist()
def get_tax_rate(account_head):
return frappe.db.get_value("Account", account_head, "tax_rate")
diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py
index 74a3d69..8f687d1 100644
--- a/erpnext/controllers/buying_controller.py
+++ b/erpnext/controllers/buying_controller.py
@@ -330,19 +330,23 @@
pr_qty = flt(d.qty) * flt(d.conversion_factor)
if pr_qty:
- val_rate_db_precision = 6 if cint(self.precision("valuation_rate", d)) <= 6 else 9
- rate = flt(d.valuation_rate, val_rate_db_precision)
sle = self.get_sl_entries(d, {
"actual_qty": flt(pr_qty),
"serial_no": cstr(d.serial_no).strip()
})
if self.is_return:
+ original_incoming_rate = frappe.db.get_value("Stock Ledger Entry",
+ {"voucher_type": "Purchase Receipt", "voucher_no": self.return_against,
+ "item_code": d.item_code}, "incoming_rate")
+
sle.update({
- "outgoing_rate": rate
+ "outgoing_rate": original_incoming_rate
})
else:
+ val_rate_db_precision = 6 if cint(self.precision("valuation_rate", d)) <= 6 else 9
+ incoming_rate = flt(d.valuation_rate, val_rate_db_precision)
sle.update({
- "incoming_rate": rate
+ "incoming_rate": incoming_rate
})
sl_entries.append(sle)
diff --git a/erpnext/controllers/print_settings.py b/erpnext/controllers/print_settings.py
index 5d27b03..25ae1b2 100644
--- a/erpnext/controllers/print_settings.py
+++ b/erpnext/controllers/print_settings.py
@@ -12,7 +12,7 @@
}
doc.hide_in_print_layout = ["uom", "stock_uom"]
- doc.flags.compact_item_print = cint(frappe.db.get_value("Features Setup", None, "compact_item_print"))
+ doc.flags.compact_item_print = cint(frappe.db.get_value("Print Settings", None, "compact_item_print"))
if doc.flags.compact_item_print:
doc.print_templates["description"] = "templates/print_formats/includes/item_table_description.html"
diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py
index 9187706..37b13c3 100644
--- a/erpnext/controllers/sales_and_purchase_return.py
+++ b/erpnext/controllers/sales_and_purchase_return.py
@@ -53,17 +53,18 @@
valid_items = frappe._dict()
- select_fields = "item_code, sum(qty) as qty, rate" if doc.doctype=="Purchase Invoice" \
- else "item_code, sum(qty) as qty, rate, serial_no, batch_no"
+ select_fields = "item_code, qty" if doc.doctype=="Purchase Invoice" \
+ else "item_code, qty, serial_no, batch_no"
- for d in frappe.db.sql("""select {0} from `tab{1} Item` where parent = %s
- group by item_code""".format(select_fields, doc.doctype), doc.return_against, as_dict=1):
- valid_items.setdefault(d.item_code, d)
+ for d in frappe.db.sql("""select {0} from `tab{1} Item` where parent = %s"""
+ .format(select_fields, doc.doctype), doc.return_against, as_dict=1):
+ valid_items = get_ref_item_dict(valid_items, d)
+
if doc.doctype in ("Delivery Note", "Sales Invoice"):
- for d in frappe.db.sql("""select item_code, sum(qty) as qty, serial_no, batch_no from `tabPacked Item`
- where parent = %s group by item_code""".format(doc.doctype), doc.return_against, as_dict=1):
- valid_items.setdefault(d.item_code, d)
+ for d in frappe.db.sql("""select item_code, qty, serial_no, batch_no from `tabPacked Item`
+ where parent = %s""".format(doc.doctype), doc.return_against, as_dict=1):
+ valid_items = get_ref_item_dict(valid_items, d)
already_returned_items = get_already_returned_items(doc)
@@ -86,7 +87,7 @@
elif abs(d.qty) > max_return_qty:
frappe.throw(_("Row # {0}: Cannot return more than {1} for Item {2}")
.format(d.idx, ref.qty, d.item_code), StockOverReturnError)
- elif ref.batch_no and d.batch_no != ref.batch_no:
+ elif ref.batch_no and d.batch_no not in ref.batch_no:
frappe.throw(_("Row # {0}: Batch No must be same as {1} {2}")
.format(d.idx, doc.doctype, doc.return_against))
elif ref.serial_no:
@@ -94,9 +95,8 @@
frappe.throw(_("Row # {0}: Serial No is mandatory").format(d.idx))
else:
serial_nos = get_serial_nos(d.serial_no)
- ref_serial_nos = get_serial_nos(ref.serial_no)
for s in serial_nos:
- if s not in ref_serial_nos:
+ if s not in ref.serial_no:
frappe.throw(_("Row # {0}: Serial No {1} does not match with {2} {3}")
.format(d.idx, s, doc.doctype, doc.return_against))
@@ -107,6 +107,25 @@
if not items_returned:
frappe.throw(_("Atleast one item should be entered with negative quantity in return document"))
+
+def get_ref_item_dict(valid_items, ref_item_row):
+ from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
+
+ valid_items.setdefault(ref_item_row.item_code, frappe._dict({
+ "qty": 0,
+ "serial_no": [],
+ "batch_no": []
+ }))
+ item_dict = valid_items[ref_item_row.item_code]
+ item_dict["qty"] += ref_item_row.qty
+
+ if ref_item_row.get("serial_no"):
+ item_dict["serial_no"] += get_serial_nos(ref_item_row.serial_no)
+
+ if ref_item_row.get("batch_no"):
+ item_dict["batch_no"].append(ref_item_row.batch_no)
+
+ return valid_items
def get_already_returned_items(doc):
return frappe._dict(frappe.db.sql("""
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index 7210d76..eb75dee 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -435,13 +435,39 @@
- flt(self.doc.base_write_off_amount), self.doc.precision("grand_total"))
if self.doc.doctype == "Sales Invoice":
+ self.calculate_paid_amount()
self.doc.round_floats_in(self.doc, ["paid_amount"])
paid_amount = self.doc.paid_amount \
if self.doc.party_account_currency == self.doc.currency else self.doc.base_paid_amount
- self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount),
- self.doc.precision("outstanding_amount"))
+
+ self.doc.outstanding_amount = 0
+ if total_amount_to_pay > paid_amount:
+ self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount),
+ self.doc.precision("outstanding_amount"))
+ self.change_amount()
+
elif self.doc.doctype == "Purchase Invoice":
self.doc.outstanding_amount = flt(total_amount_to_pay, self.doc.precision("outstanding_amount"))
+
+ def calculate_paid_amount(self):
+ paid_amount = base_paid_amount = 0.0
+ for payment in self.doc.get('payments'):
+ payment.base_amount = flt(payment.amount * self.doc.conversion_rate)
+ paid_amount += payment.amount
+ base_paid_amount += payment.base_amount
+
+ self.doc.paid_amount = flt(paid_amount, self.doc.precision("paid_amount"))
+ self.doc.base_paid_amount = flt(base_paid_amount, self.doc.precision("base_paid_amount"))
+
+ def change_amount(self):
+ change_amount = 0.0
+ if self.doc.paid_amount > self.doc.grand_total:
+ change_amount = flt(self.doc.paid_amount - self.doc.grand_total,
+ self.doc.precision("change_amount"))
+
+ self.doc.change_amount = change_amount;
+ self.doc.base_change_amount = flt(change_amount * self.doc.conversion_rate,
+ self.doc.precision("base_change_amount"))
def calculate_margin(self, item):
total_margin = 0.0
diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js
index 337b631..c918dad 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.js
+++ b/erpnext/crm/doctype/opportunity/opportunity.js
@@ -2,7 +2,7 @@
// License: GNU General Public License v3. See license.txt
frappe.provide("erpnext.crm");
-frappe.require("assets/erpnext/js/utils.js");
+
cur_frm.email_field = "contact_email";
frappe.ui.form.on("Opportunity", {
customer: function(frm) {
diff --git a/erpnext/docs/assets/img/accounts/asset-graph.png b/erpnext/docs/assets/img/accounts/asset-graph.png
new file mode 100644
index 0000000..5b300bb
--- /dev/null
+++ b/erpnext/docs/assets/img/accounts/asset-graph.png
Binary files differ
diff --git a/erpnext/docs/assets/img/accounts/asset-movement-using-button.png b/erpnext/docs/assets/img/accounts/asset-movement-using-button.png
new file mode 100644
index 0000000..b9ca68d
--- /dev/null
+++ b/erpnext/docs/assets/img/accounts/asset-movement-using-button.png
Binary files differ
diff --git a/erpnext/docs/assets/img/accounts/asset-movement.png b/erpnext/docs/assets/img/accounts/asset-movement.png
new file mode 100644
index 0000000..39f7b34
--- /dev/null
+++ b/erpnext/docs/assets/img/accounts/asset-movement.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/email/email-alert-condition.png b/erpnext/docs/assets/img/setup/email/email-alert-condition.png
new file mode 100644
index 0000000..8ede011
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/email/email-alert-condition.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/email/email-alert-subject.png b/erpnext/docs/assets/img/setup/email/email-alert-subject.png
new file mode 100644
index 0000000..671de9b
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/email/email-alert-subject.png
Binary files differ
diff --git a/erpnext/docs/user/manual/de/CRM/customer.md b/erpnext/docs/user/manual/de/CRM/customer.md
index e16504a..3ec4281 100644
--- a/erpnext/docs/user/manual/de/CRM/customer.md
+++ b/erpnext/docs/user/manual/de/CRM/customer.md
@@ -17,7 +17,7 @@
Kontakte und Adressen werden in ERPNext getrennt gespeichert, damit Sie mehrere verschiedene Kontakte oder Adressen mit Kunden und Lieferanten verknüpfen können.
-Lesen Sie hierzu auch [Kontakt]({{docs_base_url}}/user/manual/en/crm/contact.html).
+Lesen Sie hierzu auch [Kontakt]({{docs_base_url}}/user/manual/de/CRM/contact.html).
### Einbindung in Konten
diff --git a/erpnext/docs/user/manual/de/CRM/setup/campaign.md b/erpnext/docs/user/manual/de/CRM/setup/campaign.md
index 9d070ff..c9b1ac8 100644
--- a/erpnext/docs/user/manual/de/CRM/setup/campaign.md
+++ b/erpnext/docs/user/manual/de/CRM/setup/campaign.md
@@ -5,7 +5,7 @@
<img class="screenshot" alt="Kampagne" src="{{docs_base_url}}/assets/img/crm/campaign.png">
-Sie können in einer Kampagne [Leads]({{docs_base_url}}/user/manual/en/crm/lead.html), [Opportunities]({{docs_base_url}}/user/manual/en/crm/opportunity.html) und [Angebote]({{docs_base_url}}/user/manual/en/selling/quotation.html) nachverfolgen.
+Sie können in einer Kampagne [Leads]({{docs_base_url}}/user/manual/de/CRM/lead.html), [Opportunities]({{docs_base_url}}/user/manual/de/CRM/opportunity.html) und [Angebote]({{docs_base_url}}/user/manual/de/selling/quotation.html) nachverfolgen.
### Leads zu einer Kampagne nachverfolgen
diff --git a/erpnext/docs/user/manual/de/CRM/setup/index.md b/erpnext/docs/user/manual/de/CRM/setup/index.md
index 7a4110e..ebc9191 100644
--- a/erpnext/docs/user/manual/de/CRM/setup/index.md
+++ b/erpnext/docs/user/manual/de/CRM/setup/index.md
@@ -1,6 +1,6 @@
# Einrichtung
<span class="text-muted contributed-by">Beigetragen von CWT Connector & Wire Technology GmbH</span>
-Themen
+### Themen
{index}
diff --git a/erpnext/docs/user/manual/de/accounts/index.md b/erpnext/docs/user/manual/de/accounts/index.md
index fedcd99..28c8a65 100644
--- a/erpnext/docs/user/manual/de/accounts/index.md
+++ b/erpnext/docs/user/manual/de/accounts/index.md
@@ -9,6 +9,6 @@
* Eingangsrechnung: Rechnungen, die Sie von Ihren Lieferanten für deren Produkte oder Dienstleistungen erhalten.
* Journalbuchungen / Buchungssätze: Für Buchungen wie Zahlung, Gutschrift und andere.
-#### Themen
+### Themen
{index}
diff --git a/erpnext/docs/user/manual/de/accounts/making-payments.md b/erpnext/docs/user/manual/de/accounts/making-payments.md
index 550953d..0c2e041 100644
--- a/erpnext/docs/user/manual/de/accounts/making-payments.md
+++ b/erpnext/docs/user/manual/de/accounts/making-payments.md
@@ -3,13 +3,10 @@
Zahlungen zu Ausgangs- oder Eingangsrechnungen können über die Schaltfläche "Zahlungsbuchung erstellen" zu übertragenen Rechnungen erfasst werden.
-1\. Aktualisieren Sie das Bankkonto (Sie können hier auch ein Standardkonto in den Unternehmensstammdaten einstellen).
-
-2\. Aktualiseren Sie das Veröffentlichungsdatum.
-
-3\. Geben Sie Schecknummer und Scheckdatum ein.
-
-4\. Speichern und Übertragen Sie.
+ 1. Aktualisieren Sie das Bankkonto (Sie können hier auch ein Standardkonto in den Unternehmensstammdaten einstellen).
+ 1. Aktualiseren Sie das Veröffentlichungsdatum.
+ 1. Geben Sie Schecknummer und Scheckdatum ein.
+ 1. Speichern und Übertragen Sie.
<img class="screenshot" alt="Zahlungen durchführen" src="{{docs_base_url}}/assets/img/accounts/make-payment.png">
diff --git a/erpnext/docs/user/manual/de/accounts/opening-entry.md b/erpnext/docs/user/manual/de/accounts/opening-entry.md
index b3d7718..8195faf 100644
--- a/erpnext/docs/user/manual/de/accounts/opening-entry.md
+++ b/erpnext/docs/user/manual/de/accounts/opening-entry.md
@@ -3,6 +3,6 @@
Wenn Sie eine neue Firma erstellen, dann können Sie das ERPNext-Modul Rechnungswesen starten, indem Sie in den Kontenplan gehen.
-Wenn Sie aber von einem reinen Buchhaltungsprogramm wie Tally oder einer FoxPro-basieren Software migrieren, dann lesen Sie unter [Eröffnungsbilanz]({{docs_base_url}}/user/manual/en/accounts/opening-accounts.html) nach.
+Wenn Sie aber von einem reinen Buchhaltungsprogramm wie Tally oder einer FoxPro-basieren Software migrieren, dann lesen Sie unter [Eröffnungsbilanz]({{docs_base_url}}/user/manual/de/accounts/opening-accounts.html) nach.
{next}
diff --git a/erpnext/docs/user/manual/de/accounts/point-of-sales-invoice.md b/erpnext/docs/user/manual/de/accounts/point-of-sales-invoice.md
index 5cbc382..d64e272 100644
--- a/erpnext/docs/user/manual/de/accounts/point-of-sales-invoice.md
+++ b/erpnext/docs/user/manual/de/accounts/point-of-sales-invoice.md
@@ -11,9 +11,8 @@
In ERPNext können über den POS alle Verkaufs- und Einkaufstransaktionen, wie Ausgangsrechnung, Angebot, Kundenauftrag, Lieferantenauftrag, usw. bearbeitet werden. Über folgende zwei Schritte richten Sie den POS ein:
-1\. Aktivieren Sie die POS-Ansicht über Einstellungen > Anpassen > Funktionseinstellungen
-
-2\. Erstellen Sie einen Datensatz für die [POS-Einstellungen]({{docs_base_url}}/user/manual/en/setting-up/pos-setting.html)
+1. Aktivieren Sie die POS-Ansicht über Einstellungen > Anpassen > Funktionseinstellungen
+2. Erstellen Sie einen Datensatz für die [POS-Einstellungen]({{docs_base_url}}/user/manual/de/setting-up/pos-setting.html)
#### Auf die POS-Ansicht umschalten
@@ -57,17 +56,15 @@
Wenn alle Artikel mit Mengenangabe im Einkaufswagen hinzugefügt wurden, können Sie die Zahlung durchführen. Der Zahlungsprozess untergliedert sich in drei Schritte:
-1\. Klicken Sie auf "Zahlung durchführen" um das Zahlungsfenster zu öffnen.
-
-2\. Wählen Sie die Zahlungsart aus.
-
-3\. Klicken Sie auf die Schaltfläche "Zahlen" um das Dokument abzuspeichern.
+1. Klicken Sie auf "Zahlung durchführen" um das Zahlungsfenster zu öffnen.
+2. Wählen Sie die Zahlungsart aus.
+3. Klicken Sie auf die Schaltfläche "Zahlen" um das Dokument abzuspeichern.
![POS-Zahlung]({{docs_base_url}}/assets/old_images/erpnext/pos-make-payment.png)
Übertragen Sie das Dokument um den Datensatz abzuschliessen. Nachdem das Dokument übertragen wurde, können Sie es entweder ausdrucken oder per E-Mail versenden.
-#### Buchungssätze (Hauptbuch) für einen POS:
+#### Buchungssätze (Hauptbuch) für einen POS
Soll:
diff --git a/erpnext/docs/user/manual/de/accounts/setup/index.txt b/erpnext/docs/user/manual/de/accounts/setup/index.txt
index 439c184..f59526c 100644
--- a/erpnext/docs/user/manual/de/accounts/setup/index.txt
+++ b/erpnext/docs/user/manual/de/accounts/setup/index.txt
@@ -1,4 +1,3 @@
-
fiscal-year
cost-center
accounts-settings
diff --git a/erpnext/docs/user/manual/de/accounts/setup/tax-rule.md b/erpnext/docs/user/manual/de/accounts/setup/tax-rule.md
index 0e1d00d..73d4907 100644
--- a/erpnext/docs/user/manual/de/accounts/setup/tax-rule.md
+++ b/erpnext/docs/user/manual/de/accounts/setup/tax-rule.md
@@ -1,7 +1,7 @@
# Steuerregeln
<span class="text-muted contributed-by">Beigetragen von CWT Connector & Wire Technology GmbH</span>
-Sie können festlegen, welche [Steuervorlage]({{docs_base_url}}/user/manual/en/setting-up/setting-up-taxes.html) auf eine Verkaufs-/Einkaufstransaktion angewendet wird, wenn Sie die Funktion Steuerregel verwenden.
+Sie können festlegen, welche [Steuervorlage]({{docs_base_url}}/user/manual/de/setting-up/setting-up-taxes.html) auf eine Verkaufs-/Einkaufstransaktion angewendet wird, wenn Sie die Funktion Steuerregel verwenden.
<img class="screenshot" alt="Steuerregel" src="{{docs_base_url}}/assets/img/accounts/tax-rule.png">
diff --git a/erpnext/docs/user/manual/de/buying/index.md b/erpnext/docs/user/manual/de/buying/index.md
index 4d18d59..c5bdd04 100644
--- a/erpnext/docs/user/manual/de/buying/index.md
+++ b/erpnext/docs/user/manual/de/buying/index.md
@@ -7,6 +7,6 @@
ERPNext beinhaltet einen Satz an Transaktionen, die Ihren Einkaufprozess so effektiv und störungsfrei machen, wie nur möglich.
-### Topics
+### Themen
{index}
diff --git a/erpnext/docs/user/manual/de/buying/setup/buying-settings.md b/erpnext/docs/user/manual/de/buying/setup/buying-settings.md
index 863e208..e6f0d97 100644
--- a/erpnext/docs/user/manual/de/buying/setup/buying-settings.md
+++ b/erpnext/docs/user/manual/de/buying/setup/buying-settings.md
@@ -17,7 +17,7 @@
> Einstellungen > Einstellungen > Nummernkreis
-[Klicken Sie hier, wenn Sie mehr über Nummernkreise wissen möchten]({{docs_base_url}}/user/manual/en/setting-up/settings/naming-series.html)
+[Klicken Sie hier, wenn Sie mehr über Nummernkreise wissen möchten]({{docs_base_url}}/user/manual/de/setting-up/settings/naming-series.html)
### 2. Standard-Lieferantentyp
diff --git a/erpnext/docs/user/manual/de/customize-erpnext/custom-doctype.md b/erpnext/docs/user/manual/de/customize-erpnext/custom-doctype.md
index 1e33282..01bfaa7 100644
--- a/erpnext/docs/user/manual/de/customize-erpnext/custom-doctype.md
+++ b/erpnext/docs/user/manual/de/customize-erpnext/custom-doctype.md
@@ -11,15 +11,11 @@
### Einzelheiten zum DocType
-1\. Modul: Wählen Sie das Modul aus, in dem dieser DocType verwendet wird.
-
-2\. Dokumententyp: Geben Sie an, ob dieser DocType Hauptdaten befördern oder Transaktionen nachverfolgen soll. Der DocType für das Buch wird als Vorlage hinzugefügt.
-
-3\. Ist Untertabelle: Wenn dieser DocType als Tabelle in einen anderen DocType eingefügt wird, wie die Artikeltabelle in den DocType Kundenauftrag, dann sollten Sie auch "Ist Untertabelle" ankreuzen. Ansonsten nicht.
-
-4\. Ist einzeln: Wenn diese Option aktiviert ist, wird dieser DocType zu einem einzeln verwendeten Formular, wie die Vertriebseinstellungen, die nicht von Benutzern reproduziert werden können.
-
-5\. Benutzerdefiniert?: Dieses Feld ist standardmäßig aktiviert, wenn ein benutzerdefinierter DocType hinzugefügt wird.
+1. Modul: Wählen Sie das Modul aus, in dem dieser DocType verwendet wird.
+2. Dokumententyp: Geben Sie an, ob dieser DocType Hauptdaten befördern oder Transaktionen nachverfolgen soll. Der DocType für das Buch wird als Vorlage hinzugefügt.
+3. Ist Untertabelle: Wenn dieser DocType als Tabelle in einen anderen DocType eingefügt wird, wie die Artikeltabelle in den DocType Kundenauftrag, dann sollten Sie auch "Ist Untertabelle" ankreuzen. Ansonsten nicht.
+4. Ist einzeln: Wenn diese Option aktiviert ist, wird dieser DocType zu einem einzeln verwendeten Formular, wie die Vertriebseinstellungen, die nicht von Benutzern reproduziert werden können.
+5. Benutzerdefiniert?: Dieses Feld ist standardmäßig aktiviert, wenn ein benutzerdefinierter DocType hinzugefügt wird.
![Grundlagen zum Doctype]({{docs_base_url}}/assets/img/setup/customize/doctype-basics.png)
@@ -29,17 +25,12 @@
Felder sind viel mehr als Datenbankspalten; sie können sein:
-1\. Spalten in der Datenbank
-
-2\. Wichtig für das Layout (Bereiche, Spaltentrennung)
-
-3\. Untertabellen (Feld vom Typ Tabelle)
-
-4\. HTML
-
-5\. Aktionen (Schaltflächen)
-
-6\. Anhänge oder Bilder
+1. Spalten in der Datenbank
+2. Wichtig für das Layout (Bereiche, Spaltentrennung)
+3. Untertabellen (Feld vom Typ Tabelle)
+4. HTML
+5. Aktionen (Schaltflächen)
+6. Anhänge oder Bilder
![Felder im DocType]({{docs_base_url}}/assets/img/setup/customize/Doctype-all-fields.png)
diff --git a/erpnext/docs/user/manual/de/customize-erpnext/custom-field.md b/erpnext/docs/user/manual/de/customize-erpnext/custom-field.md
index efd5980..c3bec3f 100644
--- a/erpnext/docs/user/manual/de/customize-erpnext/custom-field.md
+++ b/erpnext/docs/user/manual/de/customize-erpnext/custom-field.md
@@ -64,17 +64,12 @@
Sie können weitere Eigenschaften auswählen wie:
-1\. Ist Pflichtfeld: Ist das Feld zwingend erforderlich oder nicht?
-
-2\. Beim Drucken verbergen: Soll dieses Feld beim Ausdruck sichtbar sein oder nicht?
-
-3\. Feldbeschreibung: Hier steht eine kurze Beschreibung des Feldes die gleich unter dem Feld erscheint.
-
-4\. Standardwert: Der Wert in diesem Feld wird automatisch aktualisiert.
-
-5\. Schreibgeschützt: Wenn diese Option aktiviert ist, kann das benutzerdefinierte Feld nicht geändert werden.
-
-6\. Beim Übertragen zulassen: Wenn diese Option ausgewählt wird, ist es erlaubt den Wert des Feldes zu ändern, wenn er in einer Transaktion übertragen wird.
+1. Ist Pflichtfeld: Ist das Feld zwingend erforderlich oder nicht?
+2. Beim Drucken verbergen: Soll dieses Feld beim Ausdruck sichtbar sein oder nicht?
+3. Feldbeschreibung: Hier steht eine kurze Beschreibung des Feldes die gleich unter dem Feld erscheint.
+4. Standardwert: Der Wert in diesem Feld wird automatisch aktualisiert.
+5. Schreibgeschützt: Wenn diese Option aktiviert ist, kann das benutzerdefinierte Feld nicht geändert werden.
+6. Beim Übertragen zulassen: Wenn diese Option ausgewählt wird, ist es erlaubt den Wert des Feldes zu ändern, wenn er in einer Transaktion übertragen wird.
![Eigenschaften von benutzerdefinierten Feldern]({{docs_base_url}}/assets/old_images/erpnext/custom-field-properties.png)
diff --git a/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/custom-script-examples/custom-script-fetch-values-from-master.md b/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/custom-script-examples/custom-script-fetch-values-from-master.md
index 36f7894..c4e41ec 100644
--- a/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/custom-script-examples/custom-script-fetch-values-from-master.md
+++ b/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/custom-script-examples/custom-script-fetch-values-from-master.md
@@ -5,7 +5,7 @@
> add_fetch(link_fieldname, source_fieldname, target_fieldname)
-### Beispiel:
+### Beispiel
Sie erstellen ein benutzerdefiniertes Feld **VAT ID** (vat_id) unter **Kunde** und **Ausgangsrechnung** und Sie möchten sicher stellen, dass dieser Wert immer aktualisiert wird, wenn Sie einen Kunden oder eine Ausgangsrechnung aufrufen.
@@ -15,6 +15,6 @@
* * *
-Sehen Sie hierzu auch: [Wie man ein benutzerdefiniertes Skript erstellt]({{docs_base_url}}/user/manual/en/customize-erpnext/custom-scripts.html).
+Sehen Sie hierzu auch: [Wie man ein benutzerdefiniertes Skript erstellt]({{docs_base_url}}/user/manual/de/customize-erpnext/custom-scripts/).
{next}
diff --git a/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/custom-script-examples/index.md b/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/custom-script-examples/index.md
index 35cc4f7..43770ef 100644
--- a/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/custom-script-examples/index.md
+++ b/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/custom-script-examples/index.md
@@ -5,20 +5,17 @@
Sie erstellen ein benutzerdefiniertes Skript wie folgt (Sie müssen dafür Systemadministrator sein!):
-1\. Gehen Sie zu: Einstellungen > Benutzerdefiniertes Skript > Neu
-
-2\. Wählen Sie den DocType, in dem Sie ein benutzerdefiniertes Skript hinzufügen möchten, aus.
+1. Gehen Sie zu: Einstellungen > Benutzerdefiniertes Skript > Neu
+2. Wählen Sie den DocType, in dem Sie ein benutzerdefiniertes Skript hinzufügen möchten, aus.
* * *
-### Anmerkungen:
+### Anmerkungen
-1\. Auf benutzerdefinierte Skripte für Server kann nur der Administrator zugreifen.
+1. Auf benutzerdefinierte Skripte für Server kann nur der Administrator zugreifen.
+2. Benutzerdefinierte Skripte für Clients werden in Javascript geschrieben, die für Server in Python.
+3. Zum Testen gehen Sie auf Werkzeuge > Cache leeren und laden Sie die Seite neu, wenn Sie ein benutzerdefiniertes Skript aktualisieren.
-2\. Benutzerdefinierte Skripte für Clients werden in Javascript geschrieben, die für Server in Python.
-
-3\. Zum Testen gehen Sie auf Werkzeuge > Cache leeren und laden Sie die Seite neu, wenn Sie ein benutzerdefiniertes Skript aktualisieren.
-
-### Themen:
+### Themen
{index}
diff --git a/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/index.md b/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/index.md
index a4ad75a..8e2e842 100644
--- a/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/index.md
+++ b/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/index.md
@@ -5,6 +5,8 @@
> Einstellungen > Anpassen > Benutzerdefiniertes Skript
+<img alt="Custom Script" class="screenshot" src="{{docs_base_url}}/assets/img/customize/custom-script-1.png">
+
### Themen
{index}
diff --git a/erpnext/docs/user/manual/de/customize-erpnext/document-title.md b/erpnext/docs/user/manual/de/customize-erpnext/document-title.md
index 4ab5154..3b13208 100644
--- a/erpnext/docs/user/manual/de/customize-erpnext/document-title.md
+++ b/erpnext/docs/user/manual/de/customize-erpnext/document-title.md
@@ -13,11 +13,9 @@
Um eine Standard-Bezeichnung einzufügen, gehen Sie zu:
-1\. Einstellungen > Anpassen > Formular anpassen
-
-2\. Wählen Sie Ihre Transaktion aus
-
-3\. Bearbeiten Sie das Feld "Standard" in Ihrem Formular
+1. Einstellungen > Anpassen > Formular anpassen
+2. Wählen Sie Ihre Transaktion aus
+3. Bearbeiten Sie das Feld "Standard" in Ihrem Formular
### Bezeichnungen definieren
diff --git a/erpnext/docs/user/manual/de/customize-erpnext/index.txt b/erpnext/docs/user/manual/de/customize-erpnext/index.txt
index 1113395..bf6d52e 100644
--- a/erpnext/docs/user/manual/de/customize-erpnext/index.txt
+++ b/erpnext/docs/user/manual/de/customize-erpnext/index.txt
@@ -5,4 +5,4 @@
document-title
hiding-modules-and-features
print-format
-articles
+custom-scripts
diff --git a/erpnext/docs/user/manual/de/customize-erpnext/print-format.md b/erpnext/docs/user/manual/de/customize-erpnext/print-format.md
index ca6c771..85b1589 100644
--- a/erpnext/docs/user/manual/de/customize-erpnext/print-format.md
+++ b/erpnext/docs/user/manual/de/customize-erpnext/print-format.md
@@ -14,7 +14,7 @@
> Einstellungen > Druck > Druckformate
-![Druckformat]({{docs_base_url}}/assets/old_images/erpnext/customize/print-format.png)
+![Druckformat]({{docs_base_url}}/assets/img/customize/print-settings.png)
Wählen Sie den Typ des Druckformats, welches Sie bearbeiten wollen, und klicken Sie auf die Schaltfläche "Kopieren" in der rechten Spalte. Es öffnet sich ein neues Druckformat mit der Einstellung NEIN für "für "Ist Standard" und Sie kännen das Druckformat bearbeiten.
@@ -26,11 +26,10 @@
> Anmerkung: Vorgedrucktes Briefpapier zu verwenden ist normalerweise keine gute Idee, weil Ihre Ausdrucke unfertig (inkonsistent) aussehen, wenn Sie per E-mail verschickt werden.
-### Referenzen:
+### Referenzen
-1\. [Programmiersprache Jinja Templating: Referenz](http://jinja.pocoo.org/docs/templates/)
-
-2\. [Bootstrap CSS Framework](http://getbootstrap.com/)
+1. [Programmiersprache Jinja Templating: Referenz](http://jinja.pocoo.org/docs/templates/)
+1. [Bootstrap CSS Framework](http://getbootstrap.com/)
### Druckeinstellungen
@@ -38,9 +37,9 @@
> Einstellungen > Druck und Branding > Druckeinstellungen
-![Druckformat]({{docs_base_url}}/assets/old_images/erpnext/customize/print-settings.png)
+![Druckformat]({{docs_base_url}}/assets/img/customize/print-settings.png)
-### Beispiel:
+### Beispiel
<h3>{{ doc.select<em>print</em>heading or "Invoice" }}</h3>
<div class="row">
@@ -84,9 +83,8 @@
### Anmerkungen
-1\. Um nach Datum und Währung formatiert Werte zu erhalten, verwenden Sie: `doc.get_formatted("fieldname")`
-
-2\. Für übersetzbare Zeichenfolgen verwenden Sie: `{{ _("This string is translated") }}`
+1. Um nach Datum und Währung formatiert Werte zu erhalten, verwenden Sie: `doc.get_formatted("fieldname")`
+1. Für übersetzbare Zeichenfolgen verwenden Sie: `{{ _("This string is translated") }}`
### Fußzeilen
diff --git a/erpnext/docs/user/manual/de/human-resources/attendance.md b/erpnext/docs/user/manual/de/human-resources/attendance.md
index a889cd8..9dd45ab 100644
--- a/erpnext/docs/user/manual/de/human-resources/attendance.md
+++ b/erpnext/docs/user/manual/de/human-resources/attendance.md
@@ -9,6 +9,6 @@
Sie können einen monatlichen Report über Ihre Anwesenheiten erhalten, indem Sie zum "Monatlichen Anwesenheitsbericht" gehen.
-Sie können auch ganz einfach Anwesenheiten über das [Werkzeug zum Hochladen von Anwesenheiten]({{docs_base_url}}/user/manual/en/human-resources/tools/upload-attendance.html) hochladen.
+Sie können auch ganz einfach Anwesenheiten über das [Werkzeug zum Hochladen von Anwesenheiten]({{docs_base_url}}/user/manual/de/human-resources/tools/upload-attendance.html) hochladen.
{next}
diff --git a/erpnext/docs/user/manual/de/human-resources/job-applicant.md b/erpnext/docs/user/manual/de/human-resources/job-applicant.md
index 92819e8..51b0359 100644
--- a/erpnext/docs/user/manual/de/human-resources/job-applicant.md
+++ b/erpnext/docs/user/manual/de/human-resources/job-applicant.md
@@ -1,7 +1,7 @@
# Bewerber
<span class="text-muted contributed-by">Beigetragen von CWT Connector & Wire Technology GmbH</span>
-Sie können eine Liste von Bewerbern auf [offene Stellen]({{docs_base_url}}/user/manual/en/human-resources/job-opening.html) verwalten.
+Sie können eine Liste von Bewerbern auf [offene Stellen]({{docs_base_url}}/user/manual/de/human-resources/job-opening.html) verwalten.
Um einen neuen Bewerber anzulegen, gehen Sie zu:
diff --git a/erpnext/docs/user/manual/de/human-resources/leave-application.md b/erpnext/docs/user/manual/de/human-resources/leave-application.md
index 0f28e6f..fc16d83 100644
--- a/erpnext/docs/user/manual/de/human-resources/leave-application.md
+++ b/erpnext/docs/user/manual/de/human-resources/leave-application.md
@@ -14,8 +14,8 @@
<img class="screenshot" alt="Urlaubsgenehmiger" src="{{docs_base_url}}/assets/img/human-resources/employee-leave-approver.png">
-> Tipp: Wenn Sie möchten, dass alle Benutzer ihre Urlaubsanträge selbst erstellen, können Sie in den Einstellungen zur Urlaubsgenehmigung Ihre Mitarbeiter-IDs als so einstellen, dass sie für die Regel zutreffend sind. Für weiterführende Informationen kesen Sie hierzu die Diskussion zum Thema [Einstellungen zu Genehmigungen]({{docs_base_url}}/user/manual/en/setting-up/users-and-permissions.html).
+> Tipp: Wenn Sie möchten, dass alle Benutzer ihre Urlaubsanträge selbst erstellen, können Sie in den Einstellungen zur Urlaubsgenehmigung Ihre Mitarbeiter-IDs als so einstellen, dass sie für die Regel zutreffend sind. Für weiterführende Informationen kesen Sie hierzu die Diskussion zum Thema [Einstellungen zu Genehmigungen]({{docs_base_url}}/user/manual/de/setting-up/users-and-permissions/user-permissions.html).
-Um einem Mitarbeiter Urlaub zuzuteilen, kreuzen Sie [Urlaubszuteilung]({{docs_base_url}}/user/manual/en/human-resources/setup/leave-allocation.html) an.
+Um einem Mitarbeiter Urlaub zuzuteilen, kreuzen Sie [Urlaubszuteilung]({{docs_base_url}}/user/manual/de/human-resources/setup/leave-allocation.html) an.
{next}
diff --git a/erpnext/docs/user/manual/de/human-resources/offer-letter.md b/erpnext/docs/user/manual/de/human-resources/offer-letter.md
index 562b24c..5566071 100644
--- a/erpnext/docs/user/manual/de/human-resources/offer-letter.md
+++ b/erpnext/docs/user/manual/de/human-resources/offer-letter.md
@@ -9,7 +9,7 @@
<img class="screenshot" alt="Angebotsschreiben" src="{{docs_base_url}}/assets/img/human-resources/offer-letter.png">
-> Anmerkung: Angebotsschreiben kann nur zu einem [Bewerber]({{docs_base_url}}/user/manual/en/human-resources/job-applicant.html) erstellt werden.
+> Anmerkung: Angebotsschreiben kann nur zu einem [Bewerber]({{docs_base_url}}/user/manual/de/human-resources/job-applicant.html) erstellt werden.
Es gibt ein vordefiniertes Druckformat zum Angebotsschreiben.
diff --git a/erpnext/docs/user/manual/de/human-resources/salary-and-payroll.md b/erpnext/docs/user/manual/de/human-resources/salary-and-payroll.md
index 5d7eb61..a8eb33a 100644
--- a/erpnext/docs/user/manual/de/human-resources/salary-and-payroll.md
+++ b/erpnext/docs/user/manual/de/human-resources/salary-and-payroll.md
@@ -7,11 +7,9 @@
Um in ERPNext eine Gehaltsabrechnung durchzuführen
-1\. Erstellen Sie Gehaltsstrukturen für alle Arbeitnehmer.
-
-2\. Erstellen Sie über den Prozess Gehaltsabrechnung Gehaltsabrechnungen.
-
-3\. Buchen Sie das Gehalt in Ihren Konten.
+1. Erstellen Sie Gehaltsstrukturen für alle Arbeitnehmer.
+2. Erstellen Sie über den Prozess Gehaltsabrechnung Gehaltsabrechnungen.
+3. Buchen Sie das Gehalt in Ihren Konten.
### Gehaltsstruktur
@@ -19,11 +17,9 @@
Gehaltsstrukturen werden verwendet um Organisationen zu helfen
-1\. Gehaltslevel zu erhalten, die am Markt wettbewerbsfähig sind.
-
-2\. Ein ausgeglichenes Verhältnis zwischen den Entlohnungen intern anfallender Jobs zu erreichen.
-
-3\. Unterschiede in den Ebenen von Verwantwortung, Begabungen und Leistungen zu erkennen und entsprechend zu vergüten und Gehaltserhöhungen zu verwalten.
+1. Gehaltslevel zu erhalten, die am Markt wettbewerbsfähig sind.
+2. Ein ausgeglichenes Verhältnis zwischen den Entlohnungen intern anfallender Jobs zu erreichen.
+3. Unterschiede in den Ebenen von Verwantwortung, Begabungen und Leistungen zu erkennen und entsprechend zu vergüten und Gehaltserhöhungen zu verwalten.
Eine Gehaltsstruktur kann folgende Komponenten enthalten:
@@ -83,15 +79,11 @@
Beim Bearbeiten einer Gehaltsabrechnung
-1\. Wählen Sie die Firma, für die Sie Gehaltsabrechnungen erstellen wollen.
-
-2\. Wählen Sie den ensprechenden Monat und das Jahr.
-
-3\. Klicken Sie auf "Gehaltsabrechnung erstellen". Hierdurch werden für jeden aktiven Mitarbeiter für den gewählten Monat Datensätze für die Gehaltsabrechnung angelegt. Wenn die Gehaltsabrechnungen einmal angelegt sind, erstellt das System keine weiteren Gehaltsabrechnungen. Alle Aktualisierungen werden im Bereich "Aktivitätsprotokoll" angezeigt.
-
-4\. Wenn alle Gehaltsabrechnungen erstellt wurden, können Sie prüfen, ob Sie richtig sind, und sie bearbeiten, wenn Sie unbezahlten Urlaub abziehen wollen.
-
-5\. Wenn Sie das geprüft haben, können Sie sie alle gemeinsam "übertragen" indem Sie auf die Schaltfläche "Gehaltsabrechnung übertragen" klicken. Wenn Sie möchten, dass Sie automatisch per E-Mail an einen Mitarbeiter verschickt werden, stellen Sie sicher, dass Sie die Option "E-Mail absenden" angeklickt haben.
+1. Wählen Sie die Firma, für die Sie Gehaltsabrechnungen erstellen wollen.
+2. Wählen Sie den ensprechenden Monat und das Jahr.
+3. Klicken Sie auf "Gehaltsabrechnung erstellen". Hierdurch werden für jeden aktiven Mitarbeiter für den gewählten Monat Datensätze für die Gehaltsabrechnung angelegt. Wenn die Gehaltsabrechnungen einmal angelegt sind, erstellt das System keine weiteren Gehaltsabrechnungen. Alle Aktualisierungen werden im Bereich "Aktivitätsprotokoll" angezeigt.
+4. Wenn alle Gehaltsabrechnungen erstellt wurden, können Sie prüfen, ob Sie richtig sind, und sie bearbeiten, wenn Sie unbezahlten Urlaub abziehen wollen.
+5. Wenn Sie das geprüft haben, können Sie sie alle gemeinsam "übertragen" indem Sie auf die Schaltfläche "Gehaltsabrechnung übertragen" klicken. Wenn Sie möchten, dass Sie automatisch per E-Mail an einen Mitarbeiter verschickt werden, stellen Sie sicher, dass Sie die Option "E-Mail absenden" angeklickt haben.
### Gehälter in Konten buchen
diff --git a/erpnext/docs/user/manual/de/human-resources/setup/leave-allocation.md b/erpnext/docs/user/manual/de/human-resources/setup/leave-allocation.md
index f9162ca..2e80ddf 100644
--- a/erpnext/docs/user/manual/de/human-resources/setup/leave-allocation.md
+++ b/erpnext/docs/user/manual/de/human-resources/setup/leave-allocation.md
@@ -5,6 +5,6 @@
<img class="screenshot" alt="Urlaubszuordnung" src="{{docs_base_url}}/assets/img/human-resources/leave-allocation.png">
-Um mehreren verschhiedenen Mitarbeitern Urlaub zuzuteilen, nutzen Sie das [Urlaubszuordnungs-Werkzeug]({{docs_base_url}}/user/manual/en/human-resources/tools/leave-allocation-tool.html).
+Um mehreren verschhiedenen Mitarbeitern Urlaub zuzuteilen, nutzen Sie das [Urlaubszuordnungs-Werkzeug]({{docs_base_url}}/user/manual/de/human-resources/tools/leave-allocation-tool.html).
{next}
diff --git a/erpnext/docs/user/manual/de/index.md b/erpnext/docs/user/manual/de/index.md
index 5d2aeab..4dddaf5 100644
--- a/erpnext/docs/user/manual/de/index.md
+++ b/erpnext/docs/user/manual/de/index.md
@@ -1,6 +1,6 @@
# Benutzerhandbuch (Deutsch)
<span class="text-muted contributed-by">Beigetragen von CWT Connector & Wire Technology GmbH</span>
-### Inhalt:
+### Inhalt
{index}
diff --git a/erpnext/docs/user/manual/de/introduction/concepts-and-terms.md b/erpnext/docs/user/manual/de/introduction/concepts-and-terms.md
index ab70d18..ad4d0c4 100644
--- a/erpnext/docs/user/manual/de/introduction/concepts-and-terms.md
+++ b/erpnext/docs/user/manual/de/introduction/concepts-and-terms.md
@@ -151,7 +151,7 @@
> Lagerbestand > Dokumente > Lager
#### Lagerbuchung
-Materialübertrag von einem Lager, in ein Lager oder zwischen mehreren Lägern.
+Materialübertrag von einem Lager, in ein Lager oder zwischen mehreren Lagern.
> Lagerbestand > Dokumente > Lagerbuchung
diff --git a/erpnext/docs/user/manual/de/introduction/implementation-strategy.md b/erpnext/docs/user/manual/de/introduction/implementation-strategy.md
index 3c41659..8218f8e 100644
--- a/erpnext/docs/user/manual/de/introduction/implementation-strategy.md
+++ b/erpnext/docs/user/manual/de/introduction/implementation-strategy.md
@@ -11,7 +11,7 @@
* Lesen Sie das Handbuch.
* Legen Sie ein kostenloses Konto auf [https://erpnext.com](https://erpnext.com) an. (Das ist der einfachste Weg um zu experimentieren.)
* Legen Sie Ihre ersten Kunden, Lieferanten und Artikel an. Erstellen Sie weitere, um sich mit diesen Verfahren vertraut zu machen.
-* Legen Sie Kundengruppen, Artikelgruppen, Läger und Lieferantengruppen an, damit Sie Ihre Artikel klassifizieren können.
+* Legen Sie Kundengruppen, Artikelgruppen, Lager und Lieferantengruppen an, damit Sie Ihre Artikel klassifizieren können.
* Durchlaufen Sie einen Standard-Vertriebszyklus: Lead -> Opportunity -> Angebot -> Kundenauftrag -> Lieferschein -> Ausgangsrechnung -> Zahlung (Journalbuchung/Buchungssatz)
* Durchlaufen Sie einen Standard-Einkaufszyklus: Materialanfrage -> Lieferantenauftrag -> Eingangsrechnung -> Zahlung (Journalbuchung/Buchungssatz)
* Durchlaufen Sie einen Fertigungszyklus (wenn anwendbar): Stückliste -> Planungswerkzeug zur Fertigung -> Fertigungsauftrag -> Materialausgabe
@@ -25,7 +25,7 @@
* Säubern Sie Ihr Testkonto oder legen Sie besser noch eine frische Installation an.
* Wenn Sie nur Ihre Transaktionen, nicht aber Ihre Stammdaten wie Artikel, Kunde, Lieferant, Stückliste, etc. löschen wollen, brauchen Sie nur auf die Firma klicken, für die Sie diese Transaktionen erstellt haben, und mit einer frischen Stückliste starten. Um eine Firma zu löschen, öffnen Sie den Datensatz zur Firma über Einstellungen > Vorlagen > Firma und löschen Sie die Firma indem Sie die **"Löschen"-Schaltfläche** am unteren Ende anklicken.
* Sie können auch auf [https://erpnext.com](https://erpnext.com) ein neues Konto erstellen, und die Dreißig-Tage-Probezeit nutzen. [Finden Sie hier mehr zum Thema Einsatz von ERPNext heraus](/introduction/getting-started-with-erpnext).
-* Richten Sie Kundengruppen, Artikelgruppen, Läger und Stücklisten für alle Module ein.
+* Richten Sie Kundengruppen, Artikelgruppen, Lager und Stücklisten für alle Module ein.
* Importieren Sie Kunden, Lieferanten, Artikel, Kontakte und Adressen mit Hilfe des Datenimportwerkzeuges.
* Importieren Sie den Anfangsbestand des Lagers über das Werkzeug zum Lagerabgleich.
* Erstellen Sie Eröffnungsbuchungen über Journalbuchungen/Buchungssätze und geben Sie offene Ausgangs- und Eingangsrechnungen ein.
diff --git a/erpnext/docs/user/manual/de/introduction/index.md b/erpnext/docs/user/manual/de/introduction/index.md
index f9e30f5..2b6a45a 100644
--- a/erpnext/docs/user/manual/de/introduction/index.md
+++ b/erpnext/docs/user/manual/de/introduction/index.md
@@ -31,6 +31,6 @@
Und vieles vieles mehr.
-#### Themen:
+#### Themen
{index}
diff --git a/erpnext/docs/user/manual/de/manufacturing/production-order.md b/erpnext/docs/user/manual/de/manufacturing/production-order.md
index 3bbcce0..e6ddd7b 100644
--- a/erpnext/docs/user/manual/de/manufacturing/production-order.md
+++ b/erpnext/docs/user/manual/de/manufacturing/production-order.md
@@ -17,7 +17,7 @@
* Geben Sie das geplante Startdatum an (ein geschätztes Datum zu dem die Produktion beginnen soll).
* Wählen Sie das Lager aus. Das Fertigungslager ist der Ort zu dem die Artikel gelangen, wenn Sie mit der Herstellung beginnen, und das Eingangslager ist der Ort, wo fertige Erzeugnisse lagern, bevor sie versandt werden.
-> Anmerkung: Sie können einen Fertigungsauftrag abspeichern ohne ein Lager auszuwählen. Läger sind jedoch zwingend erforderlich um einen Fertigungsauftrag zu übertragen.
+> Anmerkung: Sie können einen Fertigungsauftrag abspeichern ohne ein Lager auszuwählen. Lager sind jedoch zwingend erforderlich um einen Fertigungsauftrag zu übertragen.
### Arbeitsplätze neu zuordnen/Dauer von Arbeitsgängen
@@ -84,11 +84,11 @@
* Wenn Sie einen Fertigungsauftrag anhalten, wird sein Status auf "Angehalten" gesetzt, mit der Folge, dass alle Herstellungsprozesse für diesen Fertigungsauftrag eingestellt werden.
* Um den Fertigungsauftrag anzuhalten klicken Sie auf die Schaltfläche "Anhalten".
-1\. Wenn Sie den Fertigungsauftrag übertragen, reserviert das System für jeden Arbeitsgang des Fertigungsauftrags in Serie gemäß dem geplanten Startdatum basierend auf der Verfügbarkeit des Arbeitsplatzes ein Zeitfenster. Die Verfügbarkeit des Arbeitsplatzes hängt von den Arbeitszeiten des Arbeitsplatzes und der Urlaubsliste ab und davon, ob ein anderer Arbeitsgang des Fertigungsauftrages in diesem Zeitfenster eingeplant wurde. Sie können in den Fertigungseinstellungen die Anzahl der Tage angeben, in denen das System versucht den Arbeitsgang einzuplanen. Standardmäßig ist dieser Wert auf 30 Tage eingestellt. Wenn der Arbeitsgang über das verfügbare Zeitfenster hinaus Zeit benötigt, fragt Sie das System, ob der Arbeitsgang pausieren soll. Wenn das System die Terminplanung erstellen konnte, legt es Zeitprotokolle an und speichert sie. Sie können diese verändern und später übertragen.
-2\. Sie können außerdem zusätzliche Zeitprotokolle für einen Arbeitsgang erstellen. Hierzu wählen Sie den betreffenden Arbeitsgang aus und klicken Sie auf "Zeitprotokoll erstellen".
-3\. Rohmaterial übertragen: Dieser Schritt erstellt eine Lagerbuchung mit allen Artikeln, die benötigt werden, um dem Fertigungsauftrag abzuschliessen, und dem Fertigungslager hinzugefügt werden müssen (Unterartikel werden entweder als EIN Artikel mit Stücklister ODER in aufgelöster Form gemäß Ihren Einstellungen hinzugefügt).
-4\. Fertigerzeugnisse aktualisieren: Dieser Schritt erstellt eine Lagerbuchung, welche alle Unterartikel vom Fertigungslager abzieht und dem Lager Fertige Erzeugnisse hinzufügt.
-5\. Um die zum Fertigungsauftrag erstellten Zeitprotokolle anzusehen, klicken Sie auf "Zeitprotokolle anzeigen".
+1. Wenn Sie den Fertigungsauftrag übertragen, reserviert das System für jeden Arbeitsgang des Fertigungsauftrags in Serie gemäß dem geplanten Startdatum basierend auf der Verfügbarkeit des Arbeitsplatzes ein Zeitfenster. Die Verfügbarkeit des Arbeitsplatzes hängt von den Arbeitszeiten des Arbeitsplatzes und der Urlaubsliste ab und davon, ob ein anderer Arbeitsgang des Fertigungsauftrages in diesem Zeitfenster eingeplant wurde. Sie können in den Fertigungseinstellungen die Anzahl der Tage angeben, in denen das System versucht den Arbeitsgang einzuplanen. Standardmäßig ist dieser Wert auf 30 Tage eingestellt. Wenn der Arbeitsgang über das verfügbare Zeitfenster hinaus Zeit benötigt, fragt Sie das System, ob der Arbeitsgang pausieren soll. Wenn das System die Terminplanung erstellen konnte, legt es Zeitprotokolle an und speichert sie. Sie können diese verändern und später übertragen.
+2. Sie können außerdem zusätzliche Zeitprotokolle für einen Arbeitsgang erstellen. Hierzu wählen Sie den betreffenden Arbeitsgang aus und klicken Sie auf "Zeitprotokoll erstellen".
+3. Rohmaterial übertragen: Dieser Schritt erstellt eine Lagerbuchung mit allen Artikeln, die benötigt werden, um dem Fertigungsauftrag abzuschliessen, und dem Fertigungslager hinzugefügt werden müssen (Unterartikel werden entweder als EIN Artikel mit Stücklister ODER in aufgelöster Form gemäß Ihren Einstellungen hinzugefügt).
+4. Fertigerzeugnisse aktualisieren: Dieser Schritt erstellt eine Lagerbuchung, welche alle Unterartikel vom Fertigungslager abzieht und dem Lager Fertige Erzeugnisse hinzufügt.
+5. Um die zum Fertigungsauftrag erstellten Zeitprotokolle anzusehen, klicken Sie auf "Zeitprotokolle anzeigen".
<img class="screenshot" alt="Fertigungsauftrag anhalten" src="{{docs_base_url}}/assets/img/manufacturing/PO-stop.png">
diff --git a/erpnext/docs/user/manual/de/manufacturing/subcontracting.md b/erpnext/docs/user/manual/de/manufacturing/subcontracting.md
index 901d242..28fa3cd 100644
--- a/erpnext/docs/user/manual/de/manufacturing/subcontracting.md
+++ b/erpnext/docs/user/manual/de/manufacturing/subcontracting.md
@@ -7,11 +7,9 @@
### Fremdvergabe einstellen
-1\. Erstellen Sie getrennte Artikel für unbearbeitete und bearbeitet Produkte. Beispiel: Wenn Sie Ihrem Lieferanten unlackierte Artikel X übergeben und Ihnen der Lieferant lackierte Produkte X zurückliefert, dann erstellen Sie zwei Artikel: "X unlackiert" und "X".
-
-2\. Erstellen Sie ein Lager für den Lieferanten, damit Sie die übergebenen Artikel nachverfolgen können (möglicherweise geben Sie ja Artikel im Wert einer Monatslieferung außer Haus).
-
-3\. Stellen Sie für den bearbeiteten Artikel und der Artikelvorlage den Punkt "Ist Fremdvergabe" auf JA ein.
+1. Erstellen Sie getrennte Artikel für unbearbeitete und bearbeitet Produkte. Beispiel: Wenn Sie Ihrem Lieferanten unlackierte Artikel X übergeben und Ihnen der Lieferant lackierte Produkte X zurückliefert, dann erstellen Sie zwei Artikel: "X unlackiert" und "X".
+2. Erstellen Sie ein Lager für den Lieferanten, damit Sie die übergebenen Artikel nachverfolgen können (möglicherweise geben Sie ja Artikel im Wert einer Monatslieferung außer Haus).
+3. Stellen Sie für den bearbeiteten Artikel und der Artikelvorlage den Punkt "Ist Fremdvergabe" auf JA ein.
![Fremdvergabe]({{docs_base_url}}/assets/old_images/erpnext/subcontract.png)
diff --git a/erpnext/docs/user/manual/de/manufacturing/tools/bom-replace-tool.md b/erpnext/docs/user/manual/de/manufacturing/tools/bom-replace-tool.md
index e8dc3f4..922c32a 100644
--- a/erpnext/docs/user/manual/de/manufacturing/tools/bom-replace-tool.md
+++ b/erpnext/docs/user/manual/de/manufacturing/tools/bom-replace-tool.md
@@ -11,37 +11,26 @@
Wenn eine Firma Computer herstellt, besteht die Stückliste des fertigen Erzeugnisses in etwa so aus:
-1\. Bildschirm
-
-2\. Tastatur
-
-3\. Maus
-
-4\. Zentraleinheit
+1. Bildschirm
+2. Tastatur
+3. Maus
+4. Zentraleinheit
Von den oben aufgelisteten Artikeln wird die Zentraleinheit separat zusammengebaut. Somit wird eine eigenständige Stückliste für die Zentraleinheit ersellt. Im folgenden werden die Artikel der Stückliste der Zentraleinheit angegeben:
-1\. 250 GByte Festplatte
-
-2\. Hauptplatine
-
-3\. Prozessor
-
-4\. SMTP
-
-5\. DVD-Laufwerk
+1. 250 GByte Festplatte
+2. Hauptplatine
+3. Prozessor
+4. SMTP
+5. DVD-Laufwerk
Wenn zur Stückliste der Zentraleinheit weitere Artikel hinzugefügt werden sollen, oder enthaltene Artikel bearbeitet werden sollen, sollte eine neue Stückliste erstellt werden.
-1\. _350 GByte Festplatte_
-
-2\. Hauptplatine
-
-3\. Prozessor
-
-4\. SMTP
-
-5\. DVD-Laufwerk
+1. _350 GByte Festplatte_
+2. Hauptplatine
+3. Prozessor
+4. SMTP
+5. DVD-Laufwerk
Um die Stückliste, bei der die Zentraleinheit als Rohmaterial enthalten ist, in der Stückliste des fertigen Produktes zu aktualisieren, können Sie das Stücklisten-Austauschwerkzeug verwenden.
diff --git a/erpnext/docs/user/manual/de/manufacturing/workstation.md b/erpnext/docs/user/manual/de/manufacturing/workstation.md
index e9db7f2..2405382 100644
--- a/erpnext/docs/user/manual/de/manufacturing/workstation.md
+++ b/erpnext/docs/user/manual/de/manufacturing/workstation.md
@@ -13,6 +13,6 @@
Geben Sie unter "Arbeitszeit" die Betriebszeiten des Arbeitsplatzes an. Sie können die Betriebszeiten auch mit Hilfe von Schichten angeben. Wenn Sie einen Fertigungauftrag einplanen, prüft das System die Verfügbarkeit des Arbeitsplatzes basierend auf den angegebenen Betrieszeiten.
-> Anmerkung: Sie können Überstunden für einen Arbeitsplatz über die [Fertigungseinstellungen]({{docs_base_url}}/user/manual/en/manufacturing/setup/manufacturing-settings.html) aktivieren.
+> Anmerkung: Sie können Überstunden für einen Arbeitsplatz über die [Fertigungseinstellungen]({{docs_base_url}}/user/manual/de/manufacturing/setup/manufacturing-settings.html) aktivieren.
{next}
diff --git a/erpnext/docs/user/manual/de/projects/project.md b/erpnext/docs/user/manual/de/projects/project.md
index 6a9db66..518443b 100644
--- a/erpnext/docs/user/manual/de/projects/project.md
+++ b/erpnext/docs/user/manual/de/projects/project.md
@@ -8,7 +8,7 @@
### Aufgaben verwalten
Ein Projekt kann in mehrere verschiedene Aufgaben aufgeteilt werden.
-Eine Aufgabe kann über das Projektdokument selbst erstellt werden oder über die Schaltfläche [Aufgabe]({{docs_base_url}}/user/manual/en/projects/tasks.html).
+Eine Aufgabe kann über das Projektdokument selbst erstellt werden oder über die Schaltfläche [Aufgabe]({{docs_base_url}}/user/manual/de/projects/tasks.html).
<img class="screenshot" alt="Projekt" src="{{docs_base_url}}/assets/img/project/project_task.png">
@@ -24,7 +24,7 @@
### Zeitmanagement
-ERPNext verwendet [Zeitprotokolle]({{docs_base_url}}/user/manual/en/projects/time-log.html) um den Fortschritt eines Projektes nachzuverfolgen. Sie können Zeitprotokolle zu jeder Aufgabe erstellen. Das aktuelle Start- und Enddatum wird dann zusammen mit der Kostenberechnung basierend auf dem Zeitprotokoll aktualisiert.
+ERPNext verwendet [Zeitprotokolle]({{docs_base_url}}/user/manual/de/projects/time-log.html) um den Fortschritt eines Projektes nachzuverfolgen. Sie können Zeitprotokolle zu jeder Aufgabe erstellen. Das aktuelle Start- und Enddatum wird dann zusammen mit der Kostenberechnung basierend auf dem Zeitprotokoll aktualisiert.
* Um ein Zeitprotokoll zu einem Projekt anzusehen, klicken Sie auf "Zeitprotokolle"
@@ -38,7 +38,7 @@
### Aufwände verwalten
-Sie können [Aufwandsabrechnungen]({{docs_base_url}}/user/manual/en/human-resources/expense-claim.html) mit Projektaufgaben verbuchen. Das System aktualisiert die Gesamtsumme der Aufwände im Abschnitt Kostenabrechnung.
+Sie können [Aufwandsabrechnungen]({{docs_base_url}}/user/manual/de/human-resources/expense-claim.html) mit Projektaufgaben verbuchen. Das System aktualisiert die Gesamtsumme der Aufwände im Abschnitt Kostenabrechnung.
* Um die Aufwandsabrechnungen zu einem Projekt anzusehen, klicken Sie auf "Aufwandsabrechnung".
@@ -54,7 +54,7 @@
### Kostenstelle
-Sie können zu einem Projekt eine [Kostenstelle]({{docs_base_url}}/user/manual/en/accounts/setup/cost-center.html) erstellen oder Sie können eine existierende Kostenstelle verwenden um alle Aufwände die zu einem Projekt entstehen mitzuverfolgen.
+Sie können zu einem Projekt eine [Kostenstelle]({{docs_base_url}}/user/manual/de/accounts/setup/cost-center.html) erstellen oder Sie können eine existierende Kostenstelle verwenden um alle Aufwände die zu einem Projekt entstehen mitzuverfolgen.
<img class="screenshot" alt="Projekt - Kostenstelle" src="{{docs_base_url}}/assets/img/project/project_cost_center.png">
@@ -69,7 +69,7 @@
### Abrechnung
-Sie können einen [Kundenauftrag]({{docs_base_url}}/user/manual/en/selling/sales-order.html) zu einem Projekt erstellen bzw. ihn mit dem Projekt verknüpfen. Wenn er einmal verlinkt ist, können Sie das Vertriebsmodul dazu nutzen, dass Projekt mit Ihrem Kunden abzurechnen.
+Sie können einen [Kundenauftrag]({{docs_base_url}}/user/manual/de/selling/sales-order.html) zu einem Projekt erstellen bzw. ihn mit dem Projekt verknüpfen. Wenn er einmal verlinkt ist, können Sie das Vertriebsmodul dazu nutzen, dass Projekt mit Ihrem Kunden abzurechnen.
<img class="screenshot" alt="Projekt - Kundenauftrag" src="{{docs_base_url}}/assets/img/project/project_sales_order.png">
diff --git a/erpnext/docs/user/manual/de/projects/tasks.md b/erpnext/docs/user/manual/de/projects/tasks.md
index 73e19fe..163fb68 100644
--- a/erpnext/docs/user/manual/de/projects/tasks.md
+++ b/erpnext/docs/user/manual/de/projects/tasks.md
@@ -25,7 +25,7 @@
### Zeitmanagement
-ERPNext verwendet [Zeitprotokolle]({{docs_base_url}}/user/manual/en/projects/time-log.html) um den Fortschritt einer Aufgabe mitzuprotokollieren. Sie können mehrere unterschiedliche Zeitprotokolle zu jeder Aufgabe erstellen. Das aktuelle Start- und Enddatum kann dann zusammen mit der auf dem Zeitprotokoll basierenden Kostenberechnung aktualisiert werden.
+ERPNext verwendet [Zeitprotokolle]({{docs_base_url}}/user/manual/de/projects/time-log.html) um den Fortschritt einer Aufgabe mitzuprotokollieren. Sie können mehrere unterschiedliche Zeitprotokolle zu jeder Aufgabe erstellen. Das aktuelle Start- und Enddatum kann dann zusammen mit der auf dem Zeitprotokoll basierenden Kostenberechnung aktualisiert werden.
* Um ein zu einer Aufgabe erstelltes Zeitprotokoll anzuschauen, klicken Sie auf "Zeitprotokolle".
@@ -39,7 +39,7 @@
### Ausgabenmanagement
-Sie können [Aufwandsabrechnungen]({{docs_base_url}}/user/manual/en/human-resource-management/expense-claim.html) mit einer Aufgabe verbuchen. Das System aktualisiert den Gesamtbetrag der Aufwandsabrechnungen im Abschnitt Kostenberechnung.
+Sie können [Aufwandsabrechnungen]({{docs_base_url}}/user/manual/de/human-resources/expense-claim.html) mit einer Aufgabe verbuchen. Das System aktualisiert den Gesamtbetrag der Aufwandsabrechnungen im Abschnitt Kostenberechnung.
* Um eine Aufwandsabrechnung, die zu einer Aufgabe erstellt wurde, anzuschauen, klicken Sie auf "Aufwandsabrechnung".
diff --git a/erpnext/docs/user/manual/de/projects/time-log.md b/erpnext/docs/user/manual/de/projects/time-log.md
index b65bf5e..d90e27a 100644
--- a/erpnext/docs/user/manual/de/projects/time-log.md
+++ b/erpnext/docs/user/manual/de/projects/time-log.md
@@ -37,12 +37,12 @@
### Abrechnung über Zeitprotokolle
* Wenn Sie ein Zeitprotokoll abrechnen wollen, müssem Sie die Option "Abrechenbar" anklicken.
-* Im Abschnitt Kostenberechnung erstellt das System den Rechungsbetrag über die [Aktivitätskosten]({{docs_base_url}}/user/manual/en/projects/activity-cost.html) basierend auf dem angegebenen Mitarbeiter und der angegebenen Aktivitätsart.
+* Im Abschnitt Kostenberechnung erstellt das System den Rechungsbetrag über die [Aktivitätskosten]({{docs_base_url}}/user/manual/de/projects/activity-cost.html) basierend auf dem angegebenen Mitarbeiter und der angegebenen Aktivitätsart.
* Das System kalkuliert dann den Rechnungsbetrag basierend auf den im Zeitprotokoll angegebenen Stunden.
* Wenn "Abrechenbar" nicht markiert wurde, zeigt das System beim "Rechnungsbetrag" 0 an.
<img class="screenshot" alt="Zeitprotokoll - Abrechnung" src="{{docs_base_url}}/assets/img/project/time_log_costing.png">
-* Nach dem Übertragen des Zeitprotokolls müssen Sie einen [Zeitprotokollstapel]({{docs_base_url}}/user/manual/en/projects/time-log-batch.html) erstellen um mit der Abrechnung fortfahren zu können.
+* Nach dem Übertragen des Zeitprotokolls müssen Sie einen [Zeitprotokollstapel]({{docs_base_url}}/user/manual/de/projects/time-log-batch.html) erstellen um mit der Abrechnung fortfahren zu können.
{next}
diff --git a/erpnext/docs/user/manual/de/selling/quotation.md b/erpnext/docs/user/manual/de/selling/quotation.md
index f7b6833..3434e26 100644
--- a/erpnext/docs/user/manual/de/selling/quotation.md
+++ b/erpnext/docs/user/manual/de/selling/quotation.md
@@ -34,12 +34,12 @@
Die Preise, die sie abgeben, hängen von zwei Dingen ab:
-* Die Preisliste: Wenn Sie mehrere verschiedene Preislisten haben, können Sie eine Preisliste auswählen oder sie mit dem Kunden markieren (so dass sie automatisch vorselektiert wird). Ihre Artikelpreise werden automatisch über die Preisliste aktualisert. Für weitere Informationen bitte bei [Preisliste]({{docs_base_url}}/user/manual/en/setting-up/price-lists.html) weiterlesen.
+* Die Preisliste: Wenn Sie mehrere verschiedene Preislisten haben, können Sie eine Preisliste auswählen oder sie mit dem Kunden markieren (so dass sie automatisch vorselektiert wird). Ihre Artikelpreise werden automatisch über die Preisliste aktualisert. Für weitere Informationen bitte bei [Preisliste]({{docs_base_url}}/user/manual/de/setting-up/price-lists.html) weiterlesen.
* Die Währung: Wenn Sie einem Kunden in einer anderen Währung anbieten, müssen Sie die Umrechnungsfaktoren aktualisieren um ERPNext in die Lage zu versetzen die Information in Ihrer Standardwährung zu speichern. Das hilft Ihnen dabei den Wert Ihres Angebots in der Standardwährung zu analysieren.
### Steuern
-Um Steuern zu Ihrem Angebot hinzu zu fügen, können Sie entweder eine Steuervorlage oder eine Verkaufssteuern- und Gebühren-Vorlage auswählen oder die Steuern selbst hinzufügen. Um Steuern im Einzelnen zu verstehen, lesen Sie bitte [Steuern]({{docs_base_url}}/user/manual/en/setting-up/setting-up-taxes.html).
+Um Steuern zu Ihrem Angebot hinzu zu fügen, können Sie entweder eine Steuervorlage oder eine Verkaufssteuern- und Gebühren-Vorlage auswählen oder die Steuern selbst hinzufügen. Um Steuern im Einzelnen zu verstehen, lesen Sie bitte [Steuern]({{docs_base_url}}/user/manual/de/setting-up/setting-up-taxes.html).
Sie können Steuern auf die gleiche Art hinzufügen wie die Vorlage Verkaufssteuern und Gebühren.
diff --git a/erpnext/docs/user/manual/de/setting-up/authorization-rule.md b/erpnext/docs/user/manual/de/setting-up/authorization-rule.md
index 462c196..7b202f1 100644
--- a/erpnext/docs/user/manual/de/setting-up/authorization-rule.md
+++ b/erpnext/docs/user/manual/de/setting-up/authorization-rule.md
@@ -13,27 +13,27 @@
Nehmen wir an dass ein Vertriebsmitarbeiter Kundenbestellungen nur dann genehmigen lassen muss, wenn der Gesamtwert 10.000 Euro übersteigt. Wenn die Kundenbestellung 10.000 Euro nicht übersteigt, dann kann auch ein Vertriebsmitarbeiter diese Transaktion übertragen. Das bedeutet, dass die Berechtigung des Vertriebsmitarbeiters zum Übertragen auf Kundenaufträge mit einer Maximalsumme von 10.000 Euro beschränkt wird.
-#### Schritt 1:
+#### Schritt 1
Öffnen Sie eine neue Autorisierungsregel.
-#### Schritt 2:
+#### Schritt 2
Wählen Sie die Firma und die Transaktion aus, für die diese Autorisierungsregel angewendet werden soll. Diese Funktionalität ist nur für beschränkte Transaktionen verfügbar.
-#### Schritt 3:
+#### Schritt 3
Wählen Sie einen Wert für "Basiert auf" aus. Eine Autorisierungsregel wird auf Grundlage eines Wertes in diesem Feld angewendet.
-#### Schritt 4:
+#### Schritt 4
Wählen Sie eine Rolle, auf die die Autorisierungsregel angewendet werden soll. Für unser angenommenes Beispiel wird die Rolle "Nutzer Vertrieb" über "Anwenden auf (Rolle)" als Rolle ausgewählt. Um noch etwas genauer zu werden, können Sie auch über "Anwenden auf (Benutzer)" einen bestimmten Benutzer auswählen, wenn Sie eine Regel speziell auf einen Mitarbeiter anwenden wollen, und nicht auf alle Mitarbeiter aus dem Vertrieb. Es ist auch in Ordnung, keinen Benutzer aus dem Vertrieb anzugeben, weil es nicht zwingend erforderlich ist.
-#### Schritt 5:
+#### Schritt 5
Wählen Sie die Rolle des Genehmigers aus. Das könnte z. B. die Rolle des Vertriebsleiters sein, die Kundenaufträge über 10.000 Euro übertragen darf. Sie können auch hier einen bestimmten Vertriebsleiter auswählen, und dann die Regel so gestalten, dass Sie nur auf diesen Benutzer anwendbar ist. Einen genehmigenden Benutzer anzugeben ist nicht zwingend erfoderlich.
-#### Schritt 6:
+#### Schritt 6
Geben Sie "Autorisierter Wert" ein. Im Beispiel stellen wir das auf 10.000 Euro ein.
diff --git a/erpnext/docs/user/manual/de/setting-up/data/data-import-tool.md b/erpnext/docs/user/manual/de/setting-up/data/data-import-tool.md
index 9e9f340..90dc38c 100644
--- a/erpnext/docs/user/manual/de/setting-up/data/data-import-tool.md
+++ b/erpnext/docs/user/manual/de/setting-up/data/data-import-tool.md
@@ -36,10 +36,10 @@
<img alt="Upload" class="screenshot" src="{{docs_base_url}}/assets/img/setup/data-import/data-import-3.png">
-#### Anmerkungen:
+#### Anmerkungen
-1\. Stellen Sie sicher, dass Sie als Verschlüsselung UTF-8 verwenden, wenn Ihre Anwendung das zulässt.
-2\. Lassen Sie die Spalte ID für einen neuen Datensatz leer.
+1. Stellen Sie sicher, dass Sie als Verschlüsselung UTF-8 verwenden, wenn Ihre Anwendung das zulässt.
+2. Lassen Sie die Spalte ID für einen neuen Datensatz leer.
### 4. Hochladen aller Tabellen (übergeordnete und Untertabellen)
diff --git a/erpnext/docs/user/manual/de/setting-up/data/index.md b/erpnext/docs/user/manual/de/setting-up/data/index.md
index 3586885..68460b0 100644
--- a/erpnext/docs/user/manual/de/setting-up/data/index.md
+++ b/erpnext/docs/user/manual/de/setting-up/data/index.md
@@ -3,6 +3,6 @@
Mithilfe des Werkzeuges zum Datenimport und -export können Sie Massenimporte und -exporte aus und nach Tabellenkalkulationsdateien (**.csv**) durchführen. Dieses Werkzeug ist sehr hilfreich zu Beginn des Einrichtungsprozesses um Daten aus anderen Systemen zu übernehmen.
-Themen
+### Themen
{index}
diff --git a/erpnext/docs/user/manual/de/setting-up/email/email-alerts.md b/erpnext/docs/user/manual/de/setting-up/email/email-alerts.md
index 732d648..58f6fe3 100644
--- a/erpnext/docs/user/manual/de/setting-up/email/email-alerts.md
+++ b/erpnext/docs/user/manual/de/setting-up/email/email-alerts.md
@@ -3,19 +3,13 @@
Sie können verschiedene E-Mail-Benachrichtigungen in Ihrem System einstellen, um Sie an wichtige Aktivitäten zu erinnern, beispielsweise an:
-1\. das Enddatum einer Aufgabe.
-
-2\. einen vom Kunden erwarteten Liefertermin eines Kundenauftrages.
-
-3\. einen vom Lieferanten erwarteten Zahlungstermin.
-
-4\. eine Erinnerung zum Nachfassen.
-
-5\. Wenn der Wert einer Bestellung einen bestimmten Betrag überschreitet.
-
-6\. Wenn ein Vertrag ausläuft.
-
-7\. Wenn eine Aufgabe abgeschlossen ist oder Ihren Status ändert.
+1. das Enddatum einer Aufgabe.
+2. einen vom Kunden erwarteten Liefertermin eines Kundenauftrages.
+3. einen vom Lieferanten erwarteten Zahlungstermin.
+4. eine Erinnerung zum Nachfassen.
+5. Wenn der Wert einer Bestellung einen bestimmten Betrag überschreitet.
+6. Wenn ein Vertrag ausläuft.
+7. Wenn eine Aufgabe abgeschlossen ist oder Ihren Status ändert.
Hierfür müssen Sie eine E-Mail-Erinnerung einstellen.
@@ -25,29 +19,20 @@
Um eine E-Mail-Erinnerung einzustellen, gehen Sie wie folgt vor:
-1\. Wählen Sie das Dokument aus, welches Sie beobachten wollen.
-
-2\. Geben Sie an, welche Ereignisse Sie beobachten wollen. Ereignisse sind:
-
-2\.1 Neu: Wenn ein Dokument des gewählten Typs erstellt wird.
-
-2\.2 Speichern / Übertragen / Stornieren: Wenn ein Dokument des gewählten Typs gespeichert, übertragen oder storniert wird.
-
-2\.3 Änderung des Wertes: Wenn sich ein bestimmter Wert ändert.
-
-2\.4 Tage vor / Tage nach: Stellen Sie eine Benachrichtigung einige Tage vor oder nach einem **Referenzdatum** ein. Um die Anzahl der Tage einzugeben, geben Sie einen Wert in **Tage vor oder nach** ein. Das kann sehr nützlich sein, wenn es sich um Fälligkeitstermine handelt oder es um das Nachverfolgen von Leads oder Angeboten geht.
-
-3\. Stellen Sie, wenn Sie möchten, Zusatzbedingungen ein.
-
-4\. Geben Sie die Empfänger der Erinnerung an. Der Empfänger kann sowohl über ein Feld des Dokumentes als auch über eine feste Liste ausgewählt werden.
-
-5\. Verfassen Sie die Nachricht.
+1. Wählen Sie das Dokument aus, welches Sie beobachten wollen.
+2. Geben Sie an, welche Ereignisse Sie beobachten wollen. Ereignisse sind:
+ 1. Neu: Wenn ein Dokument des gewählten Typs erstellt wird.
+ 2. Speichern / Übertragen / Stornieren: Wenn ein Dokument des gewählten Typs gespeichert, übertragen oder storniert wird.
+ 3. Änderung des Wertes: Wenn sich ein bestimmter Wert ändert.
+ 4. Tage vor / Tage nach: Stellen Sie eine Benachrichtigung einige Tage vor oder nach einem **Referenzdatum** ein. Um die Anzahl der Tage einzugeben, geben Sie einen Wert in **Tage vor oder nach** ein. Das kann sehr nützlich sein, wenn es sich um Fälligkeitstermine handelt oder es um das Nachverfolgen von Leads oder Angeboten geht.
+3. Stellen Sie, wenn Sie möchten, Zusatzbedingungen ein.
+4. Geben Sie die Empfänger der Erinnerung an. Der Empfänger kann sowohl über ein Feld des Dokumentes als auch über eine feste Liste ausgewählt werden.
+5. Verfassen Sie die Nachricht.
---
#### Beispiel
-1\. [Kriterien definieren](<img class="screenshot" src="{{docs_base_url}}/assets/img/setup/email/email-alert-1.png">)
-
-2\. [Empfänger und Nachrichtentext eingeben](<img class="screenshot" src="{{docs_base_url}}/assets/img/setup/email/email-alert-2.png">)
+1. [Kriterien definieren](<img class="screenshot" src="{{docs_base_url}}/assets/img/setup/email/email-alert-1.png">)
+2. [Empfänger und Nachrichtentext eingeben](<img class="screenshot" src="{{docs_base_url}}/assets/img/setup/email/email-alert-2.png">)
{next}
diff --git a/erpnext/docs/user/manual/de/setting-up/email/sending-email.md b/erpnext/docs/user/manual/de/setting-up/email/sending-email.md
index 730cae5..d2087ca 100644
--- a/erpnext/docs/user/manual/de/setting-up/email/sending-email.md
+++ b/erpnext/docs/user/manual/de/setting-up/email/sending-email.md
@@ -5,6 +5,6 @@
<img class="screenshot" alt="Emails versenden" src="{{docs_base_url}}/assets/img/setup/email/send-email.gif">
-**Anmerkung:** Es müssen Konten zum [E-Mail-Versand]({{docs_base_url}}/user/manual/en/setting-up/email/email-account.html) eingerichtet sein.
+**Anmerkung:** Es müssen Konten zum [E-Mail-Versand]({{docs_base_url}}/user/manual/de/setting-up/email/email-account.html) eingerichtet sein.
{next}
diff --git a/erpnext/docs/user/manual/de/setting-up/settings/naming-series.md b/erpnext/docs/user/manual/de/setting-up/settings/naming-series.md
index ca41025..1a6f336 100644
--- a/erpnext/docs/user/manual/de/setting-up/settings/naming-series.md
+++ b/erpnext/docs/user/manual/de/setting-up/settings/naming-series.md
@@ -23,11 +23,9 @@
In diesem Formular,
-1\. Wählen Sie die Transaktion aus, für die Sie den Nummernkreis einstellen wollen. Das System wird den aktuellen Nummernkreis in der Textbox aktualisieren.
-
-2\. Passen Sie den Nummernkreis nach Ihren Wünschen mit eindeutigen Präfixen an. Jedes Präfix muss in einer neuen Zeile stehen.
-
-3\. Das erste Präfix wird zum Standard-Präfix. Wenn Sie möchten, dass ein Benutzer explizit einen Nummernkreis statt der Standardeinstellung auswählt, markieren Sie die Option "Benutzer muss immer auswählen".
+1. Wählen Sie die Transaktion aus, für die Sie den Nummernkreis einstellen wollen. Das System wird den aktuellen Nummernkreis in der Textbox aktualisieren.
+2. Passen Sie den Nummernkreis nach Ihren Wünschen mit eindeutigen Präfixen an. Jedes Präfix muss in einer neuen Zeile stehen.
+3. Das erste Präfix wird zum Standard-Präfix. Wenn Sie möchten, dass ein Benutzer explizit einen Nummernkreis statt der Standardeinstellung auswählt, markieren Sie die Option "Benutzer muss immer auswählen".
Sie können auch den Startpunkt eines Nummernkreises auswählen, indem Sie den Namen und den Startpunkt des Nummernkreises im Abschnitt "Seriennummer aktualisieren" angeben.
diff --git a/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-5-letterhead-and-logo.md b/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-5-letterhead-and-logo.md
index eca0a67..f32815d 100644
--- a/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-5-letterhead-and-logo.md
+++ b/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-5-letterhead-and-logo.md
@@ -15,7 +15,7 @@
Wenn Ihr Briefkopf noch nicht fertig ist, können Sie diesen Schritt auch überspringen.
-Um später einen Briefkopf über das Modul "Einstellungen" auszuwählen, lesen Sie im Bereich [Briefkopf]({{docs_base_url}}/user/manual/en/setting-up/print/letter-head.html) weiter.
+Um später einen Briefkopf über das Modul "Einstellungen" auszuwählen, lesen Sie im Bereich [Briefkopf]({{docs_base_url}}/user/manual/de/setting-up/print/letter-head.html) weiter.
### Anhang als Internetverknüpfung
diff --git a/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-7-tax-details.md b/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-7-tax-details.md
index cedbe30..76f1538 100644
--- a/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-7-tax-details.md
+++ b/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-7-tax-details.md
@@ -18,6 +18,6 @@
Das Anliegen der Mehrwertsteuer ist es, für den Staat ähnlich der Körperschaftssteuer und der Einkommensteuer Steuererträge zu generieren. Beispiel: Wenn Sie in einem Kaufhaus einkaufen schlägt Ihnen das Geschäft 19% als Mehrwertsteuer auf die Rechnung auf.
-Um im Einstellungsassistenten die Mehrwertsteuer einzustellen, geben Sie einfach den Prozentsatz der vom Staat erhoben wird, ein. Um die Mehrwertsteuer zu einem späteren Zeitpunkt einzustellen, lesen Sie bitte den Abschnitt [Einstellen von Steuern]({{docs_base_url}}/user/manual/en/setting-up/setting-up-taxes.html).
+Um im Einstellungsassistenten die Mehrwertsteuer einzustellen, geben Sie einfach den Prozentsatz der vom Staat erhoben wird, ein. Um die Mehrwertsteuer zu einem späteren Zeitpunkt einzustellen, lesen Sie bitte den Abschnitt [Einstellen von Steuern]({{docs_base_url}}/user/manual/de/setting-up/setting-up-taxes.html).
{next}
diff --git a/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-8-customer-names.md b/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-8-customer-names.md
index 65c4c7a..69fed2b 100644
--- a/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-8-customer-names.md
+++ b/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-8-customer-names.md
@@ -18,6 +18,6 @@
Kontaktname: Shiv Agarwal
-Um mehr über Kunden zu erfahren, lesen Sie im Abschnitt [Details zu Kunden]({{docs_base_url}}/user/manual/en/CRM/customer.html) nach.
+Um mehr über Kunden zu erfahren, lesen Sie im Abschnitt [Details zu Kunden]({{docs_base_url}}/user/manual/de/CRM/customer.html) nach.
{next}
diff --git a/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-9-suppliers.md b/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-9-suppliers.md
index b880cb4..7d398b5 100644
--- a/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-9-suppliers.md
+++ b/erpnext/docs/user/manual/de/setting-up/setup-wizard/step-9-suppliers.md
@@ -8,6 +8,6 @@
---
-Um den Begriff "Lieferant" besser zu verstehen, lesen Sie unter [Lieferantenstammdaten]({{docs_base_url}}/user/manual/en/buying/supplier-master.html) nach.
+Um den Begriff "Lieferant" besser zu verstehen, lesen Sie unter [Lieferantenstammdaten]({{docs_base_url}}/user/manual/de/buying/supplier.html) nach.
{next}
diff --git a/erpnext/docs/user/manual/de/setting-up/third-party-backups.md b/erpnext/docs/user/manual/de/setting-up/third-party-backups.md
index 28ecce2..ba53f5e 100644
--- a/erpnext/docs/user/manual/de/setting-up/third-party-backups.md
+++ b/erpnext/docs/user/manual/de/setting-up/third-party-backups.md
@@ -27,7 +27,7 @@
![Dropbox-Zugriff]({{docs_base_url}}/assets/old_images/erpnext/dropbox-access.png)
-## Für OpenSource-Nutzer:
+## Für OpenSource-Nutzer
Voreinstellungen:
diff --git a/erpnext/docs/user/manual/de/setting-up/users-and-permissions/role-based-permissions.md b/erpnext/docs/user/manual/de/setting-up/users-and-permissions/role-based-permissions.md
index 0dbcab4..6d101bc 100644
--- a/erpnext/docs/user/manual/de/setting-up/users-and-permissions/role-based-permissions.md
+++ b/erpnext/docs/user/manual/de/setting-up/users-and-permissions/role-based-permissions.md
@@ -31,7 +31,7 @@
Um Benutzerberechtigungen zu setzen, gehen Sie zu:
-> Einstellungen > Berechtigungen > [Benutzerrechte-Manager]({{docs_base_url}}/user/manual/en/setting-up/users-and-permissions/user-permissions.html)
+> Einstellungen > Berechtigungen > [Benutzerrechte-Manager]({{docs_base_url}}/user/manual/de/setting-up/users-and-permissions/user-permissions.html)
diff --git a/erpnext/docs/user/manual/de/setting-up/users-and-permissions/user-permissions.md b/erpnext/docs/user/manual/de/setting-up/users-and-permissions/user-permissions.md
index de37271..a751693 100644
--- a/erpnext/docs/user/manual/de/setting-up/users-and-permissions/user-permissions.md
+++ b/erpnext/docs/user/manual/de/setting-up/users-and-permissions/user-permissions.md
@@ -12,7 +12,7 @@
Abbildung: Übersicht aus dem Benutzerberechtigungs-Manager die aufzeigt, wie Benutzer nur auf bestimmte Firmen zugreifen können
-#### Beispiel:
+#### Beispiel
Der Benutzer "aromn@example.com" hat die Rolle "Nutzer Vertrieb" und wir möchten die Zugriffsrechte des Benutzers so einschränken, dass er nur auf Datensätze einer bestimmten Firma, nämlich der Wind Power LLC, zugreifen kann.
diff --git a/erpnext/docs/user/manual/de/stock/accounting-of-inventory-stock/index.md b/erpnext/docs/user/manual/de/stock/accounting-of-inventory-stock/index.md
index 1212013..1a17675 100644
--- a/erpnext/docs/user/manual/de/stock/accounting-of-inventory-stock/index.md
+++ b/erpnext/docs/user/manual/de/stock/accounting-of-inventory-stock/index.md
@@ -9,7 +9,7 @@
Wenn Sie Artikel kaufen und erhalten, werden diese Artikel als Vermögen des Unternehmens gebucht (Warenbestand/Anlagevermögen). Wenn Sie diese Artikel wieder verkaufen und ausliefern, werden Kosten (Selbstkosten) in Höhe der Bezugskosten der Artikel verbucht. Nach jeder Lagertransaktion werden Buchungen im Hauptbuch erstellt. Dies hat zum Ergebnis, dass der Wert im Lagerbuch immer gleich dem Wert in der Bilanz bleibt. Das verbessert die Aussagekraft der Bilanz und der Gewinn- und Verlustrechnung.
-Um Buchungen für bestimmte Lagertransaktionen zu überprüfen, bitte unter [Beispiele]({{docs_base_url}}/user/manual/en/stock/accounting-of-inventory-stock/perpetual-inventory.html) nachlesen.
+Um Buchungen für bestimmte Lagertransaktionen zu überprüfen, bitte unter [Beispiele]({{docs_base_url}}/user/manual/de/stock/accounting-of-inventory-stock/perpetual-inventory.html) nachlesen.
#### Vorteile
@@ -33,6 +33,6 @@
Dieser Gesamtprozess wird als Stichtagsinventur bezeichnet.
-Wenn Sie als bereits existierender Benutzer die Stichtagsinventur nutzen aber zur Ständigen Inventur wechseln möchten, müssen Sie der Migrationsanleitung folgen. Für weitere Details lesen Sie [Migration aus der Stichtagsinventur]({{docs_base_url}}/user/manual/en/stock/accounting-of-inventory-stock/migrate-to-perpetual-inventory.html).
+Wenn Sie als bereits existierender Benutzer die Stichtagsinventur nutzen aber zur Ständigen Inventur wechseln möchten, müssen Sie der Migrationsanleitung folgen. Für weitere Details lesen Sie [Migration aus der Stichtagsinventur]({{docs_base_url}}/user/manual/de/stock/accounting-of-inventory-stock/migrate-to-perpetual-inventory.html).
{next}
diff --git a/erpnext/docs/user/manual/de/stock/accounting-of-inventory-stock/migrate-to-perpetual-inventory.md b/erpnext/docs/user/manual/de/stock/accounting-of-inventory-stock/migrate-to-perpetual-inventory.md
index c233959..742d246 100644
--- a/erpnext/docs/user/manual/de/stock/accounting-of-inventory-stock/migrate-to-perpetual-inventory.md
+++ b/erpnext/docs/user/manual/de/stock/accounting-of-inventory-stock/migrate-to-perpetual-inventory.md
@@ -1,14 +1,14 @@
# Zur Ständigen Inventur wechseln
<span class="text-muted contributed-by">Beigetragen von CWT Connector & Wire Technology GmbH</span>
-Bestehende Benutzer müssen sich an folgende Schritte halten um das neue System der Ständigen Inventur zu aktivieren. Da die Ständige Inventur immer auf einer Synchronisation zwischen Lager und Kontostand aufbaut, ist es nicht möglich diese Option in einer bestehenden Lagereinstellung zu übernehmen. Sie müssen einen komplett neuen Satz von Lägern erstellen, jedes davon verbunden mit dem betreffenden Konto.
+Bestehende Benutzer müssen sich an folgende Schritte halten um das neue System der Ständigen Inventur zu aktivieren. Da die Ständige Inventur immer auf einer Synchronisation zwischen Lager und Kontostand aufbaut, ist es nicht möglich diese Option in einer bestehenden Lagereinstellung zu übernehmen. Sie müssen einen komplett neuen Satz von Lagern erstellen, jedes davon verbunden mit dem betreffenden Konto.
Schritte:
* Heben Sie die Salden der Konten, die Sie zur Pflege des verfügbaren Lagerwertes verwenden, (Warenbestände/Anlagevermögen) durch eine Journalbuchung auf.
- * Da bereits angelegte Läger mit Lagertransaktionen verbunden sind, es aber keine verknüpften Buchungssätze gibt, können diese Läger nicht in einer ständigen Inventur genutzt werden. Sie müssen für zukünftige Lagertransaktionen neue Läger anlegen, die dann mit den zutreffenden Konten verknüpft sind. Wählen Sie bei der Erstellung neuer Läger eine Artikelgruppe unter der das Unterkonto für das Lager erstellt wird.
+ * Da bereits angelegte Lager mit Lagertransaktionen verbunden sind, es aber keine verknüpften Buchungssätze gibt, können diese Lager nicht in einer ständigen Inventur genutzt werden. Sie müssen für zukünftige Lagertransaktionen neue Lager anlegen, die dann mit den zutreffenden Konten verknüpft sind. Wählen Sie bei der Erstellung neuer Lager eine Artikelgruppe unter der das Unterkonto für das Lager erstellt wird.
* Erstellen Sie folgende Standardkonten für jede Firma:
@@ -25,6 +25,6 @@
* Erstellen Sie Lagerbuchungen (Materialübertrag) um verfügbare Lagerbestände von einem existierenden Lager auf ein neues Lager zu übertragen. Sobald im neuen Lager der Lagerbestand verfügbar wird, sollten Sie für zukünftige Transaktionen nur noch das neue Lager verwenden.
-Das System wird für bereits existierende Lagertransaktionen keine Buchungssätze erstellen, wenn sie vor der Aktivierung der Ständigen Inventur übertragen wurden, da die alten Läger nicht mit Konten verknüpft werden. Wenn Sie eine neue Transaktion mit einem alten Lager erstellen oder eine existierende Transaktion ändern, gibt es keine korrespondierenden Buchungssätze. Sie müssen Lager und Kontostände manuell über das Journal synchronisieren.
+Das System wird für bereits existierende Lagertransaktionen keine Buchungssätze erstellen, wenn sie vor der Aktivierung der Ständigen Inventur übertragen wurden, da die alten Lager nicht mit Konten verknüpft werden. Wenn Sie eine neue Transaktion mit einem alten Lager erstellen oder eine existierende Transaktion ändern, gibt es keine korrespondierenden Buchungssätze. Sie müssen Lager und Kontostände manuell über das Journal synchronisieren.
> Anmerkung: Wenn Sie bereits das alte System der Ständigen Inventur nutzen, wird dieses automatisch deaktiviert. Sie müssen den Schritten oben folgen um es wieder zu aktivieren.
diff --git a/erpnext/docs/user/manual/de/stock/accounting-of-inventory-stock/perpetual-inventory.md b/erpnext/docs/user/manual/de/stock/accounting-of-inventory-stock/perpetual-inventory.md
index e41d0c5..9a7f431 100644
--- a/erpnext/docs/user/manual/de/stock/accounting-of-inventory-stock/perpetual-inventory.md
+++ b/erpnext/docs/user/manual/de/stock/accounting-of-inventory-stock/perpetual-inventory.md
@@ -7,22 +7,19 @@
### Aktivierung
-1\. Richten Sie die folgenden Standard-Konten für jede Firma ein:
-
-* Lagerwaren erhalten aber noch nicht abgerechnet
-* Lagerabgleichskonto
-* In der Bewertung enthaltene Kosten
-* Kostenstelle
-
-2\. In der Ständigen Inventur verwaltet das System für jedes Lager einen eigenen Kontostand unter einer eigenen Kontobezeichnung. Um diese Kontobezeichnung zu erstellen, gehen Sie zu "Konto erstellen unter" in den Lagerstammdaten.
-
-3\. Aktivieren Sie die Ständige Inventur.
+1. Richten Sie die folgenden Standard-Konten für jede Firma ein:
+ * Lagerwaren erhalten aber noch nicht abgerechnet
+ * Lagerabgleichskonto
+ * In der Bewertung enthaltene Kosten
+ * Kostenstelle
+2. In der Ständigen Inventur verwaltet das System für jedes Lager einen eigenen Kontostand unter einer eigenen Kontobezeichnung. Um diese Kontobezeichnung zu erstellen, gehen Sie zu "Konto erstellen unter" in den Lagerstammdaten.
+3. Aktivieren Sie die Ständige Inventur.
> Einstellungen > Rechnungswesen > Kontoeinstellungen > Eine Buchung für jede Lagerbewegung erstellen
---
-### Beispiel:
+### Beispiel
Wir nehmen folgenden Kontenplan und folgende Lagereinstellungen für Ihre Firma an:
@@ -60,7 +57,7 @@
* Versandgebühren
* Zoll
-#### Kontenkonfiguration des Lagers:
+#### Kontenkonfiguration des Lagers
* In Verkaufsstellen
* In der Fertigung
diff --git a/erpnext/docs/user/manual/de/stock/articles/index.md b/erpnext/docs/user/manual/de/stock/articles/index.md
index 59fa9ae..2dbba4a 100644
--- a/erpnext/docs/user/manual/de/stock/articles/index.md
+++ b/erpnext/docs/user/manual/de/stock/articles/index.md
@@ -18,7 +18,7 @@
### Lagerbestand: Lager- und Bestandseinstellungen
-In ERPNext können Sie verschiedene Typen von Lägern einstellen um Ihre unterschiedlichen Artikel zu lagern. Die Auswahl kann aufgrund der Artikeltypen getroffen werden. Das kann ein Artikel des Anlagevermögens sein, ein Lagerartikel oder auch ein Fertigungsartikel.
+In ERPNext können Sie verschiedene Typen von Lagern einstellen um Ihre unterschiedlichen Artikel zu lagern. Die Auswahl kann aufgrund der Artikeltypen getroffen werden. Das kann ein Artikel des Anlagevermögens sein, ein Lagerartikel oder auch ein Fertigungsartikel.
* **Lagerartikel:** Wenn Sie Lagerartikel dieses Typs in Ihrem Lagerbestand verwalten, erzeugt ERPNext für jede Transaktion dieses Artikels eine Buchung im Lagerhauptbuch.
* **Standardlager:** Das ist das Lager, welches automatisch bei Ihren Transaktionen ausgewählt wird.
diff --git a/erpnext/docs/user/manual/de/stock/delivery-note.md b/erpnext/docs/user/manual/de/stock/delivery-note.md
index 98ae787..00e66ca 100644
--- a/erpnext/docs/user/manual/de/stock/delivery-note.md
+++ b/erpnext/docs/user/manual/de/stock/delivery-note.md
@@ -19,7 +19,7 @@
### Pakete oder Artikel mit Produkt-Bundles versenden
-Wenn Sie Artikel, die ein [Produkt-Bundle]({{docs_base_url}}/user/manual/en/selling/setup/sales-bom.html), ERPNext will automatically beinhalten, versenden, erstellt Ihnen ERPNext automatisch eine Tabelle "Packliste" basierend auf den Unterartikeln dieses Artikels.
+Wenn Sie Artikel, die ein [Produkt-Bundle]({{docs_base_url}}/user/manual/de/selling/setup/product-bundle.html), ERPNext will automatically beinhalten, versenden, erstellt Ihnen ERPNext automatisch eine Tabelle "Packliste" basierend auf den Unterartikeln dieses Artikels.
Wenn Ihre Artikel serialisiert sind, dann müssen Sie für Artikel vom Typ Produkt-Bundle die Seriennummer in der Tabelle "Packliste" aktualisieren.
diff --git a/erpnext/docs/user/manual/de/stock/index.md b/erpnext/docs/user/manual/de/stock/index.md
index 4241104..5a0c2dd 100644
--- a/erpnext/docs/user/manual/de/stock/index.md
+++ b/erpnext/docs/user/manual/de/stock/index.md
@@ -21,6 +21,6 @@
Um dies umzusetzen, sammelt ERPNext alle Bestandstransaktionen in einer Tabelle, die als Lagerhauptbuch bezeichnet wird. Alle Kaufbelege, Lagerbuchungen und Lieferscheine aktualisieren diese Tabelle.
-### Themen:
+### Themen
{index}
diff --git a/erpnext/docs/user/manual/de/stock/material-request.md b/erpnext/docs/user/manual/de/stock/material-request.md
index ab5977b..0f55b1e 100644
--- a/erpnext/docs/user/manual/de/stock/material-request.md
+++ b/erpnext/docs/user/manual/de/stock/material-request.md
@@ -16,9 +16,9 @@
Eine Materialanfrage kann auf folgende Arten erstellt werden:
* Automatisch aus einem Kundenauftrag heraus.
-* Automatisch, wenn die projizierte Menge eines Artikels in den Lägern einen bestimmten Bestand erreicht.
+* Automatisch, wenn die projizierte Menge eines Artikels in den Lagern einen bestimmten Bestand erreicht.
* Automatisch aus einer Stückliste heraus, wenn Sie das Modul "Produktionsplanung" benutzen, um Ihre Fertigungsaktivitäten zu planen.
-* Wenn Ihre Artikel Bestandsposten sind, müssen Sie überdies das Lager angeben, auf welches diese Artikel geliefert werden sollen. Das hilft dabei die [projizierte Menge]({{docs_base_url}}/user/manual/en/stock/projected-quantity.html) für diesen Artikel im Auge zu behalten.
+* Wenn Ihre Artikel Bestandsposten sind, müssen Sie überdies das Lager angeben, auf welches diese Artikel geliefert werden sollen. Das hilft dabei die [projizierte Menge]({{docs_base_url}}/user/manual/de/stock/projected-quantity.html) für diesen Artikel im Auge zu behalten.
Es gibt folgende Typen von Materialanfragen:
diff --git a/erpnext/docs/user/manual/de/stock/stock-entry.md b/erpnext/docs/user/manual/de/stock/stock-entry.md
index 699713a..4b9fe08 100644
--- a/erpnext/docs/user/manual/de/stock/stock-entry.md
+++ b/erpnext/docs/user/manual/de/stock/stock-entry.md
@@ -21,7 +21,7 @@
In einer Lagerbuchung müssen Sie die Artikelliste mit all Ihren Transaktionen aktualisieren. Für jede Zeile müssen Sie ein Ausgangslager oder ein Eingangslager oder beides eingeben (wenn Sie eine Bewegung erfassen).
-#### Zusätzliche Kosten:
+#### Zusätzliche Kosten
Wenn die Lagerbuchung eine Eingangsbuchung ist, d. h. wenn ein beliebiger Artikel an einem Ziellager angenommen wird, können Sie zusätzliche Kosten erfassen (wie Versandgebühren, Zollgebühren, Betriebskosten, usw.), die mit dem Prozess verbunden sind. Die Zusatzkosten werden berücksichtigt, um den Wert des Artikels zu kalkulieren.
diff --git a/erpnext/docs/user/manual/de/stock/tools/landed-cost-voucher.md b/erpnext/docs/user/manual/de/stock/tools/landed-cost-voucher.md
index 1a311e2..340e104 100644
--- a/erpnext/docs/user/manual/de/stock/tools/landed-cost-voucher.md
+++ b/erpnext/docs/user/manual/de/stock/tools/landed-cost-voucher.md
@@ -27,10 +27,8 @@
### Was passiert bei der Ausgabe?
-1\. Bei der Ausgabe des Einstandskostenbelegs werden die zutreffenden Einstandskosten in der Artikelliste des Kaufbelegs aktualisiert.
-
-2\. Die Bewertung der Artikel wird basierend auf den neuen Einstandskosten neu berechnet.
-
-3\. Wenn Sie die Ständige Inventur nutzen, verbucht das System Buchungen im Hauptbuch um den Lagerbestand zu korrigieren. Es belastet (erhöht) das Konto des zugehörigen Lagers und entlastet (erniedrigt) das Konto "Ausgaben in Bewertung eingerechnet". Wenn Artikel schon geliefert wurden, wurden die Selbstkosten zur alten Bewertung verbucht. Daher werden Hauptbuch-Buchungen erneut für alle zukünftigen ausgehenden Buchungen verbundener Artikel erstellt um den Selbstkosten-Betrag zu korrigieren.
+1. Bei der Ausgabe des Einstandskostenbelegs werden die zutreffenden Einstandskosten in der Artikelliste des Kaufbelegs aktualisiert.
+2. Die Bewertung der Artikel wird basierend auf den neuen Einstandskosten neu berechnet.
+3. Wenn Sie die Ständige Inventur nutzen, verbucht das System Buchungen im Hauptbuch um den Lagerbestand zu korrigieren. Es belastet (erhöht) das Konto des zugehörigen Lagers und entlastet (erniedrigt) das Konto "Ausgaben in Bewertung eingerechnet". Wenn Artikel schon geliefert wurden, wurden die Selbstkosten zur alten Bewertung verbucht. Daher werden Hauptbuch-Buchungen erneut für alle zukünftigen ausgehenden Buchungen verbundener Artikel erstellt um den Selbstkosten-Betrag zu korrigieren.
{next}
diff --git a/erpnext/docs/user/manual/de/stock/warehouse.md b/erpnext/docs/user/manual/de/stock/warehouse.md
index 5025d16..a2e6c43 100644
--- a/erpnext/docs/user/manual/de/stock/warehouse.md
+++ b/erpnext/docs/user/manual/de/stock/warehouse.md
@@ -1,7 +1,7 @@
# Lager
<span class="text-muted contributed-by">Beigetragen von CWT Connector & Wire Technology GmbH</span>
-Ein Lager ist ein geschäftlich genutztes Gebäude zum Lagern von Waren. Läger werden von Herstellern, Importeuren, Exporteuren, Großhändlern, Transporteuren, vom Zoll, usw. genutzt. Es handelt sich normalerweise um große, flache Gebäude in Industriegebieten von Städten und Ortschaften. Meistens verfügen sie über Ladestationen um Waren auf LKWs zu verladen und sie aus LKWs zu entladen.
+Ein Lager ist ein geschäftlich genutztes Gebäude zum Lagern von Waren. Lager werden von Herstellern, Importeuren, Exporteuren, Großhändlern, Transporteuren, vom Zoll, usw. genutzt. Es handelt sich normalerweise um große, flache Gebäude in Industriegebieten von Städten und Ortschaften. Meistens verfügen sie über Ladestationen um Waren auf LKWs zu verladen und sie aus LKWs zu entladen.
Um zum Bereich "Lager" zu gelangen, klicken Sie auf "Lagerbestand" und gehen Sie unter "Dokumente" auf "Lager". Sie können auch über das Modul "Einstellungen" gehen und auf "Lagerbestand" und "Lager-Einstellungen" klicken.
@@ -9,13 +9,13 @@
<img class="screenshot" alt="Lager" src="{{docs_base_url}}/assets/img/stock/warehouse.png">
-In ERPNext muss jedes Lager einer festen Firma zugeordnet sein, um einen unternehmensbezogenen Lagerbestand zu erhalten. Die Läger werden mit den ihnen zugeordneten Firmenkürzeln abgespeichert. Dies erleichtert es auf einen Blick herauszufinden, welches Lager zu welcher Firma gehört.
+In ERPNext muss jedes Lager einer festen Firma zugeordnet sein, um einen unternehmensbezogenen Lagerbestand zu erhalten. Die Lager werden mit den ihnen zugeordneten Firmenkürzeln abgespeichert. Dies erleichtert es auf einen Blick herauszufinden, welches Lager zu welcher Firma gehört.
-Sie können für diese Läger Benutzereinschränkungen mit einstellen. Wenn Sie nicht möchten, dass ein bestimmter Benutzer mit einem bestimmten Lager arbeiten kann, können Sie diesen Benutzer vom Zugriff auf das Lager ausschliessen.
+Sie können für diese Lager Benutzereinschränkungen mit einstellen. Wenn Sie nicht möchten, dass ein bestimmter Benutzer mit einem bestimmten Lager arbeiten kann, können Sie diesen Benutzer vom Zugriff auf das Lager ausschliessen.
-### Läger verschmelzen
+### Lager verschmelzen
-Bei der täglichen Arbeit kommt es vor, dass fälschlicherweise doppelte Einträge erstellt werden, was zu doppelten Lägern führt. Doppelte Datensätze können zu einem einzigen Lagerort verschmolzen werden. Wählen Sie hierzu aus der Kopfmenüleiste des Systems das Menü "Datei" aus. Wählen Sie "Umbenennen" und geben Sie das richtige Lager ein, drücken Sie danach die Schaltfläche "Verschmelzen". Das System ersetzt in allen Transaktionen alle falschen Lagereinträge durch das richtige Lager. Weiterhin wird die verfügbare Menge (tatsächliche Menge, reservierte Menge, bestellte Menge, usw.) aller Artikel im doppelt vorhandenen Lager auf das richtige Lager übertragen. Löschen Sie nach dem Abschluß der Verschmelzung das doppelte Lager.
+Bei der täglichen Arbeit kommt es vor, dass fälschlicherweise doppelte Einträge erstellt werden, was zu doppelten Lagern führt. Doppelte Datensätze können zu einem einzigen Lagerort verschmolzen werden. Wählen Sie hierzu aus der Kopfmenüleiste des Systems das Menü "Datei" aus. Wählen Sie "Umbenennen" und geben Sie das richtige Lager ein, drücken Sie danach die Schaltfläche "Verschmelzen". Das System ersetzt in allen Transaktionen alle falschen Lagereinträge durch das richtige Lager. Weiterhin wird die verfügbare Menge (tatsächliche Menge, reservierte Menge, bestellte Menge, usw.) aller Artikel im doppelt vorhandenen Lager auf das richtige Lager übertragen. Löschen Sie nach dem Abschluß der Verschmelzung das doppelte Lager.
> Hinweis: ERPNext berechnet den Lagerbestand für jede mögliche Kombination aus Artikel und Lager. Aus diesem Grund können Sie sich für jeden beliebigen Artikel den Lagerbestand in einem bestimmten Lager zu einem bestimmten Datum anzeigen lassen.
diff --git a/erpnext/docs/user/manual/de/support/index.md b/erpnext/docs/user/manual/de/support/index.md
index a4bb1f4..3b43a4d 100644
--- a/erpnext/docs/user/manual/de/support/index.md
+++ b/erpnext/docs/user/manual/de/support/index.md
@@ -5,6 +5,6 @@
In diesem Modul können Sie eingehende Supportanfragen über Supporttickets abwickeln. Sie können somit auch Kundenanfragen zu bestimmten Seriennummern im Auge behalten und diese basierend auf der Garantie und anderen Informationen beantworten. Weiterhin können Sie Wartungspläne für Seriennummern erstellen und Wartungsbesuche bei Ihren Kunden aufzeichnen.
-Themen
+### Themen
{index}
diff --git a/erpnext/docs/user/manual/de/using-erpnext/collaborating-around-forms.md b/erpnext/docs/user/manual/de/using-erpnext/collaborating-around-forms.md
index b84dac7..3107a2b 100644
--- a/erpnext/docs/user/manual/de/using-erpnext/collaborating-around-forms.md
+++ b/erpnext/docs/user/manual/de/using-erpnext/collaborating-around-forms.md
@@ -13,6 +13,6 @@
### Schlagworte
-Lesen Sie hier mehr über [Schlagworte]({{docs_base_url}}/user/manual/en/collaboration-tools/tags.html)
+Lesen Sie hier mehr über [Schlagworte]({{docs_base_url}}/user/manual/de/using-erpnext/tags.html)
{next}
diff --git a/erpnext/docs/user/manual/de/website/index.md b/erpnext/docs/user/manual/de/website/index.md
index 2f8b4de..ca0310b 100644
--- a/erpnext/docs/user/manual/de/website/index.md
+++ b/erpnext/docs/user/manual/de/website/index.md
@@ -13,11 +13,9 @@
Wir haben uns genau das gleiche gedacht und haben deshalb eine kleine aber feine App zur Webseitenentwicklung gebaut, direkt in ERPNext! Wenn Sie das Webseitenmodul von ERPNext nutzen, können Sie:
-1\. Webseiten erstellen
-
-2\. Einen Blog schreiben
-
-3\. Ihren Produktkatalog basierend auf den Artikelstammdaten erstellen
+1. Webseiten erstellen
+2. Einen Blog schreiben
+3. Ihren Produktkatalog basierend auf den Artikelstammdaten erstellen
In Kürze werden wir einen Einkaufswagen mit bereit stellen, so dass Ihre Kunden Bestellung aufgeben können und online zahlen können.
diff --git a/erpnext/docs/user/manual/de/website/setup/website-settings.md b/erpnext/docs/user/manual/de/website/setup/website-settings.md
index efab665..45a4498 100644
--- a/erpnext/docs/user/manual/de/website/setup/website-settings.md
+++ b/erpnext/docs/user/manual/de/website/setup/website-settings.md
@@ -7,7 +7,7 @@
### Zielseite
-* Homepage: Sie können angeben, welche [Webseite]({{docs_base_url}}/user/manual/en/website/web-page.html) die Startseite der Homepage ist.
+* Homepage: Sie können angeben, welche [Webseite]({{docs_base_url}}/user/manual/de/website/web-page.html) die Startseite der Homepage ist.
* Startseite ist "Products": Wenn diese Option markiert ist, ist die Standard-Artikelgruppe die Startseite der Webseite.
* Titel-Präfix: Stellt den Browser-Titel ein.
diff --git a/erpnext/docs/user/manual/de/website/web-form.md b/erpnext/docs/user/manual/de/website/web-form.md
index ce660f6..473f2c7 100644
--- a/erpnext/docs/user/manual/de/website/web-form.md
+++ b/erpnext/docs/user/manual/de/website/web-form.md
@@ -13,13 +13,10 @@
> Webseite > Web-Formular > Neu
-1\. Geben Sie die Bezeichnung und die URL des Web-Formulars an.
-
-2\. Wählen Sie den DocType aus, in dem der Benutzer Datensätze speichern soll.
-
-3\. Geben Sie an, ob sich der Benutzer einloggen muss, Daten ändern muss, mehrere verschiedene Datensätze verwalten soll, etc.
-
-4\. Fügen Sie die Felder, die Sie in den Datensätzen haben wollen, hinzu.
+1. Geben Sie die Bezeichnung und die URL des Web-Formulars an.
+2. Wählen Sie den DocType aus, in dem der Benutzer Datensätze speichern soll.
+3. Geben Sie an, ob sich der Benutzer einloggen muss, Daten ändern muss, mehrere verschiedene Datensätze verwalten soll, etc.
+4. Fügen Sie die Felder, die Sie in den Datensätzen haben wollen, hinzu.
<img class="screenshot" alt="Webformular" src="{{docs_base_url}}/assets/img/website/web-form.png">
diff --git a/erpnext/docs/user/manual/en/CRM/customer.md b/erpnext/docs/user/manual/en/CRM/customer.md
index 90a4228..88f9e66 100644
--- a/erpnext/docs/user/manual/en/CRM/customer.md
+++ b/erpnext/docs/user/manual/en/CRM/customer.md
@@ -21,9 +21,9 @@
Contacts and Addresses in ERPNext are stored separately so that you can
attach multiple Contacts or Addresses to Customers and Suppliers.
-Read [Contact]({{docs_base_url}}/user/manual/en/crm/contact.html) to know more.
+Read [Contact]({{docs_base_url}}/user/manual/en/CRM/contact.html) to know more.
-Thus we may have identical Customer Names that are uniquely identified by the ID. Since the email address is not part of the customer information the linking of customer and User is through [Contacts]({{docs_base_url}}/user/manual/en/crm/contact.html)
+Thus we may have identical Customer Names that are uniquely identified by the ID. Since the email address is not part of the customer information the linking of customer and User is through [Contacts]({{docs_base_url}}/user/manual/en/CRM/contact.html)
### Integration with Accounts
@@ -52,12 +52,12 @@
“Credit Limit”. You can also set a global “Credit Limit” in the Company
master. Classifying Customers
-ERPNext allows you to group your Customers using [Customer Group]({{docs_base_url}}/user/manual/en/crm/setup/customer-group.html)
-and also divide them into [Territories]({{docs_base_url}}/user/manual/en/crm/setup/territory.html)
+ERPNext allows you to group your Customers using [Customer Group]({{docs_base_url}}/user/manual/en/CRM/setup/customer-group.html)
+and also divide them into [Territories]({{docs_base_url}}/user/manual/en/CRM/setup/territory.html)
Grouping will help you get better analysis of your data and
identify which Customers are profitable and which are not. Territories will
help you set sales targets for the respective territories.
-You can also mention [Sales Person]({{docs_base_url}}/user/manual/en/crm/setup/sales-person.html) against a customer.
+You can also mention [Sales Person]({{docs_base_url}}/user/manual/en/CRM/setup/sales-person.html) against a customer.
### Sales Partner
diff --git a/erpnext/docs/user/manual/en/CRM/setup/campaign.md b/erpnext/docs/user/manual/en/CRM/setup/campaign.md
index baf6ba4..9714350 100644
--- a/erpnext/docs/user/manual/en/CRM/setup/campaign.md
+++ b/erpnext/docs/user/manual/en/CRM/setup/campaign.md
@@ -4,7 +4,7 @@
<img class="screenshot" alt="Campaign" src="{{docs_base_url}}/assets/img/crm/campaign.png">
-You can track [Lead]({{docs_base_url}}/user/manual/en/crm/lead.html), [Opportunity]({{docs_base_url}}/user/manual/en/crm/opportunity.html), [Quotation]({{docs_base_url}}/user/manual/en/selling/quotation.html) against a campaign.
+You can track [Lead]({{docs_base_url}}/user/manual/en/CRM/lead.html), [Opportunity]({{docs_base_url}}/user/manual/en/CRM/opportunity.html), [Quotation]({{docs_base_url}}/user/manual/en/selling/quotation.html) against a campaign.
###Track Leads against Campaign
diff --git a/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md b/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md
index 2acdd37..1cdbd1e 100644
--- a/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md
+++ b/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md
@@ -45,6 +45,10 @@
In the depreciation entry, the "Accumulated Depreciation Account" is credited and "Depreciation Expense Account" is debited. The related accounts can be set in the Asset Category or Company.
+For better visibility, net value of the asset on different depreciation dates are shown in a line graph.
+
+<img class="screenshot" alt="Asset" src="{{docs_base_url}}/assets/img/accounts/asset-graph.png">
+
## Purchase an asset
@@ -71,4 +75,14 @@
You can scrap an asset anytime using the "Scrap Asset" button in the Asset record. The "Gain/Loss Account on Asset Disposal" mentioned in the Company is debited by the Current Value (After Depreciation) of the asset. After scrapping, you can also restore the asset using "Restore Asset" button.
-<img class="screenshot" alt="Asset" src="{{docs_base_url}}/assets/img/accounts/scrap-journal-entry.png">
\ No newline at end of file
+<img class="screenshot" alt="Asset" src="{{docs_base_url}}/assets/img/accounts/scrap-journal-entry.png">
+
+## Asset Movement
+
+The movement of the assets (from one warehouse to another) is also tracked via Asset Movement form.
+
+<img class="screenshot" alt="Asset" src="{{docs_base_url}}/assets/img/accounts/asset-movement.png">
+
+There is also a dedicated button "Transfer Asset" inside the Asset form to track the Asset Movement.
+
+<img class="screenshot" alt="Asset" src="{{docs_base_url}}/assets/img/accounts/asset-movement-using-button.png">
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/accounts/tools/payment-tool.md b/erpnext/docs/user/manual/en/accounts/tools/payment-tool.md
index a5d6966..2b2ec36 100644
--- a/erpnext/docs/user/manual/en/accounts/tools/payment-tool.md
+++ b/erpnext/docs/user/manual/en/accounts/tools/payment-tool.md
@@ -11,14 +11,14 @@
6. Click on Get Outstanding Vouchers to fetch all the valid Vouchers, Invoices and Orders against which a payment can be made/received. These will appear in the Against Voucher section.
* __Note:__ In case User is paying a customer or receiving payment from a supplier, add the details regarding the relevant invoices and orders manually.
-<img class="screenshot" alt="Payment Tool" src="{{docs_base_url}}/assets/img/accounts/payment-tool-1.png">
+ <img class="screenshot" alt="Payment Tool" src="{{docs_base_url}}/assets/img/accounts/payment-tool-1.png">
7. Once details have been fetched, click on the detail entry and enter the payment amount made against that Invoice/Order/Voucher
-<img class="screenshot" alt="Payment Tool" src="{{docs_base_url}}/assets/img/accounts/payment-tool-2.png">
+ <img class="screenshot" alt="Payment Tool" src="{{docs_base_url}}/assets/img/accounts/payment-tool-2.png">
8. Click on 'Make Journal Entry' to generate a new Journal Entry with the relevant Party Details and Credit/Debit details filled in.
-<img class="screenshot" alt="Payment Tool" src="{{docs_base_url}}/assets/img/accounts/payment-tool-3.png">
+ <img class="screenshot" alt="Payment Tool" src="{{docs_base_url}}/assets/img/accounts/payment-tool-3.png">
{next}
diff --git a/erpnext/docs/user/manual/en/customize-erpnext/articles/making-custom-reports-in-erpnext.md b/erpnext/docs/user/manual/en/customize-erpnext/articles/making-custom-reports-in-erpnext.md
index 46af27e..7bc965b 100644
--- a/erpnext/docs/user/manual/en/customize-erpnext/articles/making-custom-reports-in-erpnext.md
+++ b/erpnext/docs/user/manual/en/customize-erpnext/articles/making-custom-reports-in-erpnext.md
@@ -12,12 +12,12 @@
Query Report is written in SQL which pull values from account's database and fetch in the report. Though SQL queries can be written from front end, like HTML, its restricted in hosted users. Because it will allow users with no access to specific report to query data directly from the database.
-Check Purchase Order Item to be Received report in Stock module for example of Query report. Click [here](https://frappe.github.io/frappe/user/guides/reports-and-printing/how-to-make-query-report.html) to learn how to create Query Report.
+Check Purchase Order Item to be Received report in Stock module for example of Query report. Click [here](https://frappe.github.io/frappe/user/en/guides/reports-and-printing/how-to-make-query-report.html) to learn how to create Query Report.
### 3. Script Report
Script Reports are written in Python and stored on server side. These are complex reports which involves logic and calculation. Since these reports are written on server side, customizing it from hosted account is not possible.
-Check Financial Analytics report in Accounts module for example of Script Report. Click [here](https://frappe.github.io/frappe/user/guides/reports-and-printing/how-to-make-script-reports.html) to learn how to create Script Report.
+Check Financial Analytics report in Accounts module for example of Script Report. Click [here](https://frappe.github.io/frappe/user/en/guides/reports-and-printing/how-to-make-script-reports.html) to learn how to create Script Report.
<!-- markdown -->
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/customize-erpnext/customize-form.md b/erpnext/docs/user/manual/en/customize-erpnext/customize-form.md
index b93d76e..f52cee1 100644
--- a/erpnext/docs/user/manual/en/customize-erpnext/customize-form.md
+++ b/erpnext/docs/user/manual/en/customize-erpnext/customize-form.md
@@ -1,5 +1,5 @@
<!--markdown-->
-Before we venture to learn form customization tool, click [here](https://frappe.github.io/frappe/user/tutorial/doctypes.html) to understand the architecture of forms in ERPNext. It shall help you in using Customize Form tool more efficiently.
+Before we venture to learn form customization tool, click [here](https://frappe.github.io/frappe/user/en/tutorial/doctypes.html) to understand the architecture of forms in ERPNext. It shall help you in using Customize Form tool more efficiently.
Customize Form is the tool which allows user to customize property of the standard fields, and insert [custom fields]({{docs_base_url}}/user/manual/en/customize-erpnext/custom-field.html) as per the requirement. Let's assume we need to set Project Name field as a mandatory field in the Sales Order form. Following are the steps which shall be followed to achieve this.
diff --git a/erpnext/docs/user/manual/en/human-resources/leave-application.md b/erpnext/docs/user/manual/en/human-resources/leave-application.md
index 59c963f..824cd04 100644
--- a/erpnext/docs/user/manual/en/human-resources/leave-application.md
+++ b/erpnext/docs/user/manual/en/human-resources/leave-application.md
@@ -17,8 +17,8 @@
> Tip : If you want all users to create their own Leave Applications, you can set
their “Employee ID” as a match rule in the Leave Application Permission
-settings. See the earlier discussion on [Setting Up Permissions]({{docs_base_url}}/user/manual/en/setting-up/users-and-permissions.html)
+settings. See the earlier discussion on [Setting Up Permissions]({{docs_base_url}}/user/manual/en/setting-up/users-and-permissions/user-permissions.html)
for more info.
-You assign Leaves aginast an Employee check [Leave Allocation]({{docs_base_url}}/user/manual/en/human-resources/setup/leave-allocation.html)
+You assign Leaves aginast an Employee check [Leave Allocation]({{docs_base_url}}/user/manual/en/human-resources/leave.html)
{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/introduction/concepts-and-terms.md b/erpnext/docs/user/manual/en/introduction/concepts-and-terms.md
index 7761198..2be5a86 100644
--- a/erpnext/docs/user/manual/en/introduction/concepts-and-terms.md
+++ b/erpnext/docs/user/manual/en/introduction/concepts-and-terms.md
@@ -145,13 +145,19 @@
A person who could be a future source of business. A Lead may generate
Opportunities. (from: “may lead to a sale”).
-> Selling > Lead
+> CRM > Lead
#### Opportunity
A potential sale. (from: “opportunity for a business”).
-> Selling > Opportunity
+> CRM > Opportunity
+
+#### Quotation
+
+Customer's request to price an item or service.
+
+> Selling > Quotation
#### Sales Order
diff --git a/erpnext/docs/user/manual/en/projects/tasks.md b/erpnext/docs/user/manual/en/projects/tasks.md
index f04406f..dd9d77a 100644
--- a/erpnext/docs/user/manual/en/projects/tasks.md
+++ b/erpnext/docs/user/manual/en/projects/tasks.md
@@ -41,7 +41,7 @@
### Managing Expenses
-You can book [Expense Claim]({{docs_base_url}}/user/manual/en/human-resource-management/expense-claim.html) against a task.
+You can book [Expense Claim]({{docs_base_url}}/user/manual/en/human-resources/expense-claim.html) against a task.
The system shall update the total amount from expense claims in the costing section.
* To view Expense Claims made against a Task click on 'Expense Claims'
diff --git a/erpnext/docs/user/manual/en/setting-up/articles/integrating-erpnext-with-other-application.md b/erpnext/docs/user/manual/en/setting-up/articles/integrating-erpnext-with-other-application.md
index 2d2c179..3cbf159 100644
--- a/erpnext/docs/user/manual/en/setting-up/articles/integrating-erpnext-with-other-application.md
+++ b/erpnext/docs/user/manual/en/setting-up/articles/integrating-erpnext-with-other-application.md
@@ -2,6 +2,6 @@
For now, ERPNext has out-of-the-box integration available for some applications like Shopify, your SMS gateway and payment gateway. To integrate ERPNext with other application, you can use REST API of Frappe. Check following links to learn more about REST API of Frappe.
-[Frappe Rest API](https://frappe.github.io/frappe/user/guides/integration/rest_api.html)
+[Frappe Rest API](https://frappe.github.io/frappe/user/en/guides/integration/rest_api.html)
<!-- markdown -->
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/setting-up/email/email-alerts.md b/erpnext/docs/user/manual/en/setting-up/email/email-alerts.md
index f4cccd3..1a5d13a 100644
--- a/erpnext/docs/user/manual/en/setting-up/email/email-alerts.md
+++ b/erpnext/docs/user/manual/en/setting-up/email/email-alerts.md
@@ -28,6 +28,41 @@
1. Set the recipients of this alert. The recipient could either be a field of the document or a list of fixed email ids.
1. Compose the message
+
+### Setting a Subject
+You can retrieve the data for a particular field by using `doc.[field_name]`. To use it in your subject / message, you have to surround it with `{{ }}`. These are called [Jinja](http://jinja.pocoo.org/) tags. So, for example to get the name of a document, you use `{{ doc.name }}`. The below example sends an email on saving a Task with the Subject, "TASK##### has been created"
+
+<img class="screenshot" alt="Setting Subject" src="{{docs_base_url}}/assets/img/setup/email/email-alert-subject.png">
+
+### Setting Conditions
+
+Email alerts allow you to set conditions according to the field data in your documents. For example, if you want to recieve an Email if a Lead has been saved as "Interested" as it's status, you put `doc.status == "Interested"` in the conditions textbox. You can also set more complex conditions by combining them.
+
+<img class="screenshot" alt="Setting Condition" src="{{docs_base_url}}/assets/img/setup/email/email-alert-condition.png">
+
+The above example will send an Email Alert when a Task is saved with the status "Open" and the Expected End Date for the Task is the date on or before the date on which it was saved on.
+
+### Setting a Message
+
+You can use both Jinja Tags (`{{ doc.[field_name] }}`) and HTML tags in the message textbox.
+
+ <h3>Order Overdue</h3>
+
+ <p>Transaction {{ doc.name }} has exceeded Due Date. Please take necessary action.</p>
+
+ <!-- show last comment -->
+ {% if comments %}
+ Last comment: {{ comments[-1].comment }} by {{ comments[-1].by }}
+ {% endif %}
+
+ <h4>Details</h4>
+
+ <ul>
+ <li>Customer: {{ doc.customer }}
+ <li>Amount: {{ doc.total_amount }}
+ </ul>
+
+
---
### Example
diff --git a/erpnext/docs/user/manual/en/setting-up/setup-wizard/step-9-suppliers.md b/erpnext/docs/user/manual/en/setting-up/setup-wizard/step-9-suppliers.md
index 0e4b96a..762c984 100644
--- a/erpnext/docs/user/manual/en/setting-up/setup-wizard/step-9-suppliers.md
+++ b/erpnext/docs/user/manual/en/setting-up/setup-wizard/step-9-suppliers.md
@@ -7,6 +7,6 @@
---
-To understand Suppliers in detail visit [Supplier Master]({{docs_base_url}}/user/manual/en/buying/supplier-master.html)
+To understand Suppliers in detail visit [Supplier Master]({{docs_base_url}}/user/manual/en/buying/supplier.html)
{next}
diff --git a/erpnext/docs/user/manual/en/stock/delivery-note.md b/erpnext/docs/user/manual/en/stock/delivery-note.md
index 358f037..236e24b 100644
--- a/erpnext/docs/user/manual/en/stock/delivery-note.md
+++ b/erpnext/docs/user/manual/en/stock/delivery-note.md
@@ -22,7 +22,7 @@
### Shipping Packets or Items with Product Bundle
-If you are shipping Items that have a [Product Bundle]({{docs_base_url}}/user/manual/en/selling/setup/sales-bom.html), ERPNext will automatically
+If you are shipping Items that have a [Product Bundle]({{docs_base_url}}/user/manual/en/selling/setup/product-bundle.html), ERPNext will automatically
create a “Packing List” table for you based on the sub-Items in that Item.
If your Items are serialized, then for Product Bundle type of Items, you will have
diff --git a/erpnext/docs/user/manual/en/using-erpnext/collaborating-around-forms.md b/erpnext/docs/user/manual/en/using-erpnext/collaborating-around-forms.md
index 8ce9b68..7418d73 100644
--- a/erpnext/docs/user/manual/en/using-erpnext/collaborating-around-forms.md
+++ b/erpnext/docs/user/manual/en/using-erpnext/collaborating-around-forms.md
@@ -14,6 +14,6 @@
### Tags
-[Read more about Tags]({{docs_base_url}}/user/manual/en/collaboration-tools/tags.html)
+[Read more about Tags]({{docs_base_url}}/user/manual/en/using-erpnext/tags.html)
{next}
diff --git a/erpnext/docs/user/manual/en/website/setup/index.md b/erpnext/docs/user/manual/en/website/setup/index.md
index e14b2fd..212ccfb 100644
--- a/erpnext/docs/user/manual/en/website/setup/index.md
+++ b/erpnext/docs/user/manual/en/website/setup/index.md
@@ -1,5 +1,5 @@
Settings for your website can be mentioned under setup.
-###Topics
+### Topics
{index}
\ No newline at end of file
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 85fee1f..aef612b 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -7,7 +7,7 @@
app_description = """ERP made simple"""
app_icon = "icon-th"
app_color = "#e74c3c"
-app_version = "6.27.11"
+app_version = "6.27.17"
app_email = "info@erpnext.com"
app_license = "GNU General Public License (v3)"
source_link = "https://github.com/frappe/erpnext"
@@ -32,6 +32,8 @@
on_session_creation = "erpnext.shopping_cart.utils.set_cart_count"
on_logout = "erpnext.shopping_cart.utils.clear_cart_count"
+remember_selected = ['Company', 'Cost Center', 'Project']
+
# website
update_website_context = "erpnext.shopping_cart.utils.update_website_context"
my_account_context = "erpnext.shopping_cart.utils.update_my_account_context"
diff --git a/erpnext/hr/doctype/employee/employee.js b/erpnext/hr/doctype/employee/employee.js
index a7198e3..8857bad 100755
--- a/erpnext/hr/doctype/employee/employee.js
+++ b/erpnext/hr/doctype/employee/employee.js
@@ -4,7 +4,6 @@
frappe.provide("erpnext.hr");
erpnext.hr.EmployeeController = frappe.ui.form.Controller.extend({
setup: function() {
- this.frm.hide_first = true;
this.frm.fields_dict.user_id.get_query = function(doc, cdt, cdn) {
return { query:"frappe.core.doctype.user.user.user_query"} }
this.frm.fields_dict.reports_to.get_query = function(doc, cdt, cdn) {
diff --git a/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.py b/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.py
index 061f606..fb58d75 100755
--- a/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.py
+++ b/erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.py
@@ -21,4 +21,4 @@
user_role.role = "Leave Approver"
and user_role.parent = user.name and
user.name != %s
- """, name)
\ No newline at end of file
+ """, name or "")
\ No newline at end of file
diff --git a/erpnext/hr/doctype/hr_settings/hr_settings.js b/erpnext/hr/doctype/hr_settings/hr_settings.js
new file mode 100644
index 0000000..6ab523e
--- /dev/null
+++ b/erpnext/hr/doctype/hr_settings/hr_settings.js
@@ -0,0 +1,8 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.ui.form.on('HR Settings', {
+ refresh: function(frm) {
+
+ }
+});
diff --git a/erpnext/hr/doctype/hr_settings/hr_settings.json b/erpnext/hr/doctype/hr_settings/hr_settings.json
index 99625fd..561f013 100644
--- a/erpnext/hr/doctype/hr_settings/hr_settings.json
+++ b/erpnext/hr/doctype/hr_settings/hr_settings.json
@@ -16,12 +16,15 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Employee Settings",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -39,13 +42,16 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Employee Records to be created by",
+ "length": 0,
"no_copy": 0,
"options": "Naming Series\nEmployee Number",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -62,12 +68,15 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Stop Birthday Reminders",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -83,12 +92,15 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Payroll Settings",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -105,12 +117,42 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Include holidays in Total no. of Working Days",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "default": "1",
+ "description": "Check if you want to send salary slip in mail to each employee while submitting salary slip",
+ "fieldname": "email_salary_slip_to_employee",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Email Salary Slip to Employee",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -128,7 +170,8 @@
"is_submittable": 0,
"issingle": 1,
"istable": 0,
- "modified": "2015-02-05 05:11:39.153447",
+ "max_attachments": 0,
+ "modified": "2016-04-26 05:54:32.501880",
"modified_by": "Administrator",
"module": "HR",
"name": "HR Settings",
@@ -156,5 +199,6 @@
}
],
"read_only": 0,
- "read_only_onload": 0
+ "read_only_onload": 0,
+ "sort_order": "ASC"
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json
index c92fbb8..17e667e 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json
@@ -15,11 +15,14 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -33,17 +36,20 @@
"bold": 0,
"collapsible": 0,
"description": "Leave blank if considered for all employee types",
- "fieldname": "employee_type",
+ "fieldname": "employment_type",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
- "label": "Employee Type",
+ "label": "Employment Type",
+ "length": 0,
"no_copy": 0,
"options": "Employment Type",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -60,13 +66,16 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Branch",
+ "length": 0,
"no_copy": 0,
"options": "Branch",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -83,13 +92,16 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Department",
+ "length": 0,
"no_copy": 0,
"options": "Department",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -106,13 +118,16 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Designation",
+ "length": 0,
"no_copy": 0,
"options": "Designation",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -128,11 +143,14 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -149,13 +167,16 @@
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "From Date",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -171,13 +192,16 @@
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "To Date",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -193,13 +217,16 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Leave Type",
+ "length": 0,
"no_copy": 0,
"options": "Leave Type",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -216,12 +243,15 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Carry Forward",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -237,12 +267,15 @@
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "New Leaves Allocated (In Days)",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -258,13 +291,16 @@
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Allocate",
+ "length": 0,
"no_copy": 0,
"options": "allocate_leave",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -282,7 +318,8 @@
"is_submittable": 0,
"issingle": 1,
"istable": 0,
- "modified": "2015-10-28 16:23:57.733900",
+ "max_attachments": 0,
+ "modified": "2016-05-05 05:45:33.355366",
"modified_by": "Administrator",
"module": "HR",
"name": "Leave Control Panel",
diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
index 77c7ad9..b4561f1 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
@@ -10,27 +10,24 @@
class LeaveControlPanel(Document):
def get_employees(self):
- lst1 = [[self.employee_type,"employment_type"],[self.branch,"branch"],[self.designation,"designation"],[self.department, "department"]]
- condition = "where "
- flag = 0
- for l in lst1:
- if(l[0]):
- if flag == 0:
- condition += l[1] + "= '" + l[0] +"'"
- else:
- condition += " and " + l[1]+ "= '" +l[0] +"'"
- flag = 1
- emp_query = "select name from `tabEmployee` "
- if flag == 1:
- emp_query += condition
- e = frappe.db.sql(emp_query)
+ conditions, values = [], []
+ for field in ["employment_type", "branch", "designation", "department"]:
+ if self.get(field):
+ conditions.append("{0}=%s".format(field))
+ values.append(self.get(field))
+
+ condition_str = " and " + " and ".join(conditions) if len(conditions) else ""
+
+ e = frappe.db.sql("select name from tabEmployee where status='Active' {condition}"
+ .format(condition=condition_str), tuple(values))
+
return e
def validate_values(self):
for f in ["from_date", "to_date", "leave_type", "no_of_days"]:
if not self.get(f):
frappe.throw(_("{0} is required").format(self.meta.get_label(f)))
-
+
def to_date_validation(self):
if date_diff(self.to_date, self.from_date) <= 0:
return "Invalid period"
diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.json b/erpnext/hr/doctype/process_payroll/process_payroll.json
index 3bd298e..e3f16a5 100644
--- a/erpnext/hr/doctype/process_payroll/process_payroll.json
+++ b/erpnext/hr/doctype/process_payroll/process_payroll.json
@@ -16,12 +16,15 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Select Employees",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -37,11 +40,14 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -58,13 +64,16 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Company",
+ "length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -80,35 +89,16 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Branch",
+ "length": 0,
"no_copy": 0,
"options": "Branch",
"permlevel": 0,
"print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "Check if you want to send salary slip in mail to each employee while submitting salary slip",
- "fieldname": "send_email",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Send Email",
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -124,11 +114,14 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -145,13 +138,16 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Department",
+ "length": 0,
"no_copy": 0,
"options": "Department",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -167,13 +163,16 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Designation",
+ "length": 0,
"no_copy": 0,
"options": "Designation",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -189,13 +188,16 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Select Payroll Year and Month",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -211,13 +213,16 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Fiscal Year",
+ "length": 0,
"no_copy": 0,
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -233,12 +238,15 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -254,13 +262,16 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Month",
+ "length": 0,
"no_copy": 0,
"options": "\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -276,13 +287,16 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Process Payroll",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -298,11 +312,14 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -320,12 +337,15 @@
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Create Salary Slip",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -341,11 +361,14 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -363,12 +386,15 @@
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Submit Salary Slip",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -384,11 +410,14 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -406,12 +435,15 @@
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Make Bank Entry",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -427,11 +459,14 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -447,12 +482,15 @@
"fieldtype": "HTML",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Activity Log",
+ "length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -470,7 +508,8 @@
"is_submittable": 0,
"issingle": 1,
"istable": 0,
- "modified": "2015-07-07 07:16:02.380839",
+ "max_attachments": 0,
+ "modified": "2016-04-26 07:22:41.792785",
"modified_by": "Administrator",
"module": "HR",
"name": "Process Payroll",
diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.py b/erpnext/hr/doctype/process_payroll/process_payroll.py
index a71200c..de41530 100644
--- a/erpnext/hr/doctype/process_payroll/process_payroll.py
+++ b/erpnext/hr/doctype/process_payroll/process_payroll.py
@@ -70,7 +70,6 @@
"fiscal_year": self.fiscal_year,
"employee": emp[0],
"month": self.month,
- "email_check": self.send_email,
"company": self.company,
})
ss.insert()
@@ -109,7 +108,6 @@
for ss in ss_list:
ss_obj = frappe.get_doc("Salary Slip",ss[0])
try:
- ss_obj.email_check = self.send_email
ss_obj.submit()
except Exception,e:
not_submitted_ss.append(ss[0])
@@ -128,11 +126,9 @@
submitted_ss = self.format_as_links(list(set(all_ss) - set(not_submitted_ss)))
if submitted_ss:
- mail_sent_msg = self.send_email and " (Mail has been sent to the employee)" or ""
log = """
- <b>Salary Slips Submitted %s:</b>\
- <br><br> %s <br><br>
- """ % (mail_sent_msg, '<br>'.join(submitted_ss))
+ <b>Salary Slips Submitted:</b> <br><br>%s
+ """ % ('<br>'.join(submitted_ss))
if not_submitted_ss:
log += """
@@ -206,3 +202,5 @@
'month_end_date': med,
'month_days': month_days
})
+ else:
+ frappe.throw(_("Fiscal Year {0} not found").format(year))
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.json b/erpnext/hr/doctype/salary_slip/salary_slip.json
index 76ad96e..a31e7b0 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.json
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.json
@@ -431,32 +431,6 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "fieldname": "email_check",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Email",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "email_check",
- "oldfieldtype": "Check",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 1,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
@@ -880,8 +854,8 @@
"is_submittable": 1,
"issingle": 0,
"istable": 0,
- "max_attachments": 0,
- "modified": "2016-04-06 03:10:12.181480",
+ "max_attachments": 0,
+ "modified": "2016-04-26 06:02:06.940543",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Slip",
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py
index 63147d5..0c1f8c8 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.py
@@ -204,15 +204,17 @@
self.precision("net_pay") if disable_rounded_total else 0)
def on_submit(self):
- if(self.email_check == 1):
- self.send_mail_funct()
+ if(frappe.db.get_single_value("HR Settings", "email_salary_slip_to_employee")):
+ self.email_salary_slip()
- def send_mail_funct(self):
- receiver = frappe.db.get_value("Employee", self.employee, "company_email")
+ def email_salary_slip(self):
+ receiver = frappe.db.get_value("Employee", self.employee, "company_email") or \
+ frappe.db.get_value("Employee", self.employee, "personal_email")
if receiver:
subj = 'Salary Slip - ' + cstr(self.month) +'/'+cstr(self.fiscal_year)
frappe.sendmail([receiver], subject=subj, message = _("Please see attachment"),
- attachments=[frappe.attach_print(self.doctype, self.name, file_name=self.name)])
+ attachments=[frappe.attach_print(self.doctype, self.name, file_name=self.name)],
+ bulk=True, reference_doctype= self.doctype, reference_name= self.name)
else:
- msgprint(_("Company Email ID not found, hence mail not sent"))
+ msgprint(_("{0}: Employee email not found, hence email not sent").format(self.employee_name))
diff --git a/erpnext/hr/doctype/salary_slip/test_salary_slip.py b/erpnext/hr/doctype/salary_slip/test_salary_slip.py
index 2383aff..106b8a2 100644
--- a/erpnext/hr/doctype/salary_slip/test_salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/test_salary_slip.py
@@ -96,6 +96,19 @@
frappe.set_user("test_employee@example.com")
self.assertTrue(salary_slip_test_employee.has_permission("read"))
+
+ def test_email_salary_slip(self):
+ frappe.db.sql("delete from `tabBulk Email`")
+
+ hr_settings = frappe.get_doc("HR Settings", "HR Settings")
+ hr_settings.email_salary_slip_to_employee = 1
+ hr_settings.save()
+
+ self.make_employee("test_employee@example.com")
+ self.make_employee_salary_slip("test_employee@example.com")
+ bulk_mails = frappe.db.sql("""select name from `tabBulk Email`""")
+ self.assertTrue(bulk_mails)
+
def make_employee(self, user):
if not frappe.db.get_value("User", user):
@@ -118,6 +131,7 @@
"date_of_joining": "2013-01-01",
"department": "_Test Department 1",
"gender": "Female",
+ "company_email": user,
"status": "Active"
}).insert()
diff --git a/erpnext/hr/doctype/upload_attendance/upload_attendance.js b/erpnext/hr/doctype/upload_attendance/upload_attendance.js
index 47ffec0..c49720c 100644
--- a/erpnext/hr/doctype/upload_attendance/upload_attendance.js
+++ b/erpnext/hr/doctype/upload_attendance/upload_attendance.js
@@ -2,7 +2,7 @@
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/utils.js");
+
frappe.provide("erpnext.hr");
erpnext.hr.AttendanceControlPanel = frappe.ui.form.Controller.extend({
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.json b/erpnext/manufacturing/doctype/production_order/production_order.json
index 3b71b76..7088126 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.json
+++ b/erpnext/manufacturing/doctype/production_order/production_order.json
@@ -3,6 +3,7 @@
"allow_import": 1,
"allow_rename": 0,
"autoname": "naming_series:",
+ "beta": 0,
"creation": "2013-01-10 16:34:16",
"custom": 0,
"docstatus": 0,
@@ -1089,7 +1090,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-04-18 08:42:47.582203",
+ "modified": "2016-05-11 12:17:29.480533",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Order",
@@ -1114,26 +1115,6 @@
"share": 1,
"submit": 1,
"write": 1
- },
- {
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "email": 0,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 0,
- "read": 1,
- "report": 1,
- "role": "Stock User",
- "set_user_permissions": 0,
- "share": 0,
- "submit": 0,
- "write": 0
}
],
"quick_entry": 1,
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js
index 5b97397..710862b 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js
@@ -1,7 +1,7 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/utils.js");
+
cur_frm.cscript.onload = function(doc) {
cur_frm.set_value("company", frappe.defaults.get_user_default("Company"))
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json
index 8817f65..37b643d 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json
@@ -422,6 +422,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "description": "Enter items and planned qty for which you want to raise production orders or download raw materials for analysis.",
"fieldname": "items_for_production",
"fieldtype": "Section Break",
"hidden": 0,
@@ -524,7 +525,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "description": "Enter items and planned qty for which you want to raise production orders or download raw materials for analysis.",
+ "description": "",
"fieldname": "create_production_orders",
"fieldtype": "Section Break",
"hidden": 0,
@@ -625,7 +626,32 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "description": "Items to be requested which are \"Out of Stock\" considering all warehouses based on projected qty and minimum order qty",
+ "fieldname": "create_material_requests_for_all_required_qty",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Create Material Requests for All Required Qty",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "description": "Items to be requested which are \"Out of Stock\" considering all warehouses based on projected qty and minimum order qty, if \"Create Material Requests for All Required Qty\" is unchecked.",
"fieldname": "create_material_requests",
"fieldtype": "Button",
"hidden": 0,
@@ -683,7 +709,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-03-16 06:18:50.179089",
+ "modified": "2016-05-10 12:55:45.647374",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Planning Tool",
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
index 199a5a4..f45708a 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
@@ -386,19 +386,24 @@
self.create_material_request()
def get_requested_items(self):
- item_projected_qty = self.get_projected_qty()
items_to_be_requested = frappe._dict()
+ if not self.create_material_requests_for_all_required_qty:
+ item_projected_qty = self.get_projected_qty()
+
for item, so_item_qty in self.item_dict.items():
- requested_qty = 0
total_qty = sum([flt(d[0]) for d in so_item_qty])
- if total_qty > item_projected_qty.get(item, 0):
+ requested_qty = 0
+
+ if self.create_material_requests_for_all_required_qty:
+ requested_qty = total_qty
+ elif total_qty > item_projected_qty.get(item, 0):
# shortage
requested_qty = total_qty - flt(item_projected_qty.get(item))
# consider minimum order qty
- if requested_qty < flt(so_item_qty[0][3]):
- requested_qty = flt(so_item_qty[0][3])
+ if requested_qty and requested_qty < flt(so_item_qty[0][3]):
+ requested_qty = flt(so_item_qty[0][3])
# distribute requested qty SO wise
for item_details in so_item_qty:
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index ccc4629..10af7b6 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -169,7 +169,7 @@
erpnext.patches.v6_0.multi_currency
erpnext.patches.v5_0.repost_gle_for_jv_with_multiple_party
erpnext.patches.v5_0.portal_fixes
-erpnext.patches.v5_0.reset_values_in_tools
+erpnext.patches.v5_0.reset_values_in_tools # 02-05-2016
execute:frappe.delete_doc("Page", "users")
erpnext.patches.v5_0.update_material_transferred_for_manufacturing_again
erpnext.patches.v5_0.index_on_account_and_gl_entry
@@ -259,8 +259,9 @@
erpnext.patches.v6_24.map_customer_address_to_shipping_address_on_po
erpnext.patches.v6_27.fix_recurring_order_status
erpnext.patches.v6_20x.remove_customer_supplier_roles
-erpnext.patches.v6_24.rename_item_field
+erpnext.patches.v6_20x.update_product_bundle_description
erpnext.patches.v7_0.update_party_status
erpnext.patches.v7_0.update_item_projected
-erpnext.patches.v6_20x.update_product_bundle_description
erpnext.patches.v7_0.fix_duplicate_icons
+erpnext.patches.v7_0.remove_features_setup
+erpnext.patches.v7_0.update_home_page
\ No newline at end of file
diff --git a/erpnext/patches/v5_0/reset_values_in_tools.py b/erpnext/patches/v5_0/reset_values_in_tools.py
index 2825e4f..5aac83e 100644
--- a/erpnext/patches/v5_0/reset_values_in_tools.py
+++ b/erpnext/patches/v5_0/reset_values_in_tools.py
@@ -6,6 +6,7 @@
def execute():
for dt in ["Payment Tool", "Bank Reconciliation", "Payment Reconciliation", "Leave Control Panel",
- "Salary Manager", "Upload Attenadance", "Production Planning Tool", "BOM Replace Tool"]:
+ "Salary Manager", "Upload Attenadance", "Production Planning Tool", "BOM Replace Tool", "Customize Form",
+ "Employee Attendance Tool", "Rename Tool", "BOM Replace Tool", "Process Payroll", "Naming Series"]:
frappe.db.sql("delete from `tabSingles` where doctype=%s", dt)
\ No newline at end of file
diff --git a/erpnext/patches/v6_20x/set_compact_print.py b/erpnext/patches/v6_20x/set_compact_print.py
index 4ba1aea..495407f 100644
--- a/erpnext/patches/v6_20x/set_compact_print.py
+++ b/erpnext/patches/v6_20x/set_compact_print.py
@@ -1,5 +1,8 @@
from __future__ import unicode_literals
import frappe
+from erpnext.setup.install import create_compact_item_print_custom_field
+
def execute():
- frappe.db.set_value("Features Setup", None, "compact_item_print", 1)
+ create_compact_item_print_custom_field()
+ frappe.db.set_value("Print Settings", None, "compact_item_print", 1)
diff --git a/erpnext/patches/v7_0/remove_features_setup.py b/erpnext/patches/v7_0/remove_features_setup.py
new file mode 100644
index 0000000..60d1926
--- /dev/null
+++ b/erpnext/patches/v7_0/remove_features_setup.py
@@ -0,0 +1,26 @@
+import frappe
+
+from erpnext.setup.install import create_compact_item_print_custom_field
+from frappe.utils import cint
+
+def execute():
+ frappe.reload_doctype('Stock Settings')
+ stock_settings = frappe.get_doc('Stock Settings', 'Stock Settings')
+ stock_settings.show_barcode_field = cint(frappe.db.get_value("Features Setup", None, "fs_item_barcode"))
+ stock_settings.save()
+
+ create_compact_item_print_custom_field()
+
+ compact_item_print = frappe.db.get_value("Features Setup", None, "compact_item_print")
+ frappe.db.set_value("Print Settings", None, "compact_item_print", compact_item_print)
+
+ # remove defaults
+ frappe.db.sql("""delete from tabDefaultValue where defkey in ('fs_item_serial_nos',
+ 'fs_item_batch_nos', 'fs_brands', 'fs_item_barcode',
+ 'fs_item_advanced', 'fs_packing_details', 'fs_item_group_in_details',
+ 'fs_exports', 'fs_imports', 'fs_discounts', 'fs_purchase_discounts',
+ 'fs_after_sales_installations', 'fs_projects', 'fs_sales_extras',
+ 'fs_recurring_invoice', 'fs_pos', 'fs_manufacturing', 'fs_quality',
+ 'fs_page_break', 'fs_more_info', 'fs_pos_view', 'compact_item_print')""")
+
+ frappe.delete_doc('DocType', 'Features Setup')
diff --git a/erpnext/patches/v7_0/update_home_page.py b/erpnext/patches/v7_0/update_home_page.py
new file mode 100644
index 0000000..2cb6b40
--- /dev/null
+++ b/erpnext/patches/v7_0/update_home_page.py
@@ -0,0 +1,19 @@
+import frappe
+import erpnext
+
+def execute():
+ frappe.reload_doctype('Homepage')
+
+ website_settings = frappe.get_doc('Website Settings', 'Website Settings')
+ if frappe.db.exists('Web Page', website_settings.home_page):
+ header = frappe.db.get_value('Web Page', website_settings.home_page, 'header')
+ if header and header.startswith("<div class='hero text-center'>"):
+ homepage = frappe.get_doc('Homepage', 'Homepage')
+ homepage.company = erpnext.get_default_company()
+ homepage.tagline = header.split('<h1>')[1].split('</h1>')[0] or 'Default Website'
+ homepage.setup_items()
+ homepage.save()
+
+ website_settings.home_page = 'home'
+ website_settings.save()
+
diff --git a/erpnext/portal/doctype/homepage/homepage.json b/erpnext/portal/doctype/homepage/homepage.json
index 7078ef9..cbe58c7 100644
--- a/erpnext/portal/doctype/homepage/homepage.json
+++ b/erpnext/portal/doctype/homepage/homepage.json
@@ -3,6 +3,7 @@
"allow_import": 0,
"allow_rename": 0,
"autoname": "",
+ "beta": 1,
"creation": "2016-04-22 05:27:52.109319",
"custom": 0,
"docstatus": 0,
@@ -134,7 +135,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
- "reqd": 1,
+ "reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
@@ -150,7 +151,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-04-22 05:57:38.701653",
+ "modified": "2016-05-12 14:19:41.689519",
"modified_by": "Administrator",
"module": "Portal",
"name": "Homepage",
diff --git a/erpnext/portal/doctype/homepage/homepage.py b/erpnext/portal/doctype/homepage/homepage.py
index 6f55a59..a817230 100644
--- a/erpnext/portal/doctype/homepage/homepage.py
+++ b/erpnext/portal/doctype/homepage/homepage.py
@@ -7,4 +7,19 @@
from frappe.model.document import Document
class Homepage(Document):
- pass
+ def validate(self):
+ if not self.products:
+ self.setup_items()
+ if not self.description:
+ self.description = frappe._("This is an example website auto-generated from ERPNext")
+
+ def setup_items(self):
+ for d in frappe.get_all('Item', fields=['name', 'item_name', 'description', 'image'],
+ filters={'show_in_website': 1}, limit=3):
+
+ # set missing routes (?)
+ doc = frappe.get_doc('Item', d.name)
+ doc.save()
+ self.append('products', dict(item_code=d.name,
+ item_name=d.item_name, description=d.description, image=d.image))
+
diff --git a/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.json b/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.json
index fe93098..81c75c6 100644
--- a/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.json
+++ b/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.json
@@ -257,7 +257,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-04-22 05:57:06.261401",
+ "modified": "2016-04-25 15:51:52.811124",
"modified_by": "Administrator",
"module": "Portal",
"name": "Homepage Featured Product",
diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js
index 6f0da36..4835287 100644
--- a/erpnext/projects/doctype/project/project.js
+++ b/erpnext/projects/doctype/project/project.js
@@ -3,8 +3,6 @@
frappe.ui.form.on("Project", {
onload: function(frm) {
- frm.hide_first = true;
-
var so = frappe.meta.get_docfield("Project", "sales_order");
so.get_route_options_for_new_doc = function(field) {
if(frm.is_new()) return;
@@ -45,22 +43,32 @@
});
}
- frm.dashboard.show_dashboard();
- frm.dashboard.add_section(frappe.render_template('project_dashboard', {project: frm.doc}));
-
- // var bars = [];
- // bars.push({
- // 'title': __('Percent Complete'),
- // 'width': (frm.doc.percent_complete || 1) + '%',
- // 'progress_class': 'progress-bar-success'
- // })
- //
- // var message = __("{0}% complete", [frm.doc.percent_complete]);
- //
- // frm.dashboard.add_progress(__('Status'), bars, message);
-
+ frm.trigger('show_dashboard');
}
+ },
+ show_dashboard: function(frm) {
+ frm.dashboard.show_heatmap = true;
+ frm.dashboard.heatmap_message = __('This is based on the Time Logs created against this project');
+ frm.dashboard.show_dashboard();
+ if(frm.doc.__onload.activity_summary.length) {
+ var hours = $.map(frm.doc.__onload.activity_summary, function(d) { return d.total_hours });
+ var max_count = Math.max.apply(null, hours);
+ var sum = hours.reduce(function(a, b) { return a + b; }, 0);
+ var section = frm.dashboard.add_section(
+ frappe.render_template('project_dashboard',
+ {
+ data: frm.doc.__onload.activity_summary,
+ max_count: max_count,
+ sum: sum
+ }));
+
+ section.on('click', '.time-log-link', function() {
+ var activity_type = $(this).attr('data-activity_type');
+ frappe.set_route('List', 'Time Log',
+ {'activity_type': activity_type, 'project': frm.doc.name});
+ });
+ }
}
});
diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py
index 2cca7e2..e7f5b7a 100644
--- a/erpnext/projects/doctype/project/project.py
+++ b/erpnext/projects/doctype/project/project.py
@@ -27,6 +27,8 @@
})
self.set_onload('links', self.meta.get_links_setup())
+ self.set_onload('activity_summary', frappe.db.sql('''select activity_type, sum(hours) as total_hours
+ from `tabTime Log` where project=%s group by activity_type order by total_hours desc''', self.name, as_dict=True))
def __setup__(self):
self.onload()
@@ -154,8 +156,17 @@
from frappe.desk.notifications import get_open_count
return {
'count': get_open_count('Project', name),
+ 'timeline_data': get_timeline_data(name)
}
+def get_timeline_data(name):
+ '''Return timeline for attendance'''
+ return dict(frappe.db.sql('''select unix_timestamp(from_time), count(*)
+ from `tabTime Log` where project=%s
+ and from_time > date_sub(curdate(), interval 1 year)
+ and docstatus < 2
+ group by date(from_time)''', name))
+
def get_project_list(doctype, txt, filters, limit_start, limit_page_length=20):
return frappe.db.sql('''select distinct project.*
from tabProject project, `tabProject User` project_user
@@ -174,7 +185,8 @@
return {
"show_sidebar": True,
"show_search": True,
- "title": _("My Projects"),
+ 'no_breadcrumbs': True,
+ "title": _("Projects"),
"get_list": get_project_list,
"row_template": "templates/includes/projects/project_row.html"
}
diff --git a/erpnext/projects/doctype/project/project_dashboard.html b/erpnext/projects/doctype/project/project_dashboard.html
index efd6861..34a2d04 100644
--- a/erpnext/projects/doctype/project/project_dashboard.html
+++ b/erpnext/projects/doctype/project/project_dashboard.html
@@ -1,10 +1,26 @@
-<h5 style="margin-top: 0px;">Tasks</h5>
-{% if(project.tasks.length) { %}
- {% project.tasks.forEach(function(d) { %}
- <p><span class="indicator {{
- {"Open": "red", "Closed": "green", "Cancelled": "darkgrey"}[d.status] || "orange" }}"><a style="font-weight: normal"
- href="#Form/Task/{{ d.task_id }}">{{ d.title }}</a></span></p>
- {% }); %}
-{% } else { %}
- <p class="text-muted small">No Tasks Defined</p>
-{% } %}
\ No newline at end of file
+<h5 style="margin-top: 0px;">Activity Summary</h5>
+<h6 style="margin-bottom: 25px;">{{ __("Total hours: {0}", [flt(sum, 2) ]) }}</h6>
+{% for d in data %}
+<div class="row">
+ <div class="col-xs-4">
+ <a class="small time-log-link" data-activity_type="{{ d.activity_type || "" }}">
+ {{ d.activity_type || __("Unknown") }}</a>
+ </div>
+ <div class="col-xs-8">
+ <span class="inline-graph">
+ <span class="inline-graph-half">
+ </span>
+ <span class="inline-graph-half" title="{{ __("hours") }}">
+ <span class="inline-graph-count">
+ {{ __("{0} hours", [flt(d.total_hours, 2)]) }}
+ </span>
+ <span class="inline-graph-bar">
+ <span class="inline-graph-bar-inner dark"
+ style="width: {{ cint(d.total_hours/max_count * 100) }}%">
+ </span>
+ </span>
+ </span>
+ </span>
+ </div>
+</div>
+{% endfor %}
\ No newline at end of file
diff --git a/erpnext/projects/doctype/time_log/time_log.js b/erpnext/projects/doctype/time_log/time_log.js
index 7648a53..10e3bc7 100644
--- a/erpnext/projects/doctype/time_log/time_log.js
+++ b/erpnext/projects/doctype/time_log/time_log.js
@@ -1,111 +1,105 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.provide("erpnext.projects");
-
-frappe.ui.form.on("Time Log", "onload", function(frm) {
- if (frm.doc.__islocal) {
- if (frm.doc.for_manufacturing) {
- frappe.ui.form.trigger("Time Log", "production_order");
+frappe.ui.form.on("Time Log", {
+ onload: function(frm) {
+ if (frm.doc.__islocal) {
+ if (frm.doc.for_manufacturing) {
+ frappe.ui.form.trigger("Time Log", "production_order");
+ }
+ if (frm.doc.from_time && frm.doc.to_time) {
+ frappe.ui.form.trigger("Time Log", "to_time");
+ }
}
- if (frm.doc.from_time && frm.doc.to_time) {
- frappe.ui.form.trigger("Time Log", "to_time");
- }
- }
-});
-
-frappe.ui.form.on("Time Log", "refresh", function(frm) {
- // set default user if created
- if (frm.doc.__islocal && !frm.doc.user) {
- frm.set_value("user", user);
- }
-
- frm.toggle_reqd("activity_type", !frm.doc.for_manufacturing);
-});
-
-
-// set to time if hours is updated
-frappe.ui.form.on("Time Log", "hours", function(frm) {
- if(!frm.doc.from_time) {
- frm.set_value("from_time", frappe.datetime.now_datetime());
- }
- var d = moment(frm.doc.from_time);
- d.add(frm.doc.hours, "hours");
- frm._setting_hours = true;
- frm.set_value("to_time", d.format(moment.defaultDatetimeFormat));
- frm._setting_hours = false;
-});
-
-// clear production order if making time log
-frappe.ui.form.on("Time Log", "before_save", function(frm) {
- frm.doc.production_order && frappe.model.remove_from_locals("Production Order",
- frm.doc.production_order);
-});
-
-// set hours if to_time is updated
-frappe.ui.form.on("Time Log", "to_time", function(frm) {
- if(frm._setting_hours) return;
- frm.set_value("hours", moment(cur_frm.doc.to_time).diff(moment(cur_frm.doc.from_time),
- "seconds") / 3600);
-
-});
-
-var calculate_cost = function(frm) {
- frm.set_value("costing_amount", frm.doc.costing_rate * frm.doc.hours);
- if (frm.doc.billable==1){
- frm.set_value("billing_amount", (frm.doc.billing_rate * frm.doc.hours) + frm.doc.additional_cost);
- }
-}
-
-var get_activity_cost = function(frm) {
- if (frm.doc.activity_type){
- return frappe.call({
- method: "erpnext.projects.doctype.time_log.time_log.get_activity_cost",
- args: {
- "employee": frm.doc.employee,
- "activity_type": frm.doc.activity_type
- },
- callback: function(r) {
- if(!r.exc && r.message) {
- frm.set_value("costing_rate", r.message.costing_rate);
- frm.set_value("billing_rate", r.message.billing_rate);
- calculate_cost(frm);
+ frm.set_query('task', function() {
+ return {
+ filters:{
+ 'project': frm.doc.project
}
}
});
- }
-}
+ },
+ refresh: function(frm) {
+ // set default user if created
+ if (frm.doc.__islocal && !frm.doc.user) {
+ frm.set_value("user", user);
+ }
+ if (frm.doc.status==='In Progress' && !frm.is_new()) {
+ frm.add_custom_button(__('Finish'), function() {
+ frappe.prompt({
+ fieldtype: 'Datetime',
+ fieldname: 'to_time',
+ label: __('End Time'),
+ 'default': dateutil.now_datetime()
+ }, function(value) {
+ frm.set_value('to_time', value.to_time);
+ frm.save();
+ });
+ }).addClass('btn-primary');
+ }
-frappe.ui.form.on("Time Log", "hours", function(frm) {
- calculate_cost(frm);
-});
-frappe.ui.form.on("Time Log", "additional_cost", function(frm) {
- calculate_cost(frm);
-});
+ frm.toggle_reqd("activity_type", !frm.doc.for_manufacturing);
+ },
+ hours: function(frm) {
+ if(!frm.doc.from_time) {
+ frm.set_value("from_time", frappe.datetime.now_datetime());
+ }
+ var d = moment(frm.doc.from_time);
+ d.add(frm.doc.hours, "hours");
+ frm._setting_hours = true;
+ frm.set_value("to_time", d.format(moment.defaultDatetimeFormat));
+ frm._setting_hours = false;
-frappe.ui.form.on("Time Log", "activity_type", function(frm) {
- get_activity_cost(frm);
-});
-
-frappe.ui.form.on("Time Log", "employee", function(frm) {
- get_activity_cost(frm);
-});
-
-frappe.ui.form.on("Time Log", "billable", function(frm) {
- if (frm.doc.billable==1) {
- calculate_cost(frm);
- }
- else {
- frm.set_value("billing_amount", 0);
- frm.set_value("additional_cost", 0);
- }
-});
-
-cur_frm.fields_dict['task'].get_query = function(doc) {
- return {
- filters:{
- 'project': doc.project
+ frm.trigger('calculate_cost');
+ },
+ before_save: function(frm) {
+ frm.doc.production_order && frappe.model.remove_from_locals("Production Order",
+ frm.doc.production_order);
+ },
+ to_time: function(frm) {
+ if(frm._setting_hours) return;
+ frm.set_value("hours", moment(cur_frm.doc.to_time).diff(moment(cur_frm.doc.from_time),
+ "seconds") / 3600);
+ },
+ calculate_cost: function(frm) {
+ frm.set_value("costing_amount", frm.doc.costing_rate * frm.doc.hours);
+ if (frm.doc.billable==1){
+ frm.set_value("billing_amount", (frm.doc.billing_rate * frm.doc.hours) + frm.doc.additional_cost);
+ }
+ },
+ additional_cost: function(frm) {
+ frm.trigger('calculate_cost');
+ },
+ activity_type: function(frm) {
+ if (frm.doc.activity_type){
+ return frappe.call({
+ method: "erpnext.projects.doctype.time_log.time_log.get_activity_cost",
+ args: {
+ "employee": frm.doc.employee,
+ "activity_type": frm.doc.activity_type
+ },
+ callback: function(r) {
+ if(!r.exc && r.message) {
+ frm.set_value("costing_rate", r.message.costing_rate);
+ frm.set_value("billing_rate", r.message.billing_rate);
+ frm.trigger('calculate_cost');
+ }
+ }
+ });
+ }
+ },
+ employee: function(frm) {
+ frm.trigger('activity_type');
+ },
+ billable: function(frm) {
+ if (frm.doc.billable==1) {
+ frm.trigger('calculate_cost');
+ }
+ else {
+ frm.set_value("billing_amount", 0);
+ frm.set_value("additional_cost", 0);
}
}
-}
+
+});
diff --git a/erpnext/projects/doctype/time_log/time_log.json b/erpnext/projects/doctype/time_log/time_log.json
index 050fc54..25d62c4 100644
--- a/erpnext/projects/doctype/time_log/time_log.json
+++ b/erpnext/projects/doctype/time_log/time_log.json
@@ -89,7 +89,7 @@
},
{
"allow_on_submit": 0,
- "bold": 0,
+ "bold": 1,
"collapsible": 0,
"depends_on": "",
"fieldname": "project",
@@ -115,7 +115,7 @@
},
{
"allow_on_submit": 0,
- "bold": 0,
+ "bold": 1,
"collapsible": 0,
"depends_on": "",
"fieldname": "task",
@@ -153,7 +153,7 @@
"label": "Status",
"length": 0,
"no_copy": 0,
- "options": "Draft\nSubmitted\nBatched for Billing\nBilled\nCancelled",
+ "options": "In Progress\nTo Submit\nSubmitted\nBatched for Billing\nBilled\nCancelled",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
@@ -190,8 +190,9 @@
},
{
"allow_on_submit": 0,
- "bold": 0,
+ "bold": 1,
"collapsible": 0,
+ "default": "now",
"fieldname": "from_time",
"fieldtype": "Datetime",
"hidden": 0,
@@ -239,7 +240,7 @@
},
{
"allow_on_submit": 0,
- "bold": 0,
+ "bold": 1,
"collapsible": 0,
"fieldname": "to_time",
"fieldtype": "Datetime",
@@ -256,7 +257,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
- "reqd": 1,
+ "reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -460,7 +461,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "depends_on": "eval:doc.for_manufacturing",
+ "depends_on": "for_manufacturing",
"fieldname": "section_break_11",
"fieldtype": "Section Break",
"hidden": 0,
@@ -644,7 +645,8 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "depends_on": "",
+ "collapsible_depends_on": "",
+ "depends_on": "costing_rate",
"fieldname": "section_break_24",
"fieldtype": "Section Break",
"hidden": 0,
@@ -652,6 +654,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "label": "Cost",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -747,6 +750,7 @@
"bold": 0,
"collapsible": 0,
"default": "0",
+ "depends_on": "billable",
"description": "",
"fieldname": "billing_rate",
"fieldtype": "Currency",
@@ -800,6 +804,7 @@
"bold": 0,
"collapsible": 0,
"default": "0",
+ "depends_on": "billable",
"description": "Will be updated only if Time Log is 'Billable'",
"fieldname": "billing_amount",
"fieldtype": "Currency",
@@ -934,7 +939,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-04-15 07:51:03.097280",
+ "modified": "2016-04-29 05:19:18.247260",
"modified_by": "Administrator",
"module": "Projects",
"name": "Time Log",
diff --git a/erpnext/projects/doctype/time_log/time_log.py b/erpnext/projects/doctype/time_log/time_log.py
index e2641eb..9545bd7 100644
--- a/erpnext/projects/doctype/time_log/time_log.py
+++ b/erpnext/projects/doctype/time_log/time_log.py
@@ -45,16 +45,19 @@
def set_status(self):
self.status = {
- 0: "Draft",
+ 0: "To Submit",
1: "Submitted",
2: "Cancelled"
}[self.docstatus or 0]
+ if not self.to_time:
+ self.status = 'In Progress'
+
if self.time_log_batch:
- self.status="Batched for Billing"
+ self.status= "Batched for Billing"
if self.sales_invoice:
- self.status="Billed"
+ self.status= "Billed"
def set_title(self):
"""Set default title for the Time Log"""
@@ -88,8 +91,8 @@
existing = frappe.db.sql("""select name, from_time, to_time from `tabTime Log`
where `{0}`=%(val)s and
(
- (%(from_time)s > from_time and %(from_time)s < to_time) or
- (%(to_time)s > from_time and %(to_time)s < to_time) or
+ (%(from_time)s > from_time and %(from_time)s < to_time) or
+ (%(to_time)s > from_time and %(to_time)s < to_time) or
(%(from_time)s <= from_time and %(to_time)s >= to_time))
and name!=%(name)s
and docstatus < 2""".format(fieldname),
@@ -233,7 +236,7 @@
self.billing_amount = self.billing_rate * self.hours
else:
self.billing_amount = 0
-
+
if self.additional_cost and self.billable:
self.billing_amount += self.additional_cost
@@ -247,11 +250,11 @@
elif self.project:
frappe.get_doc("Project", self.project).update_project()
-
+
def has_webform_permission(doc):
project_user = frappe.db.get_value("Project User", {"parent": doc.project, "user":frappe.session.user} , "user")
if project_user:
- return True
+ return True
@frappe.whitelist()
diff --git a/erpnext/projects/doctype/time_log/time_log_list.js b/erpnext/projects/doctype/time_log/time_log_list.js
index 5396928..e9e7d05 100644
--- a/erpnext/projects/doctype/time_log/time_log_list.js
+++ b/erpnext/projects/doctype/time_log/time_log_list.js
@@ -4,9 +4,15 @@
// render
frappe.listview_settings['Time Log'] = {
add_fields: ["status", "billable", "activity_type", "task", "project", "hours", "for_manufacturing", "billing_amount"],
-
+
+ has_indicator_for_draft: true,
+
get_indicator: function(doc) {
- if (doc.status== "Batched for Billing") {
+ if (doc.status== "Draft") {
+ return [__("Draft"), "red", "status,=,Draft"]
+ } else if (doc.status== "In Progress") {
+ return [__("In Progress"), "orange", "status,=,In Progress"]
+ } else if (doc.status== "Batched for Billing") {
return [__("Batched for Billing"), "darkgrey", "status,=,Batched for Billing"]
} else if (doc.status== "Billed") {
return [__("Billed"), "green", "status,=,Billed"]
@@ -14,7 +20,7 @@
return [__("Billable"), "orange", "billable,=,1"]
}
},
-
+
selectable: true,
onload: function(me) {
me.page.add_menu_item(__("Make Time Log Batch"), function() {
diff --git a/erpnext/public/build.json b/erpnext/public/build.json
index ab0f673..03c381a 100644
--- a/erpnext/public/build.json
+++ b/erpnext/public/build.json
@@ -8,18 +8,27 @@
],
"js/erpnext.min.js": [
"public/js/conf.js",
- "public/js/feature_setup.js",
"public/js/utils.js",
"public/js/queries.js",
+ "public/js/sms_manager.js",
"public/js/utils/party.js",
"public/js/templates/address_list.html",
"public/js/templates/contact_list.html",
+ "public/js/controllers/stock_controller.js",
+ "public/js/controllers/payments.js",
+ "public/js/controllers/taxes_and_totals.js",
+ "public/js/controllers/transaction.js",
"public/js/pos/pos.html",
"public/js/pos/pos_bill_item.html",
"public/js/pos/pos_item.html",
"public/js/pos/pos_tax_row.html",
+ "public/js/pos/pos_print.html",
"public/js/pos/pos.js",
- "public/js/templates/item_selector.html"
+ "public/js/pos/pos_invoice_list.html",
+ "public/js/payment/pos_payment.html",
+ "public/js/payment/payment_details.html",
+ "public/js/templates/item_selector.html",
+ "public/js/utils/item_selector.js"
],
"js/item-dashboard.min.js": [
"stock/dashboard/item_dashboard.html",
diff --git a/erpnext/public/css/website.css b/erpnext/public/css/website.css
index 25d08f6..6c239c5 100644
--- a/erpnext/public/css/website.css
+++ b/erpnext/public/css/website.css
@@ -23,7 +23,8 @@
background-size: cover;
background-repeat: no-repeat;
background-position: center top;
- border-radius: 4px;
+ border-radius-top: 4px;
+ border-radius-right: 4px;
}
.product-image.missing-image {
width: 100%;
@@ -32,7 +33,8 @@
background-size: cover;
background-repeat: no-repeat;
background-position: center top;
- border-radius: 4px;
+ border-radius-top: 4px;
+ border-radius-right: 4px;
position: relative;
background-color: #EBEFF2;
}
@@ -70,7 +72,6 @@
border-top: 1px solid #EBEFF2;
}
.transaction-list-item {
- border-bottom: none;
padding: 30px;
margin: 0px -30px;
}
@@ -80,7 +81,6 @@
background-color: #fafbfc;
}
.transaction-list-item .indicator {
- font-size: inherit;
font-weight: inherit;
color: #8D99A6;
margin-left: -15px;
@@ -126,6 +126,81 @@
border-top: 1px solid #d1d8dd;
padding-top: 15px;
}
+.order-container .tax-grand-total {
+ display: inline-block;
+ font-size: 16px;
+ font-weight: bold;
+ margin-top: 5px;
+}
+.cart-container {
+ margin: 50px 0px;
+}
+.cart-container .cart-item-header .h6 {
+ padding: 7px 15px;
+}
+.cart-container .cart-items {
+ margin: 30px 0px 0px;
+}
+.cart-container .cart-item-table {
+ margin: 0px -15px;
+}
+.cart-container .cart-item-header {
+ border-bottom: 1px solid #d1d8dd;
+}
+.cart-container .cart-image-col {
+ padding-right: 0px;
+}
+.cart-container .cart-image {
+ max-width: 55px;
+ max-height: 55px;
+ margin-top: -5px;
+}
+.cart-container .cart-taxes {
+ margin-top: 30px;
+}
+.cart-container .cart-taxes .row {
+ margin-top: 15px;
+}
+.cart-container .tax-grand-total-row {
+ border-top: 1px solid #d1d8dd;
+ padding-top: 15px;
+}
+.cart-container .cart-addresses {
+ margin-top: 50px;
+}
+.cart-items .cart-dropdown,
+.item_name_dropdown {
+ display: none;
+}
+.cart-dropdown-container {
+ width: 320px;
+ padding: 15px;
+}
+.cart-dropdown-container .item-price {
+ display: block !important;
+ padding-bottom: 10px;
+}
+.cart-dropdown-container .cart-item-header {
+ border-bottom: 1px solid #d1d8dd;
+}
+.cart-dropdown-container .cart-items .cart-dropdown {
+ display: block;
+ margin-top: 15px;
+}
+.cart-dropdown-container .item_name_dropdown {
+ display: block;
+}
+.cart-dropdown-container .item-description,
+.cart-dropdown-container .cart-items .checkout,
+.cart-dropdown-container .item_name_and_description {
+ display: none;
+}
+.cart-dropdown-container .checkout-btn {
+ padding-top: 25px;
+}
+.cart-dropdown-container .col-name-description {
+ margin-bottom: 8px;
+}
.product-list-link .row {
border-bottom: 1px solid #EBEFF2;
}
@@ -147,3 +222,36 @@
max-width: 350px;
}
}
+.item-group-content {
+ margin-top: 30px;
+}
+.product-image-img {
+ border: 1px solid #EBEFF2;
+ border-radius: 3px;
+}
+.product-text {
+ border-top: 1px solid #EBEFF2;
+ padding: 15px;
+ word-wrap: break-word;
+ height: 75px;
+}
+.product-image-wrapper {
+ padding-bottom: 40px;
+}
+.featured-product-heading,
+.all-products {
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+ font-size: 12px;
+ font-weight: 500;
+}
+.all-products {
+ font-weight: 300;
+ padding-left: 25px;
+ padding-right: 25px;
+ padding-top: 10px;
+ padding-bottom: 10px;
+}
+.homepage-tagline {
+ font-size: 40px !important;
+}
diff --git a/erpnext/public/js/conf.js b/erpnext/public/js/conf.js
index 1191c47..d8133ce 100644
--- a/erpnext/public/js/conf.js
+++ b/erpnext/public/js/conf.js
@@ -15,6 +15,7 @@
frappe.urllib.get_base_url()+'/assets/erpnext/images/erp-icon.svg" />');
$('[data-link="docs"]').attr("href", "https://manual.erpnext.com")
+ $('[data-link="issues"]').attr("href", "https://github.com/frappe/erpnext/issues")
});
// doctypes created via tree
diff --git a/erpnext/public/js/controllers/payments.js b/erpnext/public/js/controllers/payments.js
new file mode 100644
index 0000000..7ac2b7b
--- /dev/null
+++ b/erpnext/public/js/controllers/payments.js
@@ -0,0 +1,158 @@
+// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+// License: GNU General Public License v3. See license.txt
+
+erpnext.payments = erpnext.stock.StockController.extend({
+ make_payment: function() {
+ var me = this;
+
+ this.dialog = new frappe.ui.Dialog({
+ title: 'Payment'
+ });
+
+ this.dialog.show();
+ this.$body = this.dialog.body;
+ this.dialog.$wrapper.find('.modal-dialog').css("width", "750px");
+ this.set_payment_primary_action();
+ this.make_keyboard();
+ },
+
+ set_payment_primary_action: function(){
+ var me = this;
+
+ this.dialog.set_primary_action(__("Submit"), function() {
+ frappe.confirm(__("Do you really want to submit the invoice?"), function () {
+ me.write_off_amount();
+ me.dialog.hide();
+ })
+ })
+ },
+
+ make_keyboard: function(){
+ var me = this;
+ $(this.$body).empty();
+ $(this.$body).html(frappe.render_template('pos_payment', this.frm.doc))
+ this.show_payment_details();
+ this.bind_keyboard_event()
+ },
+
+ pay_amount: function(){
+ var me = this;
+ this.make_multimode_payment();
+ this.calculate_outstanding_amount()
+ this.show_payment_details();
+ },
+
+ make_multimode_payment: function(){
+ var me = this;
+
+ if(this.frm.doc.change_amount > 0){
+ me.payment_val = me.doc.outstanding_amount
+ }
+
+ this.payments = frappe.model.add_child(this.frm.doc, 'Multi Mode Payment', "payments");
+ this.payments.mode_of_payment = this.dialog.fields_dict.mode_of_payment.get_value();
+ this.payments.amount = flt(this.payment_val);
+ },
+
+ show_payment_details: function(){
+ var me = this;
+ multimode_payments = $(this.$body).find('.multimode-payments').empty();
+ if(this.frm.doc.payments.length){
+ $.each(this.frm.doc.payments, function(index, data){
+ $(frappe.render_template('payment_details', {
+ mode_of_payment: data.mode_of_payment,
+ amount: data.amount,
+ idx: data.idx,
+ currency: me.frm.doc.currency,
+ type: data.type
+ })).appendTo(multimode_payments)
+ })
+ }else{
+ $("<p>No payment mode selected in pos profile</p>").appendTo(multimode_payments)
+ }
+ },
+
+ bind_keyboard_event: function(){
+ var me = this;
+ this.payment_val = '';
+ this.bind_payment_mode_keys_event();
+ this.bind_keyboard_keys_event();
+ },
+
+ bind_payment_mode_keys_event: function(){
+ var me = this;
+ $(this.$body).find('.pos-payment-row').click(function(){
+ me.idx = $(this).attr("idx");
+ me.selected_mode = $(me.$body).find(repl("input[idx='%(idx)s']",{'idx': me.idx}));
+ me.highlight_selected_row()
+ me.payment_val = 0.0
+ if(me.frm.doc.outstanding_amount > 0 && flt(me.selected_mode.val()) == 0.0){
+ //When user first time click on row
+ me.payment_val = flt(me.frm.doc.outstanding_amount)
+ me.selected_mode.val(format_number(me.payment_val, 2));
+ me.update_paid_amount()
+ me.bind_amount_change_event();
+ }else if(flt(me.selected_mode.val()) > 0){
+ //If user click on existing row which has value
+ me.payment_val = flt(me.selected_mode.val());
+ }
+ me.selected_mode.select()
+ })
+ },
+
+ highlight_selected_row: function(){
+ var me = this;
+ selected_row = $(this.$body).find(repl(".pos-payment-row[idx='%(idx)s']",{'idx': this.idx}));
+ $(this.$body).find('.pos-payment-row').removeClass('selected-payment-mode')
+ selected_row.addClass('selected-payment-mode')
+ $(this.$body).find('.amount').attr('disabled', true);
+ this.selected_mode.attr('disabled', false);
+ },
+
+ bind_keyboard_keys_event: function(){
+ var me = this;
+ $(this.$body).find('.pos-keyboard-key').click(function(){
+ me.payment_val += $(this).text();
+ me.selected_mode.val(format_number(me.payment_val, 2))
+ me.idx = me.selected_mode.attr("idx")
+ me.update_paid_amount()
+ })
+
+ $(this.$body).find('.delete-btn').click(function(){
+ me.payment_val = cstr(flt(me.selected_mode.val())).slice(0, -1);
+ me.selected_mode.val(format_number(me.payment_val, 2));
+ me.idx = me.selected_mode.attr("idx")
+ me.update_paid_amount();
+ })
+
+ },
+
+ bind_amount_change_event: function(){
+ var me = this;
+ me.selected_mode.change(function(){
+ me.payment_val = $(this).val() || 0.0;
+ me.selected_mode.val(format_number(me.payment_val, 2))
+ me.idx = me.selected_mode.attr("idx")
+ me.update_paid_amount()
+ })
+ },
+
+ update_paid_amount: function(){
+ var me = this;
+ $.each(this.frm.doc.payments, function(index, data){
+ if(cint(me.idx) == cint(data.idx)){
+ data.amount = flt(me.selected_mode.val(), 2)
+ }
+ })
+ this.calculate_outstanding_amount();
+ this.show_amounts();
+ },
+
+ show_amounts: function(){
+ var me = this;
+ $(this.$body).find('.paid_amount').text(format_currency(this.frm.doc.paid_amount, this.frm.doc.currency));
+ $(this.$body).find('.change_amount').text(format_currency(this.frm.doc.change_amount, this.frm.doc.currency))
+ $(this.$body).find('.outstanding_amount').text(format_currency(this.frm.doc.outstanding_amount, this.frm.doc.currency))
+ this.update_invoice();
+ }
+})
\ No newline at end of file
diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js
index b4e712a..f775f29 100644
--- a/erpnext/public/js/controllers/taxes_and_totals.js
+++ b/erpnext/public/js/controllers/taxes_and_totals.js
@@ -1,16 +1,30 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.provide("erpnext");
-frappe.require("assets/erpnext/js/controllers/stock_controller.js");
+erpnext.taxes_and_totals = erpnext.payments.extend({
+ apply_pricing_rule_on_item: function(item){
+ if(!item.margin_type){
+ item.margin_rate_or_amount = 0.0;
+ }
-erpnext.taxes_and_totals = erpnext.stock.StockController.extend({
+ if(item.margin_type == "Percentage"){
+ item.total_margin = item.price_list_rate + item.price_list_rate * ( item.margin_rate_or_amount / 100);
+ }else{
+ item.total_margin = item.price_list_rate + item.margin_rate_or_amount;
+ }
+
+ item.rate = flt(item.total_margin , 2);
+
+ if(item.discount_percentage){
+ discount_value = flt(item.total_margin) * flt(item.discount_percentage) / 100;
+ item.rate = flt((item.total_margin) - (discount_value), precision('rate'));
+ }
+ },
+
calculate_taxes_and_totals: function(update_paid_amount) {
this.discount_amount_applied = false;
this._calculate_taxes_and_totals();
-
- if (frappe.meta.get_docfield(this.frm.doc.doctype, "discount_amount"))
- this.apply_discount_amount();
+ this.calculate_discount_amount();
// Advance calculation applicable to Sales /Purchase Invoice
if(in_list(["Sales Invoice", "Purchase Invoice"], this.frm.doc.doctype)
@@ -27,6 +41,11 @@
this.frm.refresh_fields();
},
+ calculate_discount_amount: function(){
+ if (frappe.meta.get_docfield(this.frm.doc.doctype, "discount_amount"))
+ this.apply_discount_amount();
+ },
+
_calculate_taxes_and_totals: function() {
this.validate_conversion_rate();
this.calculate_item_values();
@@ -59,7 +78,7 @@
"to_currency": company_currency
}));
}
-
+
}
},
@@ -101,7 +120,7 @@
$.each(tax_fields, function(i, fieldname) { tax[fieldname] = 0.0 });
- if (!this.discount_amount_applied) {
+ if (!this.discount_amount_applied && cur_frm) {
cur_frm.cscript.validate_taxes_and_charges(tax.doctype, tax.name);
me.validate_inclusive_tax(tax);
}
@@ -256,7 +275,7 @@
me.round_off_totals(tax);
// adjust Discount Amount loss in last tax iteration
- if ((i == me.frm.doc["taxes"].length - 1) && me.discount_amount_applied
+ if ((i == me.frm.doc["taxes"].length - 1) && me.discount_amount_applied
&& me.frm.doc.apply_discount_on == "Grand Total" && me.frm.doc.discount_amount)
me.adjust_discount_amount_loss(tax);
}
@@ -321,10 +340,10 @@
tax.tax_amount_after_discount_amount = flt(tax.tax_amount_after_discount_amount +
discount_amount_loss, precision("tax_amount", tax));
tax.total = flt(tax.total + discount_amount_loss, precision("total", tax));
-
+
this.set_in_company_currency(tax, ["total", "tax_amount_after_discount_amount"]);
},
-
+
manipulate_grand_total_for_inclusive_tax: function() {
var me = this;
// if fully inclusive taxes and diff
@@ -342,8 +361,8 @@
last_tax.tax_amount += diff;
last_tax.tax_amount_after_discount += diff;
last_tax.total += diff;
-
- this.set_in_company_currency(last_tax,
+
+ this.set_in_company_currency(last_tax,
["total", "tax_amount", "tax_amount_after_discount_amount"]);
}
}
@@ -392,14 +411,14 @@
// rounded totals
if(frappe.meta.get_docfield(this.frm.doc.doctype, "rounded_total", this.frm.doc.name)) {
- this.frm.doc.rounded_total = round_based_on_smallest_currency_fraction(this.frm.doc.grand_total,
+ this.frm.doc.rounded_total = round_based_on_smallest_currency_fraction(this.frm.doc.grand_total,
this.frm.doc.currency, precision("rounded_total"));
}
if(frappe.meta.get_docfield(this.frm.doc.doctype, "base_rounded_total", this.frm.doc.name)) {
var company_currency = this.get_company_currency();
-
- this.frm.doc.base_rounded_total =
- round_based_on_smallest_currency_fraction(this.frm.doc.base_grand_total,
+
+ this.frm.doc.base_rounded_total =
+ round_based_on_smallest_currency_fraction(this.frm.doc.base_grand_total,
company_currency, precision("base_rounded_total"));
}
},
@@ -436,13 +455,14 @@
apply_discount_amount: function() {
var me = this;
var distributed_amount = 0.0;
+ this.frm.doc.base_discount_amount = 0.0;
if (this.frm.doc.discount_amount) {
if(!this.frm.doc.apply_discount_on)
frappe.throw(__("Please select Apply Discount On"));
-
- this.frm.set_value("base_discount_amount",
- flt(this.frm.doc.discount_amount * this.frm.doc.conversion_rate, precision("base_discount_amount")))
+
+ this.frm.doc.base_discount_amount = flt(this.frm.doc.discount_amount * this.frm.doc.conversion_rate,
+ precision("base_discount_amount"));
var total_for_discount_amount = this.get_total_for_discount_amount();
// calculate item amount after Discount Amount
@@ -458,8 +478,6 @@
this.discount_amount_applied = true;
this._calculate_taxes_and_totals();
}
- } else {
- this.frm.set_value("base_discount_amount", 0);
}
},
@@ -497,28 +515,28 @@
this.calculate_outstanding_amount(update_paid_amount);
},
-
+
calculate_outstanding_amount: function(update_paid_amount) {
// NOTE:
// paid_amount and write_off_amount is only for POS Invoice
// total_advance is only for non POS Invoice
if(this.frm.doc.is_return || this.frm.doc.docstatus > 0) return;
-
+
frappe.model.round_floats_in(this.frm.doc, ["grand_total", "total_advance", "write_off_amount"]);
- if(this.frm.doc.party_account_currency == this.frm.doc.currency) {
- var total_amount_to_pay = flt((this.frm.doc.grand_total - this.frm.doc.total_advance
+ if(this.frm.doc.party_account_currency == this.frm.doc.currency) {
+ var total_amount_to_pay = flt((this.frm.doc.grand_total - this.frm.doc.total_advance
- this.frm.doc.write_off_amount), precision("grand_total"));
} else {
var total_amount_to_pay = flt(
- (flt(this.frm.doc.grand_total*this.frm.doc.conversion_rate, precision("grand_total"))
- - this.frm.doc.total_advance - this.frm.doc.base_write_off_amount),
+ (flt(this.frm.doc.grand_total*this.frm.doc.conversion_rate, precision("grand_total"))
+ - this.frm.doc.total_advance - this.frm.doc.base_write_off_amount),
precision("base_grand_total")
);
}
-
+
if(this.frm.doc.doctype == "Sales Invoice" || this.frm.doc.doctype == "Purchase Invoice") {
frappe.model.round_floats_in(this.frm.doc, ["paid_amount"]);
-
+
if(this.frm.doc.is_pos || this.frm.doc.is_paid) {
if(!this.frm.doc.paid_amount || update_paid_amount===undefined || update_paid_amount) {
this.frm.doc.paid_amount = flt(total_amount_to_pay);
@@ -527,18 +545,59 @@
this.frm.doc.paid_amount = 0
}
this.set_in_company_currency(this.frm.doc, ["paid_amount"]);
- this.frm.refresh_field("paid_amount");
- this.frm.refresh_field("base_paid_amount");
+
+ if(this.frm.refresh_field){
+ this.frm.refresh_field("paid_amount");
+ this.frm.refresh_field("base_paid_amount");
+ }
- var paid_amount = (this.frm.doc.party_account_currency == this.frm.doc.currency) ?
+ if(this.frm.doc.doctype == "Sales Invoice"){
+ this.calculate_paid_amount()
+ }
+
+ var outstanding_amount = 0.0
+
+ var paid_amount = (this.frm.doc.party_account_currency == this.frm.doc.currency) ?
this.frm.doc.paid_amount : this.frm.doc.base_paid_amount;
-
- var outstanding_amount = flt(total_amount_to_pay - flt(paid_amount),
- precision("outstanding_amount"));
-
+
+ if (total_amount_to_pay > paid_amount){
+ outstanding_amount = flt(total_amount_to_pay - flt(paid_amount),
+ precision("outstanding_amount"));
+ }
+
} else if(this.frm.doc.doctype == "Purchase Invoice") {
var outstanding_amount = flt(total_amount_to_pay, precision("outstanding_amount"));
- }
- this.frm.set_value("outstanding_amount", outstanding_amount);
- }
+ }
+
+ this.frm.doc.outstanding_amount = outstanding_amount;
+ this.calculate_change_amount()
+ },
+
+ calculate_paid_amount: function(){
+ var me = this;
+ var paid_amount = base_paid_amount = 0.0;
+ $.each(this.frm.doc['payments'] || [], function(index, data){
+ if(data.amount > 0){
+ data.base_amount = flt(data.amount * me.frm.doc.conversion_rate);
+ paid_amount += data.amount;
+ base_paid_amount += data.base_amount;
+ }
+ })
+
+ this.frm.doc.paid_amount = flt(paid_amount, precision("paid_amount"));
+ this.frm.doc.base_paid_amount = flt(base_paid_amount, precision("base_paid_amount"));
+ },
+
+ calculate_change_amount: function(){
+ var change_amount = 0.0;
+ if(this.frm.doc.paid_amount > this.frm.doc.grand_total){
+ change_amount = flt(this.frm.doc.paid_amount - this.frm.doc.grand_total,
+ precision("change_amount"))
+ }
+
+ this.frm.doc.change_amount = flt(change_amount,
+ precision("change_amount"))
+ this.frm.doc.base_change_amount = flt(change_amount * this.frm.doc.conversion_rate,
+ precision("base_change_amount"))
+ },
})
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 78584fa..c622466 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -1,11 +1,85 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.provide("erpnext");
-frappe.require("assets/erpnext/js/controllers/taxes_and_totals.js");
-frappe.require("assets/erpnext/js/utils.js");
-
erpnext.TransactionController = erpnext.taxes_and_totals.extend({
+ setup: function() {
+ frappe.ui.form.on(this.frm.doctype + " Item", "rate", function(frm, cdt, cdn) {
+ var item = frappe.get_doc(cdt, cdn);
+ frappe.model.round_floats_in(item, ["rate", "price_list_rate"]);
+
+ if(item.price_list_rate) {
+ item.discount_percentage = flt((1 - item.rate / item.price_list_rate) * 100.0, precision("discount_percentage", item));
+ } else {
+ item.discount_percentage = 0.0;
+ }
+
+ cur_frm.cscript.set_gross_profit(item);
+ cur_frm.cscript.calculate_taxes_and_totals();
+ })
+
+ frappe.ui.form.on(this.frm.cscript.tax_table, "rate", function(frm, cdt, cdn) {
+ cur_frm.cscript.calculate_taxes_and_totals();
+ });
+
+ frappe.ui.form.on(this.frm.cscript.tax_table, "tax_amount", function(frm, cdt, cdn) {
+ cur_frm.cscript.calculate_taxes_and_totals();
+ });
+
+ frappe.ui.form.on(this.frm.cscript.tax_table, "row_id", function(frm, cdt, cdn) {
+ cur_frm.cscript.calculate_taxes_and_totals();
+ });
+
+ frappe.ui.form.on(this.frm.cscript.tax_table, "included_in_print_rate", function(frm, cdt, cdn) {
+ cur_frm.cscript.set_dynamic_labels();
+ cur_frm.cscript.calculate_taxes_and_totals();
+ });
+
+ frappe.ui.form.on(this.frm.doctype, "apply_discount_on", function(frm) {
+ if(frm.doc.additional_discount_percentage) {
+ frm.trigger("additional_discount_percentage");
+ } else {
+ cur_frm.cscript.calculate_taxes_and_totals();
+ }
+ });
+
+ frappe.ui.form.on(this.frm.doctype, "additional_discount_percentage", function(frm) {
+ if (frm.via_discount_amount) {
+ return;
+ }
+
+ if(!frm.doc.apply_discount_on) {
+ frappe.msgprint(__("Please set 'Apply Additional Discount On'"));
+ return
+ }
+
+ frm.via_discount_percentage = true;
+
+ if(frm.doc.additional_discount_percentage && frm.doc.discount_amount) {
+ // Reset discount amount and net / grand total
+ frm.set_value("discount_amount", 0);
+ }
+
+ var total = flt(frm.doc[frappe.model.scrub(frm.doc.apply_discount_on)]);
+ var discount_amount = flt(total*flt(frm.doc.additional_discount_percentage) / 100,
+ precision("discount_amount"));
+
+ frm.set_value("discount_amount", discount_amount);
+ delete frm.via_discount_percentage;
+ });
+
+ frappe.ui.form.on(this.frm.doctype, "discount_amount", function(frm) {
+ frm.cscript.set_dynamic_labels();
+
+ if (!frm.via_discount_percentage) {
+ frm.via_discount_amount = true;
+ frm.set_value("additional_discount_percentage", 0);
+ delete frm.via_discount_amount;
+ }
+
+ frm.cscript.calculate_taxes_and_totals();
+ });
+
+ },
onload: function() {
var me = this;
//this.frm.show_print_first = true;
@@ -91,7 +165,7 @@
erpnext.hide_company();
this.show_item_wise_taxes();
this.set_dynamic_labels();
- erpnext.pos.make_pos_btn(this.frm);
+ // erpnext.pos.make_pos_btn(this.frm);
this.setup_sms();
this.make_show_payments_btn();
},
@@ -126,7 +200,6 @@
},
send_sms: function() {
- frappe.require("assets/erpnext/js/sms_manager.js");
var sms_man = new SMSManager(this.frm.doc);
},
@@ -309,8 +382,8 @@
if (this.frm.doc.posting_date) var date = this.frm.doc.posting_date;
else var date = this.frm.doc.transaction_date;
-
- if (frappe.meta.get_docfield(this.frm.doctype, "shipping_address") &&
+
+ if (frappe.meta.get_docfield(this.frm.doctype, "shipping_address") &&
in_list(['Purchase Order', 'Purchase Receipt', 'Purchase Invoice'], this.frm.doctype)){
erpnext.utils.get_shipping_address(this.frm, function(){
set_party_account(set_pricing);
@@ -477,7 +550,7 @@
setup_field_label_map(["base_total", "base_net_total", "base_total_taxes_and_charges",
"base_discount_amount", "base_grand_total", "base_rounded_total", "base_in_words",
"base_taxes_and_charges_added", "base_taxes_and_charges_deducted", "total_amount_to_pay",
- "base_paid_amount", "base_write_off_amount"
+ "base_paid_amount", "base_write_off_amount", "base_change_amount"
], company_currency);
setup_field_label_map(["total", "net_total", "total_taxes_and_charges", "discount_amount",
@@ -909,80 +982,4 @@
-});
-
-frappe.ui.form.on(cur_frm.doctype + " Item", "rate", function(frm, cdt, cdn) {
- var item = frappe.get_doc(cdt, cdn);
- frappe.model.round_floats_in(item, ["rate", "price_list_rate"]);
-
- if(item.price_list_rate) {
- item.discount_percentage = flt((1 - item.rate / item.price_list_rate) * 100.0, precision("discount_percentage", item));
- } else {
- item.discount_percentage = 0.0;
- }
-
- cur_frm.cscript.set_gross_profit(item);
- cur_frm.cscript.calculate_taxes_and_totals();
-})
-
-frappe.ui.form.on(cur_frm.cscript.tax_table, "rate", function(frm, cdt, cdn) {
- cur_frm.cscript.calculate_taxes_and_totals();
-})
-
-frappe.ui.form.on(cur_frm.cscript.tax_table, "tax_amount", function(frm, cdt, cdn) {
- cur_frm.cscript.calculate_taxes_and_totals();
-})
-
-frappe.ui.form.on(cur_frm.cscript.tax_table, "row_id", function(frm, cdt, cdn) {
- cur_frm.cscript.calculate_taxes_and_totals();
-})
-
-frappe.ui.form.on(cur_frm.cscript.tax_table, "included_in_print_rate", function(frm, cdt, cdn) {
- cur_frm.cscript.set_dynamic_labels();
- cur_frm.cscript.calculate_taxes_and_totals();
-})
-
-frappe.ui.form.on(cur_frm.doctype, "apply_discount_on", function(frm) {
- if(frm.doc.additional_discount_percentage) {
- frm.trigger("additional_discount_percentage");
- } else {
- cur_frm.cscript.calculate_taxes_and_totals();
- }
-})
-
-frappe.ui.form.on(cur_frm.doctype, "additional_discount_percentage", function(frm) {
- if (frm.via_discount_amount) {
- return;
- }
-
- if(!frm.doc.apply_discount_on) {
- frappe.msgprint(__("Please set 'Apply Additional Discount On'"));
- return
- }
-
- frm.via_discount_percentage = true;
-
- if(frm.doc.additional_discount_percentage && frm.doc.discount_amount) {
- // Reset discount amount and net / grand total
- frm.set_value("discount_amount", 0);
- }
-
- var total = flt(frm.doc[frappe.model.scrub(frm.doc.apply_discount_on)]);
- var discount_amount = flt(total*flt(frm.doc.additional_discount_percentage) / 100,
- precision("discount_amount"));
-
- frm.set_value("discount_amount", discount_amount);
- delete frm.via_discount_percentage;
-});
-
-frappe.ui.form.on(cur_frm.doctype, "discount_amount", function(frm) {
- frm.cscript.set_dynamic_labels();
-
- if (!frm.via_discount_percentage) {
- frm.via_discount_amount = true;
- frm.set_value("additional_discount_percentage", 0);
- delete frm.via_discount_amount;
- }
-
- frm.cscript.calculate_taxes_and_totals();
-});
+});
\ No newline at end of file
diff --git a/erpnext/public/js/feature_setup.js b/erpnext/public/js/feature_setup.js
deleted file mode 100644
index 6dfc962..0000000
--- a/erpnext/public/js/feature_setup.js
+++ /dev/null
@@ -1,227 +0,0 @@
-// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-// License: GNU General Public License v3. See license.txt
-
-/* features setup "Dictionary", "Script"
-Dictionary Format
- 'projects': {
- 'Sales Order': {
- 'fields':['project'],
- 'items':['projected_qty']
- },
- 'Purchase Order': {
- 'fields':['project']
- }
- }
-// ====================================================================*/
-frappe.provide("erpnext.feature_setup");
-erpnext.feature_setup.feature_dict = {
- 'fs_projects': {
- 'BOM': {'fields':['project']},
- 'Delivery Note': {'fields':['project']},
- 'Purchase Invoice': {'items':['project']},
- 'Production Order': {'fields':['project']},
- 'Purchase Order': {'items':['project']},
- 'Purchase Receipt': {'items':['project']},
- 'Sales Invoice': {'fields':['project']},
- 'Sales Order': {'fields':['project']},
- 'Stock Entry': {'fields':['project']},
- 'Timesheet': {'timesheet_details':['project']}
- },
- 'fs_discounts': {
- 'Delivery Note': {'items':['discount_percentage']},
- 'Quotation': {'items':['discount_percentage']},
- 'Sales Invoice': {'items':['discount_percentage']},
- 'Sales Order': {'items':['discount_percentage','price_list_rate']}
- },
- 'fs_purchase_discounts': {
- 'Purchase Order': {'items':['base_price_list_rate', 'discount_percentage', 'price_list_rate']},
- 'Purchase Receipt': {'items':['base_price_list_rate', 'discount_percentage', 'price_list_rate']},
- 'Purchase Invoice': {'items':['base_price_list_rate', 'discount_percentage', 'price_list_rate']}
- },
- 'fs_brands': {
- 'Delivery Note': {'items':['brand']},
- 'Material Request': {'items':['brand']},
- 'Item': {'fields':['brand']},
- 'Purchase Order': {'items':['brand']},
- 'Purchase Invoice': {'items':['brand']},
- 'Quotation': {'items':['brand']},
- 'Sales Invoice': {'items':['brand']},
- 'Product Bundle': {'fields':['new_item_brand']},
- 'Sales Order': {'items':['brand']},
- 'Serial No': {'fields':['brand']}
- },
- 'fs_after_sales_installations': {
- 'Delivery Note': {'fields':['installation_status','per_installed'],'items':['installed_qty']}
- },
- 'fs_item_batch_nos': {
- 'Delivery Note': {'items':['batch_no']},
- 'Item': {'fields':['has_batch_no']},
- 'Purchase Receipt': {'items':['batch_no']},
- 'Quality Inspection': {'fields':['batch_no']},
- 'Sales and Pruchase Return Wizard': {'return_details':['batch_no']},
- 'Sales Invoice': {'items':['batch_no']},
- 'Stock Entry': {'items':['batch_no']},
- 'Stock Ledger Entry': {'fields':['batch_no']}
- },
- 'fs_item_serial_nos': {
- 'Warranty Claim': {'fields':['serial_no']},
- 'Delivery Note': {'items':['serial_no'],'packed_items':['serial_no']},
- 'Installation Note': {'items':['serial_no']},
- 'Item': {'fields':['has_serial_no']},
- 'Maintenance Schedule': {'items':['serial_no'],'schedules':['serial_no']},
- 'Maintenance Visit': {'purposes':['serial_no']},
- 'Purchase Receipt': {'items':['serial_no']},
- 'Quality Inspection': {'fields':['item_serial_no']},
- 'Sales and Pruchase Return Wizard': {'return_details':['serial_no']},
- 'Sales Invoice': {'items':['serial_no']},
- 'Stock Entry': {'items':['serial_no']},
- 'Stock Ledger Entry': {'fields':['serial_no']}
- },
- 'fs_item_barcode': {
- 'Item': {'fields': ['barcode']},
- 'Delivery Note': {'items': ['barcode']},
- 'Sales Invoice': {'items': ['barcode']},
- 'Stock Entry': {'items': ['barcode']},
- 'Purchase Receipt': {'items': ['barcode']}
- },
- 'fs_item_group_in_details': {
- 'Delivery Note': {'items':['item_group']},
- 'Opportunity': {'items':['item_group']},
- 'Material Request': {'items':['item_group']},
- 'Item': {'fields':['item_group']},
- 'Global Defaults': {'fields':['default_item_group']},
- 'Purchase Order': {'items':['item_group']},
- 'Purchase Receipt': {'items':['item_group']},
- 'Purchase Voucher': {'items':['item_group']},
- 'Quotation': {'items':['item_group']},
- 'Sales Invoice': {'items':['item_group']},
- 'Product Bundle': {'fields':['serial_no']},
- 'Sales Order': {'items':['item_group']},
- 'Serial No': {'fields':['item_group']},
- 'Sales Partner': {'targets':['item_group']},
- 'Sales Person': {'targets':['item_group']},
- 'Territory': {'targets':['item_group']}
- },
- 'fs_page_break': {
- 'Delivery Note': {'items':['page_break'],'packed_items':['page_break']},
- 'Material Request': {'items':['page_break']},
- 'Purchase Order': {'items':['page_break']},
- 'Purchase Receipt': {'items':['page_break']},
- 'Purchase Voucher': {'items':['page_break']},
- 'Quotation': {'items':['page_break']},
- 'Sales Invoice': {'items':['page_break']},
- 'Sales Order': {'items':['page_break']}
- },
- 'fs_exports': {
- 'Delivery Note': {
- 'fields': ['conversion_rate','currency','base_grand_total','base_in_words','base_rounded_total',
- 'base_total', 'base_net_total', 'base_discount_amount', 'base_total_taxes_and_charges'],
- 'items': ['base_price_list_rate','base_amount','base_rate', 'base_net_rate', 'base_net_amount']
- },
- 'POS Profile': {'fields':['conversion_rate','currency']},
- 'Quotation': {
- 'fields': ['conversion_rate','currency','base_grand_total','base_in_words','base_rounded_total',
- 'base_total', 'base_net_total', 'base_discount_amount', 'base_total_taxes_and_charges'],
- 'items': ['base_price_list_rate','base_amount','base_rate', 'base_net_rate', 'base_net_amount']
- },
- 'Sales Invoice': {
- 'fields': ['conversion_rate','currency','base_grand_total','base_in_words','base_rounded_total',
- 'base_total', 'base_net_total', 'base_discount_amount', 'base_total_taxes_and_charges'],
- 'items': ['base_price_list_rate','base_amount','base_rate', 'base_net_rate', 'base_net_amount']
- },
- 'Product Bundle': {'fields':['currency']},
- 'Sales Order': {
- 'fields': ['conversion_rate','currency','base_grand_total','base_in_words','base_rounded_total',
- 'base_total', 'base_net_total', 'base_discount_amount', 'base_total_taxes_and_charges'],
- 'items': ['base_price_list_rate','base_amount','base_rate', 'base_net_rate', 'base_net_amount']
- }
- },
-
- 'fs_imports': {
- 'Purchase Invoice': {
- 'fields': ['conversion_rate', 'currency', 'base_grand_total', 'base_discount_amount',
- 'base_in_words', 'base_total', 'base_net_total', 'base_taxes_and_charges_added',
- 'base_taxes_and_charges_deducted', 'base_total_taxes_and_charges'],
- 'items': ['base_price_list_rate', 'base_amount','base_rate', 'base_net_rate', 'base_net_amount']
- },
- 'Purchase Order': {
- 'fields': ['conversion_rate','currency', 'base_grand_total', 'base_discount_amount',
- 'base_in_words', 'base_total', 'base_net_total', 'base_taxes_and_charges_added',
- 'base_taxes_and_charges_deducted', 'base_total_taxes_and_charges'],
- 'items': ['base_price_list_rate', 'base_amount','base_rate', 'base_net_rate', 'base_net_amount']
- },
- 'Purchase Receipt': {
- 'fields': ['conversion_rate', 'currency','base_grand_total', 'base_in_words', 'base_total',
- 'base_net_total', 'base_taxes_and_charges_added', 'base_taxes_and_charges_deducted',
- 'base_total_taxes_and_charges', 'base_discount_amount'],
- 'items': ['base_price_list_rate','base_amount','base_rate', 'base_net_rate', 'base_net_amount']
- },
- 'Supplier Quotation': {
- 'fields': ['conversion_rate', 'currency','base_grand_total', 'base_in_words', 'base_total',
- 'base_net_total', 'base_taxes_and_charges_added', 'base_taxes_and_charges_deducted',
- 'base_total_taxes_and_charges', 'base_discount_amount'],
- 'items': ['base_price_list_rate','base_amount','base_rate', 'base_net_rate', 'base_net_amount']
- }
- },
-
- 'fs_item_advanced': {
- 'Item': {'fields':['customer_items']}
- },
- 'fs_sales_extras': {
- 'Address': {'fields':['sales_partner']},
- 'Contact': {'fields':['sales_partner']},
- 'Customer': {'fields':['sales_team']},
- 'Delivery Note': {'fields':['sales_team']},
- 'Item': {'fields':['customer_items']},
- 'Sales Invoice': {'fields':['sales_team']},
- 'Sales Order': {'fields':['sales_team']}
- },
- 'fs_more_info': {
- "Warranty Claim": {"fields": ["more_info"]},
- 'Material Request': {'fields':['more_info']},
- 'Lead': {'fields':['more_info']},
- 'Opportunity': {'fields':['more_info']},
- 'Purchase Invoice': {'fields':['more_info']},
- 'Purchase Order': {'fields':['more_info']},
- 'Purchase Receipt': {'fields':['more_info']},
- 'Supplier Quotation': {'fields':['more_info']},
- 'Quotation': {'fields':['more_info']},
- 'Sales Invoice': {'fields':['more_info']},
- 'Sales Order': {'fields':['more_info']},
- 'Delivery Note': {'fields':['more_info']},
- },
- 'fs_quality': {
- 'Item': {'fields':['inspection_criteria','inspection_required']},
- 'Purchase Receipt': {'items':['qa_no']}
- },
- 'fs_manufacturing': {
- 'Item': {'fields':['manufacturing']}
- },
- 'fs_pos': {
- 'Sales Invoice': {'fields':['is_pos']}
- },
- 'fs_recurring_invoice': {
- 'Sales Invoice': {'fields': ['recurring_invoice']}
- }
-}
-
-$(document).bind('form_refresh', function() {
- var feature_dict = erpnext.feature_setup.feature_dict;
- for(var sys_feat in sys_defaults) {
- if(sys_defaults[sys_feat]=='0'
- && (sys_feat in feature_dict)) { //"Features to hide" exists
- if(cur_frm.doc.doctype in feature_dict[sys_feat]) {
- for(var fort in feature_dict[sys_feat][cur_frm.doc.doctype]) {
- if(fort=='fields') {
- hide_field(feature_dict[sys_feat][cur_frm.doc.doctype][fort]);
- } else if(cur_frm.fields_dict[fort]) {
- cur_frm.fields_dict[fort].grid.set_column_disp(feature_dict[sys_feat][cur_frm.doc.doctype][fort], false);
- } else {
- msgprint(__('Grid "')+fort+__('" does not exists'));
- }
- }
- }
-
- }
- }
-})
diff --git a/erpnext/public/js/payment/payment_details.html b/erpnext/public/js/payment/payment_details.html
new file mode 100644
index 0000000..b0f61d8
--- /dev/null
+++ b/erpnext/public/js/payment/payment_details.html
@@ -0,0 +1,4 @@
+<div class="row pos-payment-row" type="{{type}}" idx={{idx}}>
+ <div class="col-xs-6"><h5 class="payment-mode text-ellipsis" idx="{{idx}}"> {{mode_of_payment}} </h5></div>
+ <div class="col-xs-6 text-right"><input disabled data-fieldtype="Currency" class="input-with-feedback form-control text-right amount" idx="{{idx}}" type="text" value="{{format_number(amount, 2)}}"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/public/js/payment/pos_payment.html b/erpnext/public/js/payment/pos_payment.html
new file mode 100644
index 0000000..e93644d
--- /dev/null
+++ b/erpnext/public/js/payment/pos_payment.html
@@ -0,0 +1,40 @@
+<div class="pos_payment row">
+ <div class="col-sm-6">
+ <div class="row">
+ <div class="col-xs-6 text-center">
+ <p class="amount-label"> Total <h3>{%= format_currency(grand_total, currency) %} </h3></p>
+ </div>
+ <div class="col-xs-6 text-center">
+ <p class="amount-label"> Paid <h3 class="paid_amount">{%= format_currency(paid_amount, currency) %}</h3></p>
+ </div>
+ </div>
+ <hr>
+ <div class="multimode-payments">
+ </div>
+ </div>
+ <div class="col-sm-6">
+ <div class="row">
+ <div class="col-xs-6 text-center">
+ <p class="amount-label"> Outstanding <h3 class="outstanding_amount">{%= format_currency(outstanding_amount, currency) %} </h3></p>
+ </div>
+ <div class="col-xs-6 text-center">
+ <p class="amount-label"> Change <h3 class="change_amount">{%= format_currency(change_amount, currency) %}</h3></p>
+ </div>
+ </div>
+ <hr>
+ <div class="payment-toolbar">
+ {% for(var i=0; i<3; i++) { %}
+ <div class="row">
+ {% for(var j=i*3; j<(i+1)*3; j++) { %}
+ <button type="button" class="btn btn-default pos-keyboard-key">{{j+1}}</button>
+ {% } %}
+ </div>
+ {% } %}
+ <div class="row">
+ <button type="button" class="btn btn-default delete-btn"><span class="mega-octicon octicon-triangle-left"></span></button>
+ <button type="button" class="btn btn-default pos-keyboard-key">0</button>
+ <button type="button" class="btn btn-default pos-keyboard-key">.</button>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/erpnext/public/js/pos/pos.html b/erpnext/public/js/pos/pos.html
index 36ef7c9..9d0ab60 100644
--- a/erpnext/public/js/pos/pos.html
+++ b/erpnext/public/js/pos/pos.html
@@ -24,22 +24,24 @@
<div class="tax-table small"></div>
</div>
</div>
- <div class="row pos-bill-row discount-amount-area">
- <div class="col-xs-6"><h6 class="text-muted">{%= __("Discount") %}</h6></div>
- <div class="col-xs-3 discount-field-col">
- <div class="input-group input-group-sm">
- <span class="input-group-addon">%</span>
- <input type="text" class="form-control discount-percentage text-right">
+ {% if (apply_discount_on) { %}
+ <div class="row pos-bill-row discount-amount-area">
+ <div class="col-xs-6"><h6 class="text-muted">{%= __("Discount") %}</h6></div>
+ <div class="col-xs-3 discount-field-col">
+ <div class="input-group input-group-sm">
+ <span class="input-group-addon">%</span>
+ <input type="text" class="form-control discount-percentage text-right">
+ </div>
</div>
- </div>
- <div class="col-xs-3 discount-field-col">
- <div class="input-group input-group-sm">
- <span class="input-group-addon">{%= get_currency_symbol(currency) %}</span>
- <input type="text" class="form-control discount-amount text-right"
- placeholder="{%= 0.00 %}">
+ <div class="col-xs-3 discount-field-col">
+ <div class="input-group input-group-sm">
+ <span class="input-group-addon">{%= get_currency_symbol(currency) %}</span>
+ <input type="text" class="form-control discount-amount text-right"
+ placeholder="{%= 0.00 %}">
+ </div>
</div>
- </div>
- </div>
+ </div>
+ {% } %}
<div class="row pos-bill-row grand-total-area">
<div class="col-xs-6"><h6>{%= __("Grand Total") %}</h6></div>
<div class="col-xs-6"><h6 class="grand-total text-right"></h6></div>
@@ -51,11 +53,12 @@
<div class="row pos-item-area">
</div>
+ <span id="customer-results" style="color:#68a;"></span>
<div class="row pos-item-toolbar">
<div class="search-area col-xs-12"></div>
</div>
<div class="item-list-area">
- <div class="item-list"></div>
+ <div class="app-listing item-list"></ul>
</div>
</div>
</div>
diff --git a/erpnext/public/js/pos/pos_bill_item.html b/erpnext/public/js/pos/pos_bill_item.html
index c93c76c..fe521f6 100644
--- a/erpnext/public/js/pos/pos_bill_item.html
+++ b/erpnext/public/js/pos/pos_bill_item.html
@@ -9,8 +9,7 @@
</div>
{% if(actual_qty != null) { %}
<div style="margin-top: 5px;" class="text-muted small text-right">
- <span title="{%= __("In Stock") %}">{%= actual_qty || 0 %}<span>
- <span title="{%= __("Projected") %}">({%= projected_qty || 0 %})<span>
+ <span title="{%= __("In Stock") %}">{%= actual_qty || 0 %}<span>
</div>
{% } %}
</div>
diff --git a/erpnext/public/js/pos/pos_invoice_list.html b/erpnext/public/js/pos/pos_invoice_list.html
new file mode 100644
index 0000000..463b3e7
--- /dev/null
+++ b/erpnext/public/js/pos/pos_invoice_list.html
@@ -0,0 +1,5 @@
+<div class="row list-row pos-invoice-list" invoice-name = "{{name}}">
+ <div class="col-xs-6">{%= customer %}</div>
+ <div class="col-xs-3 text-right">{%= grand_total %}</div>
+ <div class="col-xs-3 text-right">{%= status %}</div>
+</div>
diff --git a/erpnext/public/js/pos/pos_print.html b/erpnext/public/js/pos/pos_print.html
new file mode 100644
index 0000000..d31a885
--- /dev/null
+++ b/erpnext/public/js/pos/pos_print.html
@@ -0,0 +1,25 @@
+<style>
+ .print-format table, .print-format tr,
+ .print-format td, .print-format div, .print-format p {
+ font-family: Monospace;
+ line-height: 200%;
+ vertical-align: middle;
+ }
+ @media screen {
+ .print-format {
+ width: 4in;
+ padding: 0.25in;
+ min-height: 8in;
+ }
+ }
+</style>
+
+<p class="text-center">
+ {{ company }}<br>
+</p>
+<p>
+ {{currency}}
+</p>
+{% for item in items %}
+ <p> {{item.item_code}} </p>
+{% endfor %}
\ No newline at end of file
diff --git a/erpnext/public/js/shopping_cart.js b/erpnext/public/js/shopping_cart.js
index a3f7d3f..40f5b98 100644
--- a/erpnext/public/js/shopping_cart.js
+++ b/erpnext/public/js/shopping_cart.js
@@ -12,6 +12,19 @@
}
// update login
shopping_cart.set_cart_count();
+
+ $(".shopping-cart").on('shown.bs.dropdown', function() {
+ if (!$('.shopping-cart-menu .cart-container').length) {
+ return frappe.call({
+ method: 'erpnext.shopping_cart.cart.get_shopping_cart_menu',
+ callback: function(r) {
+ if (r.message) {
+ $('.shopping-cart-menu').html(r.message);
+ }
+ }
+ });
+ }
+ });
});
$.extend(shopping_cart, {
@@ -32,7 +45,10 @@
},
btn: opts.btn,
callback: function(r) {
- shopping_cart.set_cart_count();
+ shopping_cart.set_cart_count();
+ if (r.message.shopping_cart_menu) {
+ $('.shopping-cart-menu').html(r.message.shopping_cart_menu);
+ }
if(opts.callback)
opts.callback(r);
}
@@ -43,20 +59,19 @@
set_cart_count: function() {
var cart_count = getCookie("cart_count");
- if($(".cart-icon").length == 0) {
- $('<div class="cart-icon small" style="float:right;padding:3px;border-radius:10px;\
- border: 1px solid #7575ff;">\
- <a href="/cart" style="color:#7575ff; text-decoration: none">\
- Cart\
- <span style="color:#7575ff;" class="badge" id="cart-count">5</span>\
- </a></div>').appendTo($('.shopping-cart'))
- }
+ if(cart_count) {
+ $(".shopping-cart").toggle(true);
+ }
var $cart = $('.cart-icon');
var $badge = $cart.find("#cart-count");
if(parseInt(cart_count) === 0 || cart_count === undefined) {
$cart.css("display", "none");
+ $(".cart-items").html('Cart is Empty');
+ $(".cart-tax-items").hide();
+ $(".btn-place-order").hide();
+ $(".cart-addresses").hide();
}
else {
$cart.css("display", "inline");
diff --git a/erpnext/public/js/stock_analytics.js b/erpnext/public/js/stock_analytics.js
index a8229ba..e9f9758 100644
--- a/erpnext/public/js/stock_analytics.js
+++ b/erpnext/public/js/stock_analytics.js
@@ -1,213 +1,214 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/stock_grid_report.js");
+frappe.require("assets/erpnext/js/stock_grid_report.js", function() {
+ erpnext.StockAnalytics = erpnext.StockGridReport.extend({
+ init: function(wrapper, opts) {
+ var args = {
+ title: __("Stock Analytics"),
+ page: wrapper,
+ parent: $(wrapper).find('.layout-main'),
+ page: wrapper.page,
+ doctypes: ["Item", "Item Group", "Warehouse", "Stock Ledger Entry", "Brand",
+ "Fiscal Year", "Serial No"],
+ tree_grid: {
+ show: true,
+ parent_field: "parent_item_group",
+ formatter: function(item) {
+ if(!item.is_group) {
+ return repl("<a \
+ onclick='frappe.cur_grid_report.show_stock_ledger(\"%(value)s\")'>\
+ %(value)s</a>", {
+ value: item.name,
+ });
+ } else {
+ return item.name;
+ }
-erpnext.StockAnalytics = erpnext.StockGridReport.extend({
- init: function(wrapper, opts) {
- var args = {
- title: __("Stock Analytics"),
- page: wrapper,
- parent: $(wrapper).find('.layout-main'),
- page: wrapper.page,
- doctypes: ["Item", "Item Group", "Warehouse", "Stock Ledger Entry", "Brand",
- "Fiscal Year", "Serial No"],
- tree_grid: {
- show: true,
- parent_field: "parent_item_group",
- formatter: function(item) {
- if(!item.is_group) {
- return repl("<a \
- onclick='frappe.cur_grid_report.show_stock_ledger(\"%(value)s\")'>\
- %(value)s</a>", {
- value: item.name,
- });
- } else {
- return item.name;
}
-
- }
- },
- }
-
- if(opts) $.extend(args, opts);
-
- this._super(args);
- },
- setup_columns: function() {
- var std_columns = [
- {id: "_check", name: __("Plot"), field: "_check", width: 30,
- formatter: this.check_formatter},
- {id: "name", name: __("Item"), field: "name", width: 300,
- formatter: this.tree_formatter},
- {id: "brand", name: __("Brand"), field: "brand", width: 100},
- {id: "stock_uom", name: __("UOM"), field: "stock_uom", width: 100},
- {id: "opening", name: __("Opening"), field: "opening", hidden: true,
- formatter: this.currency_formatter}
- ];
-
- this.make_date_range_columns();
- this.columns = std_columns.concat(this.columns);
- },
- filters: [
- {fieldtype:"Select", label: __("Value or Qty"), fieldname: "value_or_qty",
- options:[{label:__("Value"), value:"Value"}, {label:__("Quantity"), value:"Quantity"}],
- filter: function(val, item, opts, me) {
- return me.apply_zero_filter(val, item, opts, me);
- }},
- {fieldtype:"Select", label: __("Brand"), link:"Brand", fieldname: "brand",
- default_value: __("Select Brand..."), filter: function(val, item, opts) {
- return val == opts.default_value || item.brand == val || item._show;
- }, link_formatter: {filter_input: "brand"}},
- {fieldtype:"Select", label: __("Warehouse"), link:"Warehouse", fieldname: "warehouse",
- default_value: __("Select Warehouse...")},
- {fieldtype:"Date", label: __("From Date"), fieldname: "from_date"},
- {fieldtype:"Date", label: __("To Date"), fieldname: "to_date"},
- {fieldtype:"Select", label: __("Range"), fieldname: "range",
- options:[
- {label:__("Daily"), value:"Daily"},
- {label:__("Weekly"), value:"Weekly"},
- {label:__("Monthly"), value:"Monthly"},
- {label:__("Quarterly"), value:"Quarterly"},
- {label:__("Yearly"), value:"Yearly"},
- ]}
- ],
- setup_filters: function() {
- var me = this;
- this._super();
-
- this.trigger_refresh_on_change(["value_or_qty", "brand", "warehouse", "range"]);
-
- this.show_zero_check();
- this.setup_plot_check();
- },
- init_filter_values: function() {
- this._super();
- this.filter_inputs.range && this.filter_inputs.range.val('Monthly');
- },
- prepare_data: function() {
- var me = this;
-
- if(!this.data) {
- var items = this.prepare_tree("Item", "Item Group");
-
- me.parent_map = {};
- me.item_by_name = {};
- me.data = [];
-
- $.each(items, function(i, v) {
- var d = copy_dict(v);
-
- me.data.push(d);
- me.item_by_name[d.name] = d;
- if(d.parent_item_group) {
- me.parent_map[d.name] = d.parent_item_group;
- }
- me.reset_item_values(d);
- });
- this.set_indent();
- this.data[0].checked = true;
- } else {
- // otherwise, only reset values
- $.each(this.data, function(i, d) {
- me.reset_item_values(d);
- d["closing_qty_value"] = 0;
- });
- }
-
- this.prepare_balances();
- this.update_groups();
-
- },
- prepare_balances: function() {
- var me = this;
- var from_date = dateutil.str_to_obj(this.from_date);
- var to_date = dateutil.str_to_obj(this.to_date);
- var data = frappe.report_dump.data["Stock Ledger Entry"];
-
- this.item_warehouse = {};
- this.serialized_buying_rates = this.get_serialized_buying_rates();
-
- for(var i=0, j=data.length; i<j; i++) {
- var sl = data[i];
- sl.posting_datetime = sl.posting_date + " " + sl.posting_time;
- var posting_datetime = dateutil.str_to_obj(sl.posting_datetime);
-
- if(me.is_default("warehouse") ? true : me.warehouse == sl.warehouse) {
- var item = me.item_by_name[sl.item_code];
- if(item.closing_qty_value==undefined) item.closing_qty_value = 0;
-
- if(me.value_or_qty!="Quantity") {
- var wh = me.get_item_warehouse(sl.warehouse, sl.item_code);
- var valuation_method = item.valuation_method ?
- item.valuation_method : sys_defaults.valuation_method;
- var is_fifo = valuation_method == "FIFO";
-
- if(sl.voucher_type=="Stock Reconciliation") {
- var diff = (sl.qty_after_transaction * sl.valuation_rate) - item.closing_qty_value;
- wh.fifo_stack = [[sl.qty_after_transaction, sl.valuation_rate, sl.posting_date]];
- wh.balance_qty = sl.qty_after_transaction;
- wh.balance_value = sl.valuation_rate * sl.qty_after_transaction;
- } else {
- var diff = me.get_value_diff(wh, sl, is_fifo);
- }
- } else {
- if(sl.voucher_type=="Stock Reconciliation") {
- var diff = sl.qty_after_transaction - item.closing_qty_value;
- } else {
- var diff = sl.qty;
- }
- }
-
- if(posting_datetime < from_date) {
- item.opening += diff;
- } else if(posting_datetime <= to_date) {
- item[me.column_map[sl.posting_date].field] += diff;
- } else {
- break;
- }
-
- item.closing_qty_value += diff;
+ },
}
- }
- },
- update_groups: function() {
- var me = this;
- $.each(this.data, function(i, item) {
- // update groups
- if(!item.is_group && me.apply_filter(item, "brand")) {
- var balance = item.opening;
- $.each(me.columns, function(i, col) {
- if(col.formatter==me.currency_formatter && !col.hidden) {
- item[col.field] = balance + item[col.field];
- balance = item[col.field];
- }
- });
- var parent = me.parent_map[item.name];
- while(parent) {
- parent_group = me.item_by_name[parent];
- $.each(me.columns, function(c, col) {
- if (col.formatter == me.currency_formatter) {
- parent_group[col.field] =
- flt(parent_group[col.field])
- + flt(item[col.field]);
+ if(opts) $.extend(args, opts);
+
+ this._super(args);
+ },
+ setup_columns: function() {
+ var std_columns = [
+ {id: "_check", name: __("Plot"), field: "_check", width: 30,
+ formatter: this.check_formatter},
+ {id: "name", name: __("Item"), field: "name", width: 300,
+ formatter: this.tree_formatter},
+ {id: "brand", name: __("Brand"), field: "brand", width: 100},
+ {id: "stock_uom", name: __("UOM"), field: "stock_uom", width: 100},
+ {id: "opening", name: __("Opening"), field: "opening", hidden: true,
+ formatter: this.currency_formatter}
+ ];
+
+ this.make_date_range_columns();
+ this.columns = std_columns.concat(this.columns);
+ },
+ filters: [
+ {fieldtype:"Select", label: __("Value or Qty"), fieldname: "value_or_qty",
+ options:[{label:__("Value"), value:"Value"}, {label:__("Quantity"), value:"Quantity"}],
+ filter: function(val, item, opts, me) {
+ return me.apply_zero_filter(val, item, opts, me);
+ }},
+ {fieldtype:"Select", label: __("Brand"), link:"Brand", fieldname: "brand",
+ default_value: __("Select Brand..."), filter: function(val, item, opts) {
+ return val == opts.default_value || item.brand == val || item._show;
+ }, link_formatter: {filter_input: "brand"}},
+ {fieldtype:"Select", label: __("Warehouse"), link:"Warehouse", fieldname: "warehouse",
+ default_value: __("Select Warehouse...")},
+ {fieldtype:"Date", label: __("From Date"), fieldname: "from_date"},
+ {fieldtype:"Date", label: __("To Date"), fieldname: "to_date"},
+ {fieldtype:"Select", label: __("Range"), fieldname: "range",
+ options:[
+ {label:__("Daily"), value:"Daily"},
+ {label:__("Weekly"), value:"Weekly"},
+ {label:__("Monthly"), value:"Monthly"},
+ {label:__("Quarterly"), value:"Quarterly"},
+ {label:__("Yearly"), value:"Yearly"},
+ ]}
+ ],
+ setup_filters: function() {
+ var me = this;
+ this._super();
+
+ this.trigger_refresh_on_change(["value_or_qty", "brand", "warehouse", "range"]);
+
+ this.show_zero_check();
+ this.setup_plot_check();
+ },
+ init_filter_values: function() {
+ this._super();
+ this.filter_inputs.range && this.filter_inputs.range.val('Monthly');
+ },
+ prepare_data: function() {
+ var me = this;
+
+ if(!this.data) {
+ var items = this.prepare_tree("Item", "Item Group");
+
+ me.parent_map = {};
+ me.item_by_name = {};
+ me.data = [];
+
+ $.each(items, function(i, v) {
+ var d = copy_dict(v);
+
+ me.data.push(d);
+ me.item_by_name[d.name] = d;
+ if(d.parent_item_group) {
+ me.parent_map[d.name] = d.parent_item_group;
+ }
+ me.reset_item_values(d);
+ });
+ this.set_indent();
+ this.data[0].checked = true;
+ } else {
+ // otherwise, only reset values
+ $.each(this.data, function(i, d) {
+ me.reset_item_values(d);
+ d["closing_qty_value"] = 0;
+ });
+ }
+
+ this.prepare_balances();
+ this.update_groups();
+
+ },
+ prepare_balances: function() {
+ var me = this;
+ var from_date = dateutil.str_to_obj(this.from_date);
+ var to_date = dateutil.str_to_obj(this.to_date);
+ var data = frappe.report_dump.data["Stock Ledger Entry"];
+
+ this.item_warehouse = {};
+ this.serialized_buying_rates = this.get_serialized_buying_rates();
+
+ for(var i=0, j=data.length; i<j; i++) {
+ var sl = data[i];
+ sl.posting_datetime = sl.posting_date + " " + sl.posting_time;
+ var posting_datetime = dateutil.str_to_obj(sl.posting_datetime);
+
+ if(me.is_default("warehouse") ? true : me.warehouse == sl.warehouse) {
+ var item = me.item_by_name[sl.item_code];
+ if(item.closing_qty_value==undefined) item.closing_qty_value = 0;
+
+ if(me.value_or_qty!="Quantity") {
+ var wh = me.get_item_warehouse(sl.warehouse, sl.item_code);
+ var valuation_method = item.valuation_method ?
+ item.valuation_method : sys_defaults.valuation_method;
+ var is_fifo = valuation_method == "FIFO";
+
+ if(sl.voucher_type=="Stock Reconciliation") {
+ var diff = (sl.qty_after_transaction * sl.valuation_rate) - item.closing_qty_value;
+ wh.fifo_stack = [[sl.qty_after_transaction, sl.valuation_rate, sl.posting_date]];
+ wh.balance_qty = sl.qty_after_transaction;
+ wh.balance_value = sl.valuation_rate * sl.qty_after_transaction;
+ } else {
+ var diff = me.get_value_diff(wh, sl, is_fifo);
+ }
+ } else {
+ if(sl.voucher_type=="Stock Reconciliation") {
+ var diff = sl.qty_after_transaction - item.closing_qty_value;
+ } else {
+ var diff = sl.qty;
+ }
+ }
+
+ if(posting_datetime < from_date) {
+ item.opening += diff;
+ } else if(posting_datetime <= to_date) {
+ item[me.column_map[sl.posting_date].field] += diff;
+ } else {
+ break;
+ }
+
+ item.closing_qty_value += diff;
+ }
+ }
+ },
+ update_groups: function() {
+ var me = this;
+ $.each(this.data, function(i, item) {
+ // update groups
+ if(!item.is_group && me.apply_filter(item, "brand")) {
+ var balance = item.opening;
+ $.each(me.columns, function(i, col) {
+ if(col.formatter==me.currency_formatter && !col.hidden) {
+ item[col.field] = balance + item[col.field];
+ balance = item[col.field];
}
});
- parent = me.parent_map[parent];
+
+ var parent = me.parent_map[item.name];
+ while(parent) {
+ parent_group = me.item_by_name[parent];
+ $.each(me.columns, function(c, col) {
+ if (col.formatter == me.currency_formatter) {
+ parent_group[col.field] =
+ flt(parent_group[col.field])
+ + flt(item[col.field]);
+ }
+ });
+ parent = me.parent_map[parent];
+ }
}
- }
- });
- },
- get_plot_points: function(item, col, idx) {
- return [[dateutil.user_to_obj(col.name).getTime(), item[col.field]]]
- },
- show_stock_ledger: function(item_code) {
- frappe.route_options = {
- item_code: item_code,
- from_date: this.from_date,
- to_date: this.to_date
- };
- frappe.set_route("query-report", "Stock Ledger");
- }
+ });
+ },
+ get_plot_points: function(item, col, idx) {
+ return [[dateutil.user_to_obj(col.name).getTime(), item[col.field]]]
+ },
+ show_stock_ledger: function(item_code) {
+ frappe.route_options = {
+ item_code: item_code,
+ from_date: this.from_date,
+ to_date: this.to_date
+ };
+ frappe.set_route("query-report", "Stock Ledger");
+ }
+ });
});
+
diff --git a/erpnext/public/less/website.less b/erpnext/public/less/website.less
index 0246cac..37e3616 100644
--- a/erpnext/public/less/website.less
+++ b/erpnext/public/less/website.less
@@ -32,7 +32,8 @@
background-size: cover;
background-repeat: no-repeat;
background-position: center top;
- border-radius: 4px;
+ border-radius-top: 4px;
+ border-radius-right: 4px;
}
.product-image.missing-image {
@@ -83,7 +84,6 @@
}
.transaction-list-item {
- border-bottom: none;
padding: 30px;
margin: 0px -30px;
@@ -94,7 +94,6 @@
}
.indicator {
- font-size: inherit;
font-weight: inherit;
color: @text-muted;
margin-left: -15px;
@@ -159,6 +158,102 @@
border-top: 1px solid @border-color;
padding-top: 15px;
}
+
+ .tax-grand-total {
+ display: inline-block;
+ font-size: 16px;
+ font-weight: bold;
+ margin-top: 5px;
+ }
+}
+
+.cart-container {
+ margin: 50px 0px;
+
+ .cart-item-header .h6 {
+ padding: 7px 15px;
+ }
+
+ .cart-items {
+ margin: 30px 0px 0px;
+ }
+
+ .cart-item-table {
+ margin: 0px -15px;
+ }
+
+ .cart-item-header {
+ border-bottom: 1px solid #d1d8dd;
+ }
+
+ .cart-image-col {
+ padding-right: 0px;
+ }
+
+ .cart-image {
+ max-width: 55px;
+ max-height: 55px;
+ margin-top: -5px;
+ }
+
+ .cart-taxes {
+ margin-top: 30px;
+
+ .row {
+ margin-top: 15px;
+ }
+ }
+
+ .tax-grand-total-row {
+ border-top: 1px solid @border-color;
+ padding-top: 15px;
+ }
+
+ .cart-addresses {
+ margin-top: 50px;
+ }
+}
+
+.cart-items .cart-dropdown,
+.item_name_dropdown {
+ display:none;
+
+}
+.cart-dropdown-container {
+ width: 320px;
+ padding: 15px;
+
+ .item-price {
+ display: block !important;
+ padding-bottom: 10px;
+ }
+
+ .cart-item-header {
+ border-bottom: 1px solid #d1d8dd;
+ }
+
+ .cart-items .cart-dropdown {
+ display:block;
+ margin-top:15px;
+ }
+
+ .item_name_dropdown {
+ display:block;
+ }
+
+ .item-description,
+ .cart-items .checkout,
+ .item_name_and_description {
+ display: none;
+ }
+
+ .checkout-btn {
+ padding-top:25px;
+ }
+ .col-name-description {
+ margin-bottom:8px;
+ }
+
}
.product-list-link {
@@ -189,3 +284,44 @@
max-width: 350px;
}
}
+
+.item-group-content {
+ margin-top: 30px;
+}
+
+.product-image-img {
+ border: 1px solid @light-border-color;
+ border-radius: 3px;
+}
+
+.product-text {
+ border-top: 1px solid @light-border-color;
+ padding: 15px;
+ word-wrap: break-word;
+ height: 75px;
+}
+
+.product-image-wrapper {
+ padding-bottom: 40px;
+}
+
+
+.featured-product-heading, .all-products {
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+ font-size: 12px;
+ font-weight: 500;
+}
+
+.all-products {
+ font-weight: 300;
+ padding-left: 25px;
+ padding-right: 25px;
+ padding-top: 10px;
+ padding-bottom: 10px;
+}
+
+.homepage-tagline {
+ font-size:40px !important;
+}
+
diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js
index 5645280..87d028f 100644
--- a/erpnext/selling/doctype/customer/customer.js
+++ b/erpnext/selling/doctype/customer/customer.js
@@ -3,7 +3,6 @@
frappe.ui.form.on("Customer", {
before_load: function(frm) {
- frm.hide_first = true;
frappe.setup_language_field(frm);
},
refresh: function(frm) {
diff --git a/erpnext/selling/doctype/installation_note/installation_note.js b/erpnext/selling/doctype/installation_note/installation_note.js
index f0e1eab..09deea2 100644
--- a/erpnext/selling/doctype/installation_note/installation_note.js
+++ b/erpnext/selling/doctype/installation_note/installation_note.js
@@ -1,7 +1,7 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/utils.js");
+
frappe.ui.form.on_change("Installation Note", "customer",
function(frm) { erpnext.utils.get_party_details(frm); });
diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json
index 123686d..037f1e8 100644
--- a/erpnext/selling/doctype/quotation/quotation.json
+++ b/erpnext/selling/doctype/quotation/quotation.json
@@ -3,6 +3,7 @@
"allow_import": 1,
"allow_rename": 0,
"autoname": "naming_series:",
+ "beta": 0,
"creation": "2013-05-24 19:29:08",
"custom": 0,
"docstatus": 0,
@@ -922,7 +923,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
- "reqd": 1,
+ "reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
@@ -2131,7 +2132,7 @@
"istable": 0,
"max_attachments": 1,
"menu_index": 0,
- "modified": "2016-04-14 12:28:39.092593",
+ "modified": "2016-05-10 12:16:13.978635",
"modified_by": "Administrator",
"module": "Selling",
"name": "Quotation",
@@ -2302,6 +2303,7 @@
"write": 0
}
],
+ "quick_entry": 0,
"read_only": 0,
"read_only_onload": 1,
"search_fields": "status,transaction_date,customer,lead,order_type",
diff --git a/erpnext/selling/report/quotation_trends/quotation_trends.js b/erpnext/selling/report/quotation_trends/quotation_trends.js
index ba62bf1..294aea0 100644
--- a/erpnext/selling/report/quotation_trends/quotation_trends.js
+++ b/erpnext/selling/report/quotation_trends/quotation_trends.js
@@ -1,8 +1,9 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/sales_trends_filters.js");
+frappe.require("assets/erpnext/js/sales_trends_filters.js", function() {
+ frappe.query_reports["Quotation Trends"] = {
+ filters: get_filters()
+ }
+});
-frappe.query_reports["Quotation Trends"] = {
- filters: get_filters()
- }
\ No newline at end of file
diff --git a/erpnext/selling/report/sales_order_trends/sales_order_trends.js b/erpnext/selling/report/sales_order_trends/sales_order_trends.js
index cee6004..863afb8 100644
--- a/erpnext/selling/report/sales_order_trends/sales_order_trends.js
+++ b/erpnext/selling/report/sales_order_trends/sales_order_trends.js
@@ -1,8 +1,8 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/sales_trends_filters.js");
-
-frappe.query_reports["Sales Order Trends"] = {
- filters: get_filters()
- }
\ No newline at end of file
+frappe.require("assets/erpnext/js/sales_trends_filters.js", function() {
+ frappe.query_reports["Sales Order Trends"] = {
+ filters: get_filters()
+ }
+});
\ No newline at end of file
diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index 167024b..e613daf 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -5,11 +5,10 @@
cur_frm.cscript.tax_table = "Sales Taxes and Charges";
{% include 'erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.js' %}
-frappe.provide("erpnext.selling");
-frappe.require("assets/erpnext/js/controllers/transaction.js");
cur_frm.email_field = "contact_email";
+frappe.provide("erpnext.selling");
erpnext.selling.SellingController = erpnext.TransactionController.extend({
onload: function() {
this._super();
@@ -123,7 +122,7 @@
// check if child doctype is Sales Order Item/Qutation Item and calculate the rate
if(in_list(["Quotation Item", "Sales Order Item", "Delivery Note Item", "Sales Invoice Item"]), cdt)
- this.calculate_revised_margin_and_rate(item, doc,cdt, cdn);
+ this.apply_pricing_rule_on_item(item);
else
item.rate = flt(item.price_list_rate * (1 - item.discount_percentage / 100.0),
precision("rate", item));
@@ -182,7 +181,7 @@
warehouse: function(doc, cdt, cdn) {
var me = this;
var item = frappe.get_doc(cdt, cdn);
-
+
if(item.item_code && item.warehouse) {
return this.frm.call({
method: "erpnext.stock.get_item_details.get_bin_details",
@@ -321,7 +320,7 @@
margin_rate_or_amount: function(doc, cdt, cdn) {
// calculated the revised total margin and rate on margin rate changes
item = locals[cdt][cdn];
- this.calculate_revised_margin_and_rate(item)
+ this.apply_pricing_rule_on_item(item)
this.calculate_taxes_and_totals();
cur_frm.refresh_fields();
},
@@ -329,26 +328,9 @@
margin_type: function(doc, cdt, cdn){
// calculate the revised total margin and rate on margin type changes
item = locals[cdt][cdn];
- this.calculate_revised_margin_and_rate(item, doc,cdt, cdn)
+ this.apply_pricing_rule_on_item(item, doc,cdt, cdn)
this.calculate_taxes_and_totals();
cur_frm.refresh_fields();
- },
-
- calculate_revised_margin_and_rate: function(item){
- if(in_list(["Percentage", "Amount"], item.margin_type)){
- if(item.margin_type == "Percentage")
- item.total_margin = item.price_list_rate + item.price_list_rate * ( item.margin_rate_or_amount / 100);
- else
- item.total_margin = item.price_list_rate + item.margin_rate_or_amount;
- item.rate = flt(item.total_margin * (1 - item.discount_percentage / 100.0),
- precision("rate", item));
- }
- else{
- item.rate_or_amount = 0.0;
- item.total_margin = 0.0;
- item.rate = flt(item.price_list_rate * (1 - item.discount_percentage / 100.0),
- precision("rate", item));
- }
}
});
diff --git a/erpnext/setup/doctype/features_setup/README.md b/erpnext/setup/doctype/features_setup/README.md
deleted file mode 100644
index 4bdea47..0000000
--- a/erpnext/setup/doctype/features_setup/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Settings for enabling / disabling certain features that will result in smaller forms.
\ No newline at end of file
diff --git a/erpnext/setup/doctype/features_setup/__init__.py b/erpnext/setup/doctype/features_setup/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/erpnext/setup/doctype/features_setup/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/erpnext/setup/doctype/features_setup/features_setup.js b/erpnext/setup/doctype/features_setup/features_setup.js
deleted file mode 100644
index a637a8e..0000000
--- a/erpnext/setup/doctype/features_setup/features_setup.js
+++ /dev/null
@@ -1,5 +0,0 @@
-frappe.ui.form.on('Features Setup', {
- refresh: function(frm) {
-
- }
-});
diff --git a/erpnext/setup/doctype/features_setup/features_setup.json b/erpnext/setup/doctype/features_setup/features_setup.json
deleted file mode 100644
index 56be6b0..0000000
--- a/erpnext/setup/doctype/features_setup/features_setup.json
+++ /dev/null
@@ -1,833 +0,0 @@
-{
- "allow_copy": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "creation": "2012-12-20 12:50:49",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "fields": [
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "materials",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Item",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "To track item in sales and purchase documents based on their serial nos. This is can also used to track warranty details of the product.",
- "fieldname": "fs_item_serial_nos",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Item Serial Nos",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "To track items in sales and purchase documents with batch nos. \"Preferred Industry: Chemicals\"",
- "fieldname": "fs_item_batch_nos",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Item Batch Nos",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "To track brand name in the following documents Delivery Note, Opportunity, Material Request, Item, Purchase Order, Purchase Voucher, Purchaser Receipt, Quotation, Sales Invoice, Product Bundle, Sales Order, Serial No",
- "fieldname": "fs_brands",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Brands",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "To track items using barcode. You will be able to enter items in Delivery Note and Sales Invoice by scanning barcode of item.",
- "fieldname": "fs_item_barcode",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Item Barcode",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break0",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "To maintain the customer wise item code and to make them searchable based on their code use this option",
- "fieldname": "fs_item_advanced",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Item Advanced",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "To get Item Group in details table",
- "fieldname": "fs_item_group_in_details",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Item Groups in Details",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "If checked, only Description, Quantity, Rate and Amount are shown in print of Item table. Any extra field is shown under 'Description' column.",
- "fieldname": "compact_item_print",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Compact Item Print",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "sales_and_purchase",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Sales and Purchase",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "All export related fields like currency, conversion rate, export total, export grand total etc are available in Delivery Note, POS, Quotation, Sales Invoice, Sales Order etc.",
- "fieldname": "fs_exports",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Exports",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "All import related fields like currency, conversion rate, import total, import grand total etc are available in Purchase Receipt, Supplier Quotation, Purchase Invoice, Purchase Order etc.",
- "fieldname": "fs_imports",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Imports",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break1",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "Field available in Delivery Note, Quotation, Sales Invoice, Sales Order",
- "fieldname": "fs_discounts",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Sales Discounts",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "Discount Fields will be available in Purchase Order, Purchase Receipt, Purchase Invoice",
- "fieldname": "fs_purchase_discounts",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Purchase Discounts",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "To track any installation or commissioning related work after sales",
- "fieldname": "fs_after_sales_installations",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "After Sale Installations",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "Available in BOM, Delivery Note, Purchase Invoice, Production Order, Purchase Order, Purchase Receipt, Sales Invoice, Sales Order, Stock Entry, Timesheet",
- "fieldname": "fs_projects",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Projects",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "If you have Sales Team and Sale Partners (Channel Partners) they can be tagged and maintain their contribution in the sales activity",
- "fieldname": "fs_sales_extras",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Sales Extras",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "accounts",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Accounts",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "Check if you need automatic recurring invoices. After submitting any sales invoice, Recurring section will be visible.",
- "fieldname": "fs_recurring_invoice",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Recurring Invoice",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break2",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "To enable \"Point of Sale\" features",
- "fieldname": "fs_pos",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Point of Sale",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "To enable \"Point of Sale\" view",
- "fieldname": "fs_pos_view",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "POS View",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "production",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Manufacturing",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "If you involve in manufacturing activity. Enables Item 'Is Manufactured'",
- "fieldname": "fs_manufacturing",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Manufacturing",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "If you follow Quality Inspection. Enables Item QA Required and QA No in Purchase Receipt",
- "fieldname": "fs_quality",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Quality",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "miscelleneous",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Miscelleneous",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "description": "If you have long print formats, this feature can be used to split the page to be printed on multiple pages with all headers and footers on each page",
- "fieldname": "fs_page_break",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Page Break",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break4",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "fs_more_info",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "More Information",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- }
- ],
- "hide_heading": 0,
- "hide_toolbar": 0,
- "icon": "icon-glass",
- "idx": 1,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 0,
- "issingle": 1,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2016-04-06 03:45:40.152486",
- "modified_by": "Administrator",
- "module": "Setup",
- "name": "Features Setup",
- "name_case": "Title Case",
- "owner": "Administrator",
- "permissions": [
- {
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 0,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 0,
- "role": "System Manager",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
- "write": 1
- },
- {
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 0,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 0,
- "role": "Administrator",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
- "write": 1
- }
- ],
- "read_only": 0,
- "read_only_onload": 0,
- "sort_order": "ASC",
- "track_seen": 0
-}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/features_setup/features_setup.py b/erpnext/setup/doctype/features_setup/features_setup.py
deleted file mode 100644
index 1ac0f74..0000000
--- a/erpnext/setup/doctype/features_setup/features_setup.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-from frappe.model.document import Document
-
-class FeaturesSetup(Document):
-
- def validate(self):
- """
- update settings in defaults
- """
- from frappe.model import default_fields
- from frappe.utils import set_default
- for key in self.meta.get_valid_columns():
- if key not in default_fields:
- set_default(key, self.get(key))
diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py
index 4b26cfc..dc30de1 100644
--- a/erpnext/setup/doctype/item_group/item_group.py
+++ b/erpnext/setup/doctype/item_group/item_group.py
@@ -58,7 +58,7 @@
if start < 0:
start = 0
context.update({
- "items": get_product_list_for_group(product_group = self.name, start=start, limit=24, search=frappe.form_dict.get("q")),
+ "items": get_product_list_for_group(product_group = self.name, start=start, limit=24, search=frappe.form_dict.get("search")),
"parent_groups": get_parent_item_groups(self.name),
"title": self.name,
"products_as_list": cint(frappe.db.get_single_value('Website Settings', 'products_as_list'))
@@ -74,7 +74,7 @@
child_groups = ", ".join(['"' + i[0] + '"' for i in get_child_groups(product_group)])
# base query
- query = """select name, item_name, item_code, page_name, website_image, thumbnail, item_group,
+ query = """select name, item_name, item_code, page_name, image, website_image, thumbnail, item_group,
description, web_long_description as website_description,
concat(parent_website_route, "/", page_name) as route
from `tabItem`
diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py
index 1402168..3337b1f 100644
--- a/erpnext/setup/install.py
+++ b/erpnext/setup/install.py
@@ -4,6 +4,7 @@
from __future__ import unicode_literals
import frappe
+from frappe import _
default_mail_footer = """<div style="padding: 7px; text-align: right; color: #888"><small>Sent via
<a style="color: #888" href="http://erpnext.org">ERPNext</a></div>"""
@@ -11,7 +12,7 @@
def after_install():
frappe.get_doc({'doctype': "Role", "role_name": "Analytics"}).insert()
set_single_defaults()
- feature_setup()
+ create_compact_item_print_custom_field()
from frappe.desk.page.setup_wizard.setup_wizard import add_all_roles_to
add_all_roles_to("Administrator")
frappe.db.commit()
@@ -24,23 +25,6 @@
print
return False
-def feature_setup():
- """save global defaults and features setup"""
- doc = frappe.get_doc("Features Setup", "Features Setup")
- doc.flags.ignore_permissions = True
-
- # store value as 1 for all these fields
- flds = ['fs_item_serial_nos', 'fs_item_batch_nos', 'fs_brands', 'fs_item_barcode',
- 'fs_item_advanced', 'fs_packing_details', 'fs_item_group_in_details',
- 'fs_exports', 'fs_imports', 'fs_discounts', 'fs_purchase_discounts',
- 'fs_after_sales_installations', 'fs_projects', 'fs_sales_extras',
- 'fs_recurring_invoice', 'fs_pos', 'fs_manufacturing', 'fs_quality',
- 'fs_page_break', 'fs_more_info', 'fs_pos_view', 'compact_item_print'
- ]
- for f in flds:
- doc.set(f, 1)
- doc.save()
-
def set_single_defaults():
for dt in frappe.db.sql_list("""select name from `tabDocType` where issingle=1"""):
default_values = frappe.db.sql("""select fieldname, `default` from `tabDocField`
@@ -55,3 +39,13 @@
pass
frappe.db.set_default("date_format", "dd-mm-yyyy")
+
+def create_compact_item_print_custom_field():
+ from frappe.custom.doctype.custom_field.custom_field import create_custom_field
+ create_custom_field('Print Settings', {
+ 'label': _('Compact Item Print'),
+ 'fieldname': 'compact_item_print',
+ 'fieldtype': 'Check',
+ 'default': 1,
+ 'insert_after': 'with_letterhead'
+ })
\ No newline at end of file
diff --git a/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html b/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html
index fe8a963..cd4d977 100644
--- a/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html
+++ b/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html
@@ -22,7 +22,7 @@
<ul class="list-unstyled">
<li><a class="text-muted" href="#">{%= __("Go to the Desktop and start using ERPNext") %}</a></li>
<li><a class="text-muted" href="#modules/Learn">{%= __("View a list of all the help videos") %}</a></li>
- <li><a class="text-muted" href="https://manual.erpnext.com" target="_blank">{%= __("Read the ERPNext Manual") %}</a></li>
+ <li><a class="text-muted" href="https://frappe.github.io/erpnext/user" target="_blank">{%= __("Read the ERPNext Manual") %}</a></li>
<li><a class="text-muted" href="https://discuss.erpnext.com" target="_blank">{%= __("Community Forum") %}</a></li>
</ul>
diff --git a/erpnext/setup/setup_wizard/data/sample_home_page.css b/erpnext/setup/setup_wizard/data/sample_home_page.css
deleted file mode 100644
index 723bcb9..0000000
--- a/erpnext/setup/setup_wizard/data/sample_home_page.css
+++ /dev/null
@@ -1,40 +0,0 @@
-.page-header {
- color: white;
- background: #263248;
- text-align: center;
- padding: 80px 0px;
-}
-
-.page-header .page-header-left {
- width: 100%;
-}
-
-.page-header h1 {
- color: white;
-}
-
-.slide h2 {
- margin-bottom: 30px;
-}
-
-.slides {
- margin-top: -15px;
-}
-
-.slide {
- padding: 30px 40px;
- max-width: 800px;
- margin: auto;
-}
-
-.container {
- max-width: 900px;
-}
-
-.img-wrapper {
- text-align: center;
- padding: 30px;
- background-color: #eee;
- border-radius: 5px;
- margin-bottom: 15px;
-}
diff --git a/erpnext/setup/setup_wizard/data/sample_home_page.html b/erpnext/setup/setup_wizard/data/sample_home_page.html
deleted file mode 100644
index 990bc1e..0000000
--- a/erpnext/setup/setup_wizard/data/sample_home_page.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<div class="slides">
- <div class="row slide">
- <h2 class="text-center">{{ _("Awesome Products") }}</h2>
- <div class="col-md-6 text-center">
- <div class="img-wrapper">
- <i class="icon-wrench text-muted" style="font-size: 100px;"></i>
- </div>
- </div>
- <div class="col-md-6">
- <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>
- </div>
- </div>
- <div class="row slide alt">
- <h2 class="text-center">{{ _("Awesome Services") }}</h2>
- <div class="col-md-6 text-center">
- <div class="img-wrapper">
- <i class="icon-phone text-muted" style="font-size: 100px;"></i>
- </div>
- </div>
- <div class="col-md-6">
- <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>
- </div>
- </div>
-</div>
-<p class="text-center" style="margin-bottom: 50px;">
- <a href="/products" class="btn btn-success">Explore <i class="icon-chevron-right"></i></a>
-</p>
-<!-- no-sidebar -->
diff --git a/erpnext/setup/setup_wizard/default_website.py b/erpnext/setup/setup_wizard/default_website.py
index e8d4eb43..d137676 100644
--- a/erpnext/setup/setup_wizard/default_website.py
+++ b/erpnext/setup/setup_wizard/default_website.py
@@ -8,34 +8,27 @@
from frappe.utils import nowdate
class website_maker(object):
- def __init__(self, company, tagline, user):
- self.company = company
- self.tagline = tagline
- self.user = user
+ def __init__(self, args):
+ self.args = args
+ self.company = args.company_name
+ self.tagline = args.company_tagline
+ self.user = args.name
self.make_web_page()
self.make_website_settings()
self.make_blog()
def make_web_page(self):
# home page
- self.webpage = frappe.get_doc({
- "doctype": "Web Page",
- "title": self.company,
- "published": 1,
- "header": "<div class='hero text-center'><h1>{0}</h1>".format(self.tagline or "Headline")+\
- '<p>'+_("This is an example website auto-generated from ERPNext")+"</p>"+\
- '<p><a class="btn btn-primary" href="/login">Login</a></p></div>',
- "description": self.company + ":" + (self.tagline or ""),
- "css": frappe.get_template("setup/setup_wizard/data/sample_home_page.css").render(),
- "main_section": frappe.get_template("setup/setup_wizard/data/sample_home_page.html").render({
- "company": self.company, "tagline": (self.tagline or "")
- })
- }).insert()
+ homepage = frappe.get_doc('Homepage', 'Homepage')
+ homepage.company = self.company
+ homepage.tag_line = self.tagline
+ homepage.setup_items()
+ homepage.save()
def make_website_settings(self):
# update in home page in settings
website_settings = frappe.get_doc("Website Settings", "Website Settings")
- website_settings.home_page = self.webpage.name
+ website_settings.home_page = 'home'
website_settings.brand_html = self.company
website_settings.copyright = self.company
website_settings.top_bar_items = []
@@ -88,5 +81,5 @@
frappe.delete_doc("Blog Post", "welcome")
frappe.delete_doc("Blogger", "administrator")
frappe.delete_doc("Blog Category", "general")
- website_maker("Test Company", "Better Tools for Everyone", "Administrator")
+ website_maker({'company':"Test Company", 'company_tagline': "Better Tools for Everyone", 'name': "Administrator"})
frappe.db.commit()
diff --git a/erpnext/setup/setup_wizard/domainify.py b/erpnext/setup/setup_wizard/domainify.py
new file mode 100644
index 0000000..a866869
--- /dev/null
+++ b/erpnext/setup/setup_wizard/domainify.py
@@ -0,0 +1,62 @@
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+domains = {
+ 'Manufacturing': {
+ 'desktop_icons': ['Item', 'BOM', 'Customer', 'Supplier', 'Sales Order',
+ 'Production Order', 'Stock Entry', 'Buying', 'Selling', 'Accounts']
+ },
+ 'Retail': {
+ 'remove_roles': ['Manufacturing User', 'Manufacturing Manager', 'Maintenance User'],
+ 'desktop_icons': ['POS', 'Item', 'Customer', 'Sales Invoice', 'Accounts']
+ },
+ 'Distribution': {
+ 'remove_roles': ['Manufacturing User', 'Manufacturing Manager', 'Maintenance User'],
+ },
+ 'Services': {
+ 'desktop_icons': ['Project', 'Time Log', 'Customer', 'Sales Invoice', 'Lead', 'Opportunity',
+ 'Expense Claim', 'Employee'],
+ 'remove_roles': ['Manufacturing User', 'Manufacturing Manager', 'Maintenance User'],
+ 'properties': [
+ {'doctype': 'Item', 'fieldname': 'is_stock_item', 'property': 'default', 'value': 0},
+ ],
+ 'set_value': [
+ ['Stock Settings', None, 'show_barcode', 0]
+ ]
+ }
+}
+
+def setup_domain(domain):
+ if not domain in domains:
+ return
+
+ from frappe.desk.doctype.desktop_icon.desktop_icon import set_desktop_icons
+ data = frappe._dict(domains[domain])
+
+ if data.remove_roles:
+ for role in data.remove_roles:
+ frappe.db.sql('delete from tabUserRole where role=%s', role)
+
+ if data.desktop_icons:
+ set_desktop_icons(data.desktop_icons)
+
+ if data.properties:
+ for args in data.properties:
+ frappe.make_property_setter(args)
+
+ if data.set_value:
+ for args in data.set_value:
+ doc = frappe.get_doc(args[0], args[1] or args[0])
+ doc.set(args[2], args[3])
+ doc.save()
+
+ frappe.clear_cache()
+
+def reset():
+ from frappe.desk.page.setup_wizard.setup_wizard import add_all_roles_to
+ add_all_roles_to('Administrator')
+
+ frappe.db.sql('delete from `tabProperty Setter`')
\ No newline at end of file
diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py
index a21fd21..48766bf 100644
--- a/erpnext/setup/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/setup_wizard/setup_wizard.py
@@ -12,6 +12,7 @@
from .sample_data import make_sample_data
from erpnext.accounts.doctype.account.account import RootNotEditable
from frappe.core.doctype.communication.comment import add_info_comment
+from erpnext.setup.setup_wizard.domainify import setup_domain
def setup_complete(args=None):
if frappe.db.sql("select name from tabCompany"):
@@ -32,8 +33,9 @@
create_customers(args)
create_suppliers(args)
frappe.local.message_log = []
+ setup_domain(args.get('domain'))
- website_maker(args.company_name.strip(), args.company_tagline, args.name)
+ website_maker(args)
create_logo(args)
frappe.db.commit()
diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py
index 2c3257e..daecaa6 100644
--- a/erpnext/shopping_cart/cart.py
+++ b/erpnext/shopping_cart/cart.py
@@ -92,8 +92,9 @@
set_cart_count(quotation)
- if with_items:
- context = get_cart_quotation(quotation)
+ context = get_cart_quotation(quotation)
+
+ if cint(with_items):
return {
"items": frappe.render_template("templates/includes/cart/cart_items.html",
context),
@@ -101,7 +102,17 @@
context),
}
else:
- return quotation.name
+ return {
+ 'name': quotation.name,
+ 'shopping_cart_menu': get_shopping_cart_menu(context)
+ }
+
+@frappe.whitelist()
+def get_shopping_cart_menu(context=None):
+ if not context:
+ context = get_cart_quotation()
+
+ return frappe.render_template('templates/includes/cart/cart_dropdown.html', context)
@frappe.whitelist()
def update_cart_address(address_fieldname, address_name):
@@ -296,6 +307,8 @@
return frappe.get_doc(party_doctype, party)
else:
+ if not cart_settings.enabled:
+ return None
customer = frappe.new_doc("Customer")
fullname = get_fullname(user)
customer.update({
@@ -357,6 +370,9 @@
if not party:
party = get_party()
+ if not party:
+ return []
+
address_docs = frappe.db.sql("""select * from `tabAddress`
where `{0}`=%s order by name limit {1}, {2}""".format(party.doctype.lower(),
limit_start, limit_page_length), party.name,
diff --git a/erpnext/stock/dashboard/item_dashboard.js b/erpnext/stock/dashboard/item_dashboard.js
index 86cc0f2..99edb0f 100644
--- a/erpnext/stock/dashboard/item_dashboard.js
+++ b/erpnext/stock/dashboard/item_dashboard.js
@@ -124,7 +124,7 @@
}
if(rate) {
- dialog.get_field('rate').set_value('rate');
+ dialog.get_field('rate').set_value(rate);
dialog.get_field('rate').df.hidden = 0;
dialog.get_field('rate').refresh();
}
@@ -136,7 +136,7 @@
}
dialog.set_primary_action(__('Submit'), function() {
- values = dialog.get_values();
+ var values = dialog.get_values();
if(!values) {
return;
}
@@ -159,4 +159,23 @@
},
});
});
+
+ $('<p style="margin-left: 10px;"><a class="link-open text-muted small">'
+ + __("Add more items or open full form") + '</a></p>')
+ .appendTo(dialog.body)
+ .find('.link-open')
+ .on('click', function() {
+ frappe.model.with_doctype('Stock Entry', function() {
+ var doc = frappe.model.get_new_doc('Stock Entry');
+ doc.from_warehouse = dialog.get_value('source');
+ doc.to_warehouse = dialog.get_value('target');
+ row = frappe.model.add_child(doc, 'items');
+ row.item_code = dialog.get_value('item_code');
+ row.f_warehouse = dialog.get_value('target');
+ row.t_warehouse = dialog.get_value('target');
+ row.qty = dialog.get_value('qty');
+ row.basic_rate = dialog.get_value('rate');
+ frappe.set_route('Form', doc.doctype, doc.name);
+ })
+ });
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index 79a4ea6..6c6a3b3 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -329,9 +329,12 @@
def get_list_context(context=None):
from erpnext.controllers.website_list_for_contact import get_list_context
list_context = get_list_context(context)
- list_context["title"] = _("My Shipments")
- list_context["show_sidebar"] = True
- list_context["show_search"] = True
+ list_context.update({
+ 'show_sidebar': True,
+ 'show_search': True,
+ 'no_breadcrumbs': True,
+ 'title': _('Shipments'),
+ })
return list_context
def get_invoiced_qty_map(delivery_note):
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 050f583..7f2be4f 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -2,11 +2,9 @@
// License: GNU General Public License v3. See license.txt
frappe.provide("erpnext.item");
-frappe.require('assets/js/item-dashboard.min.js');
frappe.ui.form.on("Item", {
onload: function(frm) {
- frm.hide_first = true;
erpnext.item.setup_queries(frm);
if (frm.doc.variant_of){
frm.fields_dict["attributes"].grid.set_column_disp("attribute_value", true);
@@ -78,17 +76,6 @@
erpnext.item.toggle_attributes(frm);
- frm.dashboard.show_heatmap = frm.doc.is_stock_item;
- frm.dashboard.heatmap_message = __('This is based on stock movement. See {0} for details',
- ['<a href="#query-report/Stock Ledger">' + __('Stock Ledger') + '</a>']);
- frm.dashboard.show_dashboard();
-
- var section = frm.dashboard.add_section('<h5 style="margin-top: 0px;">Stock Levels</h5>');
- erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({
- parent: section,
- item_code: frm.doc.name
- });
- erpnext.item.item_dashboard.refresh();
},
@@ -185,6 +172,20 @@
frm.dashboard.reset();
if(frm.doc.__islocal)
return;
+
+ frm.dashboard.show_heatmap = frm.doc.is_stock_item;
+ frm.dashboard.heatmap_message = __('This is based on stock movement. See {0} for details',
+ ['<a href="#query-report/Stock Ledger">' + __('Stock Ledger') + '</a>']);
+ frm.dashboard.show_dashboard();
+
+ frappe.require('assets/js/item-dashboard.min.js', function() {
+ var section = frm.dashboard.add_section('<h5 style="margin-top: 0px;">Stock Levels</h5>');
+ erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({
+ parent: section,
+ item_code: frm.doc.name
+ });
+ erpnext.item.item_dashboard.refresh();
+ });
},
edit_prices_button: function(frm) {
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index aa5f330..9e48fed 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -144,21 +144,22 @@
return
# find if website image url exists as public
- file = frappe.get_all("File", filters={
+ file_doc = frappe.get_all("File", filters={
"file_url": self.website_image
}, fields=["name", "is_private"], order_by="is_private asc", limit_page_length=1)
- if file:
- file = file[0]
- if not file:
+ if file_doc:
+ file_doc = file_doc[0]
+
+ if not file_doc:
if not auto_set_website_image:
frappe.msgprint(_("Website Image {0} attached to Item {1} cannot be found")
.format(self.website_image, self.name))
self.website_image = None
- elif file.is_private:
+ elif file_doc.is_private:
if not auto_set_website_image:
frappe.msgprint(_("Website Image should be a public file or website URL"))
@@ -507,10 +508,23 @@
clear_cache(self.page_name)
frappe.db.set_value("Item", newdn, "item_code", newdn)
+
if merge:
self.set_last_purchase_rate(newdn)
self.recalculate_bin_qty(newdn)
+ for dt in ("Sales Taxes and Charges", "Purchase Taxes and Charges"):
+ for d in frappe.db.sql("""select name, item_wise_tax_detail from `tab{0}`
+ where ifnull(item_wise_tax_detail, '') != ''""".format(dt), as_dict=1):
+
+ item_wise_tax_detail = json.loads(d.item_wise_tax_detail)
+ if olddn in item_wise_tax_detail:
+ item_wise_tax_detail[newdn] = item_wise_tax_detail[olddn]
+ item_wise_tax_detail.pop(olddn)
+
+ frappe.db.set_value(dt, d.name, "item_wise_tax_detail",
+ json.dumps(item_wise_tax_detail), update_modified=False)
+
def set_last_purchase_rate(self, newdn):
last_purchase_rate = get_last_purchase_details(newdn).get("base_rate", 0)
frappe.db.set_value("Item", newdn, "last_purchase_rate", last_purchase_rate)
@@ -608,6 +622,7 @@
frappe.throw(_("Item variant {0} exists with same attributes")
.format(variant), ItemVariantExistsError)
+
@frappe.whitelist()
def get_dashboard_data(name):
'''load dashboard related data'''
diff --git a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.js b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.js
index 5a86c89..15a5759 100644
--- a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.js
+++ b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.js
@@ -3,7 +3,6 @@
frappe.provide("erpnext.stock");
-frappe.require("assets/erpnext/js/controllers/stock_controller.js");
erpnext.stock.LandedCostVoucher = erpnext.stock.StockController.extend({
setup: function() {
@@ -11,16 +10,16 @@
this.frm.fields_dict.purchase_receipts.grid.get_field('receipt_document').get_query =
function(doc, cdt ,cdn) {
var d = locals[cdt][cdn]
-
+
var filters = [
[d.receipt_document_type, 'docstatus', '=', '1'],
[d.receipt_document_type, 'company', '=', me.frm.doc.company],
]
-
+
if(d.receipt_document_type == "Purchase Invoice") {
filters.push(["Purchase Invoice", "update_stock", "=", "1"])
}
-
+
if(!me.frm.doc.company) msgprint(__("Please enter company first"));
return {
filters:filters
diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js
index a4bae78..1dcbcb7 100644
--- a/erpnext/stock/doctype/material_request/material_request.js
+++ b/erpnext/stock/doctype/material_request/material_request.js
@@ -3,7 +3,7 @@
{% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %};
-frappe.require("assets/erpnext/js/utils.js");
+
frappe.ui.form.on("Material Request Item", {
"qty": function(frm, doctype, name) {
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
index 1babf2e..a173ae8 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -189,12 +189,9 @@
for d in self.get("items"):
if d.item_code in stock_items and flt(d.valuation_rate) and flt(d.qty):
if warehouse_account.get(d.warehouse):
-
- val_rate_db_precision = 6 if cint(d.precision("valuation_rate")) <= 6 else 9
-
- # warehouse account
- stock_value_diff = flt(flt(d.valuation_rate, val_rate_db_precision) * flt(d.qty)
- * flt(d.conversion_factor), d.precision("base_net_amount"))
+ stock_value_diff = frappe.db.get_value("Stock Ledger Entry",
+ {"voucher_type": "Purchase Receipt", "voucher_no": self.name,
+ "voucher_detail_no": d.name}, "stock_value_difference")
gl_entries.append(self.get_gl_dict({
"account": warehouse_account[d.warehouse]["name"],
@@ -239,14 +236,20 @@
}, warehouse_account[self.supplier_warehouse]["account_currency"]))
# divisional loss adjustment
- distributed_amount = flt(flt(d.base_net_amount, d.precision("base_net_amount"))) + \
+ valuation_amount_as_per_doc = flt(d.base_net_amount, d.precision("base_net_amount")) + \
flt(d.landed_cost_voucher_amount) + flt(d.rm_supp_cost) + flt(d.item_tax_amount)
- divisional_loss = flt(distributed_amount - stock_value_diff,
+ divisional_loss = flt(valuation_amount_as_per_doc - stock_value_diff,
d.precision("base_net_amount"))
+
if divisional_loss:
+ if self.is_return or flt(d.item_tax_amount):
+ loss_account = expenses_included_in_valuation
+ else:
+ loss_account = stock_rbnb
+
gl_entries.append(self.get_gl_dict({
- "account": stock_rbnb,
+ "account": loss_account,
"against": warehouse_account[d.warehouse]["name"],
"cost_center": d.cost_center,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 46f8c70..76b0395 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -1,7 +1,5 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/controllers/stock_controller.js");
-frappe.require("assets/erpnext/js/utils.js");
frappe.provide("erpnext.stock");
erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index f5f4e03..ead110c 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -1,8 +1,6 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/controllers/stock_controller.js");
-frappe.require("assets/erpnext/js/utils.js");
frappe.provide("erpnext.stock");
frappe.ui.form.on("Stock Reconciliation", {
diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json
index d56daf5..4a6e6e9 100644
--- a/erpnext/stock/doctype/stock_settings/stock_settings.json
+++ b/erpnext/stock/doctype/stock_settings/stock_settings.json
@@ -2,6 +2,7 @@
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
+ "beta": 0,
"creation": "2013-06-24 16:37:54",
"custom": 0,
"description": "Settings",
@@ -188,6 +189,32 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "default": "1",
+ "fieldname": "show_barcode_field",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Show Barcode Field",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
"fieldname": "section_break_7",
"fieldtype": "Section Break",
"hidden": 0,
@@ -487,7 +514,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-04-15 06:51:47.497431",
+ "modified": "2016-05-12 12:28:29.374452",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Settings",
@@ -517,5 +544,6 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "sort_order": "ASC",
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.py b/erpnext/stock/doctype/stock_settings/stock_settings.py
index bd71d46..7c67a65 100644
--- a/erpnext/stock/doctype/stock_settings/stock_settings.py
+++ b/erpnext/stock/doctype/stock_settings/stock_settings.py
@@ -6,11 +6,9 @@
from __future__ import unicode_literals
import frappe
from frappe import _
-from frappe.utils import cint
from frappe.model.document import Document
class StockSettings(Document):
-
def validate(self):
for key in ["item_naming_by", "item_group", "stock_uom", "allow_negative_stock"]:
frappe.db.set_default(key, self.get(key, ""))
@@ -25,4 +23,6 @@
self.stock_frozen_upto_days = stock_frozen_limit
frappe.msgprint (_("`Freeze Stocks Older Than` should be smaller than %d days.") %stock_frozen_limit)
-
+ # show/hide barcode field
+ frappe.make_property_setter({'fieldname': 'barcode', 'property': 'hidden',
+ 'value': 0 if self.show_barcode_field else 1})
diff --git a/erpnext/stock/page/stock_analytics/stock_analytics.js b/erpnext/stock/page/stock_analytics/stock_analytics.js
index bd2d9f6..f86201f 100644
--- a/erpnext/stock/page/stock_analytics/stock_analytics.js
+++ b/erpnext/stock/page/stock_analytics/stock_analytics.js
@@ -1,19 +1,16 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
+frappe.require("assets/erpnext/js/stock_analytics.js", function() {
+ frappe.pages['stock-analytics'].on_page_load = function(wrapper) {
+ frappe.ui.make_app_page({
+ parent: wrapper,
+ title: __('Stock Analytics'),
+ single_column: true
+ });
-frappe.pages['stock-analytics'].on_page_load = function(wrapper) {
- frappe.ui.make_app_page({
- parent: wrapper,
- title: __('Stock Analytics'),
- single_column: true
- });
+ new erpnext.StockAnalytics(wrapper);
- new erpnext.StockAnalytics(wrapper);
-
-
- frappe.breadcrumbs.add("Stock")
-
-};
-
-frappe.require("assets/erpnext/js/stock_analytics.js");
+ frappe.breadcrumbs.add("Stock")
+ };
+});
diff --git a/erpnext/stock/page/stock_balance/stock_balance.js b/erpnext/stock/page/stock_balance/stock_balance.js
index 7bf4792..2b6fd8d 100644
--- a/erpnext/stock/page/stock_balance/stock_balance.js
+++ b/erpnext/stock/page/stock_balance/stock_balance.js
@@ -1,5 +1,3 @@
-frappe.require('assets/js/item-dashboard.min.js');
-
frappe.pages['stock-balance'].on_page_load = function(wrapper) {
var page = frappe.ui.make_app_page({
parent: wrapper,
@@ -52,32 +50,35 @@
page.sort_selector.wrapper.css({'margin-right': '15px', 'margin-top': '4px'});
- page.item_dashboard = new erpnext.stock.ItemDashboard({
- parent: page.main,
- })
+ frappe.require('assets/js/item-dashboard.min.js', function() {
+ page.item_dashboard = new erpnext.stock.ItemDashboard({
+ parent: page.main,
+ })
- page.item_dashboard.before_refresh = function() {
- this.item_code = page.item_field.get_value();
- this.warehouse = page.warehouse_field.get_value();
- }
+ page.item_dashboard.before_refresh = function() {
+ this.item_code = page.item_field.get_value();
+ this.warehouse = page.warehouse_field.get_value();
+ }
- page.item_dashboard.refresh();
+ page.item_dashboard.refresh();
- // item click
- var setup_click = function(doctype) {
- page.main.on('click', 'a[data-type="'+ doctype.toLowerCase() +'"]', function() {
- var name = $(this).attr('data-name');
- var field = page[doctype.toLowerCase() + '_field'];
- if(field.get_value()===name) {
- frappe.set_route('Form', doctype, name)
- } else {
- field.set_input(name);
- page.item_dashboard.refresh();
- }
- });
- }
+ // item click
+ var setup_click = function(doctype) {
+ page.main.on('click', 'a[data-type="'+ doctype.toLowerCase() +'"]', function() {
+ var name = $(this).attr('data-name');
+ var field = page[doctype.toLowerCase() + '_field'];
+ if(field.get_value()===name) {
+ frappe.set_route('Form', doctype, name)
+ } else {
+ field.set_input(name);
+ page.item_dashboard.refresh();
+ }
+ });
+ }
- setup_click('Item');
- setup_click('Warehouse');
+ setup_click('Item');
+ setup_click('Warehouse');
+ });
+
}
\ No newline at end of file
diff --git a/erpnext/stock/report/delivery_note_trends/delivery_note_trends.js b/erpnext/stock/report/delivery_note_trends/delivery_note_trends.js
index 45955fb..0e12907 100644
--- a/erpnext/stock/report/delivery_note_trends/delivery_note_trends.js
+++ b/erpnext/stock/report/delivery_note_trends/delivery_note_trends.js
@@ -1,8 +1,9 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/sales_trends_filters.js");
+frappe.require("assets/erpnext/js/sales_trends_filters.js", function() {
+ frappe.query_reports["Delivery Note Trends"] = {
+ filters: get_filters()
+ }
+});
-frappe.query_reports["Delivery Note Trends"] = {
- filters: get_filters()
- }
\ No newline at end of file
diff --git a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.js b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.js
index 19a58ef..d94b49e 100644
--- a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.js
+++ b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.js
@@ -1,8 +1,9 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-frappe.require("assets/erpnext/js/purchase_trends_filters.js");
+frappe.require("assets/erpnext/js/purchase_trends_filters.js", function() {
+ frappe.query_reports["Purchase Receipt Trends"] = {
+ filters: get_filters()
+ }
+});
-frappe.query_reports["Purchase Receipt Trends"] = {
- filters: get_filters()
- }
\ No newline at end of file
diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py
index fcc1edf..ab8e6d8 100644
--- a/erpnext/support/doctype/issue/issue.py
+++ b/erpnext/support/doctype/issue/issue.py
@@ -55,11 +55,12 @@
def get_list_context(context=None):
return {
- "title": _("My Issues"),
+ "title": _("Issues"),
"get_list": get_issue_list,
"row_template": "templates/includes/issue_row.html",
"show_sidebar": True,
- "show_search": True
+ "show_search": True,
+ 'no_breadcrumbs': True
}
def get_issue_list(doctype, txt, filters, limit_start, limit_page_length=20):
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
index b37c47b..a267eb3 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
@@ -2,7 +2,7 @@
// License: GNU General Public License v3. See license.txt
frappe.provide("erpnext.support");
-frappe.require("assets/erpnext/js/utils.js");
+
frappe.ui.form.on_change("Maintenance Visit", "customer", function(frm) {
erpnext.utils.get_party_details(frm) });
diff --git a/erpnext/support/doctype/warranty_claim/warranty_claim.js b/erpnext/support/doctype/warranty_claim/warranty_claim.js
index 3928577..cf9d806 100644
--- a/erpnext/support/doctype/warranty_claim/warranty_claim.js
+++ b/erpnext/support/doctype/warranty_claim/warranty_claim.js
@@ -2,7 +2,6 @@
// License: GNU General Public License v3. See license.txt
frappe.provide("erpnext.support");
-frappe.require("assets/erpnext/js/utils.js");
frappe.ui.form.on("Warranty Claim", {
customer: function(frm) {
diff --git a/erpnext/templates/form_grid/item_grid.html b/erpnext/templates/form_grid/item_grid.html
index 1c50e15..c596890 100644
--- a/erpnext/templates/form_grid/item_grid.html
+++ b/erpnext/templates/form_grid/item_grid.html
@@ -13,7 +13,7 @@
<div class="row">
<div class="col-sm-6 col-xs-8">
{% if(doc.warehouse) {
- var label_class = "label-default",
+ var color = "grey",
title = "Warehouse",
actual_qty = (frm.doc.doctype==="Sales Order"
? doc.projected_qty : doc.actual_qty);
@@ -21,16 +21,16 @@
&& in_list(["Sales Order Item", "Delivery Note Item"], doc.doctype)) {
if(actual_qty != undefined) {
if(actual_qty >= doc.qty) {
- var label_class = "label-success";
+ var color = "green";
var title = "In Stock"
} else {
- var label_class = "label-danger";
+ var color = "red";
var title = "Not In Stock"
}
}
} %}
- <span class="pull-right" title="{%= title %}">
- <span class="label {%= label_class %}">
+ <span class="pull-right" title="{%= title %}" style="margin-left: 10px;">
+ <span class="indicator {{ color }}">
{%= doc.warehouse %}
</span>
</span>
diff --git a/erpnext/templates/form_grid/stock_entry_grid.html b/erpnext/templates/form_grid/stock_entry_grid.html
index a2bf1df..8604881 100644
--- a/erpnext/templates/form_grid/stock_entry_grid.html
+++ b/erpnext/templates/form_grid/stock_entry_grid.html
@@ -16,21 +16,27 @@
{% if(doc.item_name != doc.item_code) { %}
<br>{%= doc.item_name %}{% } %}
{% include "templates/form_grid/includes/visible_cols.html" %}
- {% if(frm.doc.docstatus==0 && doc.s_warehouse && doc.actual_qty < doc.qty) { %}
- <span class="text-danger small" style="margin-left: 15px;">
- Not in Stock
- </span>
- {% } %}
</div>
<!-- warehouse -->
<div class="col-sm-3 col-xs-4">
- {% if(doc.s_warehouse) { %}
- <span class="label label-default grid-label" title="{% __("Source" )%}">
- {%= doc.s_warehouse || "" %}</span>
- {% } %}
- {% if(doc.t_warehouse) { %}<span class="label label-primary grid-label" title="{% __("Target" )%}">
- {%= doc.t_warehouse || "" %}</span>{% } %}
+ {% if(doc.s_warehouse) {
+ if(frm.doc.docstatus==0) {
+ var color = (doc.s_warehouse && doc.actual_qty < doc.qty) ? "red" : "green";
+ var title = color === "red" ? __("Not in Stock") : __("In Stock");
+ } else {
+ var color = "grey";
+ var title = __("Source");
+ }
+ %}
+ <span class="indicator {{ color }}" title="{{ title }}">
+ {%= doc.s_warehouse %}</span>
+ {% }; %}
+ {% if(doc.t_warehouse) { %}
+ <div><span class="indicator {{ doc.docstatus==1 ? "blue" : "grey" }}" title="{{ __("Target" ) }}">
+ {%= doc.t_warehouse %}</span>
+ </div>
+ {% }; %}
</div>
<!-- qty -->
diff --git a/erpnext/templates/generators/item.html b/erpnext/templates/generators/item.html
index dabbf48..cf6f89b 100644
--- a/erpnext/templates/generators/item.html
+++ b/erpnext/templates/generators/item.html
@@ -20,7 +20,7 @@
</div>
<div class="col-sm-6" style="padding-left:20px;">
<h2 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h2>
-
+
<p class="text-muted">
{{ _("Item Code") }}: <span itemprop="productID">{{ variant and variant.name or name }}</span></p>
<br>
@@ -52,8 +52,10 @@
</div>
<br>
<div style="min-height: 100px; margin: 10px 0;">
- <h4 class="item-price" itemprop="price"></h4>
- <div class="item-stock" itemprop="availablity"></div>
+ <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
+ <h4 class="item-price" itemprop="price"></h4>
+ <div class="item-stock" itemprop="availability"></div>
+ </div>
<div class="item-cart hide">
<div id="item-add-to-cart">
<button class="btn btn-primary btn-sm">
@@ -71,17 +73,17 @@
</div>
<div class="row item-website-description" style="margin-top:30px; margin-bottom:20px">
<div class="col-md-12">
- <h4>{{ _("DESCRIPTION") }}</h4>
+ <div class="h6 text-uppercase">{{ _("Description") }}</div>
<div itemprop="description" class="item-desc">
{{ web_long_description or description or _("No description given") }}
</div>
</div>
</div>
-
+
{% if website_specifications -%}
<div class="row item-website-specification" style="margin-top: 40px">
<div class="col-md-12">
- <h4>{{ _("SPECIFICATIONS") }}</h4>
+ <div class="h6 text-uppercase">{{ _("Specifications") }}</div>
<table class="table borderless" style="width: 100%">
{% for d in website_specifications -%}
diff --git a/erpnext/templates/generators/item_group.html b/erpnext/templates/generators/item_group.html
index d014263..b9926d6 100644
--- a/erpnext/templates/generators/item_group.html
+++ b/erpnext/templates/generators/item_group.html
@@ -1,8 +1,5 @@
{% extends "templates/web.html" %}
-{#{% block header_actions %}
-{% include 'templates/includes/product_search_box.html' %}
-{% endblock %}#}
{% block header %}<h1>{{ _("Products") }}</h1>{% endblock %}
{% block breadcrumbs %}
<div class="page-breadcrumbs" data-html-block="breadcrumbs">
@@ -16,7 +13,7 @@
{% endblock %}
{% block page_content %}
-<div class="item-group-content">
+<div class="item-group-content" itemscope itemtype="http://schema.org/Product">
<div>
{% if slideshow %}<!-- slideshow -->
{% include "templates/includes/slideshow.html" %}
diff --git a/erpnext/templates/includes/cart.css b/erpnext/templates/includes/cart.css
index 07302db..e69de29 100644
--- a/erpnext/templates/includes/cart.css
+++ b/erpnext/templates/includes/cart.css
@@ -1,32 +0,0 @@
-.cart-content {
- min-height: 400px;
- margin-top: 60px;
-}
-
-.cart-header, .cart-footer {
- margin-bottom: 60px;
-}
-
-.cart-item-header {
- padding-bottom: 10px;
- margin-bottom: 10px;
- border-bottom: 1px solid #d1d8dd;
-}
-
-.tax-grand-total-row {
- font-size: 14px;
- margin-top: 30px;
- font-weight: bold;
-}
-
-.cart-addresses {
- margin-top: 80px;
- margin-bottom: 60px;
-}
-
-.cart-link {
- margin-top: 40px;
- text-align: right;
-
-
-}
\ No newline at end of file
diff --git a/erpnext/templates/includes/cart.js b/erpnext/templates/includes/cart.js
index 9cb5e6e..d56721d 100644
--- a/erpnext/templates/includes/cart.js
+++ b/erpnext/templates/includes/cart.js
@@ -71,7 +71,7 @@
});
});
},
-
+
render_tax_row: function($cart_taxes, doc, shipping_rules) {
var shipping_selector;
if(shipping_rules) {
diff --git a/erpnext/templates/includes/cart/cart_address.html b/erpnext/templates/includes/cart/cart_address.html
index 1af8f0b..29d4f4b 100644
--- a/erpnext/templates/includes/cart/cart_address.html
+++ b/erpnext/templates/includes/cart/cart_address.html
@@ -1,11 +1,10 @@
-{% from "erpnext/templates/includes/cart/cart_macros.html"
- import show_address %}
+{% from "erpnext/templates/includes/cart/cart_macros.html" import show_address %}
<div class="row">
{% if addresses|length == 1%}
{% set select_address = True %}
{% endif %}
<div class="col-sm-6">
- <h4>{{ _("Shipping Address") }}</h4>
+ <div class="h6 text-uppercase">{{ _("Shipping Address") }}</div>
<div id="cart-shipping-address" class="panel-group"
data-fieldname="shipping_address_name">
{% for address in addresses %}
@@ -16,7 +15,7 @@
{{ _("Manage Addresses") }}</a>
</div>
<div class="col-sm-6">
- <h4>Billing Address</h4>
+ <div class="h6 text-uppercase">Billing Address</div>
<div id="cart-billing-address" class="panel-group"
data-fieldname="customer_address">
{% for address in addresses %}
diff --git a/erpnext/templates/includes/cart/cart_dropdown.html b/erpnext/templates/includes/cart/cart_dropdown.html
new file mode 100644
index 0000000..18148ad
--- /dev/null
+++ b/erpnext/templates/includes/cart/cart_dropdown.html
@@ -0,0 +1,23 @@
+<div class="cart-dropdown-container">
+ <div id="cart-error" class="alert alert-danger"
+ style="display: none;"></div>
+ <div class="row cart-items-dropdown cart-item-header text-muted">
+ <div class="col-sm-6 col-xs-6 h6 text-uppercase">
+ {{ _("Item") }}
+ </div>
+ <div class="col-sm-6 col-xs-6 text-right h6 text-uppercase">
+ {{ _("Price") }}
+ </div>
+ </div>
+
+ {% if doc.items %}
+ <div class="cart-items">
+ {% include "templates/includes/cart/cart_items.html" %}
+ </div>
+ <div class="checkout-btn">
+ <a href="/cart" class="btn btn-block btn-primary">{{ _("Checkout") }}</a>
+ </div>
+ {% else %}
+ <p>{{ _("Cart is Empty") }}</p>
+ {% endif %}
+</div>
diff --git a/erpnext/templates/includes/cart/cart_items.html b/erpnext/templates/includes/cart/cart_items.html
index f7efa78..976467d 100644
--- a/erpnext/templates/includes/cart/cart_items.html
+++ b/erpnext/templates/includes/cart/cart_items.html
@@ -1,23 +1,30 @@
{% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %}
{% for d in doc.items %}
-<div class="cart-item">
- <div class="row">
- <div class="col-sm-8 col-xs-6" style="margin-bottom: 10px;">
- {{ item_name_and_description(d) }}
- </div>
- <div class="col-sm-2 col-xs-3 text-right">
- <span style="max-width: 50px; display: inline-block">
- <input class="form-control text-right cart-qty"
- value = "{{ d.get_formatted('qty') }}"
- data-item-code="{{ d.item_code }}"></span>
- <p class="text-muted small" style="margin-top: 10px;">
- {{ _("Rate") + ': ' + d.get_formatted("rate") }}
- </p>
- </div>
- <div class="col-sm-2 col-xs-3 text-right">
- {{ d.get_formatted("amount") }}
- </div>
+<div class="row checkout">
+ <div class="col-sm-8 col-xs-6 col-name-description">
+ {{ item_name_and_description(d) }}
+ </div>
+ <div class="col-sm-2 col-xs-3 text-right col-qty">
+ <span style="max-width: 50px; display: inline-block">
+ <input class="form-control text-right cart-qty"
+ value = "{{ d.get_formatted('qty') }}"
+ data-item-code="{{ d.item_code }}"></span>
+ </div>
+ <div class="col-sm-2 col-xs-3 text-right col-amount">
+ {{ d.get_formatted("amount") }}
+ <p class="text-muted small item-rate">{{
+ _("Rate: {0}").format(d.get_formatted("rate")) }}</p>
</div>
</div>
-{% endfor %}
+
+<div class="row cart-dropdown">
+ <div class="col-sm-8 col-xs-8 col-name-description">
+ {{ item_name_and_description(d) }}
+ </div>
+ <div class="col-sm-4 col-xs-4 text-right col-amount">
+ {{ d.get_formatted("amount") }}
+
+ </div>
+</div>
+{% endfor %}
\ No newline at end of file
diff --git a/erpnext/templates/includes/issue_row.html b/erpnext/templates/includes/issue_row.html
index c090f93..f19ea85 100644
--- a/erpnext/templates/includes/issue_row.html
+++ b/erpnext/templates/includes/issue_row.html
@@ -1,13 +1,14 @@
-<div class="web-list-item">
- <a class="no-decoration" href="/issues?name={{ doc.name }}">
+<div class="web-list-item transaction-list-item">
+ <a href="/issues?name={{ doc.name }}">
<div class="row">
- <div class="col-xs-8">
+ <div class="col-xs-3">
<span class="indicator {{ "red" if doc.status=="Open" else "darkgrey" }}">
{{ doc.name }}</span>
- <span style="margin-left: 15px;">
- {{ doc.subject }}</span>
- </div>
- <div class="col-xs-4 text-right small text-muted">
+ </div>
+ <div class="col-xs-6 items-preview text-ellipsis">
+ {{ doc.subject }}</div>
+
+ <div class="col-xs-3 text-right small text-muted">
{{ frappe.format_date(doc.modified) }}
</div>
</div>
diff --git a/erpnext/templates/includes/macros.html b/erpnext/templates/includes/macros.html
index 05181c0..8dc433a 100644
--- a/erpnext/templates/includes/macros.html
+++ b/erpnext/templates/includes/macros.html
@@ -1,4 +1,5 @@
{% macro product_image_square(website_image, css_class="") %}
+{% if website_image -%} <meta itemprop="image" content="{{ frappe.utils.quoted(website_image) | abs_url }}"></meta>{%- endif %}
<div class="product-image product-image-square {% if not website_image -%} missing-image {%- endif %} {{ css_class }}"
{% if website_image -%} style="background-image: url('{{ frappe.utils.quoted(website_image) | abs_url }}');" {%- endif %}>
</div>
@@ -7,7 +8,7 @@
{% macro product_image(website_image, css_class="") %}
<div class="product-image {% if not website_image -%} missing-image {%- endif %} {{ css_class }}">
{% if website_image -%}
- <img src="{{ frappe.utils.quoted(website_image) | abs_url }}" class="img-responsive">
+ <img itemprop="image" src="{{ frappe.utils.quoted(website_image) | abs_url }}" class="img-responsive">
{%- endif %}
</div>
{% endmacro %}
diff --git a/erpnext/templates/includes/navbar/navbar_items.html b/erpnext/templates/includes/navbar/navbar_items.html
new file mode 100644
index 0000000..9cdbd98
--- /dev/null
+++ b/erpnext/templates/includes/navbar/navbar_items.html
@@ -0,0 +1,12 @@
+{% extends 'frappe/templates/includes/navbar/navbar_items.html' %}
+
+{% block navbar_right_extension %}
+ <li class="dropdown shopping-cart">
+ <div class="cart-icon small">
+ <a class="dropdown-toggle" href="#" data-toggle="dropdown" id="navLogin">
+ Cart <span class="badge-wrapper" id="cart-count"></span>
+ </a>
+ <div class="dropdown-menu shopping-cart-menu"></div>
+ </div>
+ </li>
+{% endblock %}
\ No newline at end of file
diff --git a/erpnext/templates/includes/order/order_macros.html b/erpnext/templates/includes/order/order_macros.html
index af974aa..3f8affe 100644
--- a/erpnext/templates/includes/order/order_macros.html
+++ b/erpnext/templates/includes/order/order_macros.html
@@ -1,7 +1,7 @@
{% from "erpnext/templates/includes/macros.html" import product_image_square %}
{% macro item_name_and_description(d) %}
- <div class="row">
+ <div class="row item_name_and_description">
<div class="col-xs-4 col-sm-2 order-image-col">
<div class="order-image">
{{ product_image_square(d.image) }}
@@ -9,7 +9,18 @@
</div>
<div class="col-xs-8 col-sm-10">
{{ d.item_code }}
- <p class="text-muted small">{{ d.description }}</p>
+ <div class="text-muted small item-description">{{ d.description }}</div>
</div>
</div>
-{% endmacro %}
+
+ <div class="row item_name_dropdown">
+ <div class="col-xs-4 col-sm-4 order-image-col">
+ <div class="order-image">
+ <span class="cart-count-badge pull-right small"> {{ d.get_formatted('qty') }} </span>{{ product_image_square(d.image) }}
+ </div>
+ </div>
+ <div class="col-xs-8 col-sm-8">
+ {{ d.item_code }}
+ </div>
+ </div>
+{% endmacro %}
\ No newline at end of file
diff --git a/erpnext/templates/includes/order/order_taxes.html b/erpnext/templates/includes/order/order_taxes.html
index 564e31e..24ae088 100644
--- a/erpnext/templates/includes/order/order_taxes.html
+++ b/erpnext/templates/includes/order/order_taxes.html
@@ -13,9 +13,9 @@
</div>
{% endfor %}
<div class="row tax-grand-total-row">
- <div class="col-xs-8 text-right">{{ _("Grand Total") }}</div>
+ <div class="col-xs-8 text-right text-uppercase h6 text-muted">{{ _("Grand Total") }}</div>
<div class="col-xs-4 text-right">
- <span class="tax-grand-total">
+ <span class="tax-grand-total bold">
{{ doc.get_formatted("grand_total") }}
</span>
</div>
diff --git a/erpnext/templates/includes/products_as_grid.html b/erpnext/templates/includes/products_as_grid.html
index ff39f1f..0a66de2 100644
--- a/erpnext/templates/includes/products_as_grid.html
+++ b/erpnext/templates/includes/products_as_grid.html
@@ -1,8 +1,10 @@
{% from "erpnext/templates/includes/macros.html" import product_image_square %}
<a class="product-link" href="{{ (route or page_name)|abs_url }}">
- <div class="col-sm-2 col-xs-4 product-image-wrapper">
+ <div class="col-sm-4 col-xs-4 product-image-wrapper">
+ <div class="product-image-img">
{{ product_image_square(thumbnail or website_image) }}
- <div class="text-ellipsis inline-block small product-text">{{ item_name }}</div>
+ <div class="product-text" itemprop="name">{{ item_name }}</div>
+ </div>
</div>
</a>
diff --git a/erpnext/templates/includes/projects.css b/erpnext/templates/includes/projects.css
index e4aa81b..1f758e3 100644
--- a/erpnext/templates/includes/projects.css
+++ b/erpnext/templates/includes/projects.css
@@ -83,7 +83,6 @@
}
.progress-hg{
- margin-bottom: 0!important;
- margin-top: 30px!important;
- height:5px;
+ margin-bottom: 30!important;
+ height:2px;
}
\ No newline at end of file
diff --git a/erpnext/templates/includes/transaction_row.html b/erpnext/templates/includes/transaction_row.html
index 05aed90..17f9b90 100644
--- a/erpnext/templates/includes/transaction_row.html
+++ b/erpnext/templates/includes/transaction_row.html
@@ -1,22 +1,18 @@
<div class="web-list-item transaction-list-item">
<a href="/{{ pathname }}/{{ doc.name }}">
<div class="row">
- <div class="col-sm-6">
- <span>{{ doc.name }}</span>
- <div class="small text-muted items-preview text-ellipsis">
- {{ doc.items_preview }}
- </div>
- </div>
- <div class="col-sm-4">
- <span class="indicator {{ doc.indicator_color or "darkgrey" }}">
- {{ doc.indicator_title or doc.status }}
- </span>
+ <div class="col-sm-5">
+ <span class="indicator small {{ doc.indicator_color or "darkgrey" }}">
+ {{ doc.name }}</span>
<div class="small text-muted transaction-time"
title="{{ frappe.utils.format_datetime(doc.modified, "medium") }}">
- {{ frappe.utils.pretty_date(doc.modified) }}
+ {{ frappe.utils.format_datetime(doc.modified, "medium") }}
</div>
</div>
- <div class="col-sm-2 text-right">
+ <div class="col-sm-4 items-preview text-ellipsis">
+ {{ doc.items_preview }}
+ </div>
+ <div class="col-sm-3 text-right bold">
{{ doc.get_formatted("grand_total") }}
</div>
<!-- <div class="col-sm-3 text-right">
diff --git a/erpnext/templates/pages/cart.html b/erpnext/templates/pages/cart.html
index afba9b8..7d8d0ff 100644
--- a/erpnext/templates/pages/cart.html
+++ b/erpnext/templates/pages/cart.html
@@ -8,12 +8,6 @@
<script>{% include "templates/includes/cart.js" %}</script>
{% endblock %}
-{% block style %}
-<style>
- {% include "templates/includes/cart.css" %}
-</style>
-{% endblock %}
-
{% block header_actions %}
{% if doc.items %}
@@ -27,57 +21,58 @@
{% from "templates/includes/macros.html" import item_name_and_description %}
-<div class="cart-content">
+<div class="cart-container">
<div id="cart-container">
- <div id="cart-error" class="alert alert-danger"
- style="display: none;"></div>
- <div id="cart-items">
- <div class="row cart-item-header">
- <div class="col-sm-8 col-xs-6">
- Items
- </div>
- <div class="col-sm-2 col-xs-3 text-right">
- Qty
- </div>
- <div class="col-sm-2 col-xs-3 text-right">
- Amount
- </div>
- </div>
- {% if doc.items %}
- <div class="cart-items">
- {% include "templates/includes/cart/cart_items.html" %}
- </div>
- {% else %}
- <p>{{ _("Cart is Empty") }}</p>
- {% endif %}
- </div>
- {% if doc.items %}
- <!-- taxes -->
- <div class="cart-taxes row small">
- <div class="col-sm-8"><!-- empty --></div>
- <div class="col-sm-4 cart-tax-items">
- {% include "templates/includes/order/order_taxes.html" %}
- </div>
- </div>
- <div id="cart-totals">
- </div>
- {% if doc.tc_name %}
- <div class="cart-terms" style="display: none;" title={{doc.tc_name}}>
- {{doc.tc_name}}
- {{doc.terms}}
- </div>
- <div class="cart-link">
- <a href="#" onclick="show_terms();return false;">*Terms and Conditions</a>
- </div>
- {% endif %}
- <div class="cart-addresses">
- {% include "templates/includes/cart/cart_address.html" %}
- </div>
- <p class="cart-footer text-right">
- <button class="btn btn-primary btn-place-order btn-sm" type="button">
- {{ _("Place Order") }}</button></p>
- {% endif %}
- </div>
+ <div id="cart-error" class="alert alert-danger"
+ style="display: none;"></div>
+ <div id="cart-items">
+ <div class="row cart-item-header text-muted">
+ <div class="col-sm-8 col-xs-6 h6 text-uppercase">
+ {{ _("Item") }}
+ </div>
+ <div class="col-sm-2 col-xs-3 text-right h6 text-uppercase">
+ {{ _("Qty") }}
+ </div>
+ <div class="col-sm-2 col-xs-3 text-right h6 text-uppercase">
+ {{ _("Subtotal") }}
+ </div>
+ </div>
+ {% if doc.items %}
+ <div class="cart-items">
+ {% include "templates/includes/cart/cart_items.html" %}
+ </div>
+ {% else %}
+ <p class="empty-cart">{{ _("Cart is Empty") }}</p>
+ {% endif %}
+ </div>
+ {% if doc.items %}
+ <!-- taxes -->
+ <div class="row cart-taxes">
+ <div class="col-sm-6"><!-- empty --></div>
+ <div class="col-sm-6 text-right cart-tax-items">
+ {% include "templates/includes/order/order_taxes.html" %}
+ </div>
+ </div>
+
+ {% if doc.tc_name %}
+ <div class="cart-terms" style="display: none;" title={{doc.tc_name}}>
+ {{doc.tc_name}}
+ {{doc.terms}}
+ </div>
+ <div class="cart-link">
+ <a href="#" onclick="show_terms();return false;">*Terms and Conditions</a>
+ </div>
+ {% endif %}
+
+ <div class="cart-addresses">
+ {% include "templates/includes/cart/cart_address.html" %}
+ </div>
+
+ <p class="cart-footer text-right">
+ <button class="btn btn-primary btn-place-order btn-sm" type="button">
+ {{ _("Place Order") }}</button></p>
+ {% endif %}
+ </div>
</div>
<!-- no-sidebar -->
diff --git a/erpnext/templates/pages/home.html b/erpnext/templates/pages/home.html
index e6cfc90..689d94e 100644
--- a/erpnext/templates/pages/home.html
+++ b/erpnext/templates/pages/home.html
@@ -7,32 +7,27 @@
<div class="row">
<div class="col-sm-12">
- <h2 class="text-center">{{ homepage.tag_line or '' }}</h2>
- <p class="lead text-center">{{ homepage.description or '' }}</p>
- <p class="text-center">
- <a href="/login" class="btn btn-primary text-center">Login</a>
- </p>
-
+ <div class="homepage-tagline h1 text-center">{{ homepage.tag_line or '' }}</div>
+ <p class="text-center">{{ homepage.description or '' }}</p>
{% if homepage.products %}
- <!-- TODO: styling of this section -->
- <div class='featured-products-section'>
- <h5 class='text-uppercase'>{{ _("Featured Products") }}</h5>
+ <div class='featured-products-section' itemscope itemtype="http://schema.org/Product">
+ <h5 class='featured-product-heading'>{{ _("Featured Products") }}</h5>
<div class="featured-products">
<div id="search-list" class="row" style="margin-top:40px;">
{% for item in homepage.products %}
- <a class="product-link" href="{{ item.route | abs_url }}">
- <div class="col-sm-4 product-image-wrapper">
- {{ product_image_square(item.thumbnail or item.image) }}
- <div class="text-ellipsis inline-block small product-text">
- {{ item.item_name }}
- </div>
+ <a class="product-link" href="{{ item.route|abs_url }}">
+ <div class="col-sm-4 col-xs-4 product-image-wrapper">
+ <div class="product-image-img">
+ {{ product_image_square(item.thumbnail or item.image) }}
+ <div class="product-text" itemprop="name">{{ item.item_name }}</div>
</div>
- </a>
+ </div>
+ </a>
{% endfor %}
</div>
</div>
<!-- TODO: remove hardcoding of /products -->
- <p class="text-center"><a href="/products" class="btn btn-primary">More Products</a></p>
+ <div class="text-center"><a href="/products" class="btn btn-primary all-products"> {{ _("View All Products") }}</a></div>
</div>
{% endif %}
</div>
@@ -42,7 +37,16 @@
{% block style %}
<style>
.featured-products-section {
- margin-top: 75px;
+ margin-top: 95px;
}
+
+ .home-login {
+ margin-top: 30px;
+ }
+ .btn-login {
+ width: 80px;
+ }
+
+
</style>
{% endblock %}
diff --git a/erpnext/templates/pages/home.py b/erpnext/templates/pages/home.py
index 9488efe..4440f7e 100644
--- a/erpnext/templates/pages/home.py
+++ b/erpnext/templates/pages/home.py
@@ -3,42 +3,27 @@
from __future__ import unicode_literals
import frappe
-from frappe.utils import cstr, nowdate
-from erpnext.setup.doctype.item_group.item_group import get_item_for_list_in_html
no_cache = 1
no_sitemap = 1
def get_context(context):
homepage = frappe.get_doc('Homepage')
+
+ for item in homepage.products:
+ parent_website_route, page_name = frappe.db.get_value('Item', item.item_code,
+ ['parent_website_route', 'page_name'])
+ item.route = '/' + '/'.join(filter(None, [parent_website_route, page_name]))
+
+ # show atleast 3 products
+ if len(homepage.products) < 3:
+ for i in xrange(3 - len(homepage.products)):
+ homepage.append('products', {
+ 'item_code': 'product-{0}'.format(i),
+ 'item_name': frappe._('Product {0}').format(i),
+ 'route': '#'
+ })
+
return {
'homepage': homepage
- }
-
-
-@frappe.whitelist(allow_guest=True)
-def get_product_list(search=None, start=0, limit=6):
- # limit = 12 because we show 12 items in the grid view
-
- # base query
- query = """select name, item_name, page_name, website_image, thumbnail, item_group,
- web_long_description as website_description, parent_website_route
- from `tabItem`
- where show_in_website = 1
- and disabled=0
- and (end_of_life is null or end_of_life='0000-00-00' or end_of_life > %(today)s)
- and (variant_of is null or variant_of = '')"""
-
- # order by
- query += """ order by weightage desc, idx desc, modified desc limit %s, %s""" % (start, limit)
-
- data = frappe.db.sql(query, {
- "today": nowdate()
- }, as_dict=1)
-
- for d in data:
- d.route = ((d.parent_website_route + "/") if d.parent_website_route else "") \
- + (d.page_name or "")
-
- return [get_item_for_list_in_html(r) for r in data]
-
+ }
\ No newline at end of file
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html
index 191b078..61b4546 100644
--- a/erpnext/templates/pages/order.html
+++ b/erpnext/templates/pages/order.html
@@ -4,6 +4,9 @@
{% block breadcrumbs %}
{% include "templates/includes/breadcrumbs.html" %}
{% endblock %}
+{% block title %}
+{{ doc.name }}
+{% endblock %}
{% block header %}
<h1>{{ doc.name }}</h1>
@@ -56,7 +59,7 @@
<div class="col-sm-2 col-xs-3 text-right">
{{ d.get_formatted("amount") }}
<p class="text-muted small">{{
- _("Rate: {0}").format(d.get_formatted("rate")) }}</p>
+ _("@ {0}").format(d.get_formatted("rate")) }}</p>
</div>
</div>
{% endfor %}
diff --git a/erpnext/templates/pages/projects.html b/erpnext/templates/pages/projects.html
index 1cac25e..f50d455 100644
--- a/erpnext/templates/pages/projects.html
+++ b/erpnext/templates/pages/projects.html
@@ -3,27 +3,10 @@
{% block title %}{{ doc.project_name }}{% endblock %}
{%- from "templates/includes/projects/macros.html" import back_link -%}
-{% block header %}<h1>{{ doc.project_name }}</h1>{% endblock %}
-{% block header_actions %}{% if doc.percent_complete %}
- <div class="progress progress-hg">
- <div class="progress-bar progress-bar-{{ "warning" if doc.percent_complete|round < 100 else "success" }} active" role="progressbar"
- aria-valuenow="{{ doc.percent_complete|round|int }}"
- aria-valuemin="0" aria-valuemax="100" style="width:{{ doc.percent_complete|round|int }}%;">
- </div>
- </div>
- {% endif %}{% endblock %}
-{% block breadcrumbs %}
- <div class="page-breadcrumbs" data-html-block="breadcrumbs">
- <ul class="breadcrumb">
- <li>
- <span class="icon icon-angle-left"></span>
- <a href="/project">Projects</a>
- </li>
- </ul>
- </div>
+{% block header %}
+ <h1>{{ doc.project_name }}</h1>
{% endblock %}
-
{% block style %}
<style>
{% include "templates/includes/projects.css" %}
@@ -32,7 +15,13 @@
{% block page_content %}
-
+{% if doc.percent_complete %}
+<div class="progress progress-hg">
+ <div class="progress-bar progress-bar-{{ "warning" if doc.percent_complete|round < 100 else "success" }} active" role="progressbar" aria-valuenow="{{ doc.percent_complete|round|int }}"
+ aria-valuemin="0" aria-valuemax="100" style="width:{{ doc.percent_complete|round|int }}%;">
+ </div>
+</div>
+{% endif %}
<div class="clearfix">
<h4 style="float: left;">{{ _("Tasks") }}</h4>
diff --git a/erpnext/templates/pages/projects.py b/erpnext/templates/pages/projects.py
index f10b2fb..0f021a6 100644
--- a/erpnext/templates/pages/projects.py
+++ b/erpnext/templates/pages/projects.py
@@ -18,10 +18,10 @@
project.has_permission('read')
project.tasks = get_tasks(project.name, start=0, item_status='open',
- search=frappe.form_dict.get("q"))
+ search=frappe.form_dict.get("search"))
project.timelogs = get_timelogs(project.name, start=0,
- search=frappe.form_dict.get("q"))
+ search=frappe.form_dict.get("search"))
context.doc = project
diff --git a/erpnext/translations/ar.csv b/erpnext/translations/ar.csv
index c413ea0..9a6e5c5 100644
--- a/erpnext/translations/ar.csv
+++ b/erpnext/translations/ar.csv
@@ -512,8 +512,8 @@
apps/erpnext/erpnext/setup/setup_wizard/install_fixtures.py +139,Proposal Writing,الكتابة الاقتراح
apps/erpnext/erpnext/setup/doctype/sales_person/sales_person.py +35,Another Sales Person {0} exists with the same Employee id,شخص آخر مبيعات {0} موجود مع نفس الرقم الوظيفي
apps/erpnext/erpnext/config/accounts.py +70,Masters,الماجستير
-apps/erpnext/erpnext/config/accounts.py +135,Update Bank Transaction Dates,تواريخ عملية البنك التحديث
-apps/erpnext/erpnext/stock/stock_ledger.py +337,Negative Stock Error ({6}) for Item {0} in Warehouse {1} on {2} {3} in {4} {5},خطأ الأسهم السلبية ( { } 6 ) القطعة ل {0} في {1} في معرض النماذج ثلاثية على {2} {3} {4} في {5}
+apps/erpnext/erpnext/config/accounts.py +127,Update Bank Transaction Dates,تواريخ عملية البنك التحديث
+apps/erpnext/erpnext/stock/stock_ledger.py +337,Negative Stock Error ({6}) for Item {0} in Warehouse {1} on {2} {3} in {4} {5},خطأ الأسهم السلبية ( {6} ) القطعة ل {0} في {1} في معرض النماذج ثلاثية على {2} {3} {4} في {5}
apps/erpnext/erpnext/config/projects.py +30,Time Tracking,تتبع الوقت
DocType: Fiscal Year Company,Fiscal Year Company,الشركة السنة المالية
DocType: Packing Slip Item,DN Detail,DN التفاصيل
@@ -643,7 +643,7 @@
#### Description of Columns
-1. Calculation Type:
+1. Calculation Type:
- This can be on **Net Total** (that is the sum of basic amount).
- **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.
- **Actual** (as mentioned).
@@ -654,19 +654,19 @@
6. Amount: Tax amount.
7. Total: Cumulative total to this point.
8. Enter Row: If based on ""Previous Row Total"" you can select the row number which will be taken as a base for this calculation (default is the previous row).
-9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.","قالب الضرائب القياسية التي يمكن تطبيقها على جميع عمليات البيع. يمكن أن يحتوي هذا القالب قائمة رؤساء الضريبية، وكذلك غيرهم من رؤساء حساب / الدخل مثل ""شحن""، ""التأمين""، ""معالجة""، وغيرها
+9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.","قالب الضرائب القياسية التي يمكن تطبيقها على جميع عمليات البيع. يمكن أن يحتوي هذا القالب قائمة رؤساء الضريبية، وكذلك غيرهم من رؤساء حساب / الدخل مثل ""شحن""، ""التأمين""، ""معالجة""، وغيرها
- #### ملاحظة
+ #### ملاحظة
معدل الضريبة لك تعريف هنا سوف يكون معدل الضريبة موحد لجميع الأصناف ** **. إذا كانت هناك بنود ** ** التي لها أسعار مختلفة، وأنها يجب أن يضاف في * الضرائب البند ** الجدول في البند ** ** الرئيسي.
- #### وصف الأعمدة
+ #### وصف الأعمدة
- 1. نوع الحساب:
+ 1. نوع الحساب:
- وهذا يمكن أن يكون على ** صافي إجمالي ** (وهذا هو مجموع المبلغ الأساسي).
- ** في الصف السابق الكل / المكونات ** (للضرائب أو رسوم التراكمية). إذا قمت بتحديد هذا الخيار، سيتم تطبيق الضريبة كنسبة مئوية من الصف السابق (في الجدول الضرائب) كمية أو المجموع.
- ** ** الفعلية (كما ذكر).
- 2. رئيس الحساب: حساب دفتر الأستاذ والتي بموجبها سيتم حجز هذه الضريبة
+ 2. رئيس الحساب: حساب دفتر الأستاذ والتي بموجبها سيتم حجز هذه الضريبة
3. مركز التكلفة: إذا الضرائب / الرسوم هو الدخل (مثل الشحن) أو حساب فإنه يحتاج إلى أن يتم الحجز مقابل مركز التكلفة.
4. الوصف: وصف الضريبية (التي ستتم طباعتها في الفواتير / الاقتباس).
5. معدل: معدل الضريبة.
@@ -1973,7 +1973,7 @@
#### Description of Columns
-1. Calculation Type:
+1. Calculation Type:
- This can be on **Net Total** (that is the sum of basic amount).
- **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.
- **Actual** (as mentioned).
@@ -1985,19 +1985,19 @@
7. Total: Cumulative total to this point.
8. Enter Row: If based on ""Previous Row Total"" you can select the row number which will be taken as a base for this calculation (default is the previous row).
9. Consider Tax or Charge for: In this section you can specify if the tax / charge is only for valuation (not a part of total) or only for total (does not add value to the item) or for both.
-10. Add or Deduct: Whether you want to add or deduct the tax.","قالب الضرائب القياسية التي يمكن تطبيقها على جميع المعاملات شراء. يمكن أن يحتوي هذا القالب قائمة رؤساء الضريبية، وكذلك غيرهم من رؤساء حساب مثل ""شحن""، ""التأمين""، ""معالجة""، وغيرها
+10. Add or Deduct: Whether you want to add or deduct the tax.","قالب الضرائب القياسية التي يمكن تطبيقها على جميع المعاملات شراء. يمكن أن يحتوي هذا القالب قائمة رؤساء الضريبية، وكذلك غيرهم من رؤساء حساب مثل ""شحن""، ""التأمين""، ""معالجة""، وغيرها
- #### ملاحظة
+ #### ملاحظة
معدل الضريبة التي تحدد هنا سوف يكون معدل الضريبة موحد لجميع الأصناف ** **. إذا كانت هناك بنود ** ** التي لها أسعار مختلفة، وأنها يجب أن يضاف في * الضرائب البند ** الجدول في البند ** ** الرئيسي.
- #### وصف الأعمدة
+ #### وصف الأعمدة
- 1. نوع الحساب:
+ 1. نوع الحساب:
- وهذا يمكن أن يكون على ** صافي إجمالي ** (وهذا هو مجموع المبلغ الأساسي).
- ** في الصف السابق الكل / المكونات ** (للضرائب أو رسوم التراكمية). إذا قمت بتحديد هذا الخيار، سيتم تطبيق الضريبة كنسبة مئوية من الصف السابق (في الجدول الضرائب) كمية أو المجموع.
- ** ** الفعلية (كما ذكر).
- 2. رئيس الحساب: حساب دفتر الأستاذ والتي بموجبها سيتم حجز هذه الضريبة
+ 2. رئيس الحساب: حساب دفتر الأستاذ والتي بموجبها سيتم حجز هذه الضريبة
3. مركز التكلفة: إذا الضرائب / الرسوم هو الدخل (مثل الشحن) أو حساب فإنه يحتاج إلى أن يتم الحجز مقابل مركز التكلفة.
4. الوصف: وصف الضريبية (التي ستتم طباعتها في الفواتير / الاقتباس).
5. معدل: معدل الضريبة.
@@ -2168,7 +2168,7 @@
1. Ways of addressing disputes, indemnity, liability, etc.
1. Address and Contact of your Company.","الشروط والأحكام التي يمكن أن تضاف إلى المبيعات والمشتريات القياسية.
- أمثلة:
+ أمثلة:
1. صلاحية العرض.
1. شروط الدفع (مقدما، وعلى الائتمان، وجزء مسبقا الخ).
@@ -2177,7 +2177,7 @@
1. الضمان إن وجدت.
1. عودة السياسة.
1. شروط الشحن، إذا كان ذلك ممكنا.
- 1. سبل معالجة النزاعات، التعويض، والمسؤولية، الخ
+ 1. سبل معالجة النزاعات، التعويض، والمسؤولية، الخ
1. معالجة والاتصال من الشركة الخاصة بك."
DocType: Attendance,Leave Type,ترك نوع
apps/erpnext/erpnext/controllers/stock_controller.py +173,Expense / Difference account ({0}) must be a 'Profit or Loss' account,"حساب / حساب الفرق ({0}) يجب أن يكون الربح أو الخسارة ""حساب"
@@ -2460,7 +2460,7 @@
apps/erpnext/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py +102,Email sent to supplier {0},البريد الإلكتروني المرسلة إلى المورد {0}
apps/erpnext/erpnext/hr/doctype/leave_block_list/leave_block_list.py +19,Date is repeated,ويتكرر التاريخ
apps/erpnext/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.html +27,Authorized Signatory,المفوض بالتوقيع
-apps/erpnext/erpnext/hr/doctype/leave_application/leave_application.py +187,Leave approver must be one of {0},"الموافق عل الاجازة يجب ان يكون واحد من
+apps/erpnext/erpnext/hr/doctype/leave_application/leave_application.py +187,Leave approver must be one of {0},"الموافق عل الاجازة يجب ان يكون واحد من
{0}"
DocType: Hub Settings,Seller Email,البائع البريد الإلكتروني
DocType: Project,Total Purchase Cost (via Purchase Invoice),مجموع تكلفة الشراء (عن طريق شراء الفاتورة)
@@ -3069,7 +3069,7 @@
apps/erpnext/erpnext/setup/setup_wizard/industry_type.py +15,Brokerage,سمسرة
DocType: Address,Postal Code,الرمز البريدي
DocType: Production Order Operation,"in Minutes
-Updated via 'Time Log'","في دقائق
+Updated via 'Time Log'","في دقائق
تحديث عبر 'وقت دخول """
DocType: Customer,From Lead,من العميل المحتمل
apps/erpnext/erpnext/config/manufacturing.py +13,Orders released for production.,أوامر الإفراج عن الإنتاج.
@@ -3237,7 +3237,7 @@
apps/erpnext/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +42,Bank Statement balance as per General Ledger,بنك ميزان بيان وفقا لدفتر الأستاذ العام
DocType: Job Applicant,Applicant Name,اسم مقدم الطلب
DocType: Authorization Rule,Customer / Item Name,العميل / أسم البند
-DocType: Product Bundle,"Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**.
+DocType: Product Bundle,"Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**.
The package **Item** will have ""Is Stock Item"" as ""No"" and ""Is Sales Item"" as ""Yes"".
@@ -3370,17 +3370,17 @@
{% if phone %}Phone: {{ phone }}<br>{% endif -%}
{% if fax %}Fax: {{ fax }}<br>{% endif -%}
{% if email_id %}Email: {{ email_id }}<br>{% endif -%}
-</code></pre>","<H4> افتراضي قالب </ H4>
- <p> ويستخدم <a href=""http://jinja.pocoo.org/docs/templates/""> جينجا قالبي templating </A> وجميع مجالات عنوان ( بما في ذلك الحقول المخصصة إن وجدت) سوف تكون متاحة </ P>
- <قبل> <كود> {{address_line1}} العلامة & lt؛ BR & GT؛
- {٪ إذا address_line2٪} {{address_line2}} العلامة & lt؛ BR & GT؛ { ENDIF٪ -٪}
- {{مدينة}} العلامة & lt؛ BR & GT؛
- {٪ إذا الدولة٪} {{دولة}} العلامة & lt؛ BR & GT؛ {٪ ENDIF -٪}
- {٪ إذا كان الرقم السري٪} PIN: {{الرقم السري}} العلامة & lt؛ BR & GT؛ {٪ ENDIF -٪}
- {{البلاد}} العلامة & lt؛ BR & GT؛
- {٪ إذا كان الهاتف٪} الهاتف: {{هاتف}} العلامة & lt؛ BR & GT؛ { ٪ ENDIF -٪}
- {٪ إذا الفاكس٪} فاكس: {{الفاكس}} العلامة & lt؛ BR & GT؛ {٪ ENDIF -٪}
- {٪ إذا٪ email_id} البريد الإلكتروني: {{email_id}} العلامة & lt؛ BR & GT ؛ {٪ ENDIF -٪}
+</code></pre>","<H4> افتراضي قالب </ H4>
+ <p> ويستخدم <a href=""http://jinja.pocoo.org/docs/templates/""> جينجا قالبي templating </A> وجميع مجالات عنوان ( بما في ذلك الحقول المخصصة إن وجدت) سوف تكون متاحة </ P>
+ <قبل> <كود> {{address_line1}} العلامة & lt؛ BR & GT؛
+ {٪ إذا address_line2٪} {{address_line2}} العلامة & lt؛ BR & GT؛ { ENDIF٪ -٪}
+ {{مدينة}} العلامة & lt؛ BR & GT؛
+ {٪ إذا الدولة٪} {{دولة}} العلامة & lt؛ BR & GT؛ {٪ ENDIF -٪}
+ {٪ إذا كان الرقم السري٪} PIN: {{الرقم السري}} العلامة & lt؛ BR & GT؛ {٪ ENDIF -٪}
+ {{البلاد}} العلامة & lt؛ BR & GT؛
+ {٪ إذا كان الهاتف٪} الهاتف: {{هاتف}} العلامة & lt؛ BR & GT؛ { ٪ ENDIF -٪}
+ {٪ إذا الفاكس٪} فاكس: {{الفاكس}} العلامة & lt؛ BR & GT؛ {٪ ENDIF -٪}
+ {٪ إذا٪ email_id} البريد الإلكتروني: {{email_id}} العلامة & lt؛ BR & GT ؛ {٪ ENDIF -٪}
</ الرمز> </ PRE>"
DocType: Salary Slip Deduction,Default Amount,المبلغ الافتراضي
apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +96,Warehouse not found in the system,لم يتم العثور على المستودع في النظام
@@ -3561,7 +3561,7 @@
apps/erpnext/erpnext/crm/doctype/newsletter_list/newsletter_list.js +40,New Newsletter,النشرة الإخبارية جديدة
apps/erpnext/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py +148,Start date should be less than end date for Item {0},يجب أن يكون تاريخ البدء أقل من تاريخ انتهاء القطعة ل {0}
DocType: Item,"Example: ABCD.#####
-If series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.","مثال: ABCD #####
+If series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.","مثال: ABCD #####
إذا تم تعيين سلسلة وليس المذكورة لا المسلسل في المعاملات، سيتم إنشاء الرقم التسلسلي ثم التلقائي على أساس هذه السلسلة. إذا كنت تريد دائما أن يذكر صراحة المسلسل رقم لهذا البند. ترك هذا فارغا."
DocType: Upload Attendance,Upload Attendance,تحميل الحضور
apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.js +119,BOM and Manufacturing Quantity are required,ويلزم BOM والتصنيع الكمية
diff --git a/erpnext/utilities/doctype/address/address.py b/erpnext/utilities/doctype/address/address.py
index a94bd56..f613faa 100644
--- a/erpnext/utilities/doctype/address/address.py
+++ b/erpnext/utilities/doctype/address/address.py
@@ -122,9 +122,10 @@
def get_list_context(context=None):
from erpnext.shopping_cart.cart import get_address_docs
return {
- "title": _("My Addresses"),
+ "title": _("Addresses"),
"get_list": get_address_docs,
"row_template": "templates/includes/address_row.html",
+ 'no_breadcrumbs': True,
}
def has_website_permission(doc, ptype, user, verbose=False):
diff --git a/setup.py b/setup.py
index de74510..9ced174 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
from pip.req import parse_requirements
-version = "6.27.11"
+version = "6.27.17"
requirements = parse_requirements("requirements.txt", session="")
setup(