update void sale report and transaction sales

This commit is contained in:
Dev Team
2025-06-30 17:05:10 +06:30
parent 4ba5c607bd
commit 15f51c44a2
7 changed files with 32 additions and 13 deletions

View File

@@ -28,10 +28,18 @@
<label class="font-20 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 34px;">
</div>
<div class="form-group col-lg-3 col-md-3 col-sm-3 mbl-style">
<!-- <div class="form-group col-lg-3 col-md-3 col-sm-3 mbl-style">
<label class="font-20 mbl_lbl"><%= t("views.right_panel.detail.all_shift") %></label>
<select class="form-control select" name="shift_name" id="shift_name" style="height: 37px;">
</select>
</div> -->
<div class="form-group col-lg-3 col-md-3 col-sm-3 mbl-style">
<label class="font-20 mbl_lbl">Status</label>
<select class="form-control select" name="void_filter" id="void_filter" style="height: 37px;">
<option value="" <%= 'selected' if params[:void_filter].blank? %>>ALL</option>
<option value="void" <%= 'selected' if params[:void_filter] == 'void' %>>Void</option>
<option value="cancelled_mmqr" <%= 'selected' if params[:void_filter] == 'cancelled_mmqr' %>>Cancelled Payment (MMQR)</option>
</select>
</div>
<div class=" col-lg-1 col-md-1 col-sm-1 margin-top-20 mbl-right-btn mbl-style">
<br>

View File

@@ -48,7 +48,7 @@
<th><%= t("views.right_panel.detail.grand_total") %></th>
<th><%= t("views.right_panel.detail.rnd_adj_sh") %></th>
<th><%= t("views.right_panel.detail.grand_total") %> + <br/><%= t("views.right_panel.detail.rnd_adj_sh") %></th>
<!-- <th>Sale Status</th> -->
<th>Status</th>
</tr>
</thead>
<tbody>
@@ -65,7 +65,9 @@
<td><%= number_format(item.grand_total.to_f , precision: precision.to_i ,delimiter: delimiter) rescue '-'%> </td>
<td><%= number_format(item.rounding_adjustment.to_f, precision: precision.to_i ,delimiter: delimiter) rescue '-' %></td>
<td><%= number_format(item.grand_total.to_f + item.rounding_adjustment.to_f , precision: precision.to_i ,delimiter: delimiter) rescue '-'%> </td>
<!-- <td><%= result.sales_status rescue '-' %> </td> -->
<td>
<%= item.sale_audits.where(action: 'CANCEL_MMQR_PAYMENT').exists? ? "payment cancelled (mmqr)" : item.sale_status rescue '-' %>
</td>
<!-- <td><%= item.remarks rescue '-' %> </td> -->
</tr>
<% total_amount = total_amount.to_f + item.total_amount.to_f %>
@@ -74,7 +76,7 @@
<% grand_rounding_adjustment = grand_rounding_adjustment.to_f + item.grand_total.to_f + item.rounding_adjustment.to_f %>
<% end %>
<% end %>
<tr style="border-top:4px double #666;font-weight:600;">
<tr style="border-top:4px double #666;font-weight:600;">
<td colspan="2" style="text-align:center;">Total Void Amount :</td>
<td><%= number_format(total_amount, precision: precision.to_i ,delimiter: delimiter) rescue '-' %></td>
<td><%= number_format(grand_total, precision: precision.to_i ,delimiter: delimiter) rescue '-' %></td>

View File

@@ -32,7 +32,7 @@
<th><%= t("views.right_panel.detail.grand_total") %></th>
<th><%= t("views.right_panel.detail.rnd_adj_sh") %></th>
<th><%= t("views.right_panel.detail.grand_total") %> + <br/><%= t("views.right_panel.detail.rnd_adj_sh") %></th>
<!-- <th>Sale Status</th> -->
<th>Status</th>
</tr>
</thead>
<tbody>
@@ -49,7 +49,7 @@
<td><%= item.grand_total.to_f rescue '-'%> </td>
<td><%= item.rounding_adjustment.to_f rescue '-' %></td>
<td><%= item.grand_total.to_f + item.rounding_adjustment.to_f rescue '-'%> </td>
<!-- <td><%= result.sales_status rescue '-' %> </td> -->
<td><%= item.sale_audits.where(action: 'CANCEL_MMQR_PAYMENT').exists? ? "payment cancelled (mmqr)" : item.sale_status rescue '-' %> </td>
<!-- <td><%= item.remarks rescue '-' %> </td> -->
</tr>
<% total_amount = total_amount.to_f + item.total_amount.to_f %>

View File

@@ -114,7 +114,7 @@
<td><%= sale.total_amount %></td>
<td><%= sale.grand_total rescue '-' %></td>
<td><%= sale.cashier_name rescue '-' %></td>
<td> <%= sale.sale_status %> </td>
<td> <%= sale.sale_audits.where(action: 'CANCEL_MMQR_PAYMENT').exists? ? "payment cancelled (mmqr)" : sale.sale_status %> </td>
<td> <%= sale.receipt_date.strftime("%d-%m-%Y %I:%M %p") %> </td>
</tr>
<% end %>