update feedback testing
This commit is contained in:
@@ -86,8 +86,8 @@ ruby 2.4.1p111
|
||||
|
||||
1. Layout
|
||||
|
||||
1. 2-Column => Main Content - col-9, Infomation - col-3
|
||||
2. 3-Column => Sub Lint - col-2, Main Content - col-7, Infomation - col-3
|
||||
1. 2-Column => Main Content - col-9, Information - col-3
|
||||
2. 3-Column => Sub Lint - col-2, Main Content - col-7, Information - col-3
|
||||
|
||||
> Pixel
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ $(document).on('turbolinks:load', function() {
|
||||
$("#completed_count").text(parseInt($("#completed_count").text()) + data.length);
|
||||
|
||||
swal({
|
||||
title: "Infomation !",
|
||||
title: "Information !",
|
||||
text: 'Order has been successfully created',
|
||||
confirmButtonColor: "green",
|
||||
confirmButtonText: "Yes!",
|
||||
|
||||
@@ -55,7 +55,7 @@ class HomeController < ApplicationController
|
||||
render :index
|
||||
end
|
||||
else
|
||||
redirect_to origami_root_path, :notice => "Username and Password dosn't match!"
|
||||
redirect_to origami_root_path, :notice => "Username and Password doesn't match!"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -13,7 +13,7 @@ class MenuItem < ApplicationRecord
|
||||
has_many :menu_item_sets
|
||||
has_many :item_sets, through: :menu_item_sets
|
||||
|
||||
validates_presence_of :name, :type, :min_qty, :taxable
|
||||
validates_presence_of :name, :type, :min_qty, :taxable,:account_id
|
||||
|
||||
default_scope { order('item_code asc') }
|
||||
|
||||
@@ -53,13 +53,12 @@ class MenuItem < ApplicationRecord
|
||||
end
|
||||
|
||||
def self.deleteRecursive(menu_item)
|
||||
|
||||
# find the sub menu item of current item
|
||||
sub_menu_items = MenuItem.where("menu_item_id=?",menu_item.id)
|
||||
sub_menu_items = MenuItem.where("id=?",menu_item.id)
|
||||
if sub_menu_items.length != 0
|
||||
sub_menu_items.each do |subitem|
|
||||
if deleteRecursive(subitem)
|
||||
end
|
||||
# if deleteRecursive(subitem)
|
||||
# end
|
||||
end
|
||||
# find the instances of current menu item
|
||||
instances = MenuItemInstance.where("menu_item_id=?",menu_item.id)
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h2>CREDIT PAYMENT</h2>
|
||||
</div>
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%=origami_root_path %>"><%= t :home %></a></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="/origami/sale/<%=@sale_id %>/payment"><%= t("views.btn.payment") %></a></li> -->
|
||||
<li class="breadcrumb-item active"><%= t("views.right_panel.details.credit") %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to t('.back',:default => t("views.btn.back")),'/origami/sale/'+@sale_id +'/payment'%>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-5 col-md-5 col-sm-3">
|
||||
<div class="card" style="margin-top:10px;padding-top:20px;">
|
||||
<div class="card m-t-10 p-l-20" style="padding-top:20px;">
|
||||
<div class="card-block">
|
||||
<div class="rebate-form">
|
||||
<!-- <div class="row"> -->
|
||||
@@ -104,10 +109,10 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<button type="button" class="btn bg-default m-l-10 btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment';"> Back </button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
@@ -163,14 +168,14 @@
|
||||
$('#credit_pay').on('click',function(){
|
||||
var amount = $('#amount').text();
|
||||
var sale_id = "<%= @sale_id %>";
|
||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value"))){
|
||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
|
||||
$.ajax({type: "POST",
|
||||
url: "<%= origami_payment_credit_path %>",
|
||||
data: "amount="+ amount + "&sale_id="+ sale_id,
|
||||
success:function(result){
|
||||
if(result){
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: "Payment Success",
|
||||
type: "success"
|
||||
}, function () {
|
||||
@@ -180,7 +185,11 @@
|
||||
}
|
||||
});
|
||||
}else{
|
||||
swal("Alert","Paid Amount is over!","error");
|
||||
if (amount>0) {
|
||||
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
||||
}else{
|
||||
swal ( "Oops" , "Enter Amount!" , "error" );
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -387,7 +387,7 @@
|
||||
success:function(result){
|
||||
$("#loading_wrapper").hide();
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: result.status,
|
||||
}, function () {
|
||||
if(result.table_type == "Table"){
|
||||
@@ -410,7 +410,7 @@
|
||||
// Selected Items
|
||||
var sale_items = get_selected_sale_items();
|
||||
if(sale_items.length == 0){
|
||||
//swal("Infomation!", "You have no selected item!");
|
||||
//swal("Information!", "You have no selected item!");
|
||||
swal ( "Oops" , "You have no selected item!" , "error" );
|
||||
}
|
||||
|
||||
@@ -430,7 +430,7 @@
|
||||
data: params,
|
||||
success: function(result){
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: result.status,
|
||||
type: "success",
|
||||
}, function () {
|
||||
@@ -453,7 +453,7 @@
|
||||
url: "/origami/" + sale_id + "/remove_all_discount",
|
||||
success: function(result){
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: result.status,
|
||||
type: "success",
|
||||
}, function () {
|
||||
@@ -497,7 +497,7 @@
|
||||
btn_color = 'red'
|
||||
}
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: result.status,
|
||||
confirmButtonText: 'OK',
|
||||
confirmButtonColor: btn_color,
|
||||
|
||||
@@ -507,7 +507,7 @@
|
||||
// data: 'order_id='+ order_id,
|
||||
success: function (result) {
|
||||
if (!result.status) {
|
||||
swal("Infomation!", result.error_message);
|
||||
swal("Information!", result.error_message);
|
||||
}
|
||||
else {
|
||||
location.reload();
|
||||
|
||||
@@ -158,7 +158,7 @@ $(document).on('click', '.cashier_number', function(event){
|
||||
$('#jcb_pay').on('click',function(){
|
||||
var amount = $('#amount').text();
|
||||
var sale_id = "<%= @sale_id %>";
|
||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) ){
|
||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
|
||||
//start member discount 5% by pay card
|
||||
var sub_total = $('#sub-total').text();
|
||||
var member_id = $('#membership_id').text();
|
||||
@@ -179,7 +179,7 @@ $('#jcb_pay').on('click',function(){
|
||||
success:function(result){
|
||||
if(result){
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: "Payment Successfully",
|
||||
},function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/payment";
|
||||
@@ -188,7 +188,11 @@ $('#jcb_pay').on('click',function(){
|
||||
}
|
||||
});
|
||||
}else{
|
||||
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
||||
if (amount>0) {
|
||||
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
||||
}else{
|
||||
swal ( "Oops" , "Enter Amount!" , "error" );
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
$('#master_pay').on('click',function(){
|
||||
var amount = $('#amount').text();
|
||||
var sale_id = "<%= @sale_id %>";
|
||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) ){
|
||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
|
||||
//start member discount 5% by pay card
|
||||
var sub_total = $('#sub-total').text();
|
||||
var member_id = $('#membership_id').text();
|
||||
@@ -176,7 +176,7 @@
|
||||
success:function(result){
|
||||
if(result){
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: "Payment Successfully",
|
||||
},function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/payment";
|
||||
@@ -185,7 +185,11 @@
|
||||
}
|
||||
});
|
||||
}else{
|
||||
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
||||
if (amount>0) {
|
||||
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
||||
}else{
|
||||
swal ( "Oops" , "Enter Amount!" , "error" );
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
$('#mpu_pay').on('click',function(){
|
||||
var amount = $('#amount').text();
|
||||
var sale_id = "<%= @sale_id %>";
|
||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) ){
|
||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
|
||||
//start member discount 5% by pay card
|
||||
var sub_total = $('#sub-total').text();
|
||||
var member_id = $('#membership_id').text();
|
||||
@@ -177,7 +177,7 @@
|
||||
success:function(result){
|
||||
if(result){
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: "Payment Successfully",
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/payment";
|
||||
@@ -186,7 +186,11 @@
|
||||
}
|
||||
});
|
||||
}else{
|
||||
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
||||
if (amount>0) {
|
||||
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
||||
}else{
|
||||
swal ( "Oops" , "Enter Amount!" , "error" );
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
data: params,
|
||||
success:function(result){
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: "Success",
|
||||
}, function () {
|
||||
if(result.table_type == "Table"){
|
||||
|
||||
@@ -403,7 +403,7 @@
|
||||
$( "#loading_wrapper" ).hide();
|
||||
if($('#balance').text() < 0){
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: 'Changed amount ' + $('#balance').text() * (-1),
|
||||
}, function () {
|
||||
window.location.href = '/origami';
|
||||
@@ -411,7 +411,7 @@
|
||||
}else{
|
||||
$('#pay').text("Pay");
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: 'Thank You !',
|
||||
}, function () {
|
||||
window.location.href = '/origami';
|
||||
@@ -424,7 +424,7 @@
|
||||
|
||||
$('#void').on('click',function () {
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: 'Are you sure want to Void !',
|
||||
}, function () {
|
||||
var sale_id = $('#sale_id').text();
|
||||
@@ -472,7 +472,7 @@
|
||||
|
||||
if (cash > 0) {
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: 'Thank You !',
|
||||
}, function () {
|
||||
window.location.href = '/origami';
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
success: function(result){
|
||||
if(result.status == true){
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: result.status,
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/payment"
|
||||
|
||||
@@ -524,7 +524,7 @@ $('#request_bills').click(function() {
|
||||
success:function(result){
|
||||
if(!result.status){
|
||||
$.confirm({
|
||||
title: 'Infomation!',
|
||||
title: 'Information!',
|
||||
content: result.error_message,
|
||||
buttons: {
|
||||
confirm: {
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
data: 'sale_item_id=' + sale_item_id + "&update_qty=" + qty + "&update_price=" + price,
|
||||
success: function (result) {
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: "Qty and Price was successfully Updated",
|
||||
}, function () {
|
||||
location.reload();
|
||||
|
||||
@@ -155,7 +155,9 @@
|
||||
$('#visa_pay').on('click',function(){
|
||||
var amount = $('#amount').text();
|
||||
var sale_id = "<%= @sale_id %>";
|
||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value"))){
|
||||
console.log(amount);
|
||||
console.log($("#validamount").attr("value"));
|
||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
|
||||
//start member discount 5% by pay card
|
||||
var sub_total = $('#sub-total').text();
|
||||
var member_id = $('#membership_id').text();
|
||||
@@ -176,7 +178,7 @@
|
||||
success:function(result){
|
||||
if(result){
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: "Payment Successfully",
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/payment";
|
||||
@@ -185,7 +187,11 @@
|
||||
}
|
||||
});
|
||||
}else{
|
||||
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
||||
if (amount>0) {
|
||||
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
||||
}else{
|
||||
swal ( "Oops" , "Enter Amount!" , "error" );
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<li class="breadcrumb-item"><a href="<%= print_settings_path %>"><%= t("views.right_panel.header.print_settings") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to t('.back', :default => t("views.btn.back")), settings_employees_path %>
|
||||
<%= link_to t('.back', :default => t("views.btn.back")), print_settings_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li class="breadcrumb-item"><a href="<%= settings_payment_method_setting_path %>"><%= t("en.payment_methods") %></a></li>
|
||||
<li class="breadcrumb-item"><a href="<%= settings_payment_method_settings_path %>"><%= t("en.payment_methods") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to t('.back', :default => t("views.btn.back")), settings_payment_method_setting_path %>
|
||||
<%= link_to t('.back', :default => t("views.btn.back")), settings_payment_method_settings_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user