blob: a10870db27871dbb4a968596f1b5a49ecd524d5f [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 %}
prssanna74feaf82021-01-27 17:41:15 +053011 <h2 class="m-0">{{ doc.name }}</h2>
Rushabh Mehtadbb51542017-08-10 21:06:09 +053012{% endblock %}
13
14{% block header_actions %}
marination3a325962021-10-27 10:57:48 +053015 <div class="dropdown">
16 <button class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
17 <span class="font-md">{{ _('Actions') }}</span>
18 <b class="caret"></b>
19 </button>
20 <ul class="dropdown-menu dropdown-menu-right" role="menu">
21 {% if doc.doctype == 'Purchase Order' %}
22 <a class="dropdown-item" href="/api/method/erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice_from_portal?purchase_order_name={{ doc.name }}" data-action="make_purchase_invoice">{{ _("Make Purchase Invoice") }}</a>
23 {% endif %}
24 <a class="dropdown-item" href='/printview?doctype={{ doc.doctype}}&name={{ doc.name }}&format={{ print_format }}'
25 target="_blank" rel="noopener noreferrer">
26 {{ _("Print") }}
27 </a>
28 </ul>
29 </div>
Rushabh Mehtadbb51542017-08-10 21:06:09 +053030{% endblock %}
Rushabh Mehta156ce602015-09-11 18:49:59 +053031
Rushabh Mehta51008f22016-01-01 17:23:12 +053032{% block page_content %}
marination3a325962021-10-27 10:57:48 +053033 <div class="row transaction-subheading">
34 <div class="col-6">
35 <span class="font-md indicator-pill {{ doc.indicator_color or ("blue" if doc.docstatus==1 else "darkgrey") }}">
36 {% if doc.doctype == "Quotation" and not doc.docstatus %}
37 {{ _("Pending") }}
38 {% else %}
39 {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }}
Anupama4df1052020-09-24 13:21:54 +053040 {% endif %}
marination3a325962021-10-27 10:57:48 +053041 </span>
Manas Solankida486ee2018-07-06 12:36:57 +053042 </div>
marination3a325962021-10-27 10:57:48 +053043 <div class="col-6 text-muted text-right small pt-3">
44 {{ frappe.utils.format_date(doc.transaction_date, 'medium') }}
45 {% if doc.valid_till %}
46 <p>
47 {{ _("Valid Till") }}: {{ frappe.utils.format_date(doc.valid_till, 'medium') }}
Charles-Henri Decultot2de1cd32017-05-19 12:34:10 +020048 </p>
marination3a325962021-10-27 10:57:48 +053049 {% endif %}
Charles-Henri Decultot2de1cd32017-05-19 12:34:10 +020050 </div>
51 </div>
marination3a325962021-10-27 10:57:48 +053052
53 <p class="small my-3">
54 {%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase Order'] else doc.customer_name %}
55 <b>{{ party_name }}</b>
56
57 {% if doc.contact_display and doc.contact_display != party_name %}
58 <br>
59 {{ doc.contact_display }}
60 {% endif %}
61 </p>
62
63 {% if doc._header %}
64 {{ doc._header }}
65 {% endif %}
66
67 <div class="order-container">
68 <!-- items -->
69 <table class="order-item-table w-100 table">
70 <thead class="order-items order-item-header">
71 <th width="60%">
72 {{ _("Item") }}
73 </th>
74 <th width="20%" class="text-right">
75 {{ _("Quantity") }}
76 </th>
77 <th width="20%" class="text-right">
78 {{ _("Amount") }}
79 </th>
80 </thead>
81 <tbody>
82 {% for d in doc.items %}
83 <tr class="order-items">
84 <td>
85 {{ item_name_and_description(d) }}
86 </td>
87 <td class="text-right">
88 {{ d.qty }}
89 {% if d.delivered_qty is defined and d.delivered_qty != None %}
90 <p class="text-muted small">{{ _("Delivered") }}&nbsp;{{ d.delivered_qty }}</p>
91 {% endif %}
92 </td>
93 <td class="text-right">
94 {{ d.get_formatted("amount") }}
95 <p class="text-muted small">{{ _("Rate:") }}&nbsp;{{ d.get_formatted("rate") }}</p>
96 </td>
97 </tr>
98 {% endfor %}
99 </tbody>
100 </table>
101 <!-- taxes -->
102 <div class="order-taxes d-flex justify-content-end">
103 <table>
104 {% include "erpnext/templates/includes/order/order_taxes.html" %}
105 </table>
106 </div>
107 </div>
108
109 {% if enabled_checkout and ((doc.doctype=="Sales Order" and doc.per_billed <= 0)
110 or (doc.doctype=="Sales Invoice" and doc.outstanding_amount > 0)) %}
111 <div class="panel panel-default">
112 <div class="panel-heading">
113 <div class="row">
114 <div class="form-column col-sm-6 address-title">
115 <strong>Payment</strong>
116 </div>
117 </div>
118 </div>
119 <div class="panel-collapse">
120 <div class="panel-body text-muted small">
121 <div class="row">
122 <div class="form-column col-sm-6">
123 {% if available_loyalty_points %}
124 <div class="form-group">
125 <div class="h6">Enter Loyalty Points</div>
126 <div class="control-input-wrapper">
127 <div class="control-input">
128 <input class="form-control" type="number" min="0" max="{{ available_loyalty_points }}" id="loyalty-point-to-redeem">
129 </div>
130 <p class="help-box small text-muted d-none d-sm-block"> Available Points: {{ available_loyalty_points }} </p>
131 </div>
132 </div>
133 {% endif %}
134 </div>
135
136 <div class="form-column col-sm-6">
137 <div id="loyalty-points-status" style="text-align: right"></div>
138 <div class="page-header-actions-block" data-html-block="header-actions">
139 <p class="mt-2" style="float: right;">
140 <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"
141 class="btn btn-primary btn-sm"
142 id="pay-for-order">
143 {{ _("Pay") }} {{ doc.get_formatted("grand_total") }}
144 </a>
145 </p>
146 </div>
147 </div>
148
149 </div>
150
151 </div>
152 </div>
153 </div>
154 {% endif %}
155
156
157 {% if attachments %}
158 <div class="order-item-table">
159 <div class="row order-items order-item-header text-muted">
160 <div class="col-sm-12 h6 text-uppercase">
161 {{ _("Attachments") }}
162 </div>
163 </div>
164 <div class="row order-items">
165 <div class="col-sm-12">
166 {% for attachment in attachments %}
167 <p class="small">
168 <a href="{{ attachment.file_url }}" target="blank"> {{ attachment.file_name }} </a>
169 </p>
170 {% endfor %}
171 </div>
172 </div>
173 </div>
174 {% endif %}
175 </div>
176
177 {% if doc.terms %}
178 <div class="terms-and-condition text-muted small">
179 <hr><p>{{ doc.terms }}</p>
180 </div>
181 {% endif %}
Rushabh Mehta156ce602015-09-11 18:49:59 +0530182{% endblock %}
Manas Solankida486ee2018-07-06 12:36:57 +0530183
184{% block script %}
185 <script> {% include "templates/pages/order.js" %} </script>
186 <script>
187 window.doc_info = {
188 customer: '{{doc.customer}}',
189 doctype: '{{ doc.doctype }}',
190 doctype_name: '{{ doc.name }}',
191 grand_total: '{{ doc.grand_total }}',
192 currency: '{{ doc.currency }}'
193 }
194 </script>
Faris Ansari38ac7f72019-10-09 11:41:33 +0530195{% endblock %}