fixed grand total at receipt no report

This commit is contained in:
NyanLinHtut
2019-05-24 14:56:08 +06:30
parent 6c45e8f0a3
commit 7d105b2789
6 changed files with 120 additions and 117 deletions

View File

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

View File

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

View File

@@ -158,7 +158,11 @@
<td><%= number_with_precision(0, precision: precision.to_i ,delimiter: delimiter) rescue '-' %></td> <td><%= number_with_precision(0, precision: precision.to_i ,delimiter: delimiter) rescue '-' %></td>
<% end %> <% end %>
<%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><%= result.rounding_adjustment.to_f rescue '-' %></td>
<td><%= number_with_precision(result.grand_total, precision: precision.to_i ,delimiter: delimiter) %></td> <td><%= number_with_precision(result.grand_total, precision: precision.to_i ,delimiter: delimiter) %></td>

View File

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

View File

@@ -19,7 +19,7 @@ class ActionController::Base
render :json => [{ status: false, message: 'Invalid Access!'}] render :json => [{ status: false, message: 'Invalid Access!'}]
end end
else else
# check for license file check for license file
if check_license if check_license
current_license(ENV["SX_PROVISION_URL"]) current_license(ENV["SX_PROVISION_URL"])
else else
@@ -146,4 +146,3 @@ class ActionController::API
end end
end end

View File

@@ -1,7 +1,6 @@
application_path="#{File.expand_path("../..", __FILE__)}" application_path="#{File.expand_path("../..", __FILE__)}"
directory application_path directory application_path
# environment ENV.fetch("RAILS_ENV") { "production" } #environment "production"
environment "production"
pidfile "#{application_path}/tmp/puma/pid" pidfile "#{application_path}/tmp/puma/pid"
state_path "#{application_path}/tmp/puma/state" state_path "#{application_path}/tmp/puma/state"
stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"