diff --git a/erpnext/controllers/website_list_for_contact.py b/erpnext/controllers/website_list_for_contact.py index ecf041efd17..801c405732c 100644 --- a/erpnext/controllers/website_list_for_contact.py +++ b/erpnext/controllers/website_list_for_contact.py @@ -25,7 +25,7 @@ def get_transaction_list(doctype, txt=None, filters=None, limit_start=0, limit_p if not filters: filters = [] - if doctype in ['Supplier Quotation', 'Purchase Invoice']: + if doctype in ['Supplier Quotation', 'Purchase Invoice', 'Quotation']: filters.append((doctype, 'docstatus', '<', 2)) else: filters.append((doctype, 'docstatus', '=', 1)) diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py index a7e8388be9d..414b3defe70 100644 --- a/erpnext/shopping_cart/cart.py +++ b/erpnext/shopping_cart/cart.py @@ -96,7 +96,7 @@ def place_order(): def request_for_quotation(): quotation = _get_cart_quotation() quotation.flags.ignore_permissions = True - quotation.submit() + quotation.save() if get_shopping_cart_settings().draft_quotation else quotation.submit() return quotation.name @frappe.whitelist() diff --git a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.json b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.json index 32004efdca3..b3286edc15b 100644 --- a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.json +++ b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.json @@ -12,6 +12,7 @@ "show_price", "show_stock_availability", "enable_variants", + "draft_quotation", "column_break_7", "show_contact_us_button", "show_quantity_in_website", @@ -166,13 +167,20 @@ "fieldname": "enable_variants", "fieldtype": "Check", "label": "Enable Variants" + }, + { + "default": "0", + "depends_on": "eval: doc.enable_checkout == 0", + "fieldname": "draft_quotation", + "fieldtype": "Check", + "label": "Draft Quotation" } ], "icon": "fa fa-shopping-cart", "idx": 1, "issingle": 1, "links": [], - "modified": "2020-08-02 18:21:43.873303", + "modified": "2020-09-23 13:18:09.057707", "modified_by": "Administrator", "module": "Shopping Cart", "name": "Shopping Cart Settings", diff --git a/erpnext/templates/includes/transaction_row.html b/erpnext/templates/includes/transaction_row.html index 80a542f74bf..c3b717d093a 100644 --- a/erpnext/templates/includes/transaction_row.html +++ b/erpnext/templates/includes/transaction_row.html @@ -14,7 +14,11 @@
- {{ doc.get_formatted("grand_total") }} + {% if doc.doctype == "Quotation" and not doc.docstatus %} + {{ _("Pending For Approval") }} + {% else %} + {{ doc.get_formatted("grand_total") }} + {% endif %}
Link diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index 9e3c58b45be..19a10279bcd 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -12,22 +12,23 @@ {% endblock %} {% block header_actions %} - - + {% if not(doc.doctype == "Quotation" and not doc.docstatus) %} + + {% endif %} {% endblock %} {% block page_content %} @@ -65,43 +66,46 @@
-
-
-
- {{ _("Item") }} + {% if doc.doctype == "Quotation" and not doc.docstatus %} + {{ _("Pending For Approval") }} + {% else %} +
+
+
+ {{ _("Item") }} +
+
+ {{ _("Quantity") }} +
+
+ {{ _("Amount") }} +
-
- {{ _("Quantity") }} -
-
- {{ _("Amount") }} + {% for d in doc.items %} +
+
+ {{ item_name_and_description(d) }} +
+
+ {{ d.qty }} + {% if d.delivered_qty is defined and d.delivered_qty != None %} +

{{ _("Delivered") }} {{ d.delivered_qty }}

+ {% endif %} +
+
+ {{ d.get_formatted("amount") }} +

{{ _("Rate:") }} {{ d.get_formatted("rate") }}

+
+ {% endfor %}
- {% for d in doc.items %} -
-
- {{ item_name_and_description(d) }} -
-
- {{ d.qty }} - {% if d.delivered_qty is defined and d.delivered_qty != None %} -

{{ _("Delivered") }} {{ d.delivered_qty }}

- {% endif %} -
-
- {{ d.get_formatted("amount") }} -

{{ _("Rate:") }} {{ d.get_formatted("rate") }}

-
-
- {% endfor %} -
- - +
{% include "erpnext/templates/includes/order/order_taxes.html" %}
+ {% endif %}
{% if enabled_checkout and ((doc.doctype=="Sales Order" and doc.per_billed <= 0)