update jade integration

This commit is contained in:
Aung Myo
2017-08-23 19:46:00 +06:30
parent 0c89b09249
commit 07b13d8f87
7 changed files with 130 additions and 17 deletions

View File

@@ -22,6 +22,7 @@
<%= form_tag path, :id => "filter_form", :method => :get do %>
<div class="input-append col-md-7 form-group pull-left">
<input type="text" name="filter" style="margin-right:10px" id="search" placeholder="Search" class="form-control input-sm col-md-9">
<input type="hidden" name="type" id="type" value="">
<button type="submit" class="btn btn-primary btn-sm">Search</button>
</div>
<% end %>
@@ -258,9 +259,14 @@
$.ajax({
type: "POST",
url: "get_customer" ,
data: { filter : customer_mamber_card_no },
data: { filter : customer_mamber_card_no ,type :"card"},
dataType: "json",
success: function(data) {
success: function(data) {
if (data.status == false) {
alert(data.message)
}
customer_id = data[0].customer_id;
customer_name = data[0].name;
update_sale(customer_id, customer_name,sale_id);
@@ -282,6 +288,7 @@
if(cardNo.length == 16){
$("#paypar_account_no").val(cardNo);
$("#search").val(cardNo);
$("#type").val("card")
}
}