update fixed conflicx
This commit is contained in:
@@ -373,7 +373,7 @@ $(function() {
|
||||
$('.add_to_order').removeAttr('data-attributes');
|
||||
$('.add_to_order').removeAttr('data-options');
|
||||
|
||||
$('.change_qty').val(1);
|
||||
$('#count').val(1);
|
||||
|
||||
change_qty_plus_minus("count","plus","minus");
|
||||
|
||||
@@ -825,18 +825,11 @@ $(function() {
|
||||
|
||||
// Get Selected Class
|
||||
function change_qty_plus_minus(id,plus,minus) {
|
||||
var count = parseInt($('#'+id).val());
|
||||
|
||||
|
||||
|
||||
|
||||
$('#'+plus).on("click", function(){
|
||||
|
||||
var count = parseInt($('#'+id).val());
|
||||
var countEl = document.getElementById(id);
|
||||
|
||||
count++;
|
||||
countEl.value = count;
|
||||
|
||||
$('#'+plus).on("click", function(){
|
||||
count++;
|
||||
$('#'+id).val(count);
|
||||
|
||||
if (id == "count") {
|
||||
price = $("#unit_price").text();
|
||||
@@ -900,7 +893,7 @@ $(function() {
|
||||
|
||||
if ($.isNumeric(value)) {
|
||||
if (id=="count") {
|
||||
$('.change_qty').attr('value',value);
|
||||
$('#count').attr('value',value);
|
||||
price = $("#unit_price").text();
|
||||
$("#total_price").text(value*price);
|
||||
}else{
|
||||
|
||||
@@ -62,6 +62,9 @@ $(document).ready(function() {
|
||||
clearButton: true,
|
||||
date: false
|
||||
});
|
||||
|
||||
// first input focus for all form
|
||||
$("body").has("form").find("input:first").focus();
|
||||
|
||||
// Image Upload
|
||||
$("#simple_menu_item_image_path").fileinput({
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
@import "sweetalert/sweetalert.css";
|
||||
@import "multi-select/css/multi-select.css";
|
||||
@import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker";
|
||||
@import "jquery-ui/jquery-ui.css";
|
||||
@import "jquery-ui/jquery-ui.structure.css";
|
||||
@import "jquery-ui/jquery-ui.theme.css";
|
||||
@import "morrisjs/morris";
|
||||
@import "BSBMaterial/style";
|
||||
@import "BSBMaterial/themes/all-themes";
|
||||
|
||||
@@ -8,12 +8,12 @@ class Origami::VoidController < BaseOrigamiController
|
||||
sale = Sale.find_by_sale_id(sale_id)
|
||||
|
||||
# update count for shift sale
|
||||
if(sale.sale_status == "completed")
|
||||
# if(sale.sale_status == "completed")
|
||||
if sale.shift_sale_id != nil
|
||||
shift = ShiftSale.find(sale.shift_sale_id)
|
||||
shift.calculate(sale_id, "void")
|
||||
end
|
||||
end
|
||||
# end
|
||||
|
||||
sale.payment_status = 'void'
|
||||
sale.sale_status = 'void'
|
||||
|
||||
@@ -20,7 +20,7 @@ class SalePayment < ApplicationRecord
|
||||
end
|
||||
end
|
||||
|
||||
if (amount_due > 0)
|
||||
if (amount_due >= 0)
|
||||
payment_status = false
|
||||
#route to payment type
|
||||
case payment_method
|
||||
|
||||
@@ -54,7 +54,7 @@ class ShiftSale < ApplicationRecord
|
||||
self.cash_sales = self.cash_sales.to_f + cash.to_f
|
||||
self.credit_sales = self.credit_sales.to_i + credit.to_f
|
||||
self.other_sales = self.other_sales.to_i + other_sales.to_f
|
||||
self.nett_sales = self.nett_sales + saleobj.total_amount.to_f #self.grand_total.to_i - self.commercial_taxes
|
||||
self.nett_sales = self.nett_sales + (saleobj.total_amount.to_f - self.total_discounts) #self.grand_total.to_i - self.commercial_taxes
|
||||
self.commercial_taxes = self.commercial_taxes.to_i + tax.to_f
|
||||
self.total_rounding = self.total_rounding + saleobj.rounding_adjustment
|
||||
self.total_receipt = self.total_receipt + 1
|
||||
@@ -81,7 +81,7 @@ class ShiftSale < ApplicationRecord
|
||||
self.cash_sales = self.cash_sales.to_f - cash.to_f
|
||||
self.credit_sales = self.credit_sales.to_i - credit.to_f
|
||||
self.other_sales = self.other_sales.to_i - other_sales.to_f
|
||||
self.nett_sales = self.nett_sales - saleobj.total_amount.to_f #self.grand_total.to_i - self.commercial_taxes
|
||||
self.nett_sales = self.nett_sales - (saleobj.total_amount.to_f - self.total_discounts) #self.grand_total.to_i - self.commercial_taxes
|
||||
self.commercial_taxes = self.commercial_taxes.to_i - tax.to_f
|
||||
self.total_rounding = self.total_rounding - saleobj.rounding_adjustment
|
||||
self.total_void = self.total_void + saleobj.grand_total
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<%if current_login_employee.role !="waiter" %>
|
||||
<p class="delete waves-effect waves-block p-l-30 m-t-15" data-ref="<%=logout_path%>" data-method="delete">
|
||||
<i class="material-icons">exit_to_app</i>
|
||||
<span class="font-20 m-b-10">Logout</span>
|
||||
<span class="font-18 m-b-5">Logout</span>
|
||||
</p>
|
||||
<span class="hidden" id="delete_text">
|
||||
<h6>Are you sure you want to Logout ?</h6>
|
||||
|
||||
@@ -115,11 +115,11 @@
|
||||
<label><%= t("views.right_panel.detail.salutation") %> :</label><br>
|
||||
<label class="font-15"><%= t("views.right_panel.detail.mr") %>
|
||||
<%= f.radio_button :salutation,"Mr", :class => "salutation mr", :value=>"Mr"%></label>
|
||||
<label class="font-15 m-l-20"><%= t("views.right_panel.detail.miss") %>
|
||||
<label class="font-15 m-l-5"><%= t("views.right_panel.detail.miss") %>
|
||||
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs", :value=>"Mrs"%></label>
|
||||
<label class="font-15 m-l-20"><%= t("views.right_panel.detail.mrs") %>
|
||||
<label class="font-15 m-l-5"><%= t("views.right_panel.detail.mrs") %>
|
||||
<%= f.radio_button :salutation,"Miss", :class => "salutation miss", :value=>"Miss"%></label>
|
||||
<label class="font-15 m-l-20"><%= t("views.right_panel.detail.mdm") %>
|
||||
<label class="font-15 m-l-5"><%= t("views.right_panel.detail.mdm") %>
|
||||
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm", :value=>"Mdm"%></label>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="rebate-form">
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">You can pay up to </label>
|
||||
<label>You can pay up to </label>
|
||||
<input type="text" name="validamount" id="validamount" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@can_jcb %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
@@ -27,7 +27,7 @@
|
||||
<% if @jcbcount != 0 %>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Recent JCB paid amount </label>
|
||||
<label>Recent JCB paid amount </label>
|
||||
<input type="text" name="" id="" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@jcbcount %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
@@ -35,14 +35,14 @@
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Reference Number</label>
|
||||
<label>Reference Number</label>
|
||||
<input type="text" name="valid_amount" id="valid_amount" class="form-control col-lg-7 col-md-7 col-sm-7" value="" data-value="<%=@sale_id %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Amount</label>
|
||||
<label>Amount</label>
|
||||
<div id="amount" class="form-control col-lg-7 col-md-7 col-sm-7">0.0</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="rebate-form">
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">You can pay up to </label>
|
||||
<label>You can pay up to </label>
|
||||
<input type="text" name="validamount" id="validamount" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@can_master %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
@@ -27,7 +27,7 @@
|
||||
<% if @mastercount != 0 %>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Recent Master paid amount </label>
|
||||
<label>Recent Master paid amount </label>
|
||||
<input type="text" name="" id="" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@mastercount %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
@@ -35,14 +35,14 @@
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Reference Number</label>
|
||||
<label>Reference Number</label>
|
||||
<input type="text" name="valid_amount" id="valid_amount" class="form-control col-lg-7 col-md-7 col-sm-7" value="" data-value="<%=@sale_id %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Amount</label>
|
||||
<label>Amount</label>
|
||||
<div id="amount" class="form-control col-lg-7 col-md-7 col-sm-7">0.0</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<div class="rebate-form">
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">You can pay up to </label>
|
||||
<label>You can pay up to </label>
|
||||
<input type="text" name="validamount" id="validamount" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@can_mpu %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
@@ -28,7 +28,7 @@
|
||||
<% if @mpucount != 0 %>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Recent MPU paid amount </label>
|
||||
<label>Recent MPU paid amount </label>
|
||||
<input type="text" name="" id="" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@mpucount %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
@@ -36,14 +36,14 @@
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Reference Number</label>
|
||||
<label>Reference Number</label>
|
||||
<input type="text" name="valid_amount" id="valid_amount" class="form-control col-lg-7 col-md-7 col-sm-7" value="" data-value="<%=@sale_id %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Amount</label>
|
||||
<label>Amount</label>
|
||||
<div id="amount" class="form-control col-lg-7 col-md-7 col-sm-7">0.0</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="4%">#</th>
|
||||
<th class="" width="30%">Items</th>
|
||||
<th class="" width="20%">Items</th>
|
||||
<th style="" width="13%">QTY
|
||||
</td>
|
||||
<th class="" width="13%">Price
|
||||
</td>
|
||||
<!-- <th class='' width="17%"> Total </th> -->
|
||||
<th class='' width="17%"> Action</th>
|
||||
<th class='' width="20%"> Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -54,7 +54,7 @@
|
||||
%>
|
||||
<tr>
|
||||
<td width="4%"><%= count %></td>
|
||||
<td class='' width="30%">
|
||||
<td class='' width="20%">
|
||||
<%= sale_item.product_name %>
|
||||
</td>
|
||||
<% if sale_item.remark != 'void' && sale_item.remark != 'edit' && sale_item.remark != 'foc' %>
|
||||
@@ -108,8 +108,8 @@
|
||||
<div class="card-footer">
|
||||
<table class="table" id="order-charges-table" border="0">
|
||||
<tr>
|
||||
<td class="charges-name"><strong>Sub Total:</strong></td>
|
||||
<td class="item-attr"><strong id="order-sub-total"><%= sub_total %></strong></td>
|
||||
<td width="50%"><strong>Sub Total:</strong></td>
|
||||
<td><strong id="order-sub-total"><%= sub_total %></strong></td>
|
||||
</tr>
|
||||
<tr class="rebate_amount"></tr>
|
||||
</table>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="rebate-form">
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">You can pay up to </label>
|
||||
<label>You can pay up to </label>
|
||||
<input type="text" name="validamount" id="validamount" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@can_visa %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
@@ -27,7 +27,7 @@
|
||||
<% if @visacount != 0 %>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Recent Visa paid amount </label>
|
||||
<label>Recent Visa paid amount </label>
|
||||
<input type="text" name="" id="" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@visacount %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
@@ -35,14 +35,14 @@
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Reference Number</label>
|
||||
<label>Reference Number</label>
|
||||
<input type="text" name="valid_amount" id="valid_amount" class="form-control col-lg-7 col-md-7 col-sm-7" value="" data-value="<%=@sale_id %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Amount</label>
|
||||
<label>Amount</label>
|
||||
<div id="amount" class="form-control col-lg-7 col-md-7 col-sm-7">0.0</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="rebate-form">
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">You can pay up to </label>
|
||||
<label>You can pay up to </label>
|
||||
<input type="text" name="validamount" id="validamount" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@can_voucher %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
@@ -19,7 +19,7 @@
|
||||
<% if @vouchercount != 0 %>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Recent Voucher paid amount </label>
|
||||
<label>Recent Voucher paid amount </label>
|
||||
<input type="text" name="" id="" class="form-control col-lg-7 col-md-7 col-sm-7" readonly="" value="<%=@vouchercount %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
@@ -27,14 +27,14 @@
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Reference Number</label>
|
||||
<label>Reference Number</label>
|
||||
<input type="text" name="valid_amount" id="<%=@sale_id %>" class="form-control col-lg-7 col-md-7 col-sm-7 float-value" value="" data-value="<%=@sale_id %>" data-member-value="">
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||
<label class="col-lg-4 col-md-4 col-sm-4">Amount</label>
|
||||
<label>Amount</label>
|
||||
<!-- <div id="amount" class="form-control col-lg-7 col-md-7 col-sm-7">0.0</div> -->
|
||||
<input type="text" name="" id="amount" class="form-control col-lg-7 col-md-7 col-sm-7 float-value" value="" data-value="amount" data-member-value="">
|
||||
</div>
|
||||
|
||||
@@ -9,30 +9,20 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<!-- <div class="container"> -->
|
||||
<%= render :partial=>'shift_sale_report_filter',
|
||||
:locals=>{ :period_type => true, :shift_name => true, :report_path =>reports_saleitem_index_path} %>
|
||||
|
||||
<hr />
|
||||
<!-- /div> -->
|
||||
|
||||
<!-- <div class="container"> -->
|
||||
<!-- <div class="row"> -->
|
||||
<div class="text-right">
|
||||
<a href="javascript:export_to('<%=reports_saleitem_index_path%>.xls')" class = "btn btn-info wave-effects "><%= t("views.btn.exp_to_excel") %></a>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<div class="text-right">
|
||||
<a href="javascript:export_to('<%=reports_saleitem_index_path%>.xls')" class = "btn btn-info wave-effects "><%= t("views.btn.exp_to_excel") %></a>
|
||||
</div>
|
||||
|
||||
<div class="margin-top-20">
|
||||
<div class="card">
|
||||
<div class="table-responsive">
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped" id="items_table" border="0">
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
<th colspan="7"> <%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%></th>
|
||||
</tr>
|
||||
@@ -144,21 +134,6 @@
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
<!-- <tr>
|
||||
<td colspan="5"> </td>
|
||||
<td><%= t("views.right_panel.detail.cash_received") %></td>
|
||||
<td><span><%= @cash_data - @change_amount %></span></td>
|
||||
</tr> -->
|
||||
<!-- <tr>
|
||||
<td colspan="5"> </td>
|
||||
<td><%= t("views.right_panel.detail.card_sales") %></td>
|
||||
<td><span><%= @card_data %></span></td>
|
||||
</tr> -->
|
||||
<!-- <tr>
|
||||
<td colspan="5"> </td>
|
||||
<td><%= t("views.right_panel.detail.credit_sales") %></td>
|
||||
<td><span><%= @credit_data %></span></td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td colspan="5"> </td>
|
||||
<td><%= t("views.right_panel.detail.foc_item") %> <%= t("views.right_panel.detail.amount") %></td>
|
||||
@@ -179,13 +154,6 @@
|
||||
<td><%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %></td>
|
||||
<td><span><%= @discount_data %></span></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td colspan="5"> </td>
|
||||
<td><%= t("views.right_panel.detail.grand_total") %></td>
|
||||
<!-- <td><span class="double_underline"><%= grand_total.to_f - @discount_data.to_f%></span></td> -->
|
||||
<!-- <td><span class="double_underline"><%= @grand_total - @change_amount%></span></td>
|
||||
</tr> -->
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -148,11 +148,11 @@
|
||||
<div class="card">
|
||||
<div class="p-l-25 p-t-10 ">
|
||||
<div class="row">
|
||||
<div class="col-md-2 p-t-10">Item Code</div>
|
||||
<div class="col-md-2 p-t-10">Item Instance</div>
|
||||
<div class="col-md-2 p-t-10">Qualified Qty</div>
|
||||
<div class="col-md-3 p-t-10">Item Code</div>
|
||||
<div class="col-md-3 p-t-10">Item Instance</div>
|
||||
<div class="col-md-1 p-t-10">Qty</div>
|
||||
<div class="col-md-1 p-t-10">Net off</div>
|
||||
<div class="col-md-2 p-t-10">Net Price</div>
|
||||
<div class="col-md-1 p-t-10">Net Price</div>
|
||||
<div class="col-md-2 p-t-10">Percentage</div>
|
||||
<div class="col-md-1 p-t-10"></div>
|
||||
</div>
|
||||
@@ -164,7 +164,7 @@
|
||||
<% Product.order("name desc").pluck(:name,:item_code).each do |p| %>
|
||||
<% arr.push(p) %>
|
||||
<% end %>
|
||||
<div class="col-md-2 menu_item_choose form-group">
|
||||
<div class="col-md-3 menu_item_choose form-group">
|
||||
<select class="form-control item_code_place1">
|
||||
<option value="">Choose Something</option>
|
||||
<% arr.each do |a| %>
|
||||
@@ -174,17 +174,17 @@
|
||||
</div>
|
||||
<!-- <% sample = [] %> -->
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-3">
|
||||
<%= pro.input :item_code, :class => 'promoproduct', collection:[],input_html: { selected: 2 }, label: false %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-1">
|
||||
<%= pro.input :min_qty , label: false, :input_html => {:style => 'height: 37px'}%>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<%= pro.input :net_off , label: false, :input_html => {:style => 'height: 37px'} %>
|
||||
</div>
|
||||
<div class="col-md-2"><%= pro.input :net_price , label: false, :input_html => {:style => 'height: 37px'} %></div>
|
||||
<div class="col-md-1"><%= pro.input :net_price , label: false, :input_html => {:style => 'height: 37px'} %></div>
|
||||
<div class="col-md-2"><%= pro.input :percentage , label: false, :input_html => {:style => 'height: 37px'} %></div>
|
||||
<div class="col-md-1"><%= pro.link_to_remove "X" ,:class=>"btn-primary btn m-r-45", :style => 'width: 25px'%></div>
|
||||
</div>
|
||||
|
||||
@@ -43,19 +43,21 @@
|
||||
<td>
|
||||
<% item = MenuItemInstance.find_by_item_instance_code(pro.original_product)%>
|
||||
<% if item.nil? %>
|
||||
<%= Product.find_by_item_code(pro.original_product).name rescue "-" %>
|
||||
<%= Product.find_by_item_code(pro.original_product).name rescue "-" %>
|
||||
<% else %>
|
||||
<%= item.menu_item.name rescue "-" %>
|
||||
- <%= item.item_instance_name rescue "-" %>
|
||||
<%= item.menu_item.name rescue "-" %>
|
||||
- <%= item.item_instance_name rescue "-" %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td style="padding: 2px">
|
||||
<% if Employee.exists?(pro.created_by) %>
|
||||
<%= Employee.find(pro.created_by).name %>
|
||||
<% else %>
|
||||
<%= pro.created_by %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% if Employee.exists?(pro.created_by) %>
|
||||
<td><%= Employee.find(pro.created_by).name %></td>
|
||||
<% else %>
|
||||
<td><%= pro.created_by %></td>
|
||||
<% end %>
|
||||
<td><%= pro.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
|
||||
<td><%= link_to t("views.btn.edit"), edit_settings_promotion_path(pro),:class => 'btn btn-info btn-sm waves-effect' %>
|
||||
<td><%= link_to t("views.btn.edit"), edit_settings_promotion_path(pro),:class => 'btn btn-primary btn-sm waves-effect' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user