Forráskód Böngészése

fix data pagamento

FabioFratini 8 hónapja
szülő
commit
b1cce57ed1
2 módosított fájl, 3 hozzáadás és 1 törlés
  1. 2 1
      app/Http/Livewire/RecordOUT.php
  2. 1 0
      app/Models/Record.php

+ 2 - 1
app/Http/Livewire/RecordOUT.php

@@ -384,7 +384,7 @@ class RecordOUT extends Component
                 //'causal_id' => $this->causal_id,
                 'payment_method_id' => $this->payment_method_id,
                 'date' => $this->date,
-                'data_pagamento' => $this->data_pagamento,
+                'data_pagamento' => date("Y-m-d", strtotime($this->data_pagamento)),
                 //'month' => $this->month,
                 //'year' => $this->year,
                 //'note' => $this->note,
@@ -394,6 +394,7 @@ class RecordOUT extends Component
                 'commercial' => $this->commercial,
                 'numero_fattura' => $invoiceNumber,
             ]);
+            Log::info("Record data being inserted: " . json_encode($record));
 
             $this->dataId = $record->id;
             $tot = 0;

+ 1 - 0
app/Models/Record.php

@@ -15,6 +15,7 @@ class Record extends Model
         // 'causal_id',
         'payment_method_id',
         'date',
+        'data_pagamento',
         //'month',
         //'year',
         'type',