[RFQ] Web form alignment issue
This commit is contained in:
parent
bb2bceef62
commit
b34ba6bd6e
@ -30,9 +30,10 @@ rfq = Class.extend({
|
|||||||
var me = this;
|
var me = this;
|
||||||
$('.rfq-items').on("change", ".rfq-qty", function(){
|
$('.rfq-items').on("change", ".rfq-qty", function(){
|
||||||
me.idx = parseFloat($(this).attr('data-idx'));
|
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.rate = parseFloat($(repl('.rfq-rate[data-idx=%(idx)s]',{'idx': me.idx})).val());
|
||||||
me.update_qty_rate();
|
me.update_qty_rate();
|
||||||
|
$(this).val(format_number(me.qty, 2));
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -40,9 +41,10 @@ rfq = Class.extend({
|
|||||||
var me = this;
|
var me = this;
|
||||||
$(".rfq-items").on("change", ".rfq-rate", function(){
|
$(".rfq-items").on("change", ".rfq-rate", function(){
|
||||||
me.idx = parseFloat($(this).attr('data-idx'));
|
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.qty = parseFloat($(repl('.rfq-qty[data-idx=%(idx)s]',{'idx': me.idx})).val());
|
||||||
me.update_qty_rate();
|
me.update_qty_rate();
|
||||||
|
$(this).val(format_number(me.rate, 2));
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3,26 +3,26 @@
|
|||||||
{% for d in doc.items %}
|
{% for d in doc.items %}
|
||||||
<div class="rfq-item">
|
<div class="rfq-item">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6 col-xs-6" style="margin-bottom: 10px;margin-top: 5px;">
|
<div class="col-sm-5 col-xs-12" style="margin-bottom: 10px;margin-top: 5px;">
|
||||||
{{ item_name_and_description(d, doc) }}
|
{{ item_name_and_description(d, doc) }}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-sm-2 col-xs-2" style="margin-bottom: 10px;">
|
<!-- <div class="col-sm-2 col-xs-2" style="margin-bottom: 10px;">
|
||||||
<textarea type="text" style="margin-top: 5px;" class="input-with-feedback form-control rfq-offer_detail" ></textarea>
|
<textarea type="text" style="margin-top: 5px;" class="input-with-feedback form-control rfq-offer_detail" ></textarea>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="col-sm-2 col-xs-2 text-right">
|
<div class="col-sm-2 col-xs-4 text-right">
|
||||||
<input type="number" class="form-control text-right rfq-qty" style="margin-top: 5px; max-width: 70px;display: inline-block"
|
<input type="text" class="form-control text-right rfq-qty" style="margin-top: 5px;display: inline-block"
|
||||||
value = "{{ d.get_formatted('qty') }}"
|
value = "{{ d.get_formatted('qty') }}"
|
||||||
data-idx="{{ d.idx }}">
|
data-idx="{{ d.idx }}">
|
||||||
<p class="text-muted small" style="margin-top: 10px;">
|
<p class="text-muted small" style="margin-top: 10px;">
|
||||||
{{_("UOM") + ": "+ d.uom}}
|
{{_("UOM") + ":"+ d.uom}}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2 col-xs-2 text-right">
|
<div class="col-sm-2 col-xs-4 text-right">
|
||||||
{{doc.currency_symbol}} <input type="number" class="form-control text-right rfq-rate"
|
<input type="text" class="form-control text-right rfq-rate"
|
||||||
style="margin-top: 5px; max-width: 70px;display: inline-block" value="0.00"
|
style="margin-top: 5px;display: inline-block" value="0.00"
|
||||||
data-idx="{{ d.idx }}">
|
data-idx="{{ d.idx }}">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2 col-xs-2 text-right" style="padding-top: 9px;">
|
<div class="col-sm-3 col-xs-4 text-right" style="padding-top: 9px;">
|
||||||
{{doc.currency_symbol}} <span class="rfq-amount" data-idx="{{ d.idx }}">0.00</span>
|
{{doc.currency_symbol}} <span class="rfq-amount" data-idx="{{ d.idx }}">0.00</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,16 +33,16 @@
|
|||||||
<div id="order-container">
|
<div id="order-container">
|
||||||
<div id="rfq-items">
|
<div id="rfq-items">
|
||||||
<div class="row cart-item-header">
|
<div class="row cart-item-header">
|
||||||
<div class="col-sm-6 col-xs-6">
|
<div class="col-sm-5 col-xs-12">
|
||||||
Items
|
Items
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2 col-xs-2 text-right">
|
<div class="col-sm-2 col-xs-4 text-right">
|
||||||
Qty
|
Qty
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2 col-xs-2 text-right">
|
<div class="col-sm-2 col-xs-4 text-right">
|
||||||
Rate
|
Rate
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2 col-xs-2 text-right">
|
<div class="col-sm-3 col-xs-4 text-right">
|
||||||
Amount
|
Amount
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -55,8 +55,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{% if doc.items %}
|
{% if doc.items %}
|
||||||
<div class="row grand-total-row">
|
<div class="row grand-total-row">
|
||||||
<div class="col-xs-10 text-right">{{ _("Grand Total") }}</div>
|
<div class="col-xs-9 text-right">{{ _("Grand Total") }}</div>
|
||||||
<div class="col-xs-2 text-right">
|
<div class="col-xs-3 text-right">
|
||||||
{{doc.currency_symbol}} <span class="tax-grand-total">0.0</span>
|
{{doc.currency_symbol}} <span class="tax-grand-total">0.0</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user