Merge pull request #23416 from anupamvs/quotation-portal
feat: provision to draft quotation from portal
This commit is contained in:
commit
c33fbd7e52
@ -25,7 +25,7 @@ def get_transaction_list(doctype, txt=None, filters=None, limit_start=0, limit_p
|
|||||||
|
|
||||||
if not filters: filters = []
|
if not filters: filters = []
|
||||||
|
|
||||||
if doctype in ['Supplier Quotation', 'Purchase Invoice']:
|
if doctype in ['Supplier Quotation', 'Purchase Invoice', 'Quotation']:
|
||||||
filters.append((doctype, 'docstatus', '<', 2))
|
filters.append((doctype, 'docstatus', '<', 2))
|
||||||
else:
|
else:
|
||||||
filters.append((doctype, 'docstatus', '=', 1))
|
filters.append((doctype, 'docstatus', '=', 1))
|
||||||
|
|||||||
@ -96,6 +96,8 @@ def place_order():
|
|||||||
def request_for_quotation():
|
def request_for_quotation():
|
||||||
quotation = _get_cart_quotation()
|
quotation = _get_cart_quotation()
|
||||||
quotation.flags.ignore_permissions = True
|
quotation.flags.ignore_permissions = True
|
||||||
|
quotation.save()
|
||||||
|
if not get_shopping_cart_settings().save_quotations_as_draft:
|
||||||
quotation.submit()
|
quotation.submit()
|
||||||
return quotation.name
|
return quotation.name
|
||||||
|
|
||||||
|
|||||||
@ -27,6 +27,7 @@
|
|||||||
"enable_checkout",
|
"enable_checkout",
|
||||||
"payment_success_url",
|
"payment_success_url",
|
||||||
"column_break_11",
|
"column_break_11",
|
||||||
|
"save_quotations_as_draft",
|
||||||
"payment_gateway_account"
|
"payment_gateway_account"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
@ -166,13 +167,20 @@
|
|||||||
"fieldname": "enable_variants",
|
"fieldname": "enable_variants",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Enable Variants"
|
"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",
|
"icon": "fa fa-shopping-cart",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-08-02 18:21:43.873303",
|
"modified": "2020-09-24 16:28:07.192525",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Shopping Cart",
|
"module": "Shopping Cart",
|
||||||
"name": "Shopping Cart Settings",
|
"name": "Shopping Cart Settings",
|
||||||
|
|||||||
@ -10,7 +10,10 @@
|
|||||||
{{ product_info.price.formatted_price_sales_uom }}
|
{{ product_info.price.formatted_price_sales_uom }}
|
||||||
<small class="text-muted">({{ product_info.price.formatted_price }} / {{ product_info.uom }})</small>
|
<small class="text-muted">({{ product_info.price.formatted_price }} / {{ product_info.uom }})</small>
|
||||||
</h4>
|
</h4>
|
||||||
|
{% else %}
|
||||||
|
{{ _("Unit of Measurement") }} : {{ product_info.uom }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if cart_settings.show_stock_availability %}
|
{% if cart_settings.show_stock_availability %}
|
||||||
<div>
|
<div>
|
||||||
{% if product_info.in_stock == 0 %}
|
{% if product_info.in_stock == 0 %}
|
||||||
|
|||||||
@ -14,7 +14,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3 text-right bold">
|
<div class="col-sm-3 text-right bold">
|
||||||
|
{% if doc.doctype == "Quotation" and not doc.docstatus %}
|
||||||
|
{{ _("Pending") }}
|
||||||
|
{% else %}
|
||||||
{{ doc.get_formatted("grand_total") }}
|
{{ doc.get_formatted("grand_total") }}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="transaction-item-link" href="/{{ pathname }}/{{ doc.name }}">Link</a>
|
<a class="transaction-item-link" href="/{{ pathname }}/{{ doc.name }}">Link</a>
|
||||||
|
|||||||
@ -27,7 +27,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
@ -35,7 +34,11 @@
|
|||||||
<div class="row transaction-subheading">
|
<div class="row transaction-subheading">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<span class="indicator {{ doc.indicator_color or ("blue" if doc.docstatus==1 else "darkgrey") }}">
|
<span class="indicator {{ doc.indicator_color or ("blue" if doc.docstatus==1 else "darkgrey") }}">
|
||||||
|
{% if doc.doctype == "Quotation" and not doc.docstatus %}
|
||||||
|
{{ _("Pending") }}
|
||||||
|
{% else %}
|
||||||
{{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }}
|
{{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }}
|
||||||
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 text-muted text-right small">
|
<div class="col-6 text-muted text-right small">
|
||||||
@ -95,7 +98,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- taxes -->
|
<!-- taxes -->
|
||||||
<div class="order-taxes d-flex justify-content-end">
|
<div class="order-taxes d-flex justify-content-end">
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user