feat: provision to draft quotation from portal
This commit is contained in:
parent
5c04b2eea4
commit
c077fac2a6
@ -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))
|
||||
|
@ -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()
|
||||
|
@ -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",
|
||||
|
@ -14,7 +14,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 text-right bold">
|
||||
{% if doc.doctype == "Quotation" and not doc.docstatus %}
|
||||
{{ _("Pending For Approval") }}
|
||||
{% else %}
|
||||
{{ doc.get_formatted("grand_total") }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<a class="transaction-item-link" href="/{{ pathname }}/{{ doc.name }}">Link</a>
|
||||
|
@ -12,6 +12,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block header_actions %}
|
||||
{% if not(doc.doctype == "Quotation" and not doc.docstatus) %}
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||
<span>{{ _('Actions') }}</span>
|
||||
@ -27,7 +28,7 @@
|
||||
</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_content %}
|
||||
@ -65,6 +66,9 @@
|
||||
<div class="order-container">
|
||||
|
||||
<!-- items -->
|
||||
{% if doc.doctype == "Quotation" and not doc.docstatus %}
|
||||
{{ _("Pending For Approval") }}
|
||||
{% else %}
|
||||
<div class="order-item-table">
|
||||
<div class="row order-items order-item-header text-muted">
|
||||
<div class="col-sm-6 col-6 h6 text-uppercase">
|
||||
@ -95,13 +99,13 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<!-- taxes -->
|
||||
<div class="order-taxes d-flex justify-content-end">
|
||||
<table>
|
||||
{% include "erpnext/templates/includes/order/order_taxes.html" %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if enabled_checkout and ((doc.doctype=="Sales Order" and doc.per_billed <= 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user