mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
fix deleted invoices
This commit is contained in:
+1
-1
@@ -99,7 +99,7 @@ Route::get('/products', function (\App\Classes\Modules\Exports\Services\ExportsP
|
||||
Route::get('/fix_bills', function () {
|
||||
ini_set('max_execution_time', '1000000');
|
||||
Auth()->login(User::find(1));
|
||||
Transaction::where('type', TransactionType::INVOICE)->chunk(100, function($invoices){
|
||||
Transaction::where('type', TransactionType::INVOICE)->chunk(200, function($invoices){
|
||||
foreach ($invoices as $invoice){
|
||||
$invoice->booking->documents()->where('document_type', DocumentType::INVOICE)->delete();
|
||||
$po = $invoice->booking->transactions()->where('type', TransactionType::PURCHASE_ORDER)->first();
|
||||
|
||||
Reference in New Issue
Block a user