From 733f8112957edfce99087b6121d152da4fc9804f Mon Sep 17 00:00:00 2001 From: MVIUdani Date: Wed, 31 Mar 2021 19:39:11 +0530 Subject: [PATCH 1/4] rm newsfeed and chart view --- application/controllers/rm_controller.php | 8 ++++++-- application/views/restaurantmanager/RMnewsfeed.php | 2 +- .../views/restaurantmanager/analytics/multichart.php | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/application/controllers/rm_controller.php b/application/controllers/rm_controller.php index 765b0d5..126806b 100644 --- a/application/controllers/rm_controller.php +++ b/application/controllers/rm_controller.php @@ -59,7 +59,8 @@ public function createSubmit(){ $Ann_title = $this->post('Announcement_title'); // $Ann_date = $this->post('Announcement_date'); // $Ann_time = $this->post('Announcement_time'); - $Ann_date = date("Y-d-m"); + date_default_timezone_set('Asia/Colombo'); + $Ann_date = date("Y-m-d"); $Ann_time = date("H:i:s"); $content = $this->post('Content'); $Ann_towhom=$_POST['To_whom']; @@ -132,7 +133,8 @@ public function newsfeed_update_save(){ $Ann_title = $this->post('Announcement_title'); // $Ann_date = $this->post('Announcement_date'); //$Ann_time = $this->post('Announcement_time'); - $Ann_date = date("Y-d-m"); + date_default_timezone_set('Asia/Colombo'); + $Ann_date = date("Y-m-d"); $Ann_time = date("H:i:s"); $content = $this->post('Content'); // $Ann_towhom = $this->post('To_whom'); @@ -593,6 +595,7 @@ public function addFooditem(){ } public function createFoodItem(){ + $x=$this->get_session('user_id'); // echo $_POST['Food_name']; // echo $_POST['Description']; // echo $_POST['Unit_Price']; @@ -622,6 +625,7 @@ public function createFoodItem(){ ]; if($this->model->addFoodItem($data)){ + $this->informational("New fooditem,$Food_name:unit price is $Unit_Price create by $x"); $this->set_flash("fooditemSuccess", "Fooditem added successfully"); //$this->fooditem(); redirect("rm_controller/fooditem"); diff --git a/application/views/restaurantmanager/RMnewsfeed.php b/application/views/restaurantmanager/RMnewsfeed.php index 3d2d275..8c7b0e8 100644 --- a/application/views/restaurantmanager/RMnewsfeed.php +++ b/application/views/restaurantmanager/RMnewsfeed.php @@ -14,7 +14,7 @@ "); ?> "); ?> - + diff --git a/application/views/restaurantmanager/analytics/multichart.php b/application/views/restaurantmanager/analytics/multichart.php index abf7d10..d457344 100644 --- a/application/views/restaurantmanager/analytics/multichart.php +++ b/application/views/restaurantmanager/analytics/multichart.php @@ -32,8 +32,8 @@ $handle3->execute(); $result3 = $handle3->fetchAll(\PDO::FETCH_OBJ); - $handle4 = $link->prepare('select Order_ID,sum(case when Order_is_for_me="1" then 1 else 0 end) AS App,sum(case when Order_is_for_me="0" then 1 else 0 end) AS WalkingCustomer From orders'); - //select Order_ID,sum(case when Order_is_for_me="1" then 1 else 0 end) AS App,sum(case when Order_is_for_me="0" then 1 else 0 end) AS WalkingCustomer From orders where Order_Date_Time=CURRENT_DATE + $handle4 = $link->prepare('select Order_ID,sum(case when isCashier="0" then 1 else 0 end) AS App,sum(case when isCashier="1" then 1 else 0 end) AS WalkingCustomer From orders'); + //select Order_ID,sum(case when isCashier="0" then 1 else 0 end) AS App,sum(case when isCashier="1" then 1 else 0 end) AS WalkingCustomer From orders where Order_Date_Time=CURRENT_DATE $handle4->execute(); $result4 = $handle4->fetchAll(\PDO::FETCH_OBJ); From 15cdf8f382857b2ebe7550edfb5b6721f20d13ff Mon Sep 17 00:00:00 2001 From: yeshanGune Date: Wed, 31 Mar 2021 20:09:03 +0530 Subject: [PATCH 2/4] view css --- .../controllers/cashier_controller.php | 2 +- application/models/cashier_model.php | 30 +++++++++---------- application/models/dp_model.php | 2 +- application/models/rm_model.php | 2 +- .../views/cashier/orderfood/cashier-cart.php | 2 +- .../kitchenmanager/foodmenu/foodmenu.php | 6 ++-- public/css/cashier/cashier_cart.css | 5 +++- .../css/kitchen-manager/foodmenu/foodmenu.css | 2 +- 8 files changed, 27 insertions(+), 24 deletions(-) diff --git a/application/controllers/cashier_controller.php b/application/controllers/cashier_controller.php index 80ae48a..15c505c 100644 --- a/application/controllers/cashier_controller.php +++ b/application/controllers/cashier_controller.php @@ -328,7 +328,7 @@ public function completeOrder(){ if($cart_data['status'] === "success"){ $data = [ - 'Order_Date_Time' => date($cart_data['data']->Service_date ." ". $cart_data['data']->Service_time), //combined serve date and time + 'Order_Date_Time' => date("Y-m-d H:i:s"), //combined serve date and time 'Item_count' => $cart_data['data']->Item_count, 'Total_price' => $cart_data['data']->Sub_total + $cart_data['data']->Sub_total*0.05, //including service charge, disregarded discounts here... 'Service_charge' => $cart_data['data']->Sub_total*0.05, //service charge is 5% diff --git a/application/models/cashier_model.php b/application/models/cashier_model.php index c39b0a6..9d16dbe 100644 --- a/application/models/cashier_model.php +++ b/application/models/cashier_model.php @@ -213,24 +213,24 @@ public function get_cart_items($cart_id){ } } - public function getQtywithItemCount_reorder($order_id){ + // public function getQtywithItemCount_reorder($order_id){ - $query = - "SELECT order_item.Quantity AS Quantity , fooditem.Current_count AS Current_count - FROM order_item - INNER JOIN fooditem ON order_item.Food_ID = fooditem.Food_ID - WHERE order_item.Order_ID='".$order_id."' "; + // $query = + // "SELECT order_item.Quantity AS Quantity , fooditem.Current_count AS Current_count + // FROM order_item + // INNER JOIN fooditem ON order_item.Food_ID = fooditem.Food_ID + // WHERE order_item.Order_ID='".$order_id."' "; - $result =$this->Query($query, $options = []); + // $result =$this->Query($query, $options = []); - if($this->Count() > 0){ - $order_items = $this->AllRecords(); - //print_r($order_items); - return ['status'=>'success', 'data'=>$order_items]; - }else{ - return "order_items_not_found"; - } - } + // if($this->Count() > 0){ + // $order_items = $this->AllRecords(); + // //print_r($order_items); + // return ['status'=>'success', 'data'=>$order_items]; + // }else{ + // return "order_items_not_found"; + // } + // } public function get_cart_data($cart_id){ diff --git a/application/models/dp_model.php b/application/models/dp_model.php index ea9b0a6..b20e161 100644 --- a/application/models/dp_model.php +++ b/application/models/dp_model.php @@ -103,7 +103,7 @@ public function getAnnouncement(){ $announcement = $this->AllRecords(); //print_r($announcement); if($announcement){ - return ['status'=>'success', 'data'=>$announcement]; + return ['status'=>'success','data'=>array_reverse($announcement, true)]; }else{ return "Announcement_not_retrieved"; } diff --git a/application/models/rm_model.php b/application/models/rm_model.php index 1d29396..5d553fb 100644 --- a/application/models/rm_model.php +++ b/application/models/rm_model.php @@ -77,7 +77,7 @@ public function getAnnouncement(){ $announcement = $this->AllRecords(); //print_r($announcement); if($announcement){ - return ['status'=>'success', 'data'=>$announcement]; + return ['status'=>'success', 'data'=>array_reverse($announcement, true)]; }else{ return "Announcement_not_retrieved"; } diff --git a/application/views/cashier/orderfood/cashier-cart.php b/application/views/cashier/orderfood/cashier-cart.php index d8d6af1..ee9d214 100644 --- a/application/views/cashier/orderfood/cashier-cart.php +++ b/application/views/cashier/orderfood/cashier-cart.php @@ -73,7 +73,7 @@ class="delete" onclick="onclickDeleteCartitem(CartItem_ID ?>)"

Total: LKR get_session('cart_sub_total'),2,'.', ','); ?>

- + diff --git a/application/views/kitchenmanager/foodmenu/foodmenu.php b/application/views/kitchenmanager/foodmenu/foodmenu.php index 5599ab2..6e81b02 100644 --- a/application/views/kitchenmanager/foodmenu/foodmenu.php +++ b/application/views/kitchenmanager/foodmenu/foodmenu.php @@ -76,8 +76,8 @@ Food_ID."/".$category->Category_name, "POST");?> Current_count;?> min="1" max="1000"> - - + + @@ -123,7 +123,7 @@ Food_ID."/".$category->Category_name, "POST");?> Current_count;?> min="1" max="1000"> - + diff --git a/public/css/cashier/cashier_cart.css b/public/css/cashier/cashier_cart.css index 521dcab..3e14244 100644 --- a/public/css/cashier/cashier_cart.css +++ b/public/css/cashier/cashier_cart.css @@ -121,17 +121,20 @@ body { .cart-container .summary-container .summary-title { font-weight: 600; font-size: 20px; + margin-bottom: 20px; + } .cart-container .summary-container .total { /* border-bottom: 1px solid #ccc; */ font-weight: 500; + margin-top: 20px; } .checkout-button { background-color: var(--buy-color); color: #fff; font-size: 14px; font-weight: 600; - width: 80%; + width: 90%; height: 50px; margin: 12% auto; border: 1px solid #ccc; diff --git a/public/css/kitchen-manager/foodmenu/foodmenu.css b/public/css/kitchen-manager/foodmenu/foodmenu.css index c7ee111..7a54164 100644 --- a/public/css/kitchen-manager/foodmenu/foodmenu.css +++ b/public/css/kitchen-manager/foodmenu/foodmenu.css @@ -128,7 +128,7 @@ .grid article .quantity input[type=number]{ height: 30px; padding-left: 10px; - width: 60px; + width: 50px; border: 1px solid #999; } From 913e3c4d70e8f79ef265c52fc1bd4e7e8d737e1c Mon Sep 17 00:00:00 2001 From: MVIUdani Date: Wed, 31 Mar 2021 21:38:41 +0530 Subject: [PATCH 3/4] mod if condition --- application/views/restaurantmanager/orders/RM.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/restaurantmanager/orders/RM.php b/application/views/restaurantmanager/orders/RM.php index 88db9c7..5f8be92 100644 --- a/application/views/restaurantmanager/orders/RM.php +++ b/application/views/restaurantmanager/orders/RM.php @@ -88,7 +88,7 @@ Special_notes ?> Payment_method ?> Order_type ?> - Order_type="delivery"){?> + Order_type=="delivery"){?> Delivery_Dispatch_DateTime ?> Kitchen_Dispatch_DateTime?> From 83c7ef67f4b5d619678089f3b5a5dcd6128388e0 Mon Sep 17 00:00:00 2001 From: yeshanGune Date: Thu, 1 Apr 2021 00:47:29 +0530 Subject: [PATCH 4/4] km order type --- application/logs/2021-03-31.txt | 10 ++++++++++ .../views/kitchenmanager/orders/orders.php | 18 ++++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/application/logs/2021-03-31.txt b/application/logs/2021-03-31.txt index e69de29..aeaf4c2 100644 --- a/application/logs/2021-03-31.txt +++ b/application/logs/2021-03-31.txt @@ -0,0 +1,10 @@ +2021-03-31 20:09:31 localhost/cafe99/account_controller/loginSubmit session opened for user 200 3 INFORMATIONAL +2021-03-31 20:58:26 localhost/cafe99/account_controller/loginSubmit session opened for user 202 3 INFORMATIONAL +2021-03-31 20:58:53 localhost/cafe99/km_controller/updateOrderStatus order#24 pickup order email notif is sent successfully 3 INFORMATIONAL +2021-03-31 21:00:33 localhost/cafe99/account_controller/loginSubmit session opened for user 198 3 INFORMATIONAL +2021-03-31 21:00:43 localhost/cafe99/account_controller/loginSubmit session opened for user 202 3 INFORMATIONAL +2021-03-31 21:03:16 localhost/cafe99/account_controller/loginSubmit session opened for user 200 3 INFORMATIONAL +2021-03-31 21:03:39 localhost/cafe99/account_controller/loginSubmit session opened for user 202 3 INFORMATIONAL +2021-03-31 22:46:19 localhost/cafe99/km_controller/updateOrderStatus order#24 pickup order email notif is sent successfully 3 INFORMATIONAL +2021-03-31 23:04:11 localhost/cafe99/account_controller/loginSubmit session opened for user 202 3 INFORMATIONAL +2021-03-31 23:56:31 localhost/cafe99/account_controller/loginSubmit session opened for user 202 3 INFORMATIONAL diff --git a/application/views/kitchenmanager/orders/orders.php b/application/views/kitchenmanager/orders/orders.php index f9fa2d4..a0cf08b 100644 --- a/application/views/kitchenmanager/orders/orders.php +++ b/application/views/kitchenmanager/orders/orders.php @@ -108,7 +108,7 @@ - +
@@ -144,7 +144,7 @@ - +
@@ -181,11 +181,13 @@
@@ -235,7 +237,7 @@ - +