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..0ccc0252c31 100644 --- a/erpnext/shopping_cart/cart.py +++ b/erpnext/shopping_cart/cart.py @@ -96,7 +96,9 @@ def place_order(): def request_for_quotation(): quotation = _get_cart_quotation() quotation.flags.ignore_permissions = True - quotation.submit() + quotation.save() + if not get_shopping_cart_settings().save_quotations_as_draft: + 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..9d61e7d0ece 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 @@ -27,6 +27,7 @@ "enable_checkout", "payment_success_url", "column_break_11", + "save_quotations_as_draft", "payment_gateway_account" ], "fields": [ @@ -166,13 +167,20 @@ "fieldname": "enable_variants", "fieldtype": "Check", "label": "Enable Variants" + }, + { + "default": "0", + "depends_on": "eval: doc.enable_checkout == 0", + "fieldname": "save_quotations_as_draft", + "fieldtype": "Check", + "label": "Save Quotations as Draft" } ], "icon": "fa fa-shopping-cart", "idx": 1, "issingle": 1, "links": [], - "modified": "2020-08-02 18:21:43.873303", + "modified": "2020-09-24 16:28:07.192525", "modified_by": "Administrator", "module": "Shopping Cart", "name": "Shopping Cart Settings", diff --git a/erpnext/templates/generators/item/item_add_to_cart.html b/erpnext/templates/generators/item/item_add_to_cart.html index 40bc0c749b7..dbf15de1e48 100644 --- a/erpnext/templates/generators/item/item_add_to_cart.html +++ b/erpnext/templates/generators/item/item_add_to_cart.html @@ -10,7 +10,10 @@ {{ product_info.price.formatted_price_sales_uom }} ({{ product_info.price.formatted_price }} / {{ product_info.uom }}) + {% else %} + {{ _("Unit of Measurement") }} : {{ product_info.uom }} {% endif %} + {% if cart_settings.show_stock_availability %}
{% if product_info.in_stock == 0 %} diff --git a/erpnext/templates/includes/transaction_row.html b/erpnext/templates/includes/transaction_row.html index 80a542f74bf..fd4835ed99e 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") }} + {% else %} + {{ doc.get_formatted("grand_total") }} + {% endif %}
Link diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index 9e3c58b45be..01b5f6df6c5 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -12,22 +12,21 @@ {% endblock %} {% block header_actions %} - - + {% endblock %} {% block page_content %} @@ -35,7 +34,11 @@
- {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }} + {% if doc.doctype == "Quotation" and not doc.docstatus %} + {{ _("Pending") }} + {% else %} + {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }} + {% endif %}
@@ -95,7 +98,6 @@
{% endfor %}
-