update audit sales

This commit is contained in:
Aung Myo
2017-07-03 10:28:13 +06:30
parent e9ac1973fc
commit 39ba5d5e86
2 changed files with 15 additions and 5 deletions

View File

@@ -51,6 +51,7 @@ class Transactions::SalesController < ApplicationController
end
@sale_receivables = SalePayment.where('sale_id = ?', @sale.id)
@sale_audits = SaleAudit.where('sale_id = ?', @sale.id)
#get customer amount
@customer = Customer.find(@sale.customer_id)

View File

@@ -39,9 +39,9 @@
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#customer" role="tab">Customer Details</a>
</li>
<!-- <li class="nav-item">
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#sale_audit" role="tab">Sale Audits</a>
</li> -->
</li>
</ul>
<!-- Nav tabs - End -->
@@ -244,15 +244,24 @@
<table class="table table-striped">
<thead>
<tr>
<th>Status</th>
<th>Action </th>
<th>Action At</th>
<th>Approved By</th>
<th>Approved At</th>
<th>Remark</th>
</tr>
</thead>
<tbody>
<% @sale_audits.each do |audit| %>
<tr>
<td><%= audit.action%></td>
<td><%= audit.action_at.strftime("%m-%d-%Y %H:%M %p")%></td>
<td><%= audit.approved_by.to_datetime.strftime("%m-%d-%Y %H:%M %p")%></td>
<td><%= audit.remark%></td>
</tr>
<% end %>
</tbody>
</table>