fix: merge conflicts
diff --git a/erpnext/templates/includes/cart.js b/erpnext/templates/includes/cart.js
index 456bc7e..c6dfd35 100644
--- a/erpnext/templates/includes/cart.js
+++ b/erpnext/templates/includes/cart.js
@@ -26,15 +26,14 @@
bind_address_select: function() {
$(".cart-addresses").on('click', '.address-card', function(e) {
const $card = $(e.currentTarget);
- const address_fieldname = $card.closest('[data-fieldname]').attr('data-fieldname');
+ const address_type = $card.closest('[data-address-type]').attr('data-address-type');
const address_name = $card.closest('[data-address-name]').attr('data-address-name');
-
return frappe.call({
type: "POST",
method: "erpnext.shopping_cart.cart.update_cart_address",
freeze: true,
args: {
- address_fieldname,
+ address_type,
address_name
},
callback: function(r) {
diff --git a/erpnext/templates/includes/cart/cart_address.html b/erpnext/templates/includes/cart/cart_address.html
index f7f3548..60de3af 100644
--- a/erpnext/templates/includes/cart/cart_address.html
+++ b/erpnext/templates/includes/cart/cart_address.html
@@ -18,7 +18,7 @@
<h6 class="text-uppercase">{{ _("Shipping Address") }}</h6>
<div class="row no-gutters" data-fieldname="shipping_address_name">
{% for address in shipping_addresses %}
- <div class="mr-3 mb-3 w-25" data-address-name="{{address.name}}" {% if doc.shipping_address_name == address.name %} data-active {% endif %}>
+ <div class="mr-3 mb-3 w-25" data-address-name="{{address.name}}" data-address-type="shipping" {% if doc.shipping_address_name == address.name %} data-active {% endif %}>
{% include "templates/includes/cart/address_card.html" %}
</div>
{% endfor %}
@@ -28,7 +28,7 @@
<h6 class="text-uppercase">{{ _("Billing Address") }}</h6>
<div class="row no-gutters" data-fieldname="customer_address">
{% for address in billing_addresses %}
- <div class="mr-3 mb-3 w-25" data-address-name="{{address.name}}" {% if doc.customer_address == address.name %} data-active {% endif %}>
+ <div class="mr-3 mb-3 w-25" data-address-name="{{address.name}}" data-address-type="billing" {% if doc.customer_address == address.name %} data-active {% endif %}>
{% include "templates/includes/cart/address_card.html" %}
</div>
{% endfor %}
@@ -123,9 +123,19 @@
primary_action: (values) => {
frappe.call('erpnext.shopping_cart.cart.add_new_address', { doc: values })
.then(r => {
- d.hide();
- window.location.reload();
+ frappe.call({
+ method: "erpnext.shopping_cart.cart.update_cart_address",
+ args: {
+ address_type: r.message.address_type,
+ address_name: r.message.name
+ },
+ callback: function (r) {
+ d.hide();
+ window.location.reload();
+ }
+ });
});
+
}
})
diff --git a/erpnext/templates/includes/order/order_taxes.html b/erpnext/templates/includes/order/order_taxes.html
index 4a32aa4..ebec838 100644
--- a/erpnext/templates/includes/order/order_taxes.html
+++ b/erpnext/templates/includes/order/order_taxes.html
@@ -10,16 +10,16 @@
{% endif %}
{% for d in doc.taxes %}
-{% if d.base_tax_amount > 0 %}
-<tr>
- <td class="text-right" colspan="2">
- {{ d.description }}
- </td>
- <td class="text-right">
- {{ d.get_formatted("base_tax_amount") }}
- </td>
-</tr>
-{% endif %}
+ {% if d.base_tax_amount %}
+ <tr>
+ <td class="text-right" colspan="2">
+ {{ d.description }}
+ </td>
+ <td class="text-right">
+ {{ d.get_formatted("base_tax_amount") }}
+ </td>
+ </tr>
+ {% endif %}
{% endfor %}
{% if doc.doctype == 'Quotation' %}
diff --git a/erpnext/templates/pages/cart.html b/erpnext/templates/pages/cart.html
index 912702e..3033d15 100644
--- a/erpnext/templates/pages/cart.html
+++ b/erpnext/templates/pages/cart.html
@@ -12,16 +12,6 @@
{% block header_actions %}
-{% if doc.items and cart_settings.enable_checkout %}
-<button class="btn btn-primary btn-place-order" type="button">
- {{ _("Place Order") }}
-</button>
-{% endif %}
-{% if doc.items and not cart_settings.enable_checkout %}
-<button class="btn btn-primary btn-request-for-quotation" type="button">
- {{ _("Request for Quotation") }}
-</button>
-{% endif %}
{% endblock %}
{% block page_content %}
@@ -56,6 +46,20 @@
{% endif %}
{% if doc.items %}
+ <div class="place-order-container">
+ {% if cart_settings.enable_checkout %}
+ <button class="btn btn-primary btn-place-order" type="button">
+ {{ _("Place Order") }}
+ </button>
+ {% else %}
+ <button class="btn btn-primary btn-request-for-quotation" type="button">
+ {{ _("Request for Quotation") }}
+ </button>
+ {% endif %}
+ </div>
+ {% endif %}
+
+ {% if doc.items %}
{% if doc.tc_name %}
<div class="terms-and-conditions-link">
<a href class="link-terms-and-conditions" data-terms-name="{{ doc.tc_name }}">