mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-24 23:13:59 +00:00
Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange-2.0 into development
This commit is contained in:
@@ -65,7 +65,7 @@ class AutoPurchaseOrderFillLogic extends AbstractControllerLogic
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$bookings = Booking::where('service_id', '!=', 4)->where(function($query){
|
||||
return $query->whereMonth('created_at', '<', 03)->whereYear('created_at', 2023);
|
||||
return $query->whereMonth('created_at', '=', 04)->whereYear('created_at', 2023);
|
||||
})->whereDoesntHave('transactions', function($q){
|
||||
$q->where('type', TransactionType::PURCHASE_ORDER);
|
||||
$q->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED]);
|
||||
|
||||
@@ -33,9 +33,18 @@ class ImportHoneyTrapController
|
||||
$excelRows = $import->rows;
|
||||
$excelRows = $excelRows->toArray();
|
||||
|
||||
$returnArray = [];
|
||||
$returnArray = [];
|
||||
$segment_name = 'honey trap campaign';
|
||||
$segment = Segment::where('name', $segment_name)->first();
|
||||
|
||||
$segment_id = Segment::where('name', 'honey trap platinum')->first()->id;
|
||||
if (!$segment) {
|
||||
$row['status'] = 'Failed';
|
||||
$row['message'] = '"' . $segment_name . '"' . ' not found';
|
||||
$returnArray[] = $row;
|
||||
return response()->json($returnArray);
|
||||
}
|
||||
|
||||
$segment_id = $segment->id;
|
||||
|
||||
foreach ($excelRows as $row) {
|
||||
|
||||
@@ -111,6 +120,6 @@ class ImportHoneyTrapController
|
||||
{
|
||||
$unixTime = (($date - 25569) * 86400);
|
||||
$date = new DateTime("@$unixTime");
|
||||
return $date->format('d/m/Y');
|
||||
return $date->format('Y-m-d'); // Change the format to 'Y-m-d'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user