Roberto Santini 1週間前
コミット
fdba820de7

+ 1
- 0
app/Models/ContrattoServizio.php ファイルの表示

155
         return match ($this->periodo_ore) {
155
         return match ($this->periodo_ore) {
156
             'mensile' => ($mesi[(int) $oggi->month] ?? $oggi->format('m')).' '.$oggi->format('Y'),
156
             'mensile' => ($mesi[(int) $oggi->month] ?? $oggi->format('m')).' '.$oggi->format('Y'),
157
             'trimestrale' => 'Q'.$oggi->quarter.' '.$oggi->format('Y'),
157
             'trimestrale' => 'Q'.$oggi->quarter.' '.$oggi->format('Y'),
158
+            'semestrale' => ($oggi->month <= 6 ? '1°' : '2°').' semestre '.$oggi->format('Y'),
158
             'annuale' => $oggi->format('Y'),
159
             'annuale' => $oggi->format('Y'),
159
             default => 'una tantum',
160
             default => 'una tantum',
160
         };
161
         };

+ 2
- 0
app/Models/ContrattoServizioRiga.php ファイルの表示

171
         return match ($periodoRiga) {
171
         return match ($periodoRiga) {
172
             'mensile' => max(1, $mesi),
172
             'mensile' => max(1, $mesi),
173
             'trimestrale' => max(1, intdiv($mesi, 3)),
173
             'trimestrale' => max(1, intdiv($mesi, 3)),
174
+            'semestrale' => max(1, intdiv($mesi, 6)),
174
             'annuale' => max(1, intdiv($mesi, 12)),
175
             'annuale' => max(1, intdiv($mesi, 12)),
175
             default => 1,
176
             default => 1,
176
         };
177
         };
186
         return match ($this->periodo) {
187
         return match ($this->periodo) {
187
             'mensile' => '× '.$n.' mesi',
188
             'mensile' => '× '.$n.' mesi',
188
             'trimestrale' => '× '.$n.' trimestri',
189
             'trimestrale' => '× '.$n.' trimestri',
190
+            'semestrale' => '× '.$n.' semestri',
189
             'annuale' => '× '.$n.' anni',
191
             'annuale' => '× '.$n.' anni',
190
             default => '× '.$n,
192
             default => '× '.$n,
191
         };
193
         };

+ 1
- 0
app/Models/Prodotto.php ファイルの表示

13
         'una_tantum' => 'Una tantum',
13
         'una_tantum' => 'Una tantum',
14
         'mensile' => 'Mensile',
14
         'mensile' => 'Mensile',
15
         'trimestrale' => 'Trimestrale',
15
         'trimestrale' => 'Trimestrale',
16
+        'semestrale' => 'Semestrale',
16
         'annuale' => 'Annuale',
17
         'annuale' => 'Annuale',
17
         'a_consumo' => 'A consumo',
18
         'a_consumo' => 'A consumo',
18
     ];
19
     ];

+ 1
- 0
resources/views/contratto_servizio/form.blade.php ファイルの表示

567
     const mesi = rigaMesiValidita(tr);
567
     const mesi = rigaMesiValidita(tr);
568
     if (periodo === 'mensile') return Math.max(1, mesi);
568
     if (periodo === 'mensile') return Math.max(1, mesi);
569
     if (periodo === 'trimestrale') return Math.max(1, Math.floor(mesi / 3));
569
     if (periodo === 'trimestrale') return Math.max(1, Math.floor(mesi / 3));
570
+    if (periodo === 'semestrale') return Math.max(1, Math.floor(mesi / 6));
570
     if (periodo === 'annuale') return Math.max(1, Math.floor(mesi / 12));
571
     if (periodo === 'annuale') return Math.max(1, Math.floor(mesi / 12));
571
     return 1;
572
     return 1;
572
   }
573
   }

読み込み中…
キャンセル
保存