diff --git a/app/controllers/origami/other_charges_controller.rb b/app/controllers/origami/other_charges_controller.rb
index b0e6472c..9b94781d 100644
--- a/app/controllers/origami/other_charges_controller.rb
+++ b/app/controllers/origami/other_charges_controller.rb
@@ -45,7 +45,8 @@ class Origami::OtherChargesController < BaseOrigamiController
end
# Re-calc All Amount in Sale
- sale.compute_by_sale_items(sale_id, sale.sale_items, sale.total_discount)
+ # sale.compute_by_sale_items(sale_id, sale.sale_items, sale.total_discount)
+ sale.compute_without_void
end
dining = {:table_id => table_id, :table_type => table_type }
diff --git a/app/models/sale.rb b/app/models/sale.rb
index b23c630b..462c8c73 100644
--- a/app/models/sale.rb
+++ b/app/models/sale.rb
@@ -232,7 +232,6 @@ class Sale < ApplicationRecord
end
#compute rounding adjustment
# adjust_rounding
-
sale.save!
end
@@ -315,7 +314,7 @@ class Sale < ApplicationRecord
total_tax_amount = 0
#tax_profile - list by order_by
tax_profiles = TaxProfile.all.order("order_by asc")
-
+
# #Creat new tax records
tax_profiles.each do |tax|
sale_tax = SaleTax.new(:sale => self)
diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb
index 2a069af9..27f73619 100644
--- a/app/views/origami/rooms/show.html.erb
+++ b/app/views/origami/rooms/show.html.erb
@@ -294,6 +294,7 @@
+
@@ -304,6 +305,7 @@
+
@@ -429,6 +431,25 @@ $(document).ready(function(){
return false;
});
+ // Add Other Charges
+ $('#other-charges').click(function() {
+ var sale = $('#sale_id').val();
+ if (sale!="") {
+ var sale_id = sale
+ }else{
+ var sale_id = $('#save_order_id').attr('data-order');
+ }
+
+ if(sale_id!=""){
+ window.location.href = '/origami/' + sale_id + '/other_charges'
+ }
+ else {
+ alert("Please select an table!");
+ }
+
+ return false;
+ });
+
});
// Print for first bill