update sale item xls
This commit is contained in:
@@ -271,7 +271,7 @@ section.content {
|
|||||||
padding: .25rem .25rem !important;
|
padding: .25rem .25rem !important;
|
||||||
}
|
}
|
||||||
.alert-dismissible .close {
|
.alert-dismissible .close {
|
||||||
padding: 0.2rem 0.24rem;
|
padding: 0.5rem 0.44rem;
|
||||||
}
|
}
|
||||||
/* End Reset Theme */
|
/* End Reset Theme */
|
||||||
/* *************************************************** */
|
/* *************************************************** */
|
||||||
@@ -659,7 +659,7 @@ def self.get_item_query()
|
|||||||
# "JOIN employee_accesses ea ON ea.`employee_id` = sales.cashier_id ")
|
# "JOIN employee_accesses ea ON ea.`employee_id` = sales.cashier_id ")
|
||||||
query = query.joins(" JOIN accounts acc ON acc.id = mi.account_id")
|
query = query.joins(" JOIN accounts acc ON acc.id = mi.account_id")
|
||||||
# query = query.where("i.item_instance_code IS NOT NULL")
|
# query = query.where("i.item_instance_code IS NOT NULL")
|
||||||
query = query.group("i.product_name").order("mi.account_id")
|
query = query.group("i.product_name").order("mi.account_id asc","mi.menu_category_id asc")
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.get_other_charges()
|
def self.get_other_charges()
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ class SaleItem < ApplicationRecord
|
|||||||
# Check for actual sale items
|
# Check for actual sale items
|
||||||
sale_items.where("remark = 'Discount'").find_each do |si|
|
sale_items.where("remark = 'Discount'").find_each do |si|
|
||||||
if si.account_id == a.id
|
if si.account_id == a.id
|
||||||
discount_account[:price] = (discount_account[:price].abs + si.price.abs) * (-1)
|
discount_account[:price] = (discount_account[:price].abs + si.price.abs) * (1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
discount_accounts.push(discount_account)
|
discount_accounts.push(discount_account)
|
||||||
|
|||||||
@@ -379,15 +379,15 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#pay').click(function() {
|
$('#pay').click(function(event) {
|
||||||
// $('#pay').text("Processing, Please wait!")
|
// $('#pay').text("Processing, Please wait!")
|
||||||
|
|
||||||
$( "#loading_wrapper").show();
|
$( "#loading_wrapper").show();
|
||||||
|
|
||||||
if($('#balance').text() > 0){
|
if($('#balance').text() > 0){
|
||||||
swal ( "Oops" , "Insufficient Amount!" , "error" );
|
swal ( "Oops" , "Insufficient Amount!" , "error" );
|
||||||
$( "#loading_wrapper").hide();
|
$( "#loading_wrapper").hide();
|
||||||
}else{
|
}else{
|
||||||
|
$(this).off("click");
|
||||||
var sale_id = $('#sale_id').text();
|
var sale_id = $('#sale_id').text();
|
||||||
var item_row = $('.is_card');
|
var item_row = $('.is_card');
|
||||||
if (item_row.length < 1) {
|
if (item_row.length < 1) {
|
||||||
|
|||||||
@@ -1,16 +1,5 @@
|
|||||||
<div class="page-header">
|
|
||||||
<ol class="breadcrumb">
|
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
|
||||||
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.sale_item_report") %></li>
|
|
||||||
<span class="float-right">
|
|
||||||
<%= link_to 'Back', dashboard_path %>
|
|
||||||
</span>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<%= render :partial=>'shift_sale_report_filter',
|
|
||||||
:locals=>{ :period_type => true, :shift_name => true, :report_path =>reports_saleitem_index_path} %>
|
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user