diff --git a/erpnext/public/scss/shopping_cart.scss b/erpnext/public/scss/shopping_cart.scss index e07bcbd28ec..429f4ca35df 100644 --- a/erpnext/public/scss/shopping_cart.scss +++ b/erpnext/public/scss/shopping_cart.scss @@ -459,6 +459,7 @@ body.product-page { min-height: 0px; .r-item-image { + min-height: 100px; width: 40%; .r-product-image { @@ -480,6 +481,7 @@ body.product-page { .r-item-info { font-size: 14px; padding-right: 0; + padding-left: 10px; width: 60%; a { @@ -672,18 +674,6 @@ body.product-page { img { max-height: 112px; } - - .no-image-cart-item { - max-height: 112px; - display: flex; justify-content: center; - background-color: var(--gray-200); - align-items: center; - color: var(--gray-400); - margin-top: .15rem; - border-radius: 6px; - height: 100%; - font-size: 24px; - } } .cart-items { @@ -862,6 +852,18 @@ body.product-page { } } +.no-image-cart-item { + max-height: 112px; + display: flex; justify-content: center; + background-color: var(--gray-200); + align-items: center; + color: var(--gray-400); + margin-top: .15rem; + border-radius: 6px; + height: 100%; + font-size: 24px; +} + .cart-empty.frappe-card { min-height: 76vh; @include flex(flex, center, center, column); diff --git a/erpnext/templates/includes/order/order_macros.html b/erpnext/templates/includes/order/order_macros.html index 7b3c9a41318..3f2c1f2a1df 100644 --- a/erpnext/templates/includes/order/order_macros.html +++ b/erpnext/templates/includes/order/order_macros.html @@ -1,43 +1,49 @@ -{% from "erpnext/templates/includes/macros.html" import product_image_square %} +{% from "erpnext/templates/includes/macros.html" import product_image %} {% macro item_name_and_description(d) %} -
-
-
- {{ product_image_square(d.thumbnail or d.image) }} -
-
-
- {{ d.item_code }} -
+
+
+
+ {% if d.thumbnail or d.image %} + {{ product_image(d.thumbnail or d.image, no_border=True) }} + {% else %} +
+ {{ frappe.utils.get_abbr(d.item_name) or "NA" }} +
+ {% endif %} +
+
+
+ {{ d.item_code }} +
{{ html2text(d.description) | truncate(140) }}
-
-
+
+
{% endmacro %} {% macro item_name_and_description_cart(d) %} -
-
-
- {{ product_image_square(d.thumbnail or d.image) }} -
-
-
- {{ d.item_name|truncate(25) }} -
- - - - - - - +
+
+
+ {{ product_image_square(d.thumbnail or d.image) }}
-
-
+
+
+ {{ d.item_name|truncate(25) }} +
+ + + + + + + +
+
+
{% endmacro %} diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index 19191d89096..a10870db278 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -12,175 +12,173 @@ {% endblock %} {% block header_actions %} - - + {% endblock %} {% block page_content %} - -
-
- - {% if doc.doctype == "Quotation" and not doc.docstatus %} - {{ _("Pending") }} - {% else %} - {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }} - {% endif %} - -
-
- {{ frappe.utils.format_date(doc.transaction_date, 'medium') }} - {% if doc.valid_till %} -

- {{ _("Valid Till") }}: {{ frappe.utils.format_date(doc.valid_till, 'medium') }} -

- {% endif %} -
-
- -

- {%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase Order'] else doc.customer_name %} - {{ party_name }} - - {% if doc.contact_display and doc.contact_display != party_name %} -
- {{ doc.contact_display }} - {% endif %} -

- -{% if doc._header %} -{{ doc._header }} -{% endif %} - -
- - - - - - - - - {% for d in doc.items %} - - - - - - {% endfor %} - -
- {{ _("Item") }} - - {{ _("Quantity") }} - - {{ _("Amount") }} -
- {{ item_name_and_description(d) }} - - {{ d.qty }} - {% if d.delivered_qty is defined and d.delivered_qty != None %} -

{{ _("Delivered") }} {{ d.delivered_qty }}

+
+
+ + {% if doc.doctype == "Quotation" and not doc.docstatus %} + {{ _("Pending") }} + {% else %} + {{ _(doc.get('indicator_title')) or _(doc.status) or _("Submitted") }} {% endif %} -
- {{ d.get_formatted("amount") }} -

{{ _("Rate:") }} {{ d.get_formatted("rate") }}

-
- -
- - {% include "erpnext/templates/includes/order/order_taxes.html" %} -
-
-
- -{% if enabled_checkout and ((doc.doctype=="Sales Order" and doc.per_billed <= 0) - or (doc.doctype=="Sales Invoice" and doc.outstanding_amount > 0)) %} - -
-
-
-
- Payment -
+
-
-
-
-
-
- {% if available_loyalty_points %} -
-
Enter Loyalty Points
-
-
- -
-

Available Points: {{ available_loyalty_points }}

-
-
- {% endif %} -
- - - -
- -
-
-
-{% endif %} - - -{% if attachments %} -
-
-
- {{ _("Attachments") }} -
-
-
-
- {% for attachment in attachments %} -

- {{ attachment.file_name }} +

+ {{ frappe.utils.format_date(doc.transaction_date, 'medium') }} + {% if doc.valid_till %} +

+ {{ _("Valid Till") }}: {{ frappe.utils.format_date(doc.valid_till, 'medium') }}

- {% endfor %} + {% endif %}
-
-{% endif %} -
-{% if doc.terms %} -
-

{{ doc.terms }}

-
-{% endif %} + +

+ {%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase Order'] else doc.customer_name %} + {{ party_name }} + + {% if doc.contact_display and doc.contact_display != party_name %} +
+ {{ doc.contact_display }} + {% endif %} +

+ + {% if doc._header %} + {{ doc._header }} + {% endif %} + +
+ + + + + + + + + {% for d in doc.items %} + + + + + + {% endfor %} + +
+ {{ _("Item") }} + + {{ _("Quantity") }} + + {{ _("Amount") }} +
+ {{ item_name_and_description(d) }} + + {{ d.qty }} + {% if d.delivered_qty is defined and d.delivered_qty != None %} +

{{ _("Delivered") }} {{ d.delivered_qty }}

+ {% endif %} +
+ {{ d.get_formatted("amount") }} +

{{ _("Rate:") }} {{ d.get_formatted("rate") }}

+
+ +
+ + {% include "erpnext/templates/includes/order/order_taxes.html" %} +
+
+
+ + {% if enabled_checkout and ((doc.doctype=="Sales Order" and doc.per_billed <= 0) + or (doc.doctype=="Sales Invoice" and doc.outstanding_amount > 0)) %} +
+
+
+
+ Payment +
+
+
+
+
+
+
+ {% if available_loyalty_points %} +
+
Enter Loyalty Points
+
+
+ +
+

Available Points: {{ available_loyalty_points }}

+
+
+ {% endif %} +
+ + + +
+ +
+
+
+ {% endif %} + + + {% if attachments %} +
+
+
+ {{ _("Attachments") }} +
+
+
+
+ {% for attachment in attachments %} +

+ {{ attachment.file_name }} +

+ {% endfor %} +
+
+
+ {% endif %} +
+ + {% if doc.terms %} +
+

{{ doc.terms }}

+
+ {% endif %} {% endblock %} {% block script %}