blob: 64fd32a992ae8f1ee567abfcb5e0c8bf2ca98f72 [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 %}
11 <h1>{{ doc.name }}</h1>
12{% endblock %}
13
14{% block header_actions %}
15<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>
16{% 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">
Manas Solankida486ee2018-07-06 12:36:57 +053021 <div class="col-xs-6">
Shreya Shah7d115182018-10-02 12:46:26 +053022
Manas Solankida486ee2018-07-06 12:36:57 +053023 <span class="indicator {{ doc.indicator_color or ("blue" if doc.docstatus==1 else "darkgrey") }}">
Shreya Shah7d115182018-10-02 12:46:26 +053024 {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }}
Manas Solankida486ee2018-07-06 12:36:57 +053025 </span>
Saurabh0a0c7872016-01-04 17:37:54 +053026 </div>
Manas Solankida486ee2018-07-06 12:36:57 +053027 <div class="col-xs-6 text-muted text-right small">
28 {{ frappe.utils.formatdate(doc.transaction_date, 'medium') }}
Rushabh Mehtadbb51542017-08-10 21:06:09 +053029 {% if doc.valid_till %}
30 <p>
Manas Solankida486ee2018-07-06 12:36:57 +053031 {{ _("Valid Till") }}: {{ frappe.utils.formatdate(doc.valid_till, 'medium') }}
Rushabh Mehtadbb51542017-08-10 21:06:09 +053032 </p>
33 {% endif %}
Manas Solankida486ee2018-07-06 12:36:57 +053034 </div>
Rushabh Mehta156ce602015-09-11 18:49:59 +053035</div>
36
Rushabh Mehtadbb51542017-08-10 21:06:09 +053037<p class='small' style='padding-top: 15px;'>
38{% if doc.doctype == 'Supplier Quotation' %}
Manas Solankida486ee2018-07-06 12:36:57 +053039 <b>{{ doc.supplier_name}}</b>
Rushabh Mehtadbb51542017-08-10 21:06:09 +053040{% else %}
Manas Solankida486ee2018-07-06 12:36:57 +053041 <b>{{ doc.customer_name}}</b>
Rushabh Mehtadbb51542017-08-10 21:06:09 +053042{% endif %}
43{% if doc.contact_display %}
44 <br>
45 {{ doc.contact_display }}
46{% endif %}
47</p>
48
Rushabh Mehta156ce602015-09-11 18:49:59 +053049{% if doc._header %}
50{{ doc._header }}
51{% endif %}
52
53<div class="order-container">
54
Manas Solankida486ee2018-07-06 12:36:57 +053055 <!-- items -->
56 <div class="order-item-table">
57 <div class="row order-items order-item-header text-muted">
58 <div class="col-sm-6 col-xs-6 h6 text-uppercase">
59 {{ _("Item") }}
60 </div>
61 <div class="col-sm-3 col-xs-3 text-right h6 text-uppercase">
62 {{ _("Quantity") }}
63 </div>
64 <div class="col-sm-3 col-xs-3 text-right h6 text-uppercase">
65 {{ _("Amount") }}
66 </div>
67 </div>
68 {% for d in doc.items %}
69 <div class="row order-items">
70 <div class="col-sm-6 col-xs-6">
71 {{ item_name_and_description(d) }}
72 </div>
73 <div class="col-sm-3 col-xs-3 text-right">
74 {{ d.qty }}
75 {% if d.delivered_qty is defined and d.delivered_qty != None %}
Faris Ansari853d3fd2019-01-23 16:34:22 +053076 <p class="text-muted small">{{ _("Delivered") }}&nbsp;{{ d.delivered_qty }}</p>
Manas Solankida486ee2018-07-06 12:36:57 +053077 {% endif %}
78 </div>
79 <div class="col-sm-3 col-xs-3 text-right">
80 {{ d.get_formatted("amount") }}
Faris Ansari853d3fd2019-01-23 16:34:22 +053081 <p class="text-muted small">{{ _("Rate:") }}&nbsp;{{ d.get_formatted("rate") }}</p>
Manas Solankida486ee2018-07-06 12:36:57 +053082 </div>
83 </div>
84 {% endfor %}
85 </div>
Rushabh Mehta156ce602015-09-11 18:49:59 +053086
Manas Solankida486ee2018-07-06 12:36:57 +053087 <!-- taxes -->
88 <div class="order-taxes row">
89 <div class="col-sm-6"><!-- empty --></div>
90 <div class="col-sm-6 text-right">
91 {% include "erpnext/templates/includes/order/order_taxes.html" %}
92 </div>
93 </div>
Rushabh Mehta156ce602015-09-11 18:49:59 +053094</div>
95
Manas Solankida486ee2018-07-06 12:36:57 +053096{% if enabled_checkout and ((doc.doctype=="Sales Order" and doc.per_billed <= 0)
97 or (doc.doctype=="Sales Invoice" and doc.outstanding_amount > 0)) %}
98
99<div class="panel panel-default">
100 <div class="panel-heading">
101 <div class="row">
102 <div class="form-column col-sm-6 address-title">
103 <strong>Payment</strong>
Saurabh0a0c7872016-01-04 17:37:54 +0530104 </div>
Manas Solankida486ee2018-07-06 12:36:57 +0530105 </div>
Saurabh0a0c7872016-01-04 17:37:54 +0530106 </div>
Manas Solankida486ee2018-07-06 12:36:57 +0530107 <div class="panel-collapse">
108 <div class="panel-body text-muted small">
109 <div class="row">
110 <div class="form-column col-sm-6">
111 {% if available_loyalty_points %}
112 <div class="form-group">
113 <div class="h6">Enter Loyalty Points</div>
114 <div class="control-input-wrapper">
115 <div class="control-input">
116 <input class="form-control" type="number" min="0" max="{{ available_loyalty_points }}" id="loyalty-point-to-redeem">
117 </div>
118 <p class="help-box small text-muted hidden-xs"> Available Points: {{ available_loyalty_points }} </p>
119 </div>
120 </div>
121 {% endif %}
122 </div>
123
124 <div class="form-column col-sm-6">
125 <div id="loyalty-points-status" style="text-align: right"></div>
126 <div class="page-header-actions-block" data-html-block="header-actions">
127 <p>
128 <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"
129 class="btn btn-primary btn-sm" id="pay-for-order">{{ _("Pay") }} {{ doc.get_formatted("grand_total") }} </a>
130 </p>
131 </div>
132 </div>
133
134 </div>
135
136 </div>
137 </div>
138</div>
139{% endif %}
140
Rushabh Mehtadbb51542017-08-10 21:06:09 +0530141
Charles-Henri Decultot2de1cd32017-05-19 12:34:10 +0200142{% if attachments %}
143<div class="order-item-table">
144 <div class="row order-items order-item-header text-muted">
145 <div class="col-sm-12 h6 text-uppercase">
146 {{ _("Attachments") }}
147 </div>
148 </div>
149 <div class="row order-items">
150 <div class="col-sm-12">
151 {% for attachment in attachments %}
152 <p class="small">
153 <a href="{{ attachment.file_url }}" target="blank"> {{ attachment.file_name }} </a>
154 </p>
155 {% endfor %}
156 </div>
157 </div>
Saurabh276d3e62015-12-31 13:26:36 +0530158</div>
Charles-Henri Decultot2de1cd32017-05-19 12:34:10 +0200159{% endif %}
160</div>
Rushabh Mehtadbb51542017-08-10 21:06:09 +0530161{% if doc.terms %}
162<div class="terms-and-condition text-muted small">
Manas Solankida486ee2018-07-06 12:36:57 +0530163 <hr><p>{{ doc.terms }}</p>
Rushabh Mehtadbb51542017-08-10 21:06:09 +0530164</div>
165{% endif %}
Rushabh Mehta156ce602015-09-11 18:49:59 +0530166{% endblock %}
Manas Solankida486ee2018-07-06 12:36:57 +0530167
168{% block script %}
169 <script> {% include "templates/pages/order.js" %} </script>
170 <script>
171 window.doc_info = {
172 customer: '{{doc.customer}}',
173 doctype: '{{ doc.doctype }}',
174 doctype_name: '{{ doc.name }}',
175 grand_total: '{{ doc.grand_total }}',
176 currency: '{{ doc.currency }}'
177 }
178 </script>
179{% endblock %}