Merge pull request #5331 from nabinhait/multi-fix-55
Multiple fixes
diff --git a/erpnext/__version__.py b/erpnext/__version__.py
index 01b41d2..4cc1cec 100644
--- a/erpnext/__version__.py
+++ b/erpnext/__version__.py
@@ -1,2 +1,2 @@
from __future__ import unicode_literals
-__version__ = '6.27.16'
+__version__ = '6.27.17'
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 9e7cdb6..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
@@ -35,7 +35,7 @@
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:
@@ -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]
@@ -82,7 +84,7 @@
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_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
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 beca96e..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
@@ -32,7 +32,7 @@
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:
@@ -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]
@@ -80,7 +82,7 @@
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.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)
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 53cb7af66..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,6 +114,8 @@
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
@@ -121,8 +123,8 @@
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
+ 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)
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/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/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 d5c677c..37b13c3 100644
--- a/erpnext/controllers/sales_and_purchase_return.py
+++ b/erpnext/controllers/sales_and_purchase_return.py
@@ -62,8 +62,8 @@
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):
+ 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)
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 1e16c89..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.16"
+app_version = "6.27.17"
app_email = "info@erpnext.com"
app_license = "GNU General Public License (v3)"
source_link = "https://github.com/frappe/erpnext"
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.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 3ee0158..4758325 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -259,7 +259,8 @@
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_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
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..2e7f893
--- /dev/null
+++ b/erpnext/patches/v7_0/remove_features_setup.py
@@ -0,0 +1,24 @@
+import frappe
+
+from erpnext.setup.install import create_compact_item_print_custom_field
+
+def execute():
+ if not frappe.db.get_value("Features Setup", None, "fs_item_barcode"):
+ # hide barcode fields
+ frappe.make_property_setter(dict(fieldname='barcode', property='hidden', value=1))
+
+ 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/public/build.json b/erpnext/public/build.json
index 9a949f2..03c381a 100644
--- a/erpnext/public/build.json
+++ b/erpnext/public/build.json
@@ -8,7 +8,6 @@
],
"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",
diff --git a/erpnext/public/css/erpnext.css b/erpnext/public/css/erpnext.css
index 284260d..6777e1e 100644
--- a/erpnext/public/css/erpnext.css
+++ b/erpnext/public/css/erpnext.css
@@ -124,49 +124,3 @@
.dashboard-list-item:last-child {
border-bottom: none;
}
-
-.payment-toolbar {
- margin-left: 35px;
-}
-
-.payment-mode {
- cursor: pointer;
- font-family: sans-serif;
- font-size: 15px;
-}
-
-.pos-payment-row .col-xs-6 {
- padding :10px;
-}
-
-.pos-payment-row {
- border-bottom:1px solid #d1d8dd;
- margin: 2px 0px 5px 0px;
-}
-
-.pos-payment-row:hover {
- background-color: #FCFFDD;
- cursor: pointer;
-}
-
-.pos-keyboard-key, .delete-btn {
- border: 1px solid #d1d8dd;
- height:85px;
- width:85px;
- margin:10px 10px;
- font-size:24px;
- font-weight:200;
-}
-
-.amount-label {
- font-size: 16px;
-}
-
-.selected-payment-mode {
- background-color: #FCFFDD;
- cursor: pointer;
-}
-
-.pos-invoice-list {
- padding: 15px 10px;
-}
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/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/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/setup_wizard/domainify.py b/erpnext/setup/setup_wizard/domainify.py
new file mode 100644
index 0000000..df4afd4
--- /dev/null
+++ b/erpnext/setup/setup_wizard/domainify.py
@@ -0,0 +1,54 @@
+# 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},
+ {'fieldname': 'barcode', 'property': 'hidden', 'value': 1}
+ ]
+ }
+}
+
+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)
+
+ 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..a360d4f 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,6 +33,7 @@
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)
create_logo(args)
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/stock_ledger.py b/erpnext/stock/stock_ledger.py
index ed67322..d3fa482 100644
--- a/erpnext/stock/stock_ledger.py
+++ b/erpnext/stock/stock_ledger.py
@@ -215,8 +215,6 @@
stock_value_change = 0
if incoming_rate:
stock_value_change = actual_qty * incoming_rate
- elif flt(sle.outgoing_rate):
- stock_value_change = actual_qty * flt(sle.outgoing_rate)
elif actual_qty < 0:
# In case of delivery/stock issue, get average purchase rate
# of serial nos of current entry
diff --git a/setup.py b/setup.py
index ce447d5..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.16"
+version = "6.27.17"
requirements = parse_requirements("requirements.txt", session="")
setup(