Bladeren bron

booking agenda for scooters

szollosil 1 jaar geleden
bovenliggende
commit
cdef406346

+ 1 - 1
custom/booking/booking_agenda.php

@@ -1134,7 +1134,7 @@ print "\n" . '</form>';
             ShoMeTheEventDeatils(value);
         }
     }
-    setInterval(updateDivContent, 1000);
+    setInterval(updateDivContent, 5000);
 </script>
 <style>
     .trheight {

+ 1 - 1
custom/booking/class/api_booking.class.php

@@ -751,7 +751,7 @@ class BookingApi extends DolibarrApi
 				if ($db->num_rows($data) > 0) {
 					while ($row = $db->fetch_object($data)) {
 						ApiBbusLog::appLog("while");
-						$bookingHistory = $this->saveEventData((int)$row->fk_event, $createdInvoiceArray[0]['invoice']['id']);
+						$bookingHistory = $this->saveEventData((int)$row->fk_event, $createdInvoiceArray[0]['invoice']['id'], null, $createdInvoiceArray[0]['invoice']['id']);
 
 						ApiBbusLog::appLog("______________________________________________________________________________");
 						$this->updateBbticket($createdInvoiceArray[0]['invoice'], $bookingHistory);

+ 16 - 3
custom/booking/class/booking_agenda_helper.class.php

@@ -164,7 +164,7 @@ class BookingAgendaHelper
                 AND ac.datep BETWEEN '{$eventdayDates['from']}' AND '{$eventdayDates['to']}'
                 AND ace.participants IS NOT NULL
                 ORDER BY ac.id DESC";
-                //print $daysql;
+        //print $daysql;
         $eventsArray = $this->getOneColumnFromTable($daysql, $eventsArray, 'actioncomm_id');
         $locationArray = $this->getlocations();
         print '<table style="width:100%">';
@@ -242,12 +242,25 @@ class BookingAgendaHelper
             INNER JOIN llx_eventwizard_eventproduct as ep ON ep.fk_eventdetails = ed.rowid
             INNER JOIN llx_product as pr ON pr.rowid = ep.fk_product
             WHERE ac.id = {$eventdetail} ORDER BY fk_facture DESC";
+            //print $sql;
+            //exit;
             $result = $db->query($sql);
             if ($db->num_rows($result) > 0) {
+                print '<table><thead><tr class="firstcolumn">
+                    <th>Facture</th>
+                    <th>Location</th>
+                    <th>Time Range</th>
+                </tr></thead><tbody>';
+                $rowcolorCounter = 0;
                 while ($row = $db->fetch_object($result)) {
-                    print '<div>' . $row->invoice_number . ' ' . $row->label . ' ' . $row->datep . '-' . $row->datep2 . '</div>';
-
+                    print '<tr class="center" style="height:60px; background-color: ' . $this->getBGColor($rowcolorCounter) . ';">
+                        <td class="" style="padding:20px;">' . $row->invoice_number . '</td>
+                        <td style="padding:20px;">' . $row->label . '</td>
+                        <td style="padding:20px;">' . $row->datep . ' - ' . $row->datep2 . '</td>
+                    </tr>';
+                    $rowcolorCounter++;
                 }
+                print '</tbody></table>';
             }
         }
     }