diff --git a/include/library/Crunchbutton/Admin/Notification.php b/include/library/Crunchbutton/Admin/Notification.php index 0006c17b1..c75e756d3 100644 --- a/include/library/Crunchbutton/Admin/Notification.php +++ b/include/library/Crunchbutton/Admin/Notification.php @@ -344,6 +344,7 @@ class Crunchbutton_Admin_Notification extends Cana_Table { $shiftDateStart = $shift->dateStart( c::config()->timezone ); } + if( $shiftDateStart && ( $order->date() < $shiftDateStart ) ){ $message = $first_name . ' '; $message .= Crunchbutton_Admin_Notification::REPS_COCKPIT . $order->id_order; @@ -499,6 +500,8 @@ class Crunchbutton_Admin_Notification extends Cana_Table { 'message' => $message ]); + Log::debug( [ 'order' => $order->id_order, 'action' => 'send sms to admin', 'sms' => $sms, 'message' => $message, 'type' => 'admin_notification' ]); + return $ret; }