This commit is contained in:
JiaSheng
2023-09-26 21:30:51 +08:00
parent 32602cab31
commit f1c23d46dd
@@ -16,7 +16,7 @@ use App\Classes\ValueObjects\Constants\PaymentMethodType;
use App\Models\Transaction;
use Illuminate\Support\Facades\DB;
class ExpiredBookingCommand extends Command
class AutoFillPurchaseOrderCommand extends Command
{
/**
* The name and signature of the console command.
@@ -61,6 +61,7 @@ class ExpiredBookingCommand extends Command
*/
public function handle()
{
// 5. If purchase order not fill up in 2 month, auto fill up it
$bookings = Booking::where('status', ApprovalStatus::APPROVED)
->where('created_at', '<', now()->subDays(60)->endOfDay())
->whereHas('transactions', function($transaction) {