fix invoice bugs

This commit is contained in:
Omair Saleh
2023-09-01 05:15:41 +08:00
parent 39d8ed2e9e
commit f2c008239b
+2 -2
View File
@@ -121,7 +121,7 @@ Route::get('/transfer/{marking}/latest-invoice', function ($marking) {
$transaction = $booking->transactions()
->where('type', TransactionType::PAYMENT)
->latest()->get()[0];
$supplier = Company::where('id', $transaction->receiver)->first();
$lowercaseDocumentType = strtolower(DocumentType::INVOICE);
@@ -486,7 +486,7 @@ Route::get('/payments/manual', function(){
Route::get('/invoice/fix', function(){
set_time_limit(1800);
set_time_limit(14400);
$bookings = Booking::where('status', ApprovalStatus::COMPLETED)->whereDate('updated_at', '>=', Carbon::parse('01-01-2023'))->get();
foreach($bookings as $booking){