Merge pull request #7386 from arvindstutzen/patch-1
Update step-8-customer-names.md
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
index 0323c2f..fc9cc3b 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
@@ -11,6 +11,9 @@
cur_frm.add_custom_button(__("Purchase Order"), this.make_purchase_order,
__("Make"));
cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
+ cur_frm.add_custom_button(__("Quotation"), this.make_quotation,
+ __("Make"));
+
}
else if (this.frm.doc.docstatus===0) {
cur_frm.add_custom_button(__('Material Request'),
@@ -35,6 +38,13 @@
method: "erpnext.buying.doctype.supplier_quotation.supplier_quotation.make_purchase_order",
frm: cur_frm
})
+ },
+ make_quotation: function() {
+ frappe.model.open_mapped_doc({
+ method: "erpnext.buying.doctype.supplier_quotation.supplier_quotation.make_quotation",
+ frm: cur_frm
+ })
+
}
});
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py
index 144e982..30899c8 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py
@@ -97,8 +97,26 @@
},
"Purchase Taxes and Charges": {
"doctype": "Purchase Taxes and Charges",
- "add_if_empty": True
},
}, target_doc, set_missing_values)
return doclist
+
+@frappe.whitelist()
+def make_quotation(source_name, target_doc=None):
+ doclist = get_mapped_doc("Supplier Quotation", source_name, {
+ "Supplier Quotation": {
+ "doctype": "Quotation",
+ "field_map": {
+ "name": "supplier_quotation",
+ }
+ },
+ "Supplier Quotation Item": {
+ "doctype": "Quotation Item",
+ "condition": lambda doc: frappe.db.get_value("Item", doc.item_code, "is_sales_item")==1,
+ "add_if_empty": True
+ }
+ }, target_doc)
+
+ return doclist
+
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py
index 80f946e..df69063 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py
@@ -11,11 +11,12 @@
'transactions': [
{
'label': _('Related'),
- 'items': ['Purchase Order']
+ 'items': ['Purchase Order', 'Quotation']
},
{
'label': _('Reference'),
'items': ['Material Request', 'Request for Quotation', 'Project']
},
]
+
}
diff --git a/erpnext/hr/doctype/salary_slip/test_salary_slip.py b/erpnext/hr/doctype/salary_slip/test_salary_slip.py
index 54faa64..3eec686 100644
--- a/erpnext/hr/doctype/salary_slip/test_salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/test_salary_slip.py
@@ -76,7 +76,7 @@
if getdate(nowdate()).day >= 15:
date_of_joining = getdate(add_days(nowdate(),-10))
relieving_date = getdate(add_days(nowdate(),-10))
- elif getdate(nowdate()).day < 15 and getdate(nowdate()).day > 5:
+ elif getdate(nowdate()).day < 15 and getdate(nowdate()).day >= 5:
date_of_joining = getdate(add_days(nowdate(),-3))
relieving_date = getdate(add_days(nowdate(),-3))
elif getdate(nowdate()).day < 5 and not getdate(nowdate()).day == 1:
diff --git a/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.js b/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.js
index 93cb940..d085a33 100644
--- a/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.js
+++ b/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.js
@@ -4,16 +4,12 @@
frappe.query_reports["Daily Timesheet Summary"] = {
"filters": [
{
- "fieldname":"from_date",
- "label": __("From Date"),
- "fieldtype": "Date",
- "default": frappe.datetime.get_today()
- },
- {
- "fieldname":"to_date",
- "label": __("To Date"),
- "fieldtype": "Date",
- "default": frappe.datetime.get_today()
+ "fieldname":"date",
+ "label": __("Date"),
+ "fieldtype": "DateRange",
+ "start_with_value": true,
+ "default_from":frappe.datetime.get_today(),
+ "default_to":frappe.datetime.get_today(),
},
]
}
diff --git a/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.py b/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.py
index 682fb2e..6ed3b58 100644
--- a/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.py
+++ b/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.py
@@ -9,7 +9,9 @@
def execute(filters=None):
if not filters:
filters = {}
- elif filters.get("from_date") or filters.get("to_date"):
+ elif filters.get("date") :
+ filters["from_date"] = filters["date"][0]
+ filters["to_date"] = filters["date"][1]
filters["from_time"] = "00:00:00"
filters["to_time"] = "24:00:00"
diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json
index 4fc536e..a543ecd 100644
--- a/erpnext/selling/doctype/quotation/quotation.json
+++ b/erpnext/selling/doctype/quotation/quotation.json
@@ -2336,6 +2336,35 @@
"search_index": 0,
"set_only_once": 0,
"unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "supplier_quotation",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Supplier Quotation",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Supplier Quotation",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
}
],
"hide_heading": 0,
@@ -2350,7 +2379,7 @@
"istable": 0,
"max_attachments": 1,
"menu_index": 0,
- "modified": "2016-11-07 05:58:07.587479",
+ "modified": "2017-01-04 06:28:07.269867",
"modified_by": "Administrator",
"module": "Selling",
"name": "Quotation",
@@ -2537,5 +2566,6 @@
"sort_order": "DESC",
"timeline_field": "customer",
"title_field": "title",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py
index e01cc0b..1d2befa 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.py
+++ b/erpnext/stock/doctype/warehouse/warehouse.py
@@ -74,7 +74,7 @@
ac_doc.flags.ignore_mandatory = True
try:
ac_doc.insert()
- msgprint(_("Account head {0} created").format(ac_doc.name))
+ msgprint(_("Account head {0} created").format(ac_doc.name), indicator='green', alert=True)
except frappe.DuplicateEntryError, e:
if not (e.args and e.args[0]=='Account'):
@@ -193,9 +193,9 @@
existing_allow_negative_stock = frappe.db.get_value("Stock Settings", None, "allow_negative_stock")
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1)
- repost_stock_for_items = frappe.db.sql_list("""select distinct item_code
+ repost_stock_for_items = frappe.db.sql_list("""select distinct item_code
from tabBin where warehouse=%s""", newdn)
-
+
# Delete all existing bins to avoid duplicate bins for the same item and warehouse
frappe.db.sql("delete from `tabBin` where warehouse=%s", newdn)
diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py
index 6797f8e..fd1ece2 100644
--- a/erpnext/stock/utils.py
+++ b/erpnext/stock/utils.py
@@ -45,6 +45,7 @@
return sum(sle_map.values())
+@frappe.whitelist()
def get_stock_balance(item_code, warehouse, posting_date=None, posting_time=None, with_valuation_rate=False):
"""Returns stock balance quantity at given warehouse on given posting date or current date.
@@ -191,4 +192,4 @@
def is_group_warehouse(warehouse):
if frappe.db.get_value("Warehouse", warehouse, "is_group"):
frappe.throw(_("Group node warehouse is not allowed to select for transactions"))
-
\ No newline at end of file
+