update addorder and mem_action for additional para
This commit is contained in:
@@ -886,27 +886,33 @@ $(function() {
|
||||
|
||||
$('.keypress_qty').keyup(function(e){
|
||||
|
||||
id = $(this).attr('id');
|
||||
id = $(this).attr('id');
|
||||
value = $(this).val();
|
||||
$('.change_qty').attr('value',value);
|
||||
if (id=="count") {
|
||||
price = $("#unit_price").text();
|
||||
$("#total_price").text(value*price);
|
||||
}else{
|
||||
var item_row = $('.selected-instance');
|
||||
price = $("#set_unit_price").text();
|
||||
set_total_price = $("#set_total_price").text();
|
||||
$(".set_change_qty").val(value);
|
||||
if (item_row.length > 1) {
|
||||
total = 0 ;
|
||||
$(item_row).each(function(i){
|
||||
total += value * $(item_row[i]).attr('data-price');
|
||||
total_price = total;
|
||||
});
|
||||
|
||||
if ($.isNumeric(value)) {
|
||||
$('.change_qty').attr('value',value);
|
||||
if (id=="count") {
|
||||
price = $("#unit_price").text();
|
||||
$("#total_price").text(value*price);
|
||||
}else{
|
||||
total_price = value*price;
|
||||
var item_row = $('.selected-instance');
|
||||
price = $("#set_unit_price").text();
|
||||
set_total_price = $("#set_total_price").text();
|
||||
$(".set_change_qty").val(value);
|
||||
if (item_row.length > 1) {
|
||||
total = 0 ;
|
||||
$(item_row).each(function(i){
|
||||
total += value * $(item_row[i]).attr('data-price');
|
||||
total_price = total;
|
||||
});
|
||||
}else{
|
||||
total_price = value*price;
|
||||
}
|
||||
$("#set_total_price").text(total_price);
|
||||
}
|
||||
$("#set_total_price").text(total_price);
|
||||
}else{
|
||||
$('#'+id).val(1);
|
||||
swal("Opps","Please enter number for qty","warning");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -72,6 +72,6 @@ class Settings::MembershipActionsController < ApplicationController
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def settings_membership_action_params
|
||||
params.require(:membership_action).permit(:membership_type, :is_active, :gateway_communication_type, :gateway_url, :auth_token, :merchant_account_id, :created_by, :additional_parameter)
|
||||
params.require(:membership_action).permit(:membership_type, :is_active, :gateway_communication_type, :gateway_url, :auth_token, :merchant_account_id, :created_by)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -71,6 +71,6 @@ class Settings::ShopsController < ApplicationController
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def shop_params
|
||||
params.require(:shop).permit(:name,:address,:city,:township,:state,:country,:phone_no,:reservation_no,:license,:activated_at,:license_data,:base_currency,:cloud_token,:cloud_url,:owner_token,:id_prefix,:is_rounding_adj,:quick_sale_summary,:calc_tax_order)
|
||||
params.require(:shop).permit(:name,:address,:city,:township,:state,:country,:phone_no,:reservation_no,:license,:activated_at,:license_data,:base_currency,:cloud_token,:cloud_url,:owner_token,:id_prefix,:is_rounding_adj,:quick_sale_summary,:calc_tax_order,:show_account_info)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
</button>
|
||||
</span>
|
||||
<input type="number" value="1" id="count" class="change_qty keypress_qty form-control col-md-12 ">
|
||||
<input type="text" value="1" id="count" class="change_qty keypress_qty form-control col-md-12 ">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-success btn-number" value="+" id="plus">
|
||||
<i class="material-icons">add</i>
|
||||
@@ -214,7 +214,7 @@
|
||||
<i class="material-icons">remove</i>
|
||||
</button>
|
||||
</span>
|
||||
<input type="number" value="1" id="set_count" class="set_change_qty keypress_qty form-control col-md-12 ">
|
||||
<input type="text" value="1" id="set_count" class="set_change_qty keypress_qty form-control col-md-12 ">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-success btn-number" value="+" id="set_plus">
|
||||
<i class="material-icons">add</i>
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<%= f.input :gateway_url %>
|
||||
<%= f.input :auth_token %>
|
||||
<%= f.input :merchant_account_id %>
|
||||
<%= f.input :additional_parameter, as: :text %>
|
||||
<%= f.input :created_by %>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user