add foc amount in saleitem report

This commit is contained in:
Myat Zin Wai Maw
2019-09-11 17:12:15 +06:30
parent ac24499319
commit a4e8869234
3 changed files with 41 additions and 5 deletions

View File

@@ -226,6 +226,18 @@
<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><%= number_with_precision(grand_total , precision:precision.to_i,delimiter:delimiter)%></span></td>
</tr>
<% if @type =="" || @type =="all" %>
<tr>
<td colspan="5">&nbsp;</td>
<td>Total FOC Amount</td>
<td><span><%= number_with_precision(@foc_data , precision:precision.to_i,delimiter:delimiter)%></span></td>
</tr>
<tr style="border-top:2px solid grey;border-bottom:2px solid grey;">
<td colspan="5">&nbsp;</td>
<td style="border-bottom:2px solid grey;"><%= t("views.right_panel.detail.net_amount") %></td>
<td style="border-bottom:2px solid grey;"><span><%= number_with_precision(grand_total -@foc_data , precision:precision.to_i,delimiter:delimiter)%></span></td>
</tr>
<% end %>
<% end %>
<% if @type == "other"%>
@@ -267,4 +279,17 @@
</div>
</div>
</body>
</html>
</html>
<script type="text/javascript">
$(function(){
var type =<%=@type %>;
console.log(type);
$('.foc_payment').hide();
if (type =="" || type =="all" ){
$('.foc_payment').show();
}
else{
$('.foc_payment').hide();
}
});
</script>