Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange-2.0 into refund-ui-tab

This commit is contained in:
azumiru
2022-03-08 23:26:16 +08:00
2 changed files with 2 additions and 2 deletions
@@ -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);
+1 -1
View File
@@ -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,