Fixes in Order / Quotation (#10361)
* Additions in Order Page for Sidebar Menu with "Order" page route
* Adjust Columns in order_taxes.html to avoid number breaks for more precisions
* Fields additions in transaction_row.html
* [fix] style for order pages, indicator for quotation etc
* [fix] style for order pages, indicator for quotation etc
* [test] add timeout
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html
index 2481808..8a495b1 100644
--- a/erpnext/templates/pages/order.html
+++ b/erpnext/templates/pages/order.html
@@ -7,21 +7,44 @@
{% block title %}{{ doc.name }}{% endblock %}
-{% block header %}<h1>{{ doc.name }}</h1>{% endblock %}
+{% block header %}
+ <h1>{{ doc.name }}</h1>
+{% endblock %}
+
+{% block header_actions %}
+<a class='btn btn-xs btn-default' href='/printview?doctype={{ doc.doctype}}&name={{ doc.name }}&format={{ print_format }}' target="_blank" rel="noopener noreferrer">{{ _("Print") }}</a>
+{% endblock %}
{% block page_content %}
<div class="row transaction-subheading">
<div class="col-xs-6">
- <span class="indicator {{ doc.indicator_color or "darkgrey" }}">
+ <span class="indicator {{ doc.indicator_color or ("blue" if doc.docstatus==1 else "darkgrey") }}">
{{ doc.indicator_title or doc.status or "Submitted" }}
</span>
</div>
<div class="col-xs-6 text-muted text-right small">
{{ frappe.utils.formatdate(doc.transaction_date, 'medium') }}
+ {% if doc.valid_till %}
+ <p>
+ {{ _("Valid Till") }}: {{ frappe.utils.formatdate(doc.valid_till, 'medium') }}
+ </p>
+ {% endif %}
</div>
</div>
+<p class='small' style='padding-top: 15px;'>
+{% if doc.doctype == 'Supplier Quotation' %}
+ <b>{{ doc.supplier_name}}</b>
+{% else %}
+ <b>{{ doc.customer_name}}</b>
+{% endif %}
+{% if doc.contact_display %}
+ <br>
+ {{ doc.contact_display }}
+{% endif %}
+</p>
+
{% if doc._header %}
{{ doc._header }}
{% endif %}
@@ -31,29 +54,29 @@
<!-- items -->
<div class="order-item-table">
<div class="row order-items order-item-header text-muted">
- <div class="col-sm-8 col-xs-6 h6 text-uppercase">
+ <div class="col-sm-6 col-xs-6 h6 text-uppercase">
{{ _("Item") }}
</div>
- <div class="col-sm-2 col-xs-3 text-right h6 text-uppercase">
+ <div class="col-sm-3 col-xs-3 text-right h6 text-uppercase">
{{ _("Quantity") }}
</div>
- <div class="col-sm-2 col-xs-3 text-right h6 text-uppercase">
+ <div class="col-sm-3 col-xs-3 text-right h6 text-uppercase">
{{ _("Amount") }}
</div>
</div>
{% for d in doc.items %}
<div class="row order-items">
- <div class="col-sm-8 col-xs-6">
+ <div class="col-sm-6 col-xs-6">
{{ item_name_and_description(d) }}
</div>
- <div class="col-sm-2 col-xs-3 text-right">
+ <div class="col-sm-3 col-xs-3 text-right">
{{ d.qty }}
{% if d.delivered_qty is defined and d.delivered_qty != None %}
<p class="text-muted small">{{
_("Delivered: {0}").format(d.delivered_qty) }}</p>
{% endif %}
</div>
- <div class="col-sm-2 col-xs-3 text-right">
+ <div class="col-sm-3 col-xs-3 text-right">
{{ d.get_formatted("amount") }}
<p class="text-muted small">{{
_("@ {0}").format(d.get_formatted("rate")) }}</p>
@@ -72,8 +95,8 @@
</div>
<div class="cart-taxes row small">
- <div class="col-sm-8"><!-- empty --></div>
- <div class="col-sm-4">
+ <div class="col-sm-6"><!-- empty --></div>
+ <div class="col-sm-6">
{% if enabled_checkout %}
{% if (doc.doctype=="Sales Order" and doc.per_billed <= 0)
or (doc.doctype=="Sales Invoice" and doc.outstanding_amount > 0) %}
@@ -86,7 +109,7 @@
{% endif %}
{% endif %}
</div>
-
+
{% if attachments %}
<div class="order-item-table">
<div class="row order-items order-item-header text-muted">
@@ -106,4 +129,9 @@
</div>
{% endif %}
</div>
+{% if doc.terms %}
+<div class="terms-and-condition text-muted small">
+ <hr><p>{{ doc.terms }}</p>
+</div>
+{% endif %}
{% endblock %}