From b34ba6bd6e479db98555d636a81ad23b745bc082 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 1 Sep 2016 18:01:27 +0530 Subject: [PATCH] [RFQ] Web form alignment issue --- erpnext/templates/includes/rfq.js | 6 ++++-- erpnext/templates/includes/rfq/rfq_items.html | 16 ++++++++-------- erpnext/templates/pages/rfq.html | 12 ++++++------ 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/erpnext/templates/includes/rfq.js b/erpnext/templates/includes/rfq.js index 3e9c261a20..c63226c9bd 100644 --- a/erpnext/templates/includes/rfq.js +++ b/erpnext/templates/includes/rfq.js @@ -30,9 +30,10 @@ rfq = Class.extend({ var me = this; $('.rfq-items').on("change", ".rfq-qty", function(){ me.idx = parseFloat($(this).attr('data-idx')); - me.qty = parseFloat($(this).val()); + me.qty = parseFloat($(this).val()) || 0; me.rate = parseFloat($(repl('.rfq-rate[data-idx=%(idx)s]',{'idx': me.idx})).val()); me.update_qty_rate(); + $(this).val(format_number(me.qty, 2)); }) }, @@ -40,9 +41,10 @@ rfq = Class.extend({ var me = this; $(".rfq-items").on("change", ".rfq-rate", function(){ me.idx = parseFloat($(this).attr('data-idx')); - me.rate = parseFloat($(this).val()); + me.rate = parseFloat($(this).val()) || 0; me.qty = parseFloat($(repl('.rfq-qty[data-idx=%(idx)s]',{'idx': me.idx})).val()); me.update_qty_rate(); + $(this).val(format_number(me.rate, 2)); }) }, diff --git a/erpnext/templates/includes/rfq/rfq_items.html b/erpnext/templates/includes/rfq/rfq_items.html index 1e99a7671b..cb77f7eea5 100644 --- a/erpnext/templates/includes/rfq/rfq_items.html +++ b/erpnext/templates/includes/rfq/rfq_items.html @@ -3,26 +3,26 @@ {% for d in doc.items %}
-
+
{{ item_name_and_description(d, doc) }}
-
- +

- {{_("UOM") + ": "+ d.uom}} + {{_("UOM") + ":"+ d.uom}}

-
- {{doc.currency_symbol}} +
-
+
{{doc.currency_symbol}} 0.00
diff --git a/erpnext/templates/pages/rfq.html b/erpnext/templates/pages/rfq.html index 5729e89d40..b151987052 100644 --- a/erpnext/templates/pages/rfq.html +++ b/erpnext/templates/pages/rfq.html @@ -33,16 +33,16 @@
-
+
Items
-
+
Qty
-
+
Rate
-
+
Amount
@@ -55,8 +55,8 @@
{% if doc.items %}
-
{{ _("Grand Total") }}
-
+
{{ _("Grand Total") }}
+
{{doc.currency_symbol}} 0.0