We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 145dad7 commit e38fcb2Copy full SHA for e38fcb2
1 file changed
modules/fatture/edit.php
@@ -235,12 +235,11 @@
235
236
// Verifica la data dell'intervento rispetto alla data della fattura
237
$fatturazione_futura = false;
238
- $data_fattura = new Carbon($fattura->data);
+ $data_fattura = (new Carbon($fattura->data))->startOfDay();
239
$interventi_collegati = $fattura->getDocumentiCollegati()[Intervento::class];
240
if (! empty($interventi_collegati)) {
241
foreach ($interventi_collegati as $intervento) {
242
- $fine_intervento = $intervento->fine;
243
- $fine_intervento = new Carbon($fine_intervento);
+ $fine_intervento = (new Carbon($intervento->fine))->startOfDay();
244
245
if ($fine_intervento->diffInDays($data_fattura, false) < 0) {
246
$fatturazione_futura = true;
0 commit comments