default value receipt no detail customer filter

This commit is contained in:
Thein Lin Kyaw
2020-07-21 12:00:42 +06:30
parent 567a716fe3
commit 8d7bc2996e
2 changed files with 7 additions and 7 deletions

View File

@@ -1203,7 +1203,7 @@ end
def self.get_shift_sales_by_receipt_no_detail(shift_sale_range, shift, from, to, payment_type, customer_filter)
## => left join -> show all sales although no orders
puts customer_filter
query = Sale.includes([:survey, :sale_payments])
.select("sales.*, SUM(sale_payments.payment_amount) AS payments_for_credits_amount")
.select("dining_facilities.type AS table_type, dining_facilities.name AS table_name")

View File

@@ -18,7 +18,12 @@
<option value="9">Last year</option>
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.customer_name") %></label>
<input type="text" placeholder="Customer name" class="form-control m-t-3" name="customer" value="<%= params[:customer] %>" id="customer_filter" style="height: 32px;">
</div>
<% if defined? @payment_methods %>
<div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_payments") %></label>
@@ -31,11 +36,6 @@
</div>
<% end %>
<div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.customer_name") %></label>
<input type="text" placeholder="Customer name" class="form-control m-t-3" name="customer" id="customer_filter" >
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> -->
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>