|
@@ -21,7 +21,7 @@ |
|
|
block discarded – undo |
|
21
|
21
|
foreach (Invoice::with('invoiceDetails')->get() as $invoice) { |
|
22
|
22
|
// Supprimer les factures qui ne correspondent à rien (souvent des doublons générés en cas d'erreurs dans la transmission à Ecuasolutions. |
|
23
|
23
|
if ($invoice->enrollments->count() > 0 && DB::table('enrollment_invoice')->where('invoice_id', $invoice->id)->count() === 0) { |
|
24
|
|
- DB::table('invoices')->where('id', $invoice->id)->delete(); |
|
|
24
|
+ DB::table('invoices')->where('id', $invoice->id)->delete(); |
|
25
|
25
|
echo "\n facture # $invoice->id supprimée"; |
|
26
|
26
|
} |
|
27
|
27
|
} |
Please login to merge, or discard this patch.