2021-10-21 14:44:28 +00:00
|
|
|
|
{% from "erpnext/templates/includes/macros.html" import product_image %}
|
2015-09-16 13:22:52 +00:00
|
|
|
|
|
|
|
|
|
{% macro item_name_and_description(d) %}
|
2021-10-21 14:44:28 +00:00
|
|
|
|
<div class="row item_name_and_description">
|
|
|
|
|
<div class="col-xs-4 col-sm-2 order-image-col">
|
2022-10-04 04:27:07 +00:00
|
|
|
|
<div class="order-image h-100">
|
2021-10-21 14:44:28 +00:00
|
|
|
|
{% if d.thumbnail or d.image %}
|
|
|
|
|
{{ product_image(d.thumbnail or d.image, no_border=True) }}
|
|
|
|
|
{% else %}
|
|
|
|
|
<div class="no-image-cart-item" style="min-height: 100px;">
|
|
|
|
|
{{ frappe.utils.get_abbr(d.item_name) or "NA" }}
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-xs-8 col-sm-10">
|
|
|
|
|
{{ d.item_code }}
|
|
|
|
|
<div class="text-muted small item-description">
|
2019-03-19 06:18:32 +00:00
|
|
|
|
{{ html2text(d.description) | truncate(140) }}
|
|
|
|
|
</div>
|
2022-10-04 04:27:07 +00:00
|
|
|
|
<span class="text-muted mt-2 d-l-n order-qty">
|
|
|
|
|
{{ _("Qty ") }}({{ d.get_formatted("qty") }})
|
|
|
|
|
</span>
|
2021-10-21 14:44:28 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2016-06-22 10:16:38 +00:00
|
|
|
|
{% endmacro %}
|
2016-11-14 07:43:53 +00:00
|
|
|
|
|
2016-06-22 10:16:38 +00:00
|
|
|
|
{% macro item_name_and_description_cart(d) %}
|
2021-10-21 14:44:28 +00:00
|
|
|
|
<div class="row item_name_dropdown">
|
|
|
|
|
<div class="col-xs-4 col-sm-4 order-image-col">
|
|
|
|
|
<div class="order-image">
|
|
|
|
|
{{ product_image_square(d.thumbnail or d.image) }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-xs-8 col-sm-8">
|
|
|
|
|
{{ d.item_name|truncate(25) }}
|
2016-06-22 10:16:38 +00:00
|
|
|
|
<div class="input-group number-spinner">
|
2021-10-21 14:44:28 +00:00
|
|
|
|
<span class="input-group-btn">
|
|
|
|
|
<button class="btn btn-light cart-btn" data-dir="dwn">
|
|
|
|
|
–</button>
|
|
|
|
|
</span>
|
|
|
|
|
<input class="form-control text-right cart-qty"
|
|
|
|
|
value = "{{ d.get_formatted('qty') }}"
|
|
|
|
|
data-item-code="{{ d.item_code }}">
|
|
|
|
|
<span class="input-group-btn">
|
|
|
|
|
<button class="btn btn-light cart-btn" data-dir="up">
|
|
|
|
|
+</button>
|
|
|
|
|
</span>
|
2016-06-22 10:16:38 +00:00
|
|
|
|
</div>
|
2021-10-21 14:44:28 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2016-06-22 10:21:42 +00:00
|
|
|
|
{% endmacro %}
|