Merge branch 'r-1902001-01' of gitlab.com:code2lab/SXRestaurant into r-1902001-01

This commit is contained in:
Zoey
2019-05-28 09:34:48 +06:30
6 changed files with 133 additions and 128 deletions

View File

@@ -879,6 +879,7 @@ def self.daily_sales_list(from,to)
total_sale.each do |sale|
grand_total = sale.grand_total
amount_received = sale.amount_received
old_grand_total = sale.old_grand_total
total_discount = sale.total_discount
void_amount = sale.void_amount

View File

@@ -47,8 +47,8 @@
<select class="form-control select" name="shift_name" id="shift_name" >
</select>
</div>
<div class="col-lg-12 col-md-12 col-sm-12 margin-top-20 text-right">
<br>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20" style="margin-top: 20px;">
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div>

View File

@@ -158,7 +158,11 @@
<td><%= number_with_precision(0, precision: precision.to_i ,delimiter: delimiter) rescue '-' %></td>
<% end %>
<%end%>
<td><%= number_with_precision(result.grand_total_after_rounding(), precision: precision.to_i ,delimiter: delimiter) rescue '-' %></td>
<% if result.old_grand_total.nil? %>
<td><%= number_with_precision(result.grand_total, precision: precision.to_i ,delimiter: delimiter) rescue '-' %></td>
<%else%>
<td><%= number_with_precision(result.old_grand_total, precision: precision.to_i ,delimiter: delimiter) rescue '-' %></td>
<%end%>
<td><%= result.rounding_adjustment.to_f rescue '-' %></td>
<td><%= number_with_precision(result.grand_total, precision: precision.to_i ,delimiter: delimiter) %></td>

View File

@@ -90,7 +90,7 @@
<tr>
<td>
<%= result[:cashier_terminal_name] rescue '-'%> <%= result[:shift_id].to_i %>
<%= result[:cashier_terminal_name] rescue '-'%>
</td>
<td>
<%= result[:employee_name] rescue '-'%>

View File

@@ -17,17 +17,19 @@ class ActionController::Base
logger.info 'License is nil'
# redirect_to root_url(:host => request.domain) + "store_error"
render :json => [{ status: false, message: 'Invalid Access!'}]
end
else
# check for license file
# if check_license
# current_license(ENV["SX_PROVISION_URL"])
# else
# redirect_to activate_path
# end
if check_license
current_license(ENV["SX_PROVISION_URL"])
else
redirect_to activate_path
end
end
end
def current_license(url)
@license = License.new(url)
flag = @license.detail_with_local_file()
@@ -146,4 +148,3 @@ class ActionController::API
end
end

View File

@@ -1,10 +1,9 @@
# application_path="#{File.expand_path("../..", __FILE__)}"
# directory application_path
# # environment ENV.fetch("RAILS_ENV") { "production" }
# environment "production"
# pidfile "#{application_path}/tmp/puma/pid"
# state_path "#{application_path}/tmp/puma/state"
# stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
# port ENV.fetch("PORT") { 62158 }
# workers 2
# preload_app!
application_path="#{File.expand_path("../..", __FILE__)}"
directory application_path
environment "production"
pidfile "#{application_path}/tmp/puma/pid"
state_path "#{application_path}/tmp/puma/state"
stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
port ENV.fetch("PORT") { 62158 }
workers 2
preload_app!