blob: 67a8fed8ab1fdc4951ff0e6ac5c8defe5402bdf0 [file] [log] [blame]
Anand Doshi1947b172016-03-23 12:12:38 +05301{% extends "templates/web.html" %}
Anand Doshie3bd78e2016-04-22 18:53:21 +05302{% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %}
Rushabh Mehta156ce602015-09-11 18:49:59 +05303
Saurabhdf2783d2016-01-06 15:21:21 +05304{% block breadcrumbs %}
5 {% include "templates/includes/breadcrumbs.html" %}
6{% endblock %}
7
Rushabh Mehtaa3340622016-06-23 18:25:50 +05308{% block title %}{{ doc.name }}{% endblock %}
9
Rushabh Mehtadbb51542017-08-10 21:06:09 +053010{% block header %}
Faris Ansari5f8b3582019-03-19 11:48:32 +053011 <h1 class="m-0">{{ doc.name }}</h1>
Rushabh Mehtadbb51542017-08-10 21:06:09 +053012{% endblock %}
13
14{% block header_actions %}
Faris Ansari5f8b3582019-03-19 11:48:32 +053015<a href='/printview?doctype={{ doc.doctype}}&name={{ doc.name }}&format={{ print_format }}' target="_blank" rel="noopener noreferrer">{{ _("Print") }}</a>
Rushabh Mehtadbb51542017-08-10 21:06:09 +053016{% endblock %}
Rushabh Mehta156ce602015-09-11 18:49:59 +053017
Rushabh Mehta51008f22016-01-01 17:23:12 +053018{% block page_content %}
Rushabh Mehta156ce602015-09-11 18:49:59 +053019
Anand Doshie3bd78e2016-04-22 18:53:21 +053020<div class="row transaction-subheading">
Faris Ansari5f8b3582019-03-19 11:48:32 +053021 <div class="col-6">
Manas Solankida486ee2018-07-06 12:36:57 +053022 <span class="indicator {{ doc.indicator_color or ("blue" if doc.docstatus==1 else "darkgrey") }}">
Shreya Shah7d115182018-10-02 12:46:26 +053023 {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }}
Manas Solankida486ee2018-07-06 12:36:57 +053024 </span>
Saurabh0a0c7872016-01-04 17:37:54 +053025 </div>
Faris Ansari5f8b3582019-03-19 11:48:32 +053026 <div class="col-6 text-muted text-right small">
Manas Solankida486ee2018-07-06 12:36:57 +053027 {{ frappe.utils.formatdate(doc.transaction_date, 'medium') }}
Rushabh Mehtadbb51542017-08-10 21:06:09 +053028 {% if doc.valid_till %}
29 <p>
Manas Solankida486ee2018-07-06 12:36:57 +053030 {{ _("Valid Till") }}: {{ frappe.utils.formatdate(doc.valid_till, 'medium') }}
Rushabh Mehtadbb51542017-08-10 21:06:09 +053031 </p>
32 {% endif %}
Manas Solankida486ee2018-07-06 12:36:57 +053033 </div>
Rushabh Mehta156ce602015-09-11 18:49:59 +053034</div>
35
Faris Ansari5f8b3582019-03-19 11:48:32 +053036<p class="small my-3">
37 {%- set party_name = doc.supplier_name if doc.doctype == 'Supplier Quotation' else doc.customer_name %}
38 <b>{{ party_name }}</b>
39
40 {% if doc.contact_display and doc.contact_display != party_name %}
41 <br>
42 {{ doc.contact_display }}
43 {% endif %}
Rushabh Mehtadbb51542017-08-10 21:06:09 +053044</p>
45
Rushabh Mehta156ce602015-09-11 18:49:59 +053046{% if doc._header %}
47{{ doc._header }}
48{% endif %}
49
50<div class="order-container">
51
Manas Solankida486ee2018-07-06 12:36:57 +053052 <!-- items -->
53 <div class="order-item-table">
54 <div class="row order-items order-item-header text-muted">
Faris Ansari5f8b3582019-03-19 11:48:32 +053055 <div class="col-sm-6 col-6 h6 text-uppercase">
Manas Solankida486ee2018-07-06 12:36:57 +053056 {{ _("Item") }}
57 </div>
58 <div class="col-sm-3 col-xs-3 text-right h6 text-uppercase">
59 {{ _("Quantity") }}
60 </div>
61 <div class="col-sm-3 col-xs-3 text-right h6 text-uppercase">
62 {{ _("Amount") }}
63 </div>
64 </div>
65 {% for d in doc.items %}
66 <div class="row order-items">
Faris Ansari5f8b3582019-03-19 11:48:32 +053067 <div class="col-sm-6 col-6">
Manas Solankida486ee2018-07-06 12:36:57 +053068 {{ item_name_and_description(d) }}
69 </div>
70 <div class="col-sm-3 col-xs-3 text-right">
71 {{ d.qty }}
72 {% if d.delivered_qty is defined and d.delivered_qty != None %}
Faris Ansari853d3fd2019-01-23 16:34:22 +053073 <p class="text-muted small">{{ _("Delivered") }}&nbsp;{{ d.delivered_qty }}</p>
Manas Solankida486ee2018-07-06 12:36:57 +053074 {% endif %}
75 </div>
76 <div class="col-sm-3 col-xs-3 text-right">
77 {{ d.get_formatted("amount") }}
Faris Ansari853d3fd2019-01-23 16:34:22 +053078 <p class="text-muted small">{{ _("Rate:") }}&nbsp;{{ d.get_formatted("rate") }}</p>
Manas Solankida486ee2018-07-06 12:36:57 +053079 </div>
80 </div>
81 {% endfor %}
82 </div>
Rushabh Mehta156ce602015-09-11 18:49:59 +053083
Manas Solankida486ee2018-07-06 12:36:57 +053084 <!-- taxes -->
Faris Ansari5f8b3582019-03-19 11:48:32 +053085 <div class="order-taxes d-flex justify-content-end">
86 <table>
Manas Solankida486ee2018-07-06 12:36:57 +053087 {% include "erpnext/templates/includes/order/order_taxes.html" %}
Faris Ansari5f8b3582019-03-19 11:48:32 +053088 </table>
Manas Solankida486ee2018-07-06 12:36:57 +053089 </div>
Rushabh Mehta156ce602015-09-11 18:49:59 +053090</div>
91
Manas Solankida486ee2018-07-06 12:36:57 +053092{% if enabled_checkout and ((doc.doctype=="Sales Order" and doc.per_billed <= 0)
93 or (doc.doctype=="Sales Invoice" and doc.outstanding_amount > 0)) %}
94
95<div class="panel panel-default">
96 <div class="panel-heading">
97 <div class="row">
98 <div class="form-column col-sm-6 address-title">
99 <strong>Payment</strong>
Saurabh0a0c7872016-01-04 17:37:54 +0530100 </div>
Manas Solankida486ee2018-07-06 12:36:57 +0530101 </div>
Saurabh0a0c7872016-01-04 17:37:54 +0530102 </div>
Manas Solankida486ee2018-07-06 12:36:57 +0530103 <div class="panel-collapse">
104 <div class="panel-body text-muted small">
105 <div class="row">
106 <div class="form-column col-sm-6">
107 {% if available_loyalty_points %}
108 <div class="form-group">
109 <div class="h6">Enter Loyalty Points</div>
110 <div class="control-input-wrapper">
111 <div class="control-input">
112 <input class="form-control" type="number" min="0" max="{{ available_loyalty_points }}" id="loyalty-point-to-redeem">
113 </div>
Faris Ansari5f8b3582019-03-19 11:48:32 +0530114 <p class="help-box small text-muted d-none d-sm-block"> Available Points: {{ available_loyalty_points }} </p>
Manas Solankida486ee2018-07-06 12:36:57 +0530115 </div>
116 </div>
117 {% endif %}
118 </div>
119
120 <div class="form-column col-sm-6">
121 <div id="loyalty-points-status" style="text-align: right"></div>
122 <div class="page-header-actions-block" data-html-block="header-actions">
123 <p>
124 <a href="/api/method/erpnext.accounts.doctype.payment_request.payment_request.make_payment_request?dn={{ doc.name }}&dt={{ doc.doctype }}&submit_doc=1&order_type=Shopping Cart"
125 class="btn btn-primary btn-sm" id="pay-for-order">{{ _("Pay") }} {{ doc.get_formatted("grand_total") }} </a>
126 </p>
127 </div>
128 </div>
129
130 </div>
131
132 </div>
133 </div>
134</div>
135{% endif %}
136
Rushabh Mehtadbb51542017-08-10 21:06:09 +0530137
Charles-Henri Decultot2de1cd32017-05-19 12:34:10 +0200138{% if attachments %}
139<div class="order-item-table">
140 <div class="row order-items order-item-header text-muted">
141 <div class="col-sm-12 h6 text-uppercase">
142 {{ _("Attachments") }}
143 </div>
144 </div>
145 <div class="row order-items">
146 <div class="col-sm-12">
147 {% for attachment in attachments %}
148 <p class="small">
149 <a href="{{ attachment.file_url }}" target="blank"> {{ attachment.file_name }} </a>
150 </p>
151 {% endfor %}
152 </div>
153 </div>
Saurabh276d3e62015-12-31 13:26:36 +0530154</div>
Charles-Henri Decultot2de1cd32017-05-19 12:34:10 +0200155{% endif %}
156</div>
Rushabh Mehtadbb51542017-08-10 21:06:09 +0530157{% if doc.terms %}
158<div class="terms-and-condition text-muted small">
Manas Solankida486ee2018-07-06 12:36:57 +0530159 <hr><p>{{ doc.terms }}</p>
Rushabh Mehtadbb51542017-08-10 21:06:09 +0530160</div>
161{% endif %}
Rushabh Mehta156ce602015-09-11 18:49:59 +0530162{% endblock %}
Manas Solankida486ee2018-07-06 12:36:57 +0530163
164{% block script %}
165 <script> {% include "templates/pages/order.js" %} </script>
166 <script>
167 window.doc_info = {
168 customer: '{{doc.customer}}',
169 doctype: '{{ doc.doctype }}',
170 doctype_name: '{{ doc.name }}',
171 grand_total: '{{ doc.grand_total }}',
172 currency: '{{ doc.currency }}'
173 }
174 </script>
175{% endblock %}