blob: 6c59a9688dca59685f24f801b050b8054137e09b [file] [log] [blame]
Anand Doshi1947b172016-03-23 12:12:38 +05301{% extends "templates/web.html" %}
rohitwaghchaure2851a412023-10-18 16:31:35 +05302{% from "erpnext/templates/includes/macros.html" import product_image %}
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
Summayya Hashmanida43a5e2022-10-04 09:57:07 +05308{% block title %}
9 {{ doc.name }}
10{% endblock %}
Rushabh Mehtaa3340622016-06-23 18:25:50 +053011
Rushabh Mehtadbb51542017-08-10 21:06:09 +053012{% block header %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053013 <h3 class="m-0">{{ doc.name }}</h3>
Rushabh Mehtadbb51542017-08-10 21:06:09 +053014{% endblock %}
15
16{% block header_actions %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053017 <div class="row">
18 <div class="dropdown">
19 <button class="btn btn-sm btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
20 <span class="font-md">{{ _('Actions') }}</span>
21 <b class="caret"></b>
22 </button>
23 <ul class="dropdown-menu dropdown-menu-right" role="menu">
24 {% if doc.doctype == 'Purchase Order' and show_make_pi_button %}
25 <a class="dropdown-item"
26 href="/api/method/erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice_from_portal?purchase_order_name={{ doc.name }}"
27 data-action="make_purchase_invoice">{{ _("Make Purchase Invoice") }}
28 </a>
29 {% endif %}
30 <a class="dropdown-item"
31 href='/printview?doctype={{ doc.doctype}}&name={{ doc.name }}&format={{ print_format }}' target="_blank"
32 rel="noopener noreferrer">
33 {{ _("Print") }}
34 </a>
35 </ul>
36 </div>
Gursheen Anandae7be842024-01-30 17:24:59 +053037 {% if show_pay_button %}
38 <div class="form-column col-sm-6">
39 <div class="page-header-actions-block" data-html-block="header-actions">
40 <p>
41 <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"
42 class="btn btn-primary btn-sm" id="pay-for-order">
43 {{ _("Pay") }} {{doc.get_formatted("grand_total") }}
44 </a>
45 </p>
46 </div>
47 </div>
48 {% endif %}
marination3a325962021-10-27 10:57:48 +053049 </div>
Rushabh Mehtadbb51542017-08-10 21:06:09 +053050{% endblock %}
Rushabh Mehta156ce602015-09-11 18:49:59 +053051
Rushabh Mehta51008f22016-01-01 17:23:12 +053052{% block page_content %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053053 <div>
54 <div class="row transaction-subheading mt-1">
55 <div class="col-6 text-muted small mt-1">
56 {{ frappe.utils.format_date(doc.transaction_date, 'medium') }}
57 {% if doc.valid_till %}
58 <p>
59 {{ _("Valid Till") }}: {{ frappe.utils.format_date(doc.valid_till, 'medium') }}
60 </p>
Anupama4df1052020-09-24 13:21:54 +053061 {% endif %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053062 </div>
Manas Solankida486ee2018-07-06 12:36:57 +053063 </div>
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053064 <div class="row indicator-container mt-2">
65 <div class="col-10">
66 <span class="indicator-pill {{ doc.indicator_color or (" blue" if doc.docstatus==1 else "darkgrey" ) }}">
67 {% if doc.doctype == "Quotation" and not doc.docstatus %}
68 {{ _("Pending") }}
69 {% else %}
70 {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }}
marination3a325962021-10-27 10:57:48 +053071 {% endif %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +053072 </span>
73 </div>
74 <div class="text-right col-2">
75 {%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase
76 Order'] else doc.customer_name %}
77 <b>{{ party_name }}</b>
78
79 {% if doc.contact_display and doc.contact_display != party_name %}
80 <br>
81 {{ doc.contact_display }}
82 {% endif %}
83 </div>
84 </div>
85
86 {% if doc._header %}
87 {{ doc._header }}
88 {% endif %}
89
90 <div class="order-container mt-4">
91 <!-- items -->
92 <div class="w-100">
93 <div class="order-items order-item-header mb-1 row text-muted">
94 <span class="col-5">
95 {{ _("Item") }}
96 </span>
97 <span class="d-s-n col-3">
98 {{ _("Quantity") }}
99 </span>
100 <span class="col-2 pl-10">
101 {{ _("Rate") }}
102 </span>
103 <span class="col-2 text-right">
104 {{ _("Amount") }}
105 </span>
106 </div>
107 {% for d in doc.items %}
108 <div class="order-items row align-items-center">
109 <span class="order-item-name col-5 pr-0">
110 {{ item_name_and_description(d) }}
111 </span>
112
113 <span class="d-s-n col-3 pl-10">
114 {{ d.get_formatted("qty") }}
115 </span>
116 <span class="order-rate pl-4 col-2">
117 {{ d.get_formatted("rate") }}
118 </span>
119 <span class="col-2 text-right">
120 {{ d.get_formatted("amount") }}
121 </span>
122 </div>
123 {% endfor %}
124 </div>
125
126 <!-- taxes -->
127 <div class="">
marination3a325962021-10-27 10:57:48 +0530128 {% include "erpnext/templates/includes/order/order_taxes.html" %}
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530129 </div>
marination3a325962021-10-27 10:57:48 +0530130 </div>
131 </div>
132
marination3a325962021-10-27 10:57:48 +0530133 {% if attachments %}
134 <div class="order-item-table">
135 <div class="row order-items order-item-header text-muted">
136 <div class="col-sm-12 h6 text-uppercase">
137 {{ _("Attachments") }}
138 </div>
139 </div>
140 <div class="row order-items">
141 <div class="col-sm-12">
142 {% for attachment in attachments %}
143 <p class="small">
144 <a href="{{ attachment.file_url }}" target="blank"> {{ attachment.file_name }} </a>
145 </p>
146 {% endfor %}
147 </div>
148 </div>
149 </div>
150 {% endif %}
marination3a325962021-10-27 10:57:48 +0530151
152 {% if doc.terms %}
153 <div class="terms-and-condition text-muted small">
Summayya Hashmanida43a5e2022-10-04 09:57:07 +0530154 <hr>
155 <p>{{ doc.terms }}</p>
marination3a325962021-10-27 10:57:48 +0530156 </div>
157 {% endif %}
Rushabh Mehta156ce602015-09-11 18:49:59 +0530158{% endblock %}
Manas Solankida486ee2018-07-06 12:36:57 +0530159
rohitwaghchaure2851a412023-10-18 16:31:35 +0530160{% macro item_name_and_description(d) %}
161 <div class="row item_name_and_description">
162 <div class="col-xs-4 col-sm-2 order-image-col">
163 <div class="order-image h-100">
164 {% if d.thumbnail or d.image %}
165 {{ product_image(d.thumbnail or d.image, no_border=True) }}
166 {% else %}
167 <div class="no-image-cart-item" style="min-height: 100px;">
168 {{ frappe.utils.get_abbr(d.item_name) or "NA" }}
169 </div>
170 {% endif %}
171 </div>
172 </div>
173 <div class="col-xs-8 col-sm-10">
174 {{ d.item_code }}
175 <div class="text-muted small item-description">
176 {{ html2text(d.description) | truncate(140) }}
177 </div>
178 <span class="text-muted mt-2 d-l-n order-qty">
179 {{ _("Qty ") }}({{ d.get_formatted("qty") }})
180 </span>
181 </div>
182 </div>
183{% endmacro %}