Anand Doshi | 1947b17 | 2016-03-23 12:12:38 +0530 | [diff] [blame] | 1 | {% extends "templates/web.html" %} |
rohitwaghchaure | 2851a41 | 2023-10-18 16:31:35 +0530 | [diff] [blame] | 2 | {% from "erpnext/templates/includes/macros.html" import product_image %} |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 3 | |
Saurabh | df2783d | 2016-01-06 15:21:21 +0530 | [diff] [blame] | 4 | {% block breadcrumbs %} |
| 5 | {% include "templates/includes/breadcrumbs.html" %} |
| 6 | {% endblock %} |
| 7 | |
Summayya Hashmani | da43a5e | 2022-10-04 09:57:07 +0530 | [diff] [blame] | 8 | {% block title %} |
| 9 | {{ doc.name }} |
| 10 | {% endblock %} |
Rushabh Mehta | a334062 | 2016-06-23 18:25:50 +0530 | [diff] [blame] | 11 | |
Rushabh Mehta | dbb5154 | 2017-08-10 21:06:09 +0530 | [diff] [blame] | 12 | {% block header %} |
Summayya Hashmani | da43a5e | 2022-10-04 09:57:07 +0530 | [diff] [blame] | 13 | <h3 class="m-0">{{ doc.name }}</h3> |
Rushabh Mehta | dbb5154 | 2017-08-10 21:06:09 +0530 | [diff] [blame] | 14 | {% endblock %} |
| 15 | |
| 16 | {% block header_actions %} |
Summayya Hashmani | da43a5e | 2022-10-04 09:57:07 +0530 | [diff] [blame] | 17 | <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 Anand | ae7be84 | 2024-01-30 17:24:59 +0530 | [diff] [blame] | 37 | {% 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 %} |
marination | 3a32596 | 2021-10-27 10:57:48 +0530 | [diff] [blame] | 49 | </div> |
Rushabh Mehta | dbb5154 | 2017-08-10 21:06:09 +0530 | [diff] [blame] | 50 | {% endblock %} |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 51 | |
Rushabh Mehta | 51008f2 | 2016-01-01 17:23:12 +0530 | [diff] [blame] | 52 | {% block page_content %} |
Summayya Hashmani | da43a5e | 2022-10-04 09:57:07 +0530 | [diff] [blame] | 53 | <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> |
Anupam | a4df105 | 2020-09-24 13:21:54 +0530 | [diff] [blame] | 61 | {% endif %} |
Summayya Hashmani | da43a5e | 2022-10-04 09:57:07 +0530 | [diff] [blame] | 62 | </div> |
Manas Solanki | da486ee | 2018-07-06 12:36:57 +0530 | [diff] [blame] | 63 | </div> |
Summayya Hashmani | da43a5e | 2022-10-04 09:57:07 +0530 | [diff] [blame] | 64 | <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") }} |
marination | 3a32596 | 2021-10-27 10:57:48 +0530 | [diff] [blame] | 71 | {% endif %} |
Summayya Hashmani | da43a5e | 2022-10-04 09:57:07 +0530 | [diff] [blame] | 72 | </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=""> |
marination | 3a32596 | 2021-10-27 10:57:48 +0530 | [diff] [blame] | 128 | {% include "erpnext/templates/includes/order/order_taxes.html" %} |
Summayya Hashmani | da43a5e | 2022-10-04 09:57:07 +0530 | [diff] [blame] | 129 | </div> |
marination | 3a32596 | 2021-10-27 10:57:48 +0530 | [diff] [blame] | 130 | </div> |
| 131 | </div> |
| 132 | |
marination | 3a32596 | 2021-10-27 10:57:48 +0530 | [diff] [blame] | 133 | {% 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 %} |
marination | 3a32596 | 2021-10-27 10:57:48 +0530 | [diff] [blame] | 151 | |
| 152 | {% if doc.terms %} |
| 153 | <div class="terms-and-condition text-muted small"> |
Summayya Hashmani | da43a5e | 2022-10-04 09:57:07 +0530 | [diff] [blame] | 154 | <hr> |
| 155 | <p>{{ doc.terms }}</p> |
marination | 3a32596 | 2021-10-27 10:57:48 +0530 | [diff] [blame] | 156 | </div> |
| 157 | {% endif %} |
Rushabh Mehta | 156ce60 | 2015-09-11 18:49:59 +0530 | [diff] [blame] | 158 | {% endblock %} |
Manas Solanki | da486ee | 2018-07-06 12:36:57 +0530 | [diff] [blame] | 159 | |
rohitwaghchaure | 2851a41 | 2023-10-18 16:31:35 +0530 | [diff] [blame] | 160 | {% 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 %} |