mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-31 10:24:00 +00:00
Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange-2.0 into refund-ui-tab
This commit is contained in:
@@ -64,7 +64,7 @@ class AutoPurchaseOrderFillLogic extends AbstractControllerLogic
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$bookings = Booking::whereMonth('created_at', 7)
|
||||
$bookings = Booking::whereMonth('created_at', 8)
|
||||
->whereYear('created_at', 2021)
|
||||
->whereDoesntHave('transactions', function($q){
|
||||
$q->where('type', TransactionType::PURCHASE_ORDER);
|
||||
|
||||
@@ -17,7 +17,7 @@ class TransactionResource extends JsonResource
|
||||
public function toArray($request)
|
||||
{
|
||||
$booking = (int)$this->type === TransactionType::BILL ? $this->owner->owner : $this->booking;
|
||||
$days = Carbon::parse($this->created_at->format('d-m-Y'))->addDays($booking->service_id === 1 ? 2 : 3);
|
||||
$days = Carbon::parse($this->created_at->format('d-m-Y'))->addWeekdays($booking->service_id === 1 ? 2 : 3);
|
||||
|
||||
return [
|
||||
'id' => $this->id,
|
||||
|
||||
Reference in New Issue
Block a user