3 Achegas 9deb626da0 ... 45a4b870ae

Autor SHA1 Mensaxe Data
  Si Thu Mg Mg 45a4b870ae Fix iframe %!s(int64=5) %!d(string=hai) anos
  Si Thu Mg Mg 8907edf54e Merge branch 'master' of https://git.mokkon.com/sithu/Forward_Station_Server %!s(int64=5) %!d(string=hai) anos
  Si Thu Mg Mg 931d60b1b4 Fix Files %!s(int64=5) %!d(string=hai) anos
Modificáronse 49 ficheiros con 2136 adicións e 1026 borrados
  1. 1 1
      api/v1/Customers/Delete.php
  2. 1 1
      api/v1/Customers/Edit.php
  3. 1 1
      api/v1/Customers/addCustomer.php
  4. 1 1
      api/v1/Customers/addVehicle.php
  5. 31 1
      api/v1/Customers/customers.txt
  6. 9 9
      api/v1/Customers/customersDetails.php
  7. 1 1
      api/v1/Customers/deleteVehicle.php
  8. 1 1
      api/v1/Customers/editVehicle.php
  9. 1 82
      api/v1/Customers/vehicles.txt
  10. 1 22
      api/v1/Deliveries/selectDeliveryVw.php
  11. 45 0
      api/v1/ShiftPumpReport/shiftPumpData.php
  12. 3 0
      api/v1/ShiftPumpReport/shiftPumpData.txt
  13. 0 43
      api/v1/ShiftPumpReport/shiftPumpReport1.php
  14. 66 0
      api/v1/ShiftPumpReport/shiftPumpView.php
  15. 0 33
      api/v1/ShiftPumpReport/shiftPumpVw1.php
  16. 37 0
      api/v1/ShiftSaleReport/shiftSaleData.php
  17. 484 0
      api/v1/ShiftSaleReport/shiftSaleData.txt
  18. 0 32
      api/v1/ShiftSaleReport/shiftSaleReport1.php
  19. 0 31
      api/v1/ShiftSaleReport/shiftSaleReport2.php
  20. 60 0
      api/v1/ShiftSaleReport/shiftSaleView.php
  21. 0 33
      api/v1/ShiftSaleReport/shiftSaleVw1.php
  22. 0 33
      api/v1/ShiftSaleReport/shiftSaleVw2.php
  23. 47 0
      api/v1/ShiftTankReport/shiftTankData.php
  24. 124 0
      api/v1/ShiftTankReport/shiftTankData.txt
  25. 0 37
      api/v1/ShiftTankReport/shiftTankReport1.php
  26. 0 38
      api/v1/ShiftTankReport/shiftTankReport2.php
  27. 0 40
      api/v1/ShiftTankReport/shiftTankReport3.php
  28. 72 0
      api/v1/ShiftTankReport/shiftTankView.php
  29. 0 32
      api/v1/ShiftTankReport/shiftTankVw1.php
  30. 0 32
      api/v1/ShiftTankReport/shiftTankVw2.php
  31. 0 32
      api/v1/ShiftTankReport/shiftTankVw3.php
  32. 53 0
      api/v1/Update_Prices/EditStatus.php
  33. 0 0
      api/v1/Update_Prices/addPricesUpdate.php
  34. 33 0
      api/v1/Update_Prices/updatePricesData.php
  35. 284 0
      api/v1/Update_Prices/updatePricesData.txt
  36. 78 0
      api/v1/Update_Prices/updatePricesView.php
  37. 129 0
      api/v1/Users/addUser.php
  38. 1 0
      customers.php
  39. BIN=BIN
      db/f.db
  40. 1 120
      deliveries.php
  41. 102 0
      header.php
  42. 2 309
      index.php
  43. 399 0
      ini/logs/log.txt
  44. 1 0
      logs/log.txt
  45. 1 1
      pid
  46. 19 22
      shiftPumpReport.php
  47. 18 21
      shiftSaleReport.php
  48. 18 13
      shiftTankReport.php
  49. 11 4
      test.php

+ 1 - 1
api/v1/Customers/Delete.php

@@ -9,7 +9,7 @@ $del = "DELETE FROM customer WHERE id='$id'";
 
 $db->exec($del);
 
- //echo '<script>window.location.href="index.php"</script>';
+echo '<script>window.location.href="customers.php"</script>';
 }
 
  ?>

+ 1 - 1
api/v1/Customers/Edit.php

@@ -13,7 +13,7 @@
     //$sql2 ="UPDATE vehicle SET number='$number' WHERE id='$vehicle_id'";
     $db->exec($sql);
     //$db->exec($sql2);
-    echo '<script>window.location.href="index.php"</script>';
+    echo '<script>window.location.href="customers.php"</script>';
   }
  
 

+ 1 - 1
api/v1/Customers/addCustomer.php

@@ -7,7 +7,7 @@
 
     $db->exec("INSERT INTO customer (type,created_at,updated_at,name,credit_sale) VALUES ('',strftime('%Y-%m-%d %H:%M:%f000000+06:30', 'now', 'localtime'),strftime('%Y-%m-%d %H:%M:%f000000+06:30', 'now', 'localtime'),'$username','$creditSale');");
 
-    echo '<script>window.location.href="index.php"</script>';
+    echo '<script>window.location.href="customers.php"</script>';
     }
  ?>
  <style type="text/css">

+ 1 - 1
api/v1/Customers/addVehicle.php

@@ -7,7 +7,7 @@
 
     $db->exec("INSERT INTO vehicle (type,created_at,updated_at,customer_id,number) VALUES ('',strftime('%Y-%m-%d %H:%M:%f000000+06:30', 'now', 'localtime'),strftime('%Y-%m-%d %H:%M:%f000000+06:30', 'now', 'localtime'),'$cid','$number');");
 
-    echo '<script>window.location.href="index.php"</script>';
+    echo '<script>window.location.href="customers.php"</script>';
     }
  ?>
 <style type="text/css">

+ 31 - 1
api/v1/Customers/customers.txt

@@ -48,7 +48,7 @@
         {
             "Customer_Id": 14,
             "Name": "Si Thu Mg",
-            "Credit_Sale": "No"
+            "Credit_Sale": "Yes"
         },
         {
             "Customer_Id": 15,
@@ -479,6 +479,36 @@
             "Customer_Id": 107,
             "Name": "Si Thu Mg Mg ",
             "Credit_Sale": "Yes"
+        },
+        {
+            "Customer_Id": 108,
+            "Name": "user",
+            "Credit_Sale": "Yes"
+        },
+        {
+            "Customer_Id": 109,
+            "Name": "kyaw kyaw",
+            "Credit_Sale": "Yes"
+        },
+        {
+            "Customer_Id": 110,
+            "Name": "testing",
+            "Credit_Sale": "No"
+        },
+        {
+            "Customer_Id": 111,
+            "Name": "new",
+            "Credit_Sale": "No"
+        },
+        {
+            "Customer_Id": 112,
+            "Name": "water",
+            "Credit_Sale": "No"
+        },
+        {
+            "Customer_Id": 114,
+            "Name": "Aung Kyaw",
+            "Credit_Sale": "Yes"
         }
     ]
 }

+ 9 - 9
api/v1/Customers/customersDetails.php

@@ -75,22 +75,22 @@ $(document).ready(function() {
             //{ "data": "Number" },
         ],
         "order": [[1, 'asc']],
-        select: true
+        //select: true
     } );
 
     // Add event listener for opening and closing details
     $('#example tbody').on('click', 'td.name', function () {
         var tr = $(this).closest('tr');
         var row = table.row( tr );
-        var username = table.row( this ).data()['Name'];
-        var idForVehicle = table.row( this ).data()['Customer_Id'];
+        var username = row.data()['Name'];
+        var idForVehicle = row.data()['Customer_Id'];
         document.cookie = "customerId="+idForVehicle;
         document.cookie = "customerName="+username;
+        window.location.href = 'customers.php';
         //document.getElementById('loadVehicles').value = idForVehicle;
         //console.log( table.row( this ).data() );
         //alert( table.row( this ).data()['Customer_Id'] );
         //location.reload();
-        window.location.href = 'index.php';
 
     } );
 
@@ -98,8 +98,8 @@ $(document).ready(function() {
     $('#example tbody').on('click', 'td.delete', function () {
         var tr = $(this).closest('tr');
         var row = table.row( tr );
-        var username = table.row( this ).data()['Name'];
-        var id = table.row( this ).data()['Customer_Id'];
+        var username = row.data()['Name'];
+        var id = row.data()['Customer_Id'];
         document.getElementById('deleteid').value = id;
 
         document.getElementById('deleteForm').style.display = 'block';
@@ -114,9 +114,9 @@ $(document).ready(function() {
 
         // console.log( table.row( this ).data() );
         // alert( table.row( this ).data()['Name'] );
-        var username = table.row( this ).data()['Name'];
-        var creditSale = table.row( this ).data()['Credit_Sale'];
-        var id = table.row( this ).data()['Customer_Id'];
+        var username = row.data()['Name'];
+        var creditSale = row.data()['Credit_Sale'];
+        var id = row.data()['Customer_Id'];
 
         document.getElementById('username').value = username;
         document.getElementById('id').value = id;

+ 1 - 1
api/v1/Customers/deleteVehicle.php

@@ -9,7 +9,7 @@ $del = "DELETE FROM vehicle WHERE id='$id'";
 
 $db->exec($del);
 
- echo '<script>window.location.href="index.php"</script>';
+    echo '<script>window.location.href="customers.php"</script>';
 }
 
  ?>

+ 1 - 1
api/v1/Customers/editVehicle.php

@@ -9,7 +9,7 @@
     
     $db->exec($sql);
 
-    echo '<script>window.location.href="index.php"</script>';
+    echo '<script>window.location.href="customers.php"</script>';
 
 	}
  ?>

+ 1 - 82
api/v1/Customers/vehicles.txt

@@ -1,84 +1,3 @@
 {
-    "data": [
-        {
-            "Customer_Id": 3,
-            "Id": 4,
-            "Number": "2F\/8124"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 5,
-            "Number": "5B\/3429"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 6,
-            "Number": "7J\/5931"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 7,
-            "Number": "RS\/1234"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 9,
-            "Number": "1M\/9252"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 10,
-            "Number": "6M\/6445"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 11,
-            "Number": "DY\/60ES"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 12,
-            "Number": "9H\/9537"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 13,
-            "Number": "5K\/9939"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 14,
-            "Number": "7M\/4947"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 15,
-            "Number": "7J\/1619"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 19,
-            "Number": "4C\/1619"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 21,
-            "Number": "5C\/3113"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 25,
-            "Number": "2N\/1762"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 32,
-            "Number": "1K\/9943"
-        },
-        {
-            "Customer_Id": 3,
-            "Id": 33,
-            "Number": "2N\/9995"
-        }
-    ]
+    "data": []
 }

+ 1 - 22
api/v1/Deliveries/selectDeliveryVw.php

@@ -3,15 +3,7 @@
 
 $selectDelivery1 = $db->query("SELECT * FROM delivery JOIN delivery_tank ON delivery.id=delivery_tank.delivery_id");
 
-// print_r("<thead><tr>
-//         <th>Action</th>
-//         <th>Message</th>
-//         <th>id</th>
-//         <th>Tank</th>
-//         <th>Status</th>
-//         <th>Start</th>
-//         <th>End</th>
-//         </tr></thead> ");
+
 $json_data=[];
 function dateFormatChanger($datetime) {
 
@@ -26,19 +18,6 @@ return($newDate." ".$time[0]);
 }
 while ($row = $selectDelivery1->fetchArray()) {
 
-	//print_r($row);
-// 	print_r(
-//   "<tr>"
-//   ."<td>".$row['type']."</td>"
-//   ."<td>".$row['type']."</td>"
-//   ."<td>".$row['id']."</td>"
-//   ."<td>".$row['tank_id']."</td>"
-//   ."<td>".$row['status']."</td>"
-//   ."<td>".$row['start']."</td>"
-//   ."<td>".$row['end']."</td>"
-//   ."</tr>"
-// );
-
 $details = [
 "Action" => $row['type'],
 "Message" => $row['type'],

+ 45 - 0
api/v1/ShiftPumpReport/shiftPumpData.php

@@ -0,0 +1,45 @@
+<?php 
+    require "connectionDb.php";
+if (isset($_POST['find'])) {
+	
+$date = $_POST['selectDateToFind'];
+$date = str_replace('-', '_', $date);
+$shiftnum = $_POST['shiftNumber'];
+$fuelgrade = $_POST['fuelGrade'];
+$customers = $db->query("SELECT * FROM shift_pump_vw WHERE date='$date' AND number='$shiftnum' AND grade_name='$fuelGrade' ");
+
+$json_data=[];
+
+while ($row = $customers->fetchArray()) {
+
+//print_r($row);
+$openVolume = $row['open_volume'];
+$closeVolume = $row['close_volume'];
+$saleTotal =$closeVolume-$openVolume;
+$price= $row['price'];
+$moneyTotal = $saleTotal*$price;
+
+$details = [
+"Shift_Id" => $row['shift_id'],
+"Date" => $row['date'],
+"Number" => $row['number'],
+"Open_Date" => date('Y-M-d h:i:s A',$row['open_date']),
+"Close_Date" => date('Y-M-d h:i:s A',$row['close_date']),
+"Fp_Id" => $row['fp_id'],
+"Grade_Name" => $row['grade_name'],
+"Open_Volume" => $row['open_volume'],
+"Close_Volume" => $row['close_volume'],
+"Price" => $row['price'],
+"Sale_Total" => $saleTotal,
+"Money_Total" => $moneyTotal,
+];
+//here pushing the values in to an array  
+array_push($json_data,$details);  
+}
+$json_data_all = ["data" => $json_data];
+
+$myfile = fopen("api/v1/ShiftPumpReport/shiftPumpData.txt", "w+") or die("Unable to open file!");;
+fwrite($myfile,json_encode($json_data_all, JSON_PRETTY_PRINT));
+fclose($myfile);
+}
+ ?>

+ 3 - 0
api/v1/ShiftPumpReport/shiftPumpData.txt

@@ -0,0 +1,3 @@
+{
+    "data": []
+}

+ 0 - 43
api/v1/ShiftPumpReport/shiftPumpReport1.php

@@ -1,43 +0,0 @@
-<?php 
-require "connectionDb.php";
-
-$date = $_GET['selectDateToFind'];
-$date = str_replace('-', '_', $date);
-$shiftnum = 1;
-$shiftPumpReport1 = $db->query("SELECT * FROM shift_pump_vw WHERE date='$date'");
-
-print_r("<thead><tr>
-        <th>Pump Number</th>
-        <th>Fuel Grade</th>
-        <th>Pump Opening Volume</th>
-        <th>Pump Closing Volume</th>
-        <th>Sale Volume 
-(Closing Volume - Opening Volume)</th>
-        <th>Unit Price</th>
-        <th>Money 
-(Sale Volume x Unit Price)</th>
-        </tr></thead>");
-
-while ($row = $shiftPumpReport1->fetchArray()) {
-  //print_r($row);
-if ($row['number']==$shiftnum) {
-  $openVolume = $row['open_volume'];
-  $closeVolume = $row['close_volume'];
-  $saleTotal =$closeVolume-$openVolume;
-  $price= $row['price'];
-  $moneyTotal = $saleTotal*$price;
-  print_r(
-  "<tr>"
-  ."<td>".$row['fp_id']."</td>"
-  ."<td>".$row['grade_name']."</td>"
-  ."<td>".decimalAndNumberFormat1($row['open_volume'])."</td>"
-  ."<td>".decimalAndNumberFormat1($row['close_volume'])."</td>"
-  ."<td>".decimalAndNumberFormat1($saleTotal)."</td>"
-  ."<td>".decimalAndNumberFormat1($row['price'])."</td>"
-  ."<td>".decimalAndNumberFormat1($moneyTotal)."</td>"
-  ."</tr>"
-);
-}
-}
-
- ?>

+ 66 - 0
api/v1/ShiftPumpReport/shiftPumpView.php

@@ -0,0 +1,66 @@
+<table id="example" class="table display table-striped table-bordered table-hover table-sm" cellspacing="0" width="100%">
+        <thead>
+         <tr>
+             <th>Pump Number</th>
+             <th>Fuel Grade</th>
+             <th>Shift Opening Date</th>
+             <th>Pump Opening Volume</th>
+             <th>Shift Closing</th>
+             <th>Pump Closing Volume</th>
+             <th>Sale Volume (Closing Volume - Opening Volume)</th>
+             <th>Unit Price</th>
+             <th>Money (Sale Volume x Unit Price)</th>
+         </tr>
+        </thead>
+        <tfoot>
+            <tr>
+                <th>Pump Number</th>
+                <th>Fuel Grade</th>
+                <th>Shift Opening Date</th>
+                <th>Pump Opening Volume</th>
+                <th>Shift Closing</th>
+                <th>Pump Closing Volume</th>
+                <th>Sale Volume (Closing Volume - Opening Volume)</th>
+                <th>Unit Price</th>
+                <th>Money (Sale Volume x Unit Price)</th>
+            </tr>
+        </tfoot>
+    </table>
+<script type="text/javascript">
+$(document).ready(function() {
+    var table = $('#example').DataTable( {
+        "ajax": "api/v1/ShiftPumpReport/shiftPumpData.txt",
+         "dom": 'Bfrtip',
+        "buttons": [
+            'copy',
+            'csv',
+            'excel',
+            'pdf',
+            'print',
+            // {
+            //     extend: 'print',
+            //     text: 'Print all (not just selected)',
+            //     exportOptions: {
+            //         modifier: {
+            //             selected: null
+            //         }
+            //     }
+            // }
+        ],
+        "select": true,
+        "columns": [
+            { "data": "Fp_Id" },
+            { "data": "Grade_Name" },
+            { "data": "Open_Date"},
+            { "data": "Open_Volume" },
+            { "data": "Close_Date" },
+            { "data": "Close_Volume" },
+            { "data": "Sale_Total" },
+            { "data": "Price" },
+            { "data": "Money_Total" },
+        ],
+        "order": [[1, 'asc']],
+       
+    } );
+} );
+</script>

+ 0 - 33
api/v1/ShiftPumpReport/shiftPumpVw1.php

@@ -1,33 +0,0 @@
-<?php 
-require "connectionDb.php";
-
-$date = $_GET['selectDateToFind'];
-$date = str_replace('-', '_', $date);
-$shiftnum = 1;
-$shiftPumpReport = $db->query("SELECT * FROM shift_pump_vw WHERE date='$date'");
-  
-
-//Shift 1
-while ($row = $shiftPumpReport->fetchArray()) {
-if ($row['number']==$shiftnum) {
-  print_r("<tr>
-        <th>Shift Id:</th>
-        <th>Shift Date:</th>
-        <th>Shift Number</th>
-        <th>Shift Opening:</th>
-        <th>Shift Closing:</th>
-        </tr>");
-  print_r(
-  "<tr>"
-  ."<td>".$row['shift_id']."</td>"
-  ."<td>".$row['date']."</td>"
-  ."<td>".$row['number']."</td>"
-  ."<td>".$row['open_date']."</td>"
-  ."<td>".$row['close_date']."</td>"
-  ."</tr>"
-  
-);
-    break;
-}
-}
-?>

+ 37 - 0
api/v1/ShiftSaleReport/shiftSaleData.php

@@ -0,0 +1,37 @@
+<?php 
+    require "connectionDb.php";
+if (isset($_POST['find'])) {
+	
+$date = $_POST['selectDateToFind'];
+$date = str_replace('-', '_', $date);
+$shiftnum = $_POST['shiftNumber'];
+$fuelgrade = $_POST['fuelGrade'];
+$customers = $db->query("SELECT * FROM shift_sale_vw WHERE date='$date' AND number='$shiftnum' AND grade_name='$fuelgrade' ");
+
+$json_data=[];
+
+while ($row = $customers->fetchArray()) {
+
+// print_r($row);
+$details = [
+"Shift_Id" => $row['shift_id'],
+"Date" => $row['date'],
+"Number" => $row['number'],
+"Open_Date" => date('Y-M-d h:i:s A',$row['open_date']),
+"Close_Date" => date('Y-M-d h:i:s A',$row['close_date']),
+"Fp_Id" => $row['fp_id'],
+"Grade_Name" => $row['grade_name'],
+"Price" => $row['price'],
+"Volume" => $row['volume'],
+"Amount" => $row['amount'],
+];
+//here pushing the values in to an array  
+array_push($json_data,$details);  
+}
+$json_data_all = ["data" => $json_data];
+
+$myfile = fopen("api/v1/ShiftSaleReport/shiftSaleData.txt", "w+") or die("Unable to open file!");;
+fwrite($myfile,json_encode($json_data_all, JSON_PRETTY_PRINT));
+fclose($myfile);
+}
+ ?>

+ 484 - 0
api/v1/ShiftSaleReport/shiftSaleData.txt

@@ -0,0 +1,484 @@
+{
+    "data": [
+        {
+            "Id": 1,
+            "status": "Canceled",
+            "timing": "Shift Change",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 2,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 3,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 4,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 5,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 6,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 7,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 8,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 9,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 10,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 11,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 12,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 13,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 14,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 15,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 16,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 17,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 18,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 19,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 20,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 21,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 22,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 23,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 24,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 25,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 26,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 27,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 28,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 29,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 30,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 31,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 32,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 33,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 34,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 35,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 36,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 37,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 38,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 39,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        },
+        {
+            "Id": 40,
+            "status": "Successful",
+            "timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM",
+            "Fp_Id": null,
+            "Grade_Name": null,
+            "Price": null,
+            "Volume": null,
+            "Amount": null
+        }
+    ]
+}

+ 0 - 32
api/v1/ShiftSaleReport/shiftSaleReport1.php

@@ -1,32 +0,0 @@
-<?php 
-require "connectionDb.php";
-
-$date = $_GET['selectDateToFind'];
-$date = str_replace('-', '_', $date);
-$shiftnum = 1;
-$shiftSaleReport1 = $db->query("SELECT * FROM shift_sale_vw WHERE date='$date'");
-
-print_r("<tr>
-        <th>Pump Number</th>
-        <th>Fuel Grade</th>
-        <th>Unit Price</th>
-        <th>Volume</th>
-        <th>Amount</th>
-        </tr>");
-
-while ($row = $shiftSaleReport1->fetchArray()) {
-if ($row['number']==$shiftnum) {
-  print_r(
-  "<tr>"
-  ."<td>".$row['fp_id']."</td>"
-  ."<td>".$row['grade_name']."</td>"
-  ."<td>".decimalAndNumberFormat1($row['price'])."</td>"
-  ."<td>".decimalAndNumberFormat1($row['volume'])."</td>"
-  ."<td>".decimalAndNumberFormat1($row['amount'])."</td>"
-  ."</tr>"
-);
-}
-}
-
- ?>
-

+ 0 - 31
api/v1/ShiftSaleReport/shiftSaleReport2.php

@@ -1,31 +0,0 @@
-<?php 
-require "connectionDb.php";
-
-$date = $_GET['selectDateToFind'];
-$date = str_replace('-', '_', $date);
-$shiftnum = 2;
-$shiftTankReport2 = $db->query("SELECT * FROM shift_sale_vw WHERE date='$date'");
-
-print_r("<tr>
-        <th>Pump Number</th>
-        <th>Fuel Grade</th>
-        <th>Unit Price</th>
-        <th>Volume</th>
-        <th>Amount</th>
-        </tr>");
-
-while ($row = $shiftTankReport2->fetchArray()) {
-if ($row['number']==$shiftnum) {
-  print_r(
-  "<tr>"
-  ."<td>".$row['fp_id']."</td>"
-  ."<td>".$row['grade_name']."</td>"
-  ."<td>".decimalAndNumberFormat1($row['price'])."</td>"
-  ."<td>".decimalAndNumberFormat1($row['volume'])."</td>"
-  ."<td>".decimalAndNumberFormat1($row['amount'])."</td>"
-  ."</tr>"
-);
-}
-}
- ?>
-

+ 60 - 0
api/v1/ShiftSaleReport/shiftSaleView.php

@@ -0,0 +1,60 @@
+<table id="example" class="table display table-striped table-bordered table-hover table-sm" cellspacing="0" width="100%">
+        <thead>
+         <tr>
+             <th>Pump Number</th>
+             <th>Fuel Grade</th>
+             <th>Shift Opening Date</th>
+             <th>Shift Closing Date</th>
+             <th>Unit Price</th>
+             <th>Volume</th>
+             <th>Amount</th>
+         </tr>
+        </thead>
+<!--         <tfoot>
+            <tr>
+                <th>Pump Number</th>
+                <th>Fuel Grade</th>
+                <th>Shift Opening Date</th>
+                <th>Shift Closing Date</th>
+                <th>Unit Price</th>
+                <th>Volume
+                <th>Amount</th>
+            </tr>
+        </tfoot> -->
+    </table>
+<script type="text/javascript">
+$(document).ready(function() {
+    var table = $('#example').DataTable( {
+        "ajax": "api/v1/ShiftSaleReport/shiftSaleData.txt",
+         "dom": 'Bfrtip',
+        "buttons": [
+            'copy',
+            'csv',
+            'excel',
+            'pdf',
+            'print',
+            // {
+            //     extend: 'print',
+            //     text: 'Print all (not just selected)',
+            //     exportOptions: {
+            //         modifier: {
+            //             selected: null
+            //         }
+            //     }
+            // }
+        ],
+        "select": true,
+        "columns": [
+            { "data": "Fp_Id" },
+            { "data": "Grade_Name" },
+            { "data": "Open_Date"},
+            { "data": "Close_Date" },
+            { "data": "Price" },
+            { "data": "Volume" },
+            { "data": "Amount" },
+        ],
+        "order": [[1, 'asc']],
+       
+    } );
+} );
+</script>

+ 0 - 33
api/v1/ShiftSaleReport/shiftSaleVw1.php

@@ -1,33 +0,0 @@
-<?php 
-require "connectionDb.php";
-
-$date = $_GET['selectDateToFind'];
-$date = str_replace('-', '_', $date);
-$shiftnum = 1;
-$shiftSaleReport = $db->query("SELECT * FROM shift_sale_vw WHERE date='$date'");
-  
-
-//Shift 1
-while ($row = $shiftSaleReport->fetchArray()) {
-if ($row['number']==$shiftnum) {
-  print_r("<tr>
-        <th>Shift Id:</th>
-        <th>Shift Date:</th>
-        <th>Shift Number</th>
-        <th>Shift Opening:</th>
-        <th>Shift Closing:</th>
-        </tr>");
-  print_r(
-  "<tr>"
-  ."<td>".$row['shift_id']."</td>"
-  ."<td>".$row['date']."</td>"
-  ."<td>".$row['number']."</td>"
-  ."<td>".$row['open_date']."</td>"
-  ."<td>".$row['close_date']."</td>"
-  ."</tr>"
-  
-);
-    break;
-}
-}
-?>

+ 0 - 33
api/v1/ShiftSaleReport/shiftSaleVw2.php

@@ -1,33 +0,0 @@
-<?php 
-require "connectionDb.php";
-
-$date = $_GET['selectDateToFind'];
-$date = str_replace('-', '_', $date);
-$shiftnum = 2;
-$shiftSaleReport = $db->query("SELECT * FROM shift_sale_vw WHERE date='$date'");
-  
-
-//Shift 1
-while ($row = $shiftSaleReport->fetchArray()) {
-if ($row['number']==$shiftnum) {
-  print_r("<tr>
-        <th>Shift Id:</th>
-        <th>Shift Date:</th>
-        <th>Shift Number</th>
-        <th>Shift Opening:</th>
-        <th>Shift Closing:</th>
-        </tr>");
-  print_r(
-  "<tr>"
-  ."<td>".$row['shift_id']."</td>"
-  ."<td>".$row['date']."</td>"
-  ."<td>".$row['number']."</td>"
-  ."<td>".$row['open_date']."</td>"
-  ."<td>".$row['close_date']."</td>"
-  ."</tr>"
-  
-);
-    break;
-}
-}
-?>

+ 47 - 0
api/v1/ShiftTankReport/shiftTankData.php

@@ -0,0 +1,47 @@
+<?php 
+    require "connectionDb.php";
+if (isset($_POST['find'])) {
+	
+$date = $_POST['selectDateToFind'];
+$date = str_replace('-', '_', $date);
+$shiftnum = $_POST['shiftNumber'];
+
+if ($_POST['fuelGrade']=='ALL') {
+$customers = $db->query("SELECT * FROM shift_tank_vw WHERE date='$date' AND number='$shiftnum' ");
+}else {
+$fuelgrade = $_POST['fuelGrade'];
+$customers = $db->query("SELECT * FROM shift_tank_vw WHERE date='$date' AND number='$shiftnum' AND product_text='$fuelgrade' ");
+}
+
+
+
+$json_data=[];
+
+while ($row = $customers->fetchArray()) {
+
+ //print_r($row);
+$details = [
+"Shift_Id" => $row['shift_id'],
+"Date" => $row['date'],
+"Number" => $row['number'],
+"Open_Date" => date('Y-M-d h:i:s A',$row['open_date']),
+"Close_Date" => date('Y-M-d h:i:s A',$row['close_date']),
+"Tank_Id" => $row['tank_id'],
+"Product_Text" => $row['product_text'],
+"Open_Vol" => $row['open_vol'],
+"Close_Vol" => $row['close_vol'],
+"Open_Water_Vol" => $row['open_water_vol'],
+"Close_Water_Vol" => $row['close_water_vol'],
+"Open_Level" => $row['open_level'],
+"Close_Level" => $row['close_level'],
+];
+//here pushing the values in to an array  
+array_push($json_data,$details);  
+}
+$json_data_all = ["data" => $json_data];
+
+$myfile = fopen("api/v1/ShiftTankReport/shiftTankData.txt", "w+") or die("Unable to open file!");;
+fwrite($myfile,json_encode($json_data_all, JSON_PRETTY_PRINT));
+fclose($myfile);
+}
+ ?>

+ 124 - 0
api/v1/ShiftTankReport/shiftTankData.txt

@@ -0,0 +1,124 @@
+{
+    "data": [
+        {
+            "Shift_Id": 604,
+            "Date": "2019_05_16",
+            "Number": 1,
+            "Open_Date": "2019-May-16 12:35:21 AM",
+            "Close_Date": "2019-May-16 12:34:24 PM",
+            "Tank_Id": 1,
+            "Product_Text": "P\/Diesel",
+            "Open_Vol": 9584.5,
+            "Close_Vol": 9623.2001953125,
+            "Open_Water_Vol": 0,
+            "Close_Water_Vol": 0,
+            "Open_Level": 689.7000122070312,
+            "Close_Level": 691.7000122070312
+        },
+        {
+            "Shift_Id": 604,
+            "Date": "2019_05_16",
+            "Number": 1,
+            "Open_Date": "2019-May-16 12:35:21 AM",
+            "Close_Date": "2019-May-16 12:34:24 PM",
+            "Tank_Id": 2,
+            "Product_Text": "P\/Diesel",
+            "Open_Vol": 24942.900390625,
+            "Close_Vol": 21081.900390625,
+            "Open_Water_Vol": 0,
+            "Close_Water_Vol": 0,
+            "Open_Level": 1423.4000244140625,
+            "Close_Level": 1249.699951171875
+        },
+        {
+            "Shift_Id": 604,
+            "Date": "2019_05_16",
+            "Number": 1,
+            "Open_Date": "2019-May-16 12:35:21 AM",
+            "Close_Date": "2019-May-16 12:34:24 PM",
+            "Tank_Id": 3,
+            "Product_Text": "Diesel",
+            "Open_Vol": 7024.5,
+            "Close_Vol": 6481.60009765625,
+            "Open_Water_Vol": 0,
+            "Close_Water_Vol": 0,
+            "Open_Level": 543.2999877929688,
+            "Close_Level": 512.7000122070312
+        },
+        {
+            "Shift_Id": 604,
+            "Date": "2019_05_16",
+            "Number": 1,
+            "Open_Date": "2019-May-16 12:35:21 AM",
+            "Close_Date": "2019-May-16 12:34:24 PM",
+            "Tank_Id": 4,
+            "Product_Text": "Diesel",
+            "Open_Vol": 29619.5,
+            "Close_Vol": 26847.69921875,
+            "Open_Water_Vol": 0,
+            "Close_Water_Vol": 0,
+            "Open_Level": 1632.9000244140625,
+            "Close_Level": 1507.0999755859375
+        },
+        {
+            "Shift_Id": 604,
+            "Date": "2019_05_16",
+            "Number": 1,
+            "Open_Date": "2019-May-16 12:35:21 AM",
+            "Close_Date": "2019-May-16 12:34:24 PM",
+            "Tank_Id": 5,
+            "Product_Text": "92 RON",
+            "Open_Vol": 7914.2001953125,
+            "Close_Vol": 5761.7001953125,
+            "Open_Water_Vol": 0,
+            "Close_Water_Vol": 0,
+            "Open_Level": 1022.9000244140625,
+            "Close_Level": 810
+        },
+        {
+            "Shift_Id": 604,
+            "Date": "2019_05_16",
+            "Number": 1,
+            "Open_Date": "2019-May-16 12:35:21 AM",
+            "Close_Date": "2019-May-16 12:34:24 PM",
+            "Tank_Id": 6,
+            "Product_Text": "92 RON",
+            "Open_Vol": 21590.30078125,
+            "Close_Vol": 21595.19921875,
+            "Open_Water_Vol": 0,
+            "Close_Water_Vol": 0,
+            "Open_Level": 2283.89990234375,
+            "Close_Level": 2284.5
+        },
+        {
+            "Shift_Id": 604,
+            "Date": "2019_05_16",
+            "Number": 1,
+            "Open_Date": "2019-May-16 12:35:21 AM",
+            "Close_Date": "2019-May-16 12:34:24 PM",
+            "Tank_Id": 7,
+            "Product_Text": "95 RON",
+            "Open_Vol": 9063.2998046875,
+            "Close_Vol": 8595.5,
+            "Open_Water_Vol": 0,
+            "Close_Water_Vol": 0,
+            "Open_Level": 1113,
+            "Close_Level": 1070.5999755859375
+        },
+        {
+            "Shift_Id": 604,
+            "Date": "2019_05_16",
+            "Number": 1,
+            "Open_Date": "2019-May-16 12:35:21 AM",
+            "Close_Date": "2019-May-16 12:34:24 PM",
+            "Tank_Id": 8,
+            "Product_Text": "95 RON",
+            "Open_Vol": 5025.2998046875,
+            "Close_Vol": 4861.5,
+            "Open_Water_Vol": 0,
+            "Close_Water_Vol": 0,
+            "Open_Level": 736.7000122070312,
+            "Close_Level": 719.5
+        }
+    ]
+}

+ 0 - 37
api/v1/ShiftTankReport/shiftTankReport1.php

@@ -1,37 +0,0 @@
-<?php 
-require "connectionDb.php";
-
-$date = $_GET['selectDateToFind'];
-$date = str_replace('-', '_', $date);
-$shiftnum = 1;
-$shiftTankReport1 = $db->query("SELECT * FROM shift_tank_vw WHERE date='$date'");
-
-print_r("<tr>
-        <th>Tank Number</th>
-        <th>Product Text</th>
-        <th>Open Volume</th>
-        <th>Close Volume</th>
-        <th>Open Water Volume</th>
-        <th>Close  Water Volume</th>
-        <th>Open Level</th>
-        <th>Close Level</th>
-        </tr>");
-
-while ($row = $shiftTankReport1->fetchArray()) {
-if ($row['number']==$shiftnum) {
-  print_r(
-  "<tr>"
-  ."<td>".$row['tank_id']."</td>"
-  ."<td>".$row['product_text']."</td>"
-  ."<td>".decimalAndNumberFormat1($row['open_vol'])."</td>"
-  ."<td>".decimalAndNumberFormat1($row['close_vol'])."</td>"
-  ."<td>".decimalAndNumberFormat1($row['open_water_vol'])."</td>"
-  ."<td>".decimalAndNumberFormat1($row['close_water_vol'])."</td>"
-  ."<td>".decimalAndNumberFormat2($row['open_level'])."</td>"
-  ."<td>".decimalAndNumberFormat2($row['close_level'])."</td>"
-  ."</tr>"
-);
-}
-}
- ?>
-

+ 0 - 38
api/v1/ShiftTankReport/shiftTankReport2.php

@@ -1,38 +0,0 @@
-<?php 
-require "connectionDb.php";
-
-$date = $_GET['selectDateToFind'];
-$date = str_replace('-', '_', $date);
-$shiftnum = 2;
-$shiftTankReport2 = $db->query("SELECT * FROM shift_tank_vw WHERE date='$date'");
-
-print_r("<tr>
-        <th>Tank Number</th>
-        <th>Product Text</th>
-        <th>Open Volume</th>
-        <th>Close Volume</th>
-        <th>Open Water Volume</th>
-        <th>Close  Water Volume</th>
-        <th>Open Level</th>
-        <th>Close Level</th>
-        </tr>");
-
-while ($row = $shiftTankReport2->fetchArray()) {
-
-if ($row['number']==$shiftnum) {
-  print_r(
-  "<tr>"
-  ."<td>".$row['tank_id']."</td>"
-  ."<td>".$row['product_text']."</td>"
-  ."<td>".decimalAndNumberFormat1($row['open_vol'])."</td>"
-  ."<td>".decimalAndNumberFormat1($row['close_vol'])."</td>"
-  ."<td>".decimalAndNumberFormat1($row['open_water_vol'])."</td>"
-  ."<td>".decimalAndNumberFormat1($row['close_water_vol'])."</td>"
-  ."<td>".decimalAndNumberFormat2($row['open_level'])."</td>"
-  ."<td>".decimalAndNumberFormat2($row['close_level'])."</td>"
-  ."</tr>"
-);
-}
-}
- ?>
-

+ 0 - 40
api/v1/ShiftTankReport/shiftTankReport3.php

@@ -1,40 +0,0 @@
-<?php 
-require "connectionDb.php";
-
-$date = $_GET['selectDateToFind'];
-$date = str_replace('-', '_', $date);
-$shiftnum = 3;
-$shiftTankReport3 = $db->query("SELECT * FROM shift_tank_vw WHERE date='$date'");
-
-while ($row = $shiftTankReport3->fetchArray()) {
-if ($row['number']==$shiftnum) {
-    echo "<div style='display: none;'>".
-    print_r("<tr>
-        <th>Tank Number</th>
-        <th>Product Text</th>
-        <th>Open Volume</th>
-        <th>Close Volume</th>
-        <th>Open Water Volume</th>
-        <th>Close  Water Volume</th>
-        <th>Open Level</th>
-        <th>Close Level</th>
-        </tr>")
-  ."</div>";
-}
-if ($row['number']==$shiftnum) {
-  print_r(
-  "<tr>"
-  ."<td>".$row['tank_id']."</td>"
-  ."<td>".$row['product_text']."</td>"
-  ."<td>".decimalAndNumberFormat1($row['open_vol'])."</td>"
-  ."<td>".decimalAndNumberFormat1($row['close_vol'])."</td>"
-  ."<td>".decimalAndNumberFormat1($row['open_water_vol'])."</td>"
-  ."<td>".decimalAndNumberFormat1($row['close_water_vol'])."</td>"
-  ."<td>".decimalAndNumberFormat2($row['open_level'])."</td>"
-  ."<td>".decimalAndNumberFormat2($row['close_level'])."</td>"
-  ."</tr>"
-);
-}
-}
- ?>
-

+ 72 - 0
api/v1/ShiftTankReport/shiftTankView.php

@@ -0,0 +1,72 @@
+<table id="example" class="table display table-striped table-bordered table-hover table-sm" cellspacing="0" width="100%">
+<thead>
+ <tr>
+     <th>Tank Number</th>
+     <th>Product</th>
+     <th>Shift Opening Date</th>
+     <th>Shift Closing Date</th>
+     <th>Tank Opening Volume
+(Liters)</th>
+     <th>Tank Closing Volume
+(Liters)</th>
+     <th>Tank Water Opening Volume
+(Liters)</th>
+     <th>Tank Water Closing Volume
+(Liters)</th>
+     <th>Tank Opening Level
+(mm)</th>
+     <th>Tank Closing Level
+(mm)</th>
+ </tr>
+</thead>
+<!--         <tfoot>
+            <tr>
+                <th>Pump Number</th>
+                <th>Fuel Grade</th>
+                <th>Shift Opening Date</th>
+                <th>Shift Closing Date</th>
+                <th>Unit Price</th>
+                <th>Volume
+                <th>Amount</th>
+            </tr>
+        </tfoot> -->
+    </table>
+<script type="text/javascript">
+$(document).ready(function() {
+    var table = $('#example').DataTable( {
+        "ajax": "api/v1/ShiftTankReport/shiftTankData.txt",
+         "dom": 'Bfrtip',
+        "buttons": [
+            'copy',
+            'csv',
+            'excel',
+            'pdf',
+            'print',
+            // {
+            //     extend: 'print',
+            //     text: 'Print all (not just selected)',
+            //     exportOptions: {
+            //         modifier: {
+            //             selected: null
+            //         }
+            //     }
+            // }
+        ],
+        "select": true,
+        "columns": [
+            { "data": "Tank_Id" },
+            { "data": "Product_Text" },
+            { "data": "Open_Date"},
+            { "data": "Close_Date" },
+            { "data": "Open_Vol" },
+            { "data": "Close_Vol" },
+            { "data": "Open_Water_Vol" },
+            { "data": "Close_Water_Vol" },
+            { "data": "Close_Level" },
+            { "data": "Close_Level" },
+        ],
+        "order": [[1, 'asc']],
+       
+    } );
+} );
+</script>

+ 0 - 32
api/v1/ShiftTankReport/shiftTankVw1.php

@@ -1,32 +0,0 @@
-<?php 
-require "connectionDb.php";
-
-$date = $_GET['selectDateToFind'];
-$date = str_replace('-', '_', $date);
-$shiftnum = 1;
-$shiftTankReport1 = $db->query("SELECT * FROM shift_tank_vw WHERE date='$date'");
-  
-
-//Shift 1
-while ($row = $shiftTankReport1->fetchArray()) {
-if ($row['number']==$shiftnum) {
-  print_r("<tr>
-        <th>Shift Id:</th>
-        <th>Shift Date:</th>
-        <th>Shift Number</th>
-        <th>Shift Opening:</th>
-        <th>Shift Closing:</th>
-        </tr>");
-  print_r(
-  "<tr>"
-  ."<td>".$row['shift_id']."</td>"
-  ."<td>".$row['date']."</td>"
-  ."<td>".$row['number']."</td>"
-  ."<td>".$row['open_date']."</td>"
-  ."<td>".$row['close_date']."</td>"
-  ."</tr>"
-);
-    break;
-}
-}
-?>

+ 0 - 32
api/v1/ShiftTankReport/shiftTankVw2.php

@@ -1,32 +0,0 @@
-<?php 
-require "connectionDb.php";
-
-$date = $_GET['selectDateToFind'];
-$date = str_replace('-', '_', $date);
-$shiftnum = 2;
-$shiftTankReport1 = $db->query("SELECT * FROM shift_tank_vw WHERE date='$date'");
- 
-
-//Shift 2
-while ($row = $shiftTankReport1->fetchArray()) {
-if ($row['number']==$shiftnum) {
-  print_r("<tr>
-        <th>Shift Id:</th>
-        <th>Shift Date:</th>
-        <th>Shift Number</th>
-        <th>Shift Opening:</th>
-        <th>Shift Closing:</th>
-        </tr>");
-  print_r(
-  "<tr>"
-  ."<td>".$row['shift_id']."</td>"
-  ."<td>".$row['date']."</td>"
-  ."<td>".$row['number']."</td>"
-  ."<td>".$row['open_date']."</td>"
-  ."<td>".$row['close_date']."</td>"
-  ."</tr>"
-);
-    break;
-}
-}
- ?>

+ 0 - 32
api/v1/ShiftTankReport/shiftTankVw3.php

@@ -1,32 +0,0 @@
-<?php 
-require "connectionDb.php";
-
-$date = $_GET['selectDateToFind'];
-$date = str_replace('-', '_', $date);
-$shiftnum = 3;
-$shiftTankReport1 = $db->query("SELECT * FROM shift_tank_vw WHERE date='$date'");
-  
-
-//Shift 3
-while ($row = $shiftTankReport1->fetchArray()) {
-if ($row['number']==$shiftnum) {
-  print_r("<tr>
-        <th>Shift Id:</th>
-        <th>Shift Date:</th>
-        <th>Shift Number</th>
-        <th>Shift Opening:</th>
-        <th>Shift Closing:</th>
-        </tr>");
-  print_r(
-  "<tr>"
-  ."<td>".$row['shift_id']."</td>"
-  ."<td>".$row['date']."</td>"
-  ."<td>".$row['number']."</td>"
-  ."<td>".$row['open_date']."</td>"
-  ."<td>".$row['close_date']."</td>"
-  ."</tr>"
-);
-    break;
-}
-}
- ?>

+ 53 - 0
api/v1/Update_Prices/EditStatus.php

@@ -0,0 +1,53 @@
+<?php 
+  // require "connectionDb.php";
+
+  // if (isset($_POST['edit']) && isset($_POST['id']) && isset($_POST['username']) ) {
+    
+  //    $id = $_POST['id'];
+  //    $username = $_POST['username'];
+  //    $creditSale = $_POST['creditSale'];
+  //    //$vehicle_id = $_POST['vehicle_id'];
+  //    //$number = $_POST['number'];
+     
+  //   $sql ="UPDATE customer SET name='$username',credit_sale='$creditSale' WHERE id='$id'";
+  //   //$sql2 ="UPDATE vehicle SET number='$number' WHERE id='$vehicle_id'";
+  //   $db->exec($sql);
+  //   //$db->exec($sql2);
+  //   echo '<script>window.location.href="index.php"</script>';
+  // }
+ 
+
+ ?>
+ <style type="text/css">
+   .editStatus {
+    display: none;
+   }
+ </style>
+<div class="container editStatus" id="editStatus">
+    <form class="form-horizontal" action="" method="post">
+
+    <div class="form-group">
+     <label class="control-label col-sm-2"> Id </label>
+    <div class="col-sm-10">   
+    <input type="number" name="id" id="id">
+    </div>
+  </div>
+    
+    <div class="form-group">
+     <label class="control-label col-sm-2"> Status </label>
+    <div class="col-sm-4"> 
+      <select class="col-sm-6" name="status" id="status">
+        <option value="Successful">Successful</option>
+        <option value="Canceled">Canceled</option>
+      </select>
+    </div>
+   </div>
+
+  <div class="form-group">
+      <div class="col-sm-offset-2 col-sm-10"> 
+    <input type="submit" name="edit" value="Submit">
+    <input type="button" value="Cancel" onclick="document.getElementById('editStatus').style.display = 'none';">
+    </div>
+  </div>
+    </form>
+</div>

+ 0 - 0
api/v1/Update_Prices/addPricesUpdate.php


+ 33 - 0
api/v1/Update_Prices/updatePricesData.php

@@ -0,0 +1,33 @@
+<?php 
+    require "connectionDb.php";
+// if (isset($_POST['find'])) {
+    
+// $customers = $db->query("SELECT * FROM price_update LEFT JOIN grade_update_prices ON grade_update_prices.price_update_id=price_update.id");
+$customers = $db->query("SELECT * FROM price_update");
+
+$json_data=[];
+
+while ($row = $customers->fetchArray()) {
+
+//print_r($row);
+$details = [
+"Id" => $row['id'],
+"Status" => $row['status'],
+"Timing" => $row['timing'],
+"Create_At" => date('Y-M-d h:i:s A',$row['created_at']),
+"Update_At" => date('Y-M-d h:i:s A',$row['updated_at']),
+// "Grade_Id" => $row['grade_id'],
+// "Grade_Text" => $row['grade_text'],
+// "Grade_Price" => $row['grade_price'],
+// "New_Grade_Price" => $row['new_grade_price'],
+];
+//here pushing the values in to an array  
+array_push($json_data,$details);  
+}
+$json_data_all = ["data" => $json_data];
+
+$myfile = fopen("api/v1/Update_Prices/updatePricesData.txt", "w+") or die("Unable to open file!");;
+fwrite($myfile,json_encode($json_data_all, JSON_PRETTY_PRINT));
+fclose($myfile);
+// }
+ ?>

+ 284 - 0
api/v1/Update_Prices/updatePricesData.txt

@@ -0,0 +1,284 @@
+{
+    "data": [
+        {
+            "Id": 1,
+            "Status": "Canceled",
+            "Timing": "Shift Change",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 2,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 3,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 4,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 5,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 6,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 7,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 8,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 9,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 10,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 11,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 12,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 13,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 14,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 15,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 16,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 17,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 18,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 19,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 20,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 21,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 22,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 23,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 24,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 25,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 26,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:38 AM",
+            "Update_At": "1970-Jan-01 12:33:38 AM"
+        },
+        {
+            "Id": 27,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM"
+        },
+        {
+            "Id": 28,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM"
+        },
+        {
+            "Id": 29,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM"
+        },
+        {
+            "Id": 30,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM"
+        },
+        {
+            "Id": 31,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM"
+        },
+        {
+            "Id": 32,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM"
+        },
+        {
+            "Id": 33,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM"
+        },
+        {
+            "Id": 34,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM"
+        },
+        {
+            "Id": 35,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM"
+        },
+        {
+            "Id": 36,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM"
+        },
+        {
+            "Id": 37,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM"
+        },
+        {
+            "Id": 38,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM"
+        },
+        {
+            "Id": 39,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM"
+        },
+        {
+            "Id": 40,
+            "Status": "Successful",
+            "Timing": "Immediate",
+            "Create_At": "1970-Jan-01 12:33:39 AM",
+            "Update_At": "1970-Jan-01 12:33:39 AM"
+        }
+    ]
+}

+ 78 - 0
api/v1/Update_Prices/updatePricesView.php

@@ -0,0 +1,78 @@
+<button class="btn btn-primary" onclick="document.getElementById('editStatus').style.display = 'none';"> Add Prices Update </button>
+<table id="updatePrices" class="table display table-striped table-bordered table-hover table-sm" cellspacing="0" width="100%">
+  <thead>
+        <tr>
+            <th></th>
+            <th>Id</th>
+            <th>Status</th>
+            <th>Timing</th>
+            <th>Create At</th>
+            <th>Update At</th>
+        </tr>
+  </thead>
+
+    <!-- <tfoot>
+        <tr>
+            <th></th>
+            <th>Id</th>
+            <th>Status</th>
+            <th>Timing</th>
+            <th>Create At</th>
+            <th>Update At</th>
+        </tr>
+    </tfoot> -->
+</table>
+<?php include "EditStatus.php" ?>
+<script type="text/javascript">
+$(document).ready(function() {
+    var table = $('#updatePrices').DataTable( {
+        //"buttons": true,
+        "ajax": "api/v1/Update_Prices/updatePricesData.txt",
+        "columns": [
+            {
+                "className":      'edit',
+                "orderable":      false,
+                "data":           null,
+                "defaultContent": 'Edit'
+            },
+            { "data": "Id"},
+            { "data": "Status" },
+            { "data": "Timing" },
+            { "data": "Create_At" },
+            { "data": "Update_At" },
+        ],
+        "order": [[1, 'asc']],
+        select: true
+    } );
+
+        // Add event listener for opening and closing details
+    $('#updatePrices tbody').on('click', 'tr td.edit', function () {
+        var tr = $(this).closest('tr');
+        var row = table.row( tr );
+
+        var id = row.data()['Id'];
+        var status= row.data()['Status'];
+
+        // var id = table.row( this ).data()['Id'];
+        document.getElementById('id').value = id;
+        document.getElementById('status').value = status;
+
+        document.getElementById('editStatus').style.display = 'block';
+    } );
+
+    $('#updatePrices tbody').on('click', 'tr', function () {
+        var tr = $(this).closest('tr');
+        var row = table.row( tr );
+
+        alert(row.data()['Id']);
+        document.cookie = "updatePricesId="+row.data()['Id'];
+        // document.cookie = "customerName="+row.data()['Id'];
+        //window.location.href = 'index.php';
+        open_script();
+    } );
+    
+} );
+function open_script(){
+   window.location.assign('/updatePricesData.php');//there are many ways to do this
+}
+</script>

+ 129 - 0
api/v1/Users/addUser.php

@@ -0,0 +1,129 @@
+<?php 
+  require "connectionDb.php";
+
+  if (isset($_POST['edit']) && $_POST['role']!='super' && $_POST['username']!='super' && $_POST['email']!='super' ) {
+    
+
+     $role = $_POST['role'];
+     $id = $_POST['user_id'];
+     $username = $_POST['username'];
+     $email = $_POST['email'];
+     $password = $_POST['password'];
+     $pumplist = $_POST['pumplist'];
+     $pumpliststr = implode(",", $pumplist);
+
+     
+     $sql ="INSERT INTO user SET created_at=strftime('%Y-%m-%d %H:%M:%f000000+06:30', 'now', 'localtime'),updated_at=strftime('%Y-%m-%d %H:%M:%f000000+06:30', 'now', 'localtime'), name='$username', email='$email', password='$password',role='$role',pump_list='$pumpliststr' WHERE id='$id'";
+
+    $db->exec($sql);
+
+    echo '<script>window.location.href="index.php"</script>';
+  }
+ 
+
+ ?>
+ <style type="text/css">
+   .editUserForm {
+    display: none;
+   }
+input[type=checkbox] {
+         position: relative;
+         cursor: pointer;
+         margin: .4rem;
+    }
+input[type=checkbox]:before {
+     content: "";
+     display: block;
+     position: absolute;
+     width: 16px;
+     height: 16px;
+     top: 0;
+     left: 0;
+     border: 2px solid #555555;
+     border-radius: 3px;
+     background-color: white;
+}
+input[type=checkbox]:checked:after {
+     content: "";
+     display: block;
+     width: 5px;
+     height: 10px;
+     border: solid black;
+     border-width: 0 2px 2px 0;
+     -webkit-transform: rotate(45deg);
+     -ms-transform: rotate(45deg);
+     transform: rotate(45deg);
+     position: absolute;
+     top: 2px;
+     left: 6px;
+}
+ </style>
+<div class="container editUserForm" id="editUserForm">
+    <form class="form-horizontal" action="" method="post">
+    <input type="number" name="user_id" id="id" hidden="true">
+
+    <div class="form-group">
+     <label class="control-label col-sm-2"> Name </label>
+    <div class="col-sm-10"> 
+      <input id="username" type="text" name="username">
+    </div>
+   </div>
+
+    <div class="form-group">
+     <label class="control-label col-sm-2"> Role </label>
+      <div class="col-sm-4">
+      
+      <select class="col-sm-6" id="role" name="role">
+        <option value="cashier">cashier</option>
+        <option value="user">user</option>
+        <option value="supervisor">supervisor</option>
+        <option value="super">super</option>
+      </select>
+   </div>
+  </div>
+
+    <div class="form-group">
+     <label class="control-label col-sm-2"> Email </label>
+    <div class="col-sm-10"> 
+      <input id="email" type="text" name="email" disabled="true">
+    </div>
+   </div>
+
+    <div class="form-group">
+     <label class="control-label col-sm-2"> Password </label>
+    <div class="col-sm-10"> 
+      <input id="password" type="text" name="password" disabled="true">
+    </div>
+   </div>
+
+    <div class="form-group">
+     <label class="control-label col-sm-2"> POS passcode </label>
+    <div class="col-sm-10"> 
+      <input id="passcode" type="text" name="passcode" disabled="true">
+    </div>
+   </div>
+
+    <div class="form-group">
+     <label class="control-label col-sm-2"> Pump List </label>
+    <div class="col-sm-10"> 
+<!--       <input id="pumplist1" type="checkbox" name="pumplist" value="1"> 1
+      <input id="pumplist" type="checkbox" name="pumplist" value="2"> 2 -->
+  <?php 
+    for($i=1;$i<=24;$i++){
+      echo ' <input id="pumplist'.$i.'" type="checkbox" name="pumplist[]" value="'.$i.'"> '.$i;
+      if ($i==12) {
+        echo "<br>";
+      }
+    }
+   ?>
+    </div>
+   </div>
+ 
+  <div class="form-group">
+      <div class="col-sm-offset-2 col-sm-10"> 
+    <input type="submit" name="edit" value="Submit" class="btn btn-success">
+    <input type="button" value="Cancel" class="btn btn-danger" onclick="document.getElementById('editVForm').style.display = 'none';">
+    </div>
+  </div>
+    </form>
+</div>

+ 1 - 0
customers.php

@@ -1,2 +1,3 @@
+<?php include "header.php" ?>
 <?php include "api/v1/Customers/customersDetails.php" ?>
 <?php include "api/v1/Customers/customersVw.php" ?>

BIN=BIN
db/f.db


+ 1 - 120
deliveries.php

@@ -1,121 +1,2 @@
-
 	<?php include "api/v1/Deliveries/selectDeliveryVw.php" ?>
-<table id="example" class="table display table-striped table-bordered table-hover table-sm" cellspacing="0" width="100%">
-        <thead>
-		<tr>
-		 <th></th>
-         <th>Action</th>
-         <th>Message</th>
-         <th>id</th>
-         <th>Tank</th>
-         <th>Status</th>
-         <th>Start</th>
-         <th>End</th>
-         </tr>
-        </thead>
-        <tfoot>
-            <tr>
-                <th></th>
-                <th>Action</th>
-                <th>Message</th>
-                <th>id</th>
-                <th>Tank</th>
-                <th>Status</th>
-            </tr>
-        </tfoot>
-    </table>
-<script type="text/javascript">
-/* Formatting function for row details - modify as you need */
-function format ( d ) {
-    // `d` is the original data object for the row
-    return '<table id="example" class="table table-bordered table-sm" cellspacing="0" width="100%" style="background-color:#3F51B5;color:white;">'+
-        '<tr>'+
-            '<th>Product:</th>'+
-            '<td>'+d.Product+'</td>'+
-        '</tr>'+
-        '<tr>'+
-            '<th>Supplier Id:</th>'+
-            '<td>'+d.SupplierId+'</td>'+
-        '</tr>'+
-        '<tr>'+
-            '<th>Supplier Name:</th>'+
-            '<td>'+d.SupplierName+'</td>'+
-        '</tr>'+
-        '<tr>'+
-            '<th>Delivery Car Number:</th>'+
-            '<td>'+d.DeliveryCarNumber+'</td>'+
-        '</tr>'+
-        '<tr>'+
-            '<th>OrderPrice:</th>'+
-            '<td>'+d.OrderPrice+'</td>'+
-        '</tr>'+
-        '<tr>'+
-            '<th>OrderVolume:</th>'+
-            '<td>'+d.OrderVolume+'</td>'+
-        '</tr>'+
-        '<tr>'+
-            '<th>DeliverVolume:</th>'+
-            '<td>'+d.DeliverVolume+'</td>'+
-        '</tr>'+
-        '<tr>'+
-            '<th>FuelPoints:</th>'+
-            '<td>'+d.FuelPoints+'</td>'+
-        '</tr>'+
-        '<tr>'+
-            '<th>TankGroup:</th>'+
-            '<td>'+d.TankGroup+'</td>'+
-        '</tr>'+'<hr>'+
-        '<tr>'+
-            '<th>Tank id</th>'+
-            '<th>Start Volume</th>'+
-            '<th>End Volume</th>'+
-            '<th>Input Volume</th>'+
-        '</tr>'+
-        '<tr>'+
-            '<th>Fp id</th>'+
-            '<th>Start Volume</th>'+
-            '<th>End Volume</th>'+
-            '<th>Output Volume</th>'+
-        '</tr>'+
-    '</table>';
-}
- 
-$(document).ready(function() {
-    var table = $('#example').DataTable( {
-        "ajax": "api/v1/Deliveries/deliveryDetails.txt",
-        "columns": [
-            {
-                "className":      'details-control',
-                "orderable":      false,
-                "data":           null,
-                "defaultContent": ''
-            },
-            { "data": "Action" },
-            { "data": "Message" },
-            { "data": "Id" },
-            { "data": "Tank" },
-            { "data": "Status" },
-            { "data": "Start" },
-            { "data": "End" },
-        ],
-        "order": [[1, 'asc']]
-    } );
-     
-    // Add event listener for opening and closing details
-    $('#example tbody').on('click', 'td.details-control', function () {
-        var tr = $(this).closest('tr');
-        var row = table.row( tr );
- 
-        if ( row.child.isShown() ) {
-            // This row is already open - close it
-            row.child.hide();
-            tr.removeClass('shown');
-        }
-        else {
-            // Open this row
-            row.child( format(row.data()) ).show();
-            tr.addClass('shown');
-        }
-    } );
-} );
-</script>
+    <?php include "api/v1/Deliveries/deliveryDetails.php" ?>

+ 102 - 0
header.php

@@ -0,0 +1,102 @@
+<?php 
+$i=null;
+function decimalAndNumberFormat1($number){
+  $i = number_format(round($number,0));
+  return $i;
+}
+function decimalAndNumberFormat2($number){
+  $i = number_format(round($number,1),1);
+  return $i;
+}
+function decimalAndNumberFormat3($number){
+  $i = number_format(round($number,3));
+  return $i;
+}
+?>
+<!DOCTYPE html>
+<html lang="en" >
+
+<head>
+  <meta charset="UTF-8">
+  <title>Forward Staion Server</title>
+
+<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
+<link rel='stylesheet' href='http://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'>
+<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
+<!-- <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.css"> -->
+
+
+<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
+<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
+<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
+
+
+<link href="https://cdn.datatables.net/r/bs-3.3.5/jq-2.1.4,dt-1.10.8/datatables.min.css" rel="stylesheet"/>
+<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/jq-3.3.1/jszip-2.5.0/dt-1.10.18/b-1.5.6/b-flash-1.5.6/b-html5-1.5.6/b-print-1.5.6/sl-1.3.0/datatables.min.css"/>
+
+<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
+<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
+<script type="text/javascript" src="https://cdn.datatables.net/v/bs4/jq-3.3.1/jszip-2.5.0/dt-1.10.18/b-1.5.6/b-flash-1.5.6/b-html5-1.5.6/b-print-1.5.6/sl-1.3.0/datatables.min.js"></script>
+
+      <link rel="stylesheet" href="css/style.css">
+
+      <style type="text/css">
+	td.details-control {
+    background: url('resources/details_open.png') no-repeat center center;
+    cursor: pointer;
+}
+tr.shown td.details-control {
+    background: url('resources/details_close.png') no-repeat center center;
+}
+</style>
+<style type="text/css">
+	#example tbody tr:hover {
+       background-color: cadetblue;
+       cursor: pointer;
+   }
+ 
+   #example tr:hover td.sorting_1 {
+       background-color: cadetblue;
+       cursor: pointer;
+   }
+   #example th {
+   	background-color: #009688;
+   }
+   #vehicle tbody tr:hover {
+       background-color: cadetblue;
+       cursor: pointer;
+   }
+ 
+   #vehicle tr:hover td.sorting_1 {
+       background-color: cadetblue;
+       cursor: pointer;
+   }
+   #vehicle th {
+   	background-color: #009688;
+   }
+   #supplier tbody tr:hover {
+       background-color: cadetblue;
+       cursor: pointer;
+   }
+ 
+   #supplier tr:hover td.sorting_1 {
+       background-color: cadetblue;
+       cursor: pointer;
+   }
+   #supplier th {
+   	background-color: #009688;
+   }
+</style>
+<style>
+iframe {
+    /*float: left;*/
+	  height: 100vh; /* For 100% screen height */
+    width:  85vw; /* For 100% screen width */
+    margin: 0;
+    padding: 0;
+    border-style: none;
+    border:1px solid red;
+}
+</style>
+</head>

+ 2 - 309
index.php

@@ -1,311 +1,4 @@
-<!DOCTYPE html>
-<html lang="en" >
-
-<head>
-  <meta charset="UTF-8">
-  <title>Career Profile Page1</title>
-  <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
-  
-  <link rel='stylesheet' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'>
-<link rel='stylesheet' href='http://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'>
-
-<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
-<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
-<link href="https://cdn.datatables.net/r/bs-3.3.5/jq-2.1.4,dt-1.10.8/datatables.min.css" rel="stylesheet"/>
-<script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
-
-<script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap.min.js" charset="utf-8"></script>
-
-  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
-
-
-  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
-
-
-
-      <link rel="stylesheet" href="css/style.css">
-
-      <style type="text/css">
-	td.details-control {
-    background: url('resources/details_open.png') no-repeat center center;
-    cursor: pointer;
-}
-tr.shown td.details-control {
-    background: url('resources/details_close.png') no-repeat center center;
-}
-</style>
-<style type="text/css">
-	#example tbody tr:hover {
-       background-color: cadetblue;
-       cursor: pointer;
-   }
- 
-   #example tr:hover td.sorting_1 {
-       background-color: cadetblue;
-       cursor: pointer;
-   }
-   #example th {
-   	background-color: #009688;
-   }
-   #vehicle tbody tr:hover {
-       background-color: cadetblue;
-       cursor: pointer;
-   }
- 
-   #vehicle tr:hover td.sorting_1 {
-       background-color: cadetblue;
-       cursor: pointer;
-   }
-   #vehicle th {
-   	background-color: #009688;
-   }
-   #supplier tbody tr:hover {
-       background-color: cadetblue;
-       cursor: pointer;
-   }
- 
-   #supplier tr:hover td.sorting_1 {
-       background-color: cadetblue;
-       cursor: pointer;
-   }
-   #supplier th {
-   	background-color: #009688;
-   }
-</style>
-<style>
-.accordion {
-  background-color: #d8d4d6;
-  color: #444;
-  cursor: pointer;
-  /* padding: 18px; */
-  width: 100%;
-  border: none;
-  text-align: left;
-  outline: none;
-  transition: 0.4s;
-}
-
-.active, .accordion:hover {
-  /* background-color: #ccc;  */
-}
-
-.panel {
-  /* padding: 0 18px; */
-  display: none;
-  background-color: white;
-  overflow: hidden;
-}
-</style>
-</head>
-
-<body>
-
-  <div class="container-fluid">
-  <div class="">
-    <div class="row wrapper">
-      
-      <!-- <div class="col-md-3 col-sm-4 profile-sidebar">
-        
-        <img src="https://pbs.twimg.com/profile_images/378800000636617089/b3ee16404fc4fa124ad2917296a897f7.jpeg" class="img-responsive profile-pic center-block"/>
-        <h1>Brett East</h1>
-        <ul class="social-links">
-          <li><a href="#"><i class="fa fa-facebook-square fa-3x"></i></a></li>
-          <li><a href="#"><i class="fa fa-twitter-square fa-3x"></i></a></li>
-          <li><a href="#"><i class="fa fa-linkedin-square fa-3x"></i></a></li>
-          <li><a href="#"><i class="fa fa-google-plus-square fa-3x"></i></a></li>
-        </ul>
-        <h2>Websites</h2>
-        <p><a href="#" class="small">http://www.bretteast.com</a></p>
-        <p><a href="#" class="small">http://www.career.stackoverflow.com/brett</a></p>
-        <h2>Tenure</h2>
-        <p>Full time, Part time, Casual</p>
-        <h2>Availability</h2>
-        <p>Weekdays, Mornings, Afternoons, Evenings</p>
-          
-      </div> -->
-      
-      <div class="col-md-1 visible-md-block visible-lg-block nav-sidebar">
-        <ul class="nav">
-          <li class="image" style="width: 164px;height: 70px; background: #fff;margin-top: -19px;margin-left: -3px;">
-              <img src="img/Autoleum Logo.jpg" alt="Error" style="width:50px;height:50px;margin-left: 54px;margin-top: 8px;" >
-          </li>
-        <li><a href="#page-about" class="accordion"><i class="fa fa-user fa-2x"></i>&nbsp;&nbsp; Operations &nbsp;&nbsp;<i class="fa fa-caret-down"></i></a>
-          <div class="panel">
-          <a href="#page-one">Customers</a><br>
-          <a href="#page-two">Two</a><br>
-          <a href="#page-three">Three</a><br>
-          </div></li>
-          <li><a href="#page-education"><i class="fa fa-graduation-cap fa-2x"></i>&nbsp;&nbsp; Education</a></li>
-          <li><a href="#page-work"><i class="fa fa-briefcase fa-2x"></i>&nbsp;&nbsp; Work History</a></li>
-          <!-- <li><a href="#page-skills" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-wrench fa-2x"></i>&nbsp;&nbsp;<br />Skills <i class="fa fa-caret-down"></i></a></li> -->
-          <!-- <li>
-          <div class="dropdown">
-          <a class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-wrench fa-2x"></i>&nbsp;&nbsp;<br />Skills <i class="fa fa-caret-down"></i></a>
-            <ul class="dropdown-menu">
-              <li><a href="#" class="hover">HTML</a></li>
-              <li><a href="#">CSS</a></li>
-              <li><a href="#">JavaScript</a></li>
-            </ul>
-          </div>
-          </li> -->
-          <li><a class="accordion"><i class="fa fa-wrench fa-2x"></i>&nbsp;&nbsp; Section 1 &nbsp;&nbsp;<i class="fa fa-caret-down"></i></a>
-          <div class="panel">
-          <a>Customers</a><br>
-          <a>Two</a><br>
-          <a>Three</a><br>
-          </div></li>
-
-
-
-
-          <li><a href="#page-licences"><i class="fa fa-certificate fa-2x"></i>&nbsp;&nbsp; Licences </a></li>
-          <li><a href="#page-transport"><i class="fa fa-car fa-2x"></i>&nbsp;&nbsp; Transport</a></li>
-          <li><a href="#page-providers"><i class="fa fa-check fa-2x"></i>&nbsp;&nbsp; Provider Referrals</a></li>
-          <li><a href="#page-referees"><i class="fa fa-users fa-2x"></i>&nbsp;&nbsp; Referees</a></li>
-        </ul>
-      </div>
-      
-      <div class="col-md-12 col-sm-8 col-lg-offset-2 content">
-        <?php include "customers.php" ?>
-        
-        <hr />
-        
-        <?php include "education.php" ?>
-        
-        <hr />
-
-        <div id="page-work">
-        <h2><i class="fa fa-briefcase fa-1x fa-fw"></i> Work History</h2>
-
-        <section class="work-history">
-          <h3 class="wh-company">Warner Music</h3>
-          <p class="wh-dates"><strong>2010 - Present</strong></p>
-          <p class="wh-industry">Entertainment</p>
-
-          <h4 class="wh-name">Senior Music Manager</h4>
-
-          <h5 class="wh-duties-success">Duties & Successes</h5>
-          <p class="wh-duties-success-content">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut non lacus nisl. Sed condimentum porttitor neque, id pellentesque eros porttitor semper. Aenean nec tellus eu ipsum vehicula accumsan. Vivamus auctor ornare lacus et pretium. Aliquam vel maximus dolor.</p>
-        </section><!-- .work-history -->
-
-        <section class="work-history">
-          <h3 class="wh-company">Sony Music</h3>
-          <p class="wh-dates"><strong>2006 - 2009</strong></p>
-          <p class="wh-industry">Entertainment</p>
-
-          <h4 class="wh-name">Junior Music Editor</h4>
-
-          <h5 class="wh-duties-success">Duties & Successes</h5>
-          <p class="wh-duties-success-content">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut non lacus nisl. Sed condimentum porttitor neque, id pellentesque eros porttitor semper. Aenean nec tellus eu ipsum vehicula accumsan. Vivamus auctor ornare lacus et pretium. Aliquam vel maximus dolor.</p>
-        </section><!-- .work-history -->
-          
-        </div><!-- #work -->
-        
-        <hr />
-        
-        <div id="page-skills">
-        <h2><i class="fa fa-wrench fa-1x fa-fw"></i> Skills</h2>
-        <p class="small"><i class="fa fa-star"></i> denotes a 'top skill'</p>
-        <ul class="skills-ul">
-          <li>Music <span class="small"><i class="fa fa-star"></i></span></li>
-          <li>Editing <span class="small"><i class="fa fa-star"></i></span></li>
-          <li>Management <span class="small"><i class="fa fa-star"></i></span></li>
-          <li>Sound <span class="small"><i class="fa fa-star"></i></span></li>
-          <li>Adobe Audition</li>
-          <li>Management</li>
-          <li>Sound</li>
-          <li>Adobe Audition</li>
-        </ul>
-        </div><!-- #skills -->
-        
-        <hr />
-        
-        <div id="page-licences">
-        <h2><i class="fa fa-certificate fa-1x fa-fw"></i> Licences and Accreditations</h2>
-        
-        <dl class="licences-accreditations">
-          <dt class="la-name">Drivers Licence<dt>
-          <dd class="la-state">QLD</dd>
-          <dd class="la-date">current</dd>
-        </dl>
-        <dl class="licences-accreditations">
-          <dt class="la-name">St John's First Aid<dt>
-          <dd class="la-state">Australia</dd>
-          <dd class="la-date">2016</dd>
-        </dl>
-        </div><!-- #licences -->
-        
-        <hr />
-        
-        <div id="page-transport">
-        <h2><i class="fa fa-car fa-1x fa-fw"></i> Transport</h2>
-        <p>I use public transport</p>
-        </div><!-- #transport -->
-       
-        <hr />
-        
-        <div id="page-providers">
-        <h2><i class="fa fa-check fa-1x fa-fw"></i> Provider Referrals</h2>
-        <section class="provider-referrals">
-          <h3 class="pr-name">P1 Providers</h3>
-          <p class="pr-site-desc">P1 Providers specialises in finding roles for skilled workers.</p>
-          <h4 class="pr-contract-type">Contract Type</h4>
-          <a href="#" class="pr-link">www.p1providers.com.au</a>
-        </section><!-- .provider-referrals -->
-        </div><!-- #providers -->
-        
-        <hr />
-        
-        <div id="page-referees">
-        <h2><i class="fa fa-users fa-1x fa-fw"></i> Referees</h2>
-
-        <section class="referees">
-            <h3 class="r-company">Sony Music</h3>
-            <p class="r-name">Manager</p>
-            <h4 class="r-name">John Smith</h4>
-            <p class="r-phone">(07) 1555 9876</p>
-            <p class="r-email"><a href="mailto:#">j.smith@sonymusic.com.au</a></p>
-        </section><!-- .referees -->
-
-        <section class="referees">
-            <h3 class="r-company">Warner Music</h3>
-            <p class="r-name">Manager</p>
-            <h4 class="r-name">Gary Miller</h4>
-            <p class="r-phone">(07) 1555 6543</p>
-            <p class="r-email"><a href="mailto:#">gary.miller@warnermusic.com</a></p>
-        </section>
-        </div><!-- #referees -->
-      
-      </div><!-- .col-md-8 -->  
-      
-    </div><!-- .row -->
-  </div><!-- .container -->
-</div><!-- .containter-fluid -->
-  <!-- <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> -->
-<!-- <script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'></script> -->
-
+<?php include "header.php" ?>
   
 
-    <script  src="js/script.js"></script>
-
-    <script>
-var acc = document.getElementsByClassName("accordion");
-var i;
-
-for (i = 0; i < acc.length; i++) {
-  acc[i].addEventListener("click", function() {
-    this.classList.toggle("active");
-    var panel = this.nextElementSibling;
-    if (panel.style.display === "block") {
-      panel.style.display = "none";
-    } else {
-      panel.style.display = "block";
-    }
-  });
-}
-</script>
-
-
-</body>
-
-</html>
+<iframe src="shiftTankReport.php"></iframe>

+ 399 - 0
ini/logs/log.txt

@@ -2285,3 +2285,402 @@ Forward Station System (FSS) Server started endpoints at : 9999
 products: map[1:{1 Diesel 000000} 2:{2 P Diesel 000000} 3:{3 92 RON 000000} 4:{4 95 RON 000000} 5:{5 MS 000000} 6:{6 97 RON 000000}]
 tanks: map[1:{1 1 1} 2:{2 2 2} 3:{3 3 3} 4:{4 4 4} 5:{5 5 5} 7:{7 6 7}]
 Fps after connect: [{1 12  70  [] false } {2 2  82  [] false } {3 2  82  [] false } {4 2  82  [] false } {5 2  82  [] false } {6 2  82  [] false } {7 12  70  [] false } {8 2  82  [] false }]
+2019/06/13 09:50:14 : [ERROR] :FpSupTransBufStatus1_req : Result : 
+2019/06/13 09:50:14 : [ERROR] :192.168.1.133:36092<-192.168.1.100:5001 : RECEIVED by POS_SOL_9 : FpSupTransBufStatus1_req : read tcp 192.168.1.133:36092->192.168.1.100:5001: i/o timeout
+2019/06/13 10:50:07 : [ERROR] :FpSupTransBufStatus1_req : Result : 
+2019/06/13 10:50:07 : [ERROR] :192.168.1.133:36092<-192.168.1.100:5001 : RECEIVED by POS_SOL_9 : FpSupTransBufStatus1_req : read tcp 192.168.1.133:36092->192.168.1.100:5001: i/o timeout
+2019/06/13 10:50:08 : [ERROR] :FpSupTransBufStatus1_req : Result : 
+2019/06/13 10:50:08 : [ERROR] :192.168.1.133:36092<-192.168.1.100:5001 : RECEIVED by POS_SOL_9 : FpSupTransBufStatus1_req : read tcp 192.168.1.133:36092->192.168.1.100:5001: i/o timeout
+2019/06/13 11:21:30 : [ERROR] :FpSupTransBufStatus1_req : Result : 
+2019/06/13 11:21:30 : [ERROR] :192.168.1.133:36092<-192.168.1.100:5001 : RECEIVED by POS_SOL_9 : FpSupTransBufStatus1_req : read tcp 192.168.1.133:36092->192.168.1.100:5001: i/o timeout
+2019/06/13 12:07:19 : [ERROR] :AllFpStatus : Result : 01 30 30 30 30 30 30 30 30 30 30 02 03
+2019/06/13 12:07:19 : [ERROR] :192.168.1.133:36092<-192.168.1.100:5001 : RECEIVED by POS_SOL_9 : AllFpStatus : read tcp 192.168.1.133:36092->192.168.1.100:5001: i/o timeout
+2019/06/13 12:07:19 : [ERROR] :Listening error:read tcp 192.168.1.133:57036->192.168.1.100:5002: i/o timeout
+2019/06/13 12:07:19 : [ERROR] :Close channel
+2019/06/13 12:07:19 : [ERROR] :Connection closed
+2019/06/13 12:07:19 : [ERROR] :Close heartbeat
+2019/06/13 12:07:19 : [ERROR] :Close heartbeat
+2019/06/13 12:07:30 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:07:31 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:07:32 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:07:32 : [ERROR] :Connection failed.
+2019/06/13 12:07:43 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:07:44 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:07:45 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:07:45 : [ERROR] :Connection failed.
+2019/06/13 12:07:56 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:07:57 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:07:58 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:07:58 : [ERROR] :Connection failed.
+2019/06/13 12:08:09 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:08:10 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:08:11 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:08:11 : [ERROR] :Connection failed.
+2019/06/13 12:08:22 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:08:23 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:08:24 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:08:24 : [ERROR] :Connection failed.
+2019/06/13 12:08:35 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:08:36 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:08:37 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:08:37 : [ERROR] :Connection failed.
+2019/06/13 12:08:48 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:08:49 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:08:50 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:08:50 : [ERROR] :Connection failed.
+2019/06/13 12:09:01 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:02 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:03 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:03 : [ERROR] :Connection failed.
+2019/06/13 12:09:14 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:15 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:16 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:16 : [ERROR] :Connection failed.
+2019/06/13 12:09:27 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:28 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:29 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:29 : [ERROR] :Connection failed.
+2019/06/13 12:09:40 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:41 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:42 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:42 : [ERROR] :Connection failed.
+2019/06/13 12:09:53 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:54 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:55 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 12:09:55 : [ERROR] :Connection failed.
+products: map[1:{1 Diesel 000000} 2:{2 P Diesel 000000} 3:{3 92 RON 000000} 4:{4 95 RON 000000} 5:{5 MS 000000} 6:{6 97 RON 000000}]
+tanks: map[1:{1 1 1} 2:{2 2 2} 3:{3 3 3} 4:{4 4 4} 5:{5 5 5} 7:{7 6 7}]
+Fps after connect: [{1 12  70  [] false } {2 2  82  [] false } {3 2  82  [] false } {4 2  82  [] false } {5 2  82  [] false } {6 2  82  [] false } {7 12  70  [] false } {8 2  82  [] false }]
+2019/06/13 12:48:24 : [ERROR] :FpSupTransBufStatus1_req : Result : 
+2019/06/13 12:48:24 : [ERROR] :192.168.1.133:36914<-192.168.1.100:5001 : RECEIVED by POS_SOL_9 : FpSupTransBufStatus1_req : read tcp 192.168.1.133:36914->192.168.1.100:5001: i/o timeout
+2019/06/13 13:30:18 : [ERROR] :Listening error:read tcp 192.168.1.133:57858->192.168.1.100:5002: i/o timeout
+2019/06/13 13:30:23 : [ERROR] :AllFpStatus : Result : 
+2019/06/13 13:30:23 : [ERROR] :192.168.1.133:36914<-192.168.1.100:5001 : RECEIVED by POS_SOL_9 : AllFpStatus : read tcp 192.168.1.133:36914->192.168.1.100:5001: i/o timeout
+2019/06/13 13:30:23 : [ERROR] :Close channel
+2019/06/13 13:30:23 : [ERROR] :Close heartbeat
+2019/06/13 13:30:23 : [ERROR] :Connection closed
+2019/06/13 13:30:23 : [ERROR] :Close heartbeat
+2019/06/13 13:30:34 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:30:35 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:30:36 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:30:36 : [ERROR] :Connection failed.
+2019/06/13 13:30:47 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:30:48 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:30:49 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:30:49 : [ERROR] :Connection failed.
+2019/06/13 13:31:00 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:01 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:02 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:02 : [ERROR] :Connection failed.
+2019/06/13 13:31:13 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:14 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:15 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:15 : [ERROR] :Connection failed.
+2019/06/13 13:31:26 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:27 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:28 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:28 : [ERROR] :Connection failed.
+2019/06/13 13:31:39 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:40 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:41 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:41 : [ERROR] :Connection failed.
+2019/06/13 13:31:52 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:53 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:54 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:31:54 : [ERROR] :Connection failed.
+2019/06/13 13:32:05 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:06 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:07 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:07 : [ERROR] :Connection failed.
+2019/06/13 13:32:18 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:19 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:20 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:20 : [ERROR] :Connection failed.
+2019/06/13 13:32:31 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:32 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:33 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:33 : [ERROR] :Connection failed.
+2019/06/13 13:32:44 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:45 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:46 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:46 : [ERROR] :Connection failed.
+2019/06/13 13:32:57 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:58 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:59 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:32:59 : [ERROR] :Connection failed.
+2019/06/13 13:33:10 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:33:11 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:33:12 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:33:12 : [ERROR] :Connection failed.
+2019/06/13 13:33:23 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:33:24 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:33:25 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:33:25 : [ERROR] :Connection failed.
+2019/06/13 13:33:36 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:33:37 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:33:38 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:33:38 : [ERROR] :Connection failed.
+2019/06/13 13:33:49 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:33:50 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:33:51 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:33:51 : [ERROR] :Connection failed.
+2019/06/13 13:34:02 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:03 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:04 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:04 : [ERROR] :Connection failed.
+2019/06/13 13:34:15 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:16 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:17 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:17 : [ERROR] :Connection failed.
+2019/06/13 13:34:28 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:29 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:30 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:30 : [ERROR] :Connection failed.
+2019/06/13 13:34:41 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:42 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:43 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:43 : [ERROR] :Connection failed.
+2019/06/13 13:34:54 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:55 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:56 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:34:56 : [ERROR] :Connection failed.
+2019/06/13 13:35:07 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:35:08 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:35:09 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:35:09 : [ERROR] :Connection failed.
+2019/06/13 13:35:20 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:35:21 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:35:22 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:35:22 : [ERROR] :Connection failed.
+2019/06/13 13:35:33 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:35:34 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:35:35 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:35:35 : [ERROR] :Connection failed.
+2019/06/13 13:35:46 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:35:47 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:35:48 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:35:48 : [ERROR] :Connection failed.
+2019/06/13 13:35:59 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:00 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:01 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:01 : [ERROR] :Connection failed.
+2019/06/13 13:36:12 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:13 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:14 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:14 : [ERROR] :Connection failed.
+2019/06/13 13:36:25 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:26 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:27 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:27 : [ERROR] :Connection failed.
+2019/06/13 13:36:38 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:39 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:40 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:40 : [ERROR] :Connection failed.
+2019/06/13 13:36:51 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:52 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:53 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:36:53 : [ERROR] :Connection failed.
+2019/06/13 13:37:04 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:05 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:06 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:06 : [ERROR] :Connection failed.
+2019/06/13 13:37:17 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:18 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:19 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:19 : [ERROR] :Connection failed.
+2019/06/13 13:37:30 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:31 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:32 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:32 : [ERROR] :Connection failed.
+2019/06/13 13:37:43 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:44 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:45 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:45 : [ERROR] :Connection failed.
+2019/06/13 13:37:56 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:57 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:58 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:37:58 : [ERROR] :Connection failed.
+2019/06/13 13:38:09 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:38:10 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:38:11 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:38:11 : [ERROR] :Connection failed.
+2019/06/13 13:38:22 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:38:23 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:38:24 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:38:24 : [ERROR] :Connection failed.
+2019/06/13 13:38:35 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:38:36 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:38:37 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:38:37 : [ERROR] :Connection failed.
+2019/06/13 13:38:48 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:38:49 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:38:50 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:38:50 : [ERROR] :Connection failed.
+2019/06/13 13:39:01 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:02 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:03 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:03 : [ERROR] :Connection failed.
+2019/06/13 13:39:14 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:15 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:16 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:16 : [ERROR] :Connection failed.
+2019/06/13 13:39:27 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:28 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:29 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:29 : [ERROR] :Connection failed.
+2019/06/13 13:39:40 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:41 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:42 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:42 : [ERROR] :Connection failed.
+2019/06/13 13:39:53 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:54 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:55 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:39:55 : [ERROR] :Connection failed.
+2019/06/13 13:40:06 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:40:07 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:40:08 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:40:08 : [ERROR] :Connection failed.
+2019/06/13 13:40:19 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:40:20 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:40:21 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:40:21 : [ERROR] :Connection failed.
+2019/06/13 13:40:32 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:40:33 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:40:34 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:40:34 : [ERROR] :Connection failed.
+2019/06/13 13:40:45 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:40:46 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:40:47 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:40:47 : [ERROR] :Connection failed.
+2019/06/13 13:40:58 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:40:59 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:41:00 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:41:00 : [ERROR] :Connection failed.
+2019/06/13 13:41:11 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:41:12 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:41:13 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:41:13 : [ERROR] :Connection failed.
+2019/06/13 13:41:24 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:41:25 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:41:26 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/13 13:41:26 : [ERROR] :Connection failed.
+---------------------------------------------------
+Forward Station System (FSS) - v0.1.19
+===============
+Ini File Directory ini/
+Data Directory : ./db/
+dbmigration:true
+dblogmode:false
+Static File Location : ./static/
+Static POS Location : ./static-pos/
+Pos Binary Location : ./PosBinary/
+Log Level : ERROR
+DOMS IP Address : 192.168.1.100
+Printer : usb:/dev/usb/lp1
+Forward Station System (FSS) Server started endpoints at : 9999
+products: map[1:{1 Diesel 000000} 2:{2 P Diesel 000000} 3:{3 92 RON 000000} 4:{4 95 RON 000000} 5:{5 MS 000000} 6:{6 97 RON 000000}]
+tanks: map[1:{1 1 1} 2:{2 2 2} 3:{3 3 3} 4:{4 4 4} 5:{5 5 5} 7:{7 6 7}]
+Fps after connect: [{1 12  70  [] false } {2 2  82  [] false } {3 2  82  [] false } {4 2  82  [] false } {5 2  82  [] false } {6 2  82  [] false } {7 12  70  [] false } {8 2  82  [] false }]
+---------------------------------------------------
+Forward Station System (FSS) - v0.1.19
+===============
+Ini File Directory ini/
+Data Directory : ./db/
+dbmigration:true
+dblogmode:false
+Static File Location : ./static/
+Static POS Location : ./static-pos/
+Pos Binary Location : ./PosBinary/
+Log Level : ERROR
+DOMS IP Address : 192.168.1.100
+Printer : usb:/dev/usb/lp1
+Forward Station System (FSS) Server started endpoints at : 9999
+products: map[1:{1 Diesel 000000} 2:{2 P Diesel 000000} 3:{3 92 RON 000000} 4:{4 95 RON 000000} 5:{5 MS 000000} 6:{6 97 RON 000000}]
+tanks: map[1:{1 1 1} 2:{2 2 2} 3:{3 3 3} 4:{4 4 4} 5:{5 5 5} 7:{7 6 7}]
+Fps after connect: [{1 12  70  [] false } {2 2  82  [] false } {3 2  82  [] false } {4 2  82  [] false } {5 2  82  [] false } {6 2  82  [] false } {7 12  70  [] false } {8 2  82  [] false }]
+2019/06/17 10:44:41 : [ERROR] :FpSupTransBufStatus1_req : Result : 
+2019/06/17 10:44:41 : [ERROR] :192.168.1.133:38258<-192.168.1.100:5001 : RECEIVED by POS_SOL_9 : FpSupTransBufStatus1_req : read tcp 192.168.1.133:38258->192.168.1.100:5001: i/o timeout
+2019/06/17 12:16:13 : [ERROR] :Listening error:read tcp 192.168.1.133:60044->192.168.1.100:5002: i/o timeout
+2019/06/17 12:16:15 : [ERROR] :AllFpStatus : Result : 
+2019/06/17 12:16:15 : [ERROR] :192.168.1.133:38258<-192.168.1.100:5001 : RECEIVED by POS_SOL_9 : AllFpStatus : read tcp 192.168.1.133:38258->192.168.1.100:5001: i/o timeout
+2019/06/17 12:16:15 : [ERROR] :Close channel
+2019/06/17 12:16:15 : [ERROR] :Connection closed
+2019/06/17 12:16:15 : [ERROR] :Close heartbeat
+2019/06/17 12:16:15 : [ERROR] :Close heartbeat
+2019/06/17 12:16:26 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:16:27 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:16:28 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:16:28 : [ERROR] :Connection failed.
+2019/06/17 12:16:39 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:16:40 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:16:41 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:16:41 : [ERROR] :Connection failed.
+2019/06/17 12:16:52 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:16:53 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:16:54 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:16:54 : [ERROR] :Connection failed.
+2019/06/17 12:17:05 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:06 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:07 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:07 : [ERROR] :Connection failed.
+2019/06/17 12:17:18 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:19 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:20 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:20 : [ERROR] :Connection failed.
+2019/06/17 12:17:31 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:32 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:33 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:33 : [ERROR] :Connection failed.
+2019/06/17 12:17:44 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:45 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:46 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:46 : [ERROR] :Connection failed.
+2019/06/17 12:17:57 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:58 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:59 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 12:17:59 : [ERROR] :Connection failed.
+products: map[1:{1 Diesel 000000} 2:{2 P Diesel 000000} 3:{3 92 RON 000000} 4:{4 95 RON 000000} 5:{5 MS 000000} 6:{6 97 RON 000000}]
+tanks: map[1:{1 1 1} 2:{2 2 2} 3:{3 3 3} 4:{4 4 4} 5:{5 5 5} 7:{7 6 7}]
+Fps after connect: [{1 2  86  [] false } {2 2  82  [] false } {3 2  82  [] false } {4 2  82  [] false } {5 2  82  [] false } {6 2  82  [] false } {7 2  86  [] false } {8 2  82  [] false }]
+2019/06/17 14:07:42 : [ERROR] :Listening error:read tcp 192.168.1.133:34502->192.168.1.100:5002: i/o timeout
+2019/06/17 14:07:46 : [ERROR] :AllFpStatus : Result : 
+2019/06/17 14:07:46 : [ERROR] :192.168.1.133:40948<-192.168.1.100:5001 : RECEIVED by POS_SOL_9 : AllFpStatus : read tcp 192.168.1.133:40948->192.168.1.100:5001: i/o timeout
+2019/06/17 14:07:46 : [ERROR] :Close channel
+2019/06/17 14:07:46 : [ERROR] :Close heartbeat
+2019/06/17 14:07:46 : [ERROR] :Connection closed
+2019/06/17 14:07:46 : [ERROR] :Close heartbeat
+2019/06/17 14:07:57 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:07:58 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:07:59 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:07:59 : [ERROR] :Connection failed.
+2019/06/17 14:08:10 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:08:11 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:08:12 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:08:12 : [ERROR] :Connection failed.
+2019/06/17 14:08:23 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:08:24 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:08:25 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:08:25 : [ERROR] :Connection failed.
+2019/06/17 14:08:36 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:08:37 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:08:38 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:08:38 : [ERROR] :Connection failed.
+2019/06/17 14:08:49 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:08:50 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:08:51 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:08:51 : [ERROR] :Connection failed.
+2019/06/17 14:09:02 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:09:03 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:09:04 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:09:04 : [ERROR] :Connection failed.
+2019/06/17 14:09:15 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:09:16 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:09:17 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:09:17 : [ERROR] :Connection failed.
+2019/06/17 14:09:28 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:09:29 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:09:30 : [ERROR] :dial tcp 192.168.1.100:5001: connect: network is unreachable
+2019/06/17 14:09:30 : [ERROR] :Connection failed.
+products: map[1:{1 Diesel 000000} 2:{2 P Diesel 000000} 3:{3 92 RON 000000} 4:{4 95 RON 000000} 5:{5 MS 000000} 6:{6 97 RON 000000}]
+tanks: map[1:{1 1 1} 2:{2 2 2} 3:{3 3 3} 4:{4 4 4} 5:{5 5 5} 7:{7 6 7}]
+Fps after connect: [{1 2  86  [] false } {2 2  82  [] false } {3 2  82  [] false } {4 2  82  [] false } {5 2  82  [] false } {6 2  82  [] false } {7 2  86  [] false } {8 2  82  [] false }]

+ 1 - 0
logs/log.txt

@@ -3,4 +3,5 @@ Fail to read file: open .fss.ini: no such file or directory2019/06/11 10:29:31
 Fail to read file: open .fss.ini: no such file or directory2019/06/11 10:34:02  [ERROR] open .fss.ini: no such file or directory
 Fail to read file: open .fss.ini: no such file or directory2019/06/12 09:28:47  [ERROR] open .fss.ini: no such file or directory
 Fail to read file: open .fss.ini: no such file or directory2019/06/13 09:32:54  [ERROR] open .fss.ini: no such file or directory
+Fail to read file: open .fss.ini: no such file or directory2019/06/14 14:02:50  [ERROR] open .fss.ini: no such file or directory
 Fail to read file: open .fss.ini: no such file or directory

+ 1 - 1
pid

@@ -1 +1 @@
-4400
+4234

+ 19 - 22
shiftPumpReport.php

@@ -1,22 +1,19 @@
-	<form>
-		<input type="date" name="selectDateToFind">
-		<input class="btn btn-primary" type="submit" value="Find">
-	</form>
-	<table id="example" class="table display table-striped table-bordered table-hover table-sm" cellspacing="0" width="100%">
-	<?php include "api/v1/ShiftPumpReport/shiftPumpVw1.php" ?>
-	<?php include "api/v1/ShiftPumpReport/shiftPumpReport1.php" ?><?php include "api/v1/ShiftPumpReport/shiftPumpVw2.php" ?>
-	<?php include "api/v1/ShiftPumpReport/shiftPumpReport2.php" ?>
-	<tfoot>
-	    <tr>
-        <th>Pump Number</th>
-        <th>Fuel Grade</th>
-        <th>Pump Opening Volume</th>
-        <th>Pump Closing Volume</th>
-        <th>Sale Volume 
-(Closing Volume - Opening Volume)</th>
-        <th>Unit Price</th>
-        <th>Money 
-(Sale Volume x Unit Price)</th>
-        </tr>
-    </tfoot>
-	</table>
+<?php include "header.php" ?>
+<form method="post">
+	<input type="date" name="selectDateToFind">
+	<select name="shiftNumber" style="width: 50px;">
+		<option value="1" selected="true">1</option>
+		<option value="2">2</option>
+		<option value="3">3</option>
+	</select>
+
+	<select name="fuelGrade">
+		<option value="92 RON      " selected="true">92 RON</option>
+		<option value="95 RON      ">95 RON</option>
+		<option value="Diesel      ">Diesel</option>
+		<option value="P/Diesel    ">P/Diesel</option>
+	</select>
+	<input type="submit" name="find" value="Find">
+</form>
+<?php include "api/v1/ShiftPumpReport/shiftPumpData.php" ?>
+<?php include "api/v1/ShiftPumpReport/shiftPumpView.php" ?>

+ 18 - 21
shiftSaleReport.php

@@ -1,21 +1,18 @@
-	<form>
-		<input type="date" name="selectDateToFind">
-		<input class="btn btn-primary" type="submit" value="Find">
-	</form>
-	<div class="container-fluid">
-		<div class="row">
-			<div class="col-sm-4">
-				<table id="example" class="table display table-striped table-bordered table-hover table-sm" cellspacing="0" width="100%">
-	<?php include "api/v1/ShiftSaleReport/shiftSaleVw1.php" ?>
-	<?php include "api/v1/ShiftSaleReport/shiftSaleReport1.php" ?>
-	</table>
-	</div>
-	
-	<div class="col-sm-4">
-	<table id="example" class="table display table-striped table-bordered table-hover table-sm" cellspacing="0" width="100%">
-	<?php include "api/v1/ShiftSaleReport/shiftSaleVw2.php" ?>
-	<?php include "api/v1/ShiftSaleReport/shiftSaleReport2.php" ?>
-				</table>
-			</div>
-		</div>
-	</div>
+<form method="post">
+	<input type="date" name="selectDateToFind">
+	<select name="shiftNumber" style="width: 50px;">
+		<option value="1" selected="true">1</option>
+		<option value="2">2</option>
+		<option value="3">3</option>
+	</select>
+
+	<select name="fuelGrade">
+		<option value="92 RON      " selected="true">92 RON</option>
+		<option value="95 RON      ">95 RON</option>
+		<option value="Diesel      ">Diesel</option>
+		<option value="P/Diesel    ">P/Diesel</option>
+	</select>
+	<input type="submit" name="find" value="Find">
+</form>
+<?php include "api/v1/ShiftSaleReport/shiftSaleData.php" ?>
+<?php include "api/v1/ShiftSaleReport/shiftSaleView.php" ?>

+ 18 - 13
shiftTankReport.php

@@ -1,15 +1,20 @@
-<form>
+<?php include "header.php" ?>
+<form method="post">
 	<input type="date" name="selectDateToFind">
-	<input class="btn btn-primary" type="submit" value="Find">
-</form>
-<table id="example" class="table display table-striped table-bordered table-hover table-sm" cellspacing="0" width="100%">
-
-<?php include "api/v1/ShiftTankReport/shiftTankVw1.php"; ?>
-<?php include "api/v1/ShiftTankReport/shiftTankReport1.php"; ?>
-<?php include "api/v1/ShiftTankReport/shiftTankVw2.php"; ?>
-<?php include "api/v1/ShiftTankReport/shiftTankReport2.php"; ?>
-<?php include "api/v1/ShiftTankReport/shiftTankVw3.php"; ?>
-<?php include "api/v1/ShiftTankReport/shiftTankReport3.php"; ?>
+	<select name="shiftNumber" style="width: 50px;">
+		<option value="1" selected="true">1</option>
+		<option value="2">2</option>
+		<option value="3">3</option>
+	</select>
 
-
-</table>
+	<select name="fuelGrade">
+		<option value="ALL" selected="true">All</option>
+		<option value="92 RON">92 RON</option>
+		<option value="95 RON">95 RON</option>
+		<option value="Diesel">Diesel</option>
+		<option value="P/Diesel">P/Diesel</option>
+	</select>
+	<input type="submit" name="find" value="Find">
+</form>
+<?php include "api/v1/ShiftTankReport/shiftTankData.php" ?>
+<?php include "api/v1/ShiftTankReport/shiftTankView.php" ?>

+ 11 - 4
test.php

@@ -15,13 +15,20 @@
 
 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
 <style>
-  input  {
-    padding: 20px;
-  }
+iframe {
+	height: 100vh; /* For 100% screen height */
+    width:  89vw; /* For 100% screen width */
+    margin-left: 120px;
+    padding: 0;
+    border-style: none;
+}
 </style>
 </head>
 <body>
-<a href="dbtest.php" class="btn btn-default">VIEW</a>
+
+ <iframe src="customers.php"></iframe>
+
+
   <script>