fixed daily sale ui
This commit is contained in:
@@ -206,8 +206,6 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
|
||||
#end
|
||||
end
|
||||
logger.debug 'saleObj++++++++++++++++++++++++++'
|
||||
logger.debug saleObj.to_json
|
||||
if !saleObj.nil?
|
||||
# InventoryJob.perform_now(self.id)
|
||||
# InventoryDefinition.calculate_product_count(saleObj)
|
||||
|
||||
@@ -73,12 +73,12 @@
|
||||
<th></th>
|
||||
<th colspan="<%= @count + 1 %>" style='text-align:center;'>Income</th>
|
||||
<th colspan=4 style='text-align:center;'>Outgoing</th>
|
||||
<th style='text-align:center;'><i class="material-icons md-18" data-toggle="tooltip" data-placement="top" title="Gross Sales = (Income+Discount) - (FOC+Void)">live_help</i></th>
|
||||
<th style='text-align:center;'><i class="material-icons md-18" data-toggle="tooltip" data-placement="top" title="Total Sales = Gross Sales - Discount">live_help</i></th>
|
||||
<th style='text-align:center;' data-toggle="tooltip" data-placement="top" title="Gross Sales = (Income+Discount) - (FOC+Void)"><i class="material-icons md-18">live_help</i></th>
|
||||
<th style='text-align:center;' data-toggle="tooltip" data-placement="top" title="Total Sales = Gross Sales - Discount"><i class="material-icons md-18">live_help</i></th>
|
||||
<% if @tax.blank? %>
|
||||
<th style='text-align:center;'><i class="material-icons md-18" data-toggle="tooltip" data-placement="top" title="Tax = Total Sales / 21">live_help</i></th>
|
||||
<th style='text-align:center;' data-toggle="tooltip" data-placement="top" title="Tax = Total Sales / 21"><i class="material-icons md-18">live_help</i></th>
|
||||
<th style='text-align:center;' data-toggle="tooltip" data-placement="top" title="Net Sales = Total Sales - Tax"><i class="material-icons md-18">live_help</i></th>
|
||||
<% end %>
|
||||
<th style='text-align:center;'><i class="material-icons md-18" data-toggle="tooltip" data-placement="top" title="Net Sales = Total Sales - Tax">live_help</i></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style='text-align:center;'><%= t("views.right_panel.detail.sr") %></th>
|
||||
@@ -132,8 +132,8 @@
|
||||
<th style='text-align:center;'><%= t("views.right_panel.detail.total_sales") %></th>
|
||||
<% if @tax.blank? %>
|
||||
<th style='text-align:center;'><%= t("views.right_panel.detail.tax") %></th>
|
||||
<% end %>
|
||||
<th style='text-align:center;'><%= t("views.right_panel.detail.net_sales") %></th>
|
||||
<% end %>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -241,8 +241,8 @@
|
||||
<td style='text-align:right;'><%= number_format(sale[:total_sale], precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
<% if @tax.blank? %>
|
||||
<td style='text-align:right;'><%= number_format(sale[:tax], precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
<% end %>
|
||||
<td style='text-align:right;'><%= number_format(sale[:net_sale], precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
<% end %>
|
||||
|
||||
</tr>
|
||||
<% count = count + 1 %>
|
||||
@@ -329,8 +329,10 @@
|
||||
<td style='text-align:right;'><%= number_format(rounding_adj, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
<td style='text-align:right;'><%= number_format(gross_sale, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
<td style='text-align:right;'><%= number_format(total_sale, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
<td style='text-align:right;'><%= number_format(tax, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
<td style='text-align:right;'><%= number_format(net_sale, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
<% if @tax.blank? %>
|
||||
<td style='text-align:right;'><%= number_format(tax, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
<td style='text-align:right;'><%= number_format(net_sale, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
<% end %>
|
||||
|
||||
</tr>
|
||||
<tr style="font-weight:600;">
|
||||
@@ -342,20 +344,20 @@
|
||||
<% @tax.each do |tax|
|
||||
total_tax += tax.tax_amount.to_f %>
|
||||
<tr style="font-weight:600;">
|
||||
<td colspan="<%= colspan %>" style='text-align:right;'><%= tax.tax_name rescue '-'%></td>
|
||||
<td colspan="2" style='text-align:right;'><%= number_format(tax.tax_amount, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
<td colspan="<%= colspan + 2 %>" style='text-align:right;'><%= tax.tax_name rescue '-'%></td>
|
||||
<td colspan="5" style='text-align:right;'><%= number_format(tax.tax_amount, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% net = grand_total %>
|
||||
<% net = net - rounding_adj%>
|
||||
<% net = net - total_tax %>
|
||||
<tr style="font-weight:600;">
|
||||
<td colspan="<%= colspan %>" style='text-align:right;'><%= t("views.right_panel.detail.net_amount") %></td>
|
||||
<td colspan="<%= colspan + 2 %>" style='text-align:right;'><%= t("views.right_panel.detail.net_amount") %></td>
|
||||
<td colspan="5" style='text-align:right;'><%= number_format(net, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
</tr>
|
||||
<% else %>
|
||||
<tr style="font-weight:600;">
|
||||
<td colspan="<%= colspan %>" style='text-align:right;'><%= t("views.right_panel.detail.net_amount") %></td>
|
||||
<td colspan="<%= colspan + 2 %>" style='text-align:right;'><%= t("views.right_panel.detail.net_amount") %></td>
|
||||
<td colspan="5" style='text-align:right;'><%= number_format(net_sale, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user