@@ -23,7 +23,7 @@ |
||
| 23 | 23 | $discountValue = $discount->price / 100; |
| 24 | 24 | $discount->update(['price' => ($discountValue * $enrollmentValue)]); |
| 25 | 25 | $anomalies++; |
| 26 | - echo "\ninvoice ".$invoice->id . "fixed"; |
|
| 26 | + echo "\ninvoice ".$invoice->id."fixed"; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | foreach (Invoice::all() as $invoice) { |
| 19 | 19 | if ($invoice->total_price !== $invoice->totalPrice()) { |
| 20 | 20 | $anomalies++; |
| 21 | - echo "\ninvoice ".$invoice->id. ' should be ' . $invoice->total_price . ' vs ' . $invoice->totalPrice() .' real '; |
|
| 21 | + echo "\ninvoice ".$invoice->id.' should be '.$invoice->total_price.' vs '.$invoice->totalPrice().' real '; |
|
| 22 | 22 | } |
| 23 | 23 | } |
| 24 | 24 | echo "\n".$anomalies.' anomalies detected'; |
@@ -21,7 +21,7 @@ |
||
| 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 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | if ($invoiceDetail) { |
| 38 | 38 | $invoiceDetail->update([ |
| 39 | - 'product_name' => 'Inscription # ' . $enrollment->id, |
|
| 39 | + 'product_name' => 'Inscription # '.$enrollment->id, |
|
| 40 | 40 | 'product_code' => '', |
| 41 | 41 | 'product_id' => $enrollment->id, |
| 42 | 42 | 'product_type' => Enrollment::class, |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | } else { |
| 47 | 47 | InvoiceDetail::create([ |
| 48 | 48 | 'invoice_id' => $invoice->id, |
| 49 | - 'product_name' => 'Inscription # ' . $enrollment->id, |
|
| 49 | + 'product_name' => 'Inscription # '.$enrollment->id, |
|
| 50 | 50 | 'product_code' => '', |
| 51 | 51 | 'product_id' => $enrollment->id, |
| 52 | 52 | 'product_type' => Enrollment::class, |