fixed conflic
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
//= require autosize/autosize.js
|
//= require autosize/autosize.js
|
||||||
//= require jquery-countto/jquery.countTo.js
|
//= require jquery-countto/jquery.countTo.js
|
||||||
//= require raphael/raphael.min
|
//= require raphael/raphael.min
|
||||||
|
//= require morrisjs/morris.js
|
||||||
//= require chartjs/Chart.bundle.js
|
//= require chartjs/Chart.bundle.js
|
||||||
//= require fileinput.min
|
//= require fileinput.min
|
||||||
//= require BSBMaterial/admin.js
|
//= require BSBMaterial/admin.js
|
||||||
@@ -36,7 +37,6 @@
|
|||||||
//= require BSBMaterial/demo.js
|
//= require BSBMaterial/demo.js
|
||||||
//= require custom.js
|
//= require custom.js
|
||||||
|
|
||||||
|
|
||||||
$(document).on('turbolinks:load', function() {
|
$(document).on('turbolinks:load', function() {
|
||||||
$('.datetimepicker').bootstrapMaterialDatePicker({
|
$('.datetimepicker').bootstrapMaterialDatePicker({
|
||||||
format: 'DD-MM-YYYY - HH:mm',
|
format: 'DD-MM-YYYY - HH:mm',
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
$(document).on('turbolinks:load', function() {
|
$(document).on('turbolinks:load', function() {
|
||||||
|
// $("body").boostrapMaterialDesign();
|
||||||
|
|
||||||
var height = ($(window).height() - ($('.legal').outerHeight() + $('.user-info').outerHeight() + $('.navbar').innerHeight()));
|
var height = ($(window).height() - ($('.legal').outerHeight() + $('.user-info').outerHeight() + $('.navbar').innerHeight()));
|
||||||
|
|
||||||
@@ -54,7 +53,7 @@ $(document).on('turbolinks:load', function() {
|
|||||||
var animateExit = $("#notify_message").attr('data-animate-exit');
|
var animateExit = $("#notify_message").attr('data-animate-exit');
|
||||||
var colorName = $("#notify_message").attr('data-color-name');
|
var colorName = $("#notify_message").attr('data-color-name');
|
||||||
var text = $("#notify_message").attr('data-message');
|
var text = $("#notify_message").attr('data-message');
|
||||||
console.log(text);
|
|
||||||
if (text != null || colorName != null){
|
if (text != null || colorName != null){
|
||||||
showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit);
|
showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class HomeController < ApplicationController
|
|||||||
@sales = Sale::where("payment_status='paid' and sale_status='completed' and DATE_FORMAT(receipt_date,'%Y-%m-%d') = '#{today}'").count()
|
@sales = Sale::where("payment_status='paid' and sale_status='completed' and DATE_FORMAT(receipt_date,'%Y-%m-%d') = '#{today}'").count()
|
||||||
|
|
||||||
@top_products = Sale.top_products(today)
|
@top_products = Sale.top_products(today)
|
||||||
@hourly_sales = Sale.hourly_sales(today)
|
@hourly_sales = Sale.hourly_sales(today).sum(:grand_total)
|
||||||
# .group_by_hour(:created_at, :time_zone => 'Asia/Rangoon',format: '%I:%p')
|
# .group_by_hour(:created_at, :time_zone => 'Asia/Rangoon',format: '%I:%p')
|
||||||
# .sum(:grand_total)
|
# .sum(:grand_total)
|
||||||
@employee_sales = Sale.employee_sales(today).sum(:grand_total)
|
@employee_sales = Sale.employee_sales(today).sum(:grand_total)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ class DiningCharge < ApplicationRecord
|
|||||||
def self.amount_calculate(dining_charges_obj, checkin , checkout)
|
def self.amount_calculate(dining_charges_obj, checkin , checkout)
|
||||||
# note :: the first Charge Block will cost all, the Time rounding block will included in 2nd Charge Block
|
# note :: the first Charge Block will cost all, the Time rounding block will included in 2nd Charge Block
|
||||||
if !checkin.nil? && !checkout.nil? && !dining_charges_obj.nil?
|
if !checkin.nil? && !checkout.nil? && !dining_charges_obj.nil?
|
||||||
|
block_count = 0
|
||||||
price = 0
|
price = 0
|
||||||
minutes = DiningCharge.time_diff(checkout, checkin)
|
minutes = DiningCharge.time_diff(checkout, checkin)
|
||||||
free_time = DiningCharge.convert_to_minutes(dining_charges_obj.minimum_free_time.utc.localtime.strftime('%H:%M'))
|
free_time = DiningCharge.convert_to_minutes(dining_charges_obj.minimum_free_time.utc.localtime.strftime('%H:%M'))
|
||||||
|
|||||||
@@ -856,7 +856,9 @@ end
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.hourly_sales(today)
|
def self.hourly_sales(today)
|
||||||
query= Sale.select("grand_total").where('payment_status="paid" and sale_status = "completed" and DATE_FORMAT(receipt_date,"%Y-%m-%d") = ?',today)
|
query= Sale.select("grand_total")
|
||||||
|
.where('payment_status="paid" and sale_status = "completed" and DATE_FORMAT(receipt_date,"%Y-%m-%d") = ?',today)
|
||||||
|
.group("date_format(receipt_date, '%I %p')")
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.employee_sales(today)
|
def self.employee_sales(today)
|
||||||
|
|||||||
@@ -125,7 +125,9 @@
|
|||||||
backgroundColor.push(randomColorGenerator());
|
backgroundColor.push(randomColorGenerator());
|
||||||
});
|
});
|
||||||
|
|
||||||
var chart = new Chart("top_products", {
|
var ctx = $("#top_products").get(0).getContext("2d");
|
||||||
|
|
||||||
|
var chart = new Chart(ctx, {
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
data: {
|
data: {
|
||||||
labels: labels,
|
labels: labels,
|
||||||
@@ -159,8 +161,9 @@
|
|||||||
backgroundColor.push(randomColorGenerator());
|
backgroundColor.push(randomColorGenerator());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var ctx = $("#hourly_sales").get(0).getContext("2d");
|
||||||
|
|
||||||
var myChart = new Chart("hourly_sales", {
|
var myChart = new Chart(ctx, {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: {
|
data: {
|
||||||
labels: labels,
|
labels: labels,
|
||||||
@@ -206,8 +209,9 @@
|
|||||||
datasets.push(val);
|
datasets.push(val);
|
||||||
backgroundColor.push(randomColorGenerator());
|
backgroundColor.push(randomColorGenerator());
|
||||||
});
|
});
|
||||||
|
var ctx = $("#employee_sales").get(0).getContext("2d");
|
||||||
|
|
||||||
var myChart = new Chart("employee_sales", {
|
var myChart = new Chart(ctx, {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: {
|
data: {
|
||||||
labels: labels,
|
labels: labels,
|
||||||
@@ -254,7 +258,9 @@
|
|||||||
borderColor.push(randomColorGenerator());
|
borderColor.push(randomColorGenerator());
|
||||||
});
|
});
|
||||||
|
|
||||||
var myChart = new Chart("inventory", {
|
var ctx = $("#inventory").get(0).getContext("2d");
|
||||||
|
|
||||||
|
var myChart = new Chart(ctx, {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
data: {
|
data: {
|
||||||
labels: labels,
|
labels: labels,
|
||||||
|
|||||||
@@ -59,5 +59,4 @@
|
|||||||
<%= yield %>
|
<%= yield %>
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<div class="form-inputs p-l-15">
|
<div class="form-inputs p-l-15">
|
||||||
<%= f.input :payment_method %>
|
<%= f.input :payment_method %>
|
||||||
<%= f.input :is_active,:class=> "checkbox" %>
|
<%= f.input :is_active %>
|
||||||
<%= f.input :gateway_communication_type %>
|
<%= f.input :gateway_communication_type %>
|
||||||
<%= f.input :gateway_url %>
|
<%= f.input :gateway_url %>
|
||||||
<%= f.input :auth_token %>
|
<%= f.input :auth_token %>
|
||||||
|
|||||||
@@ -219,8 +219,8 @@
|
|||||||
7) <%= t("views.right_panel.detail.type") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.type_txt") %> <br>
|
7) <%= t("views.right_panel.detail.type") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.type_txt") %> <br>
|
||||||
8) <%= t("views.right_panel.detail.item") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.item_txt") %> <br>
|
8) <%= t("views.right_panel.detail.item") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.item_txt") %> <br>
|
||||||
9) <%= t("views.right_panel.detail.original_product") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.original_product_txt") %> <br>
|
9) <%= t("views.right_panel.detail.original_product") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.original_product_txt") %> <br>
|
||||||
10) <%= t("views.right_panel.detail.min_qty") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.min_qty_txt") %>
|
10) <%= t("views.right_panel.detail.min_qty") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.min_qty_txt") %> <br>
|
||||||
--------------------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
<h5>ADD PRODUCT</h5>
|
<h5>ADD PRODUCT</h5>
|
||||||
1) <%= t("views.right_panel.detail.item_code") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.item_code_txt") %> <%= t("views.right_panel.detail.product_txt") %> <br>
|
1) <%= t("views.right_panel.detail.item_code") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.item_code_txt") %> <%= t("views.right_panel.detail.product_txt") %> <br>
|
||||||
2) <%= t("views.right_panel.detail.min_qty") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.min_qty_txt") %> <br>
|
2) <%= t("views.right_panel.detail.min_qty") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.min_qty_txt") %> <br>
|
||||||
|
|||||||
Reference in New Issue
Block a user