add taxes in sale item
This commit is contained in:
@@ -60,7 +60,8 @@
|
||||
<% total_amount = 0 %>
|
||||
<% discount = 0 %>
|
||||
<% total_item_foc = 0 %>
|
||||
<% total_item_dis = 0 %>
|
||||
<% total_item_dis = 0.0 %>
|
||||
<% total_tax = 0 %>
|
||||
|
||||
<% @sale_data.each do |sale| %>
|
||||
|
||||
@@ -153,7 +154,7 @@
|
||||
<tr>
|
||||
<td colspan="5"> </td>
|
||||
<td><%= t("views.right_panel.detail.sub_total") %></td>
|
||||
<td ><span class="underline"><%= other_sub_total %></span></td>
|
||||
<td ><span><%= other_sub_total %></span></td>
|
||||
</tr>
|
||||
|
||||
<!-- End Other Charges -->
|
||||
@@ -161,8 +162,8 @@
|
||||
<td colspan="3"> </td>
|
||||
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.item") %></td>
|
||||
<td><span><%= total_qty%></span></td>
|
||||
<td><%= t("views.right_panel.detail.net_amount") %></td>
|
||||
<td><span><%= grand_total%></span></td>
|
||||
<td style="border-bottom:2px solid grey;"><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %></td>
|
||||
<td style="border-bottom:2px solid grey;"><span><%= grand_total%></span></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -173,8 +174,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"> </td>
|
||||
<td><%= t("views.right_panel.detail.item_discount") %> <%= t("views.right_panel.detail.amount") %></td>
|
||||
<td><span><%= total_item_dis %></span></td>
|
||||
<td style="border-bottom:2px solid grey;"><%= t("views.right_panel.detail.item_discount") %> <%= t("views.right_panel.detail.amount") %></td>
|
||||
<td style="border-bottom:2px solid grey;"><span><%= total_item_dis %></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"> </td>
|
||||
@@ -183,9 +184,31 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"> </td>
|
||||
<td><%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %></td>
|
||||
<td><span><%= @discount_data %></span></td>
|
||||
</tr>
|
||||
<td style="border-bottom:2px solid grey;"><%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %></td>
|
||||
<td style="border-bottom:2px solid grey;"><span><%= @discount_data %></span></td>
|
||||
</tr>
|
||||
|
||||
<% @sale_taxes.each do |tax| %>
|
||||
<tr>
|
||||
<td colspan="5"> </td>
|
||||
<td><%= tax.tax_name %></td>
|
||||
<td><%= tax.st_amount.round(2) %>
|
||||
<%total_tax += tax.st_amount%>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td colspan="5"> </td>
|
||||
<td style="border-top:2px solid grey;">Net Amount</td>
|
||||
<!-- <td><span class="double_underline"><%= grand_total.to_f - @discount_data.to_f%></span></td> -->
|
||||
<td style="border-top:2px solid grey;"><%= grand_total + total_tax%></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td colspan="5"> </td>
|
||||
<td>Grand Total</td>
|
||||
|
||||
<td><span class="double_underline"><%= @grand_total - @change_amount%></span></td>
|
||||
</tr> -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user