-
diff --git a/app/views/origami/discounts/index.html.erb b/app/views/origami/discounts/index.html.erb
index e1bcd3ee..a2fbaafb 100755
--- a/app/views/origami/discounts/index.html.erb
+++ b/app/views/origami/discounts/index.html.erb
@@ -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,
diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb
index 1d5c37d0..9437ad52 100755
--- a/app/views/origami/home/show.html.erb
+++ b/app/views/origami/home/show.html.erb
@@ -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();
diff --git a/app/views/origami/jcb/index.html.erb b/app/views/origami/jcb/index.html.erb
index b65686c4..f138b6ed 100755
--- a/app/views/origami/jcb/index.html.erb
+++ b/app/views/origami/jcb/index.html.erb
@@ -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" );
+ }
}
})
diff --git a/app/views/origami/master/index.html.erb b/app/views/origami/master/index.html.erb
index d42576bd..6176b5cd 100755
--- a/app/views/origami/master/index.html.erb
+++ b/app/views/origami/master/index.html.erb
@@ -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" );
+ }
}
})
diff --git a/app/views/origami/mpu/index.html.erb b/app/views/origami/mpu/index.html.erb
index 9d4ecf41..51305466 100755
--- a/app/views/origami/mpu/index.html.erb
+++ b/app/views/origami/mpu/index.html.erb
@@ -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" );
+ }
}
})
diff --git a/app/views/origami/other_charges/index.html.erb b/app/views/origami/other_charges/index.html.erb
index cc75c4f9..6dcf38a6 100755
--- a/app/views/origami/other_charges/index.html.erb
+++ b/app/views/origami/other_charges/index.html.erb
@@ -294,7 +294,7 @@
data: params,
success:function(result){
swal({
- title: "Infomation!",
+ title: "Information!",
text: "Success",
}, function () {
if(result.table_type == "Table"){
diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb
index 58763ae0..57c196ea 100755
--- a/app/views/origami/payments/show.html.erb
+++ b/app/views/origami/payments/show.html.erb
@@ -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';
diff --git a/app/views/origami/redeem_payments/index.html.erb b/app/views/origami/redeem_payments/index.html.erb
index ee8619c0..d5100040 100755
--- a/app/views/origami/redeem_payments/index.html.erb
+++ b/app/views/origami/redeem_payments/index.html.erb
@@ -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"
diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb
index 58ac1c96..092ff742 100755
--- a/app/views/origami/rooms/show.html.erb
+++ b/app/views/origami/rooms/show.html.erb
@@ -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: {
diff --git a/app/views/origami/sale_edit/edit.html.erb b/app/views/origami/sale_edit/edit.html.erb
index 04841e1a..960701ab 100755
--- a/app/views/origami/sale_edit/edit.html.erb
+++ b/app/views/origami/sale_edit/edit.html.erb
@@ -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();
diff --git a/app/views/origami/visa/index.html.erb b/app/views/origami/visa/index.html.erb
index f8677d13..615a9d3f 100755
--- a/app/views/origami/visa/index.html.erb
+++ b/app/views/origami/visa/index.html.erb
@@ -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" );
+ }
}
})
diff --git a/app/views/print_settings/show.html.erb b/app/views/print_settings/show.html.erb
index a7fc38e2..1d76a088 100755
--- a/app/views/print_settings/show.html.erb
+++ b/app/views/print_settings/show.html.erb
@@ -4,7 +4,7 @@
<%= t("views.right_panel.header.print_settings") %>
<%= t :details %>
- <%= link_to t('.back', :default => t("views.btn.back")), settings_employees_path %>
+ <%= link_to t('.back', :default => t("views.btn.back")), print_settings_path %>
diff --git a/app/views/settings/payment_method_settings/show.html.erb b/app/views/settings/payment_method_settings/show.html.erb
index 7c0d4354..0b0cdec9 100755
--- a/app/views/settings/payment_method_settings/show.html.erb
+++ b/app/views/settings/payment_method_settings/show.html.erb
@@ -1,10 +1,10 @@