added extra field kwh at m3, expand cost field to 10 komma, added maloid,counter add dialog, auto set unit
This commit is contained in:
@@ -228,7 +228,9 @@ export default function ContractForm() {
|
||||
notes: c.notes || '',
|
||||
// Energy details
|
||||
meterId: c.energyDetails?.meterId?.toString() || '',
|
||||
maloId: c.energyDetails?.maloId || '',
|
||||
annualConsumption: c.energyDetails?.annualConsumption || '',
|
||||
annualConsumptionKwh: c.energyDetails?.annualConsumptionKwh || '',
|
||||
basePrice: c.energyDetails?.basePrice || '',
|
||||
unitPrice: c.energyDetails?.unitPrice || '',
|
||||
bonus: c.energyDetails?.bonus || '',
|
||||
@@ -455,7 +457,9 @@ export default function ContractForm() {
|
||||
if (['ELECTRICITY', 'GAS'].includes(data.type)) {
|
||||
contractData.energyDetails = {
|
||||
meterId: safeParseInt(data.meterId) ?? null,
|
||||
maloId: emptyToNull(data.maloId),
|
||||
annualConsumption: data.annualConsumption ? parseFloat(data.annualConsumption) : null,
|
||||
annualConsumptionKwh: data.annualConsumptionKwh ? parseFloat(data.annualConsumptionKwh) : null,
|
||||
basePrice: data.basePrice ? parseFloat(data.basePrice) : null,
|
||||
unitPrice: data.unitPrice ? parseFloat(data.unitPrice) : null,
|
||||
bonus: data.bonus ? parseFloat(data.bonus) : null,
|
||||
@@ -864,16 +868,27 @@ export default function ContractForm() {
|
||||
label: `${m.meterNumber}${m.location ? ` (${m.location})` : ''}`,
|
||||
}))}
|
||||
/>
|
||||
<Input
|
||||
label="MaLo-ID (Marktlokations-ID)"
|
||||
{...register('maloId')}
|
||||
/>
|
||||
<Input
|
||||
label={`Jahresverbrauch (${contractType === 'ELECTRICITY' ? 'kWh' : 'm³'})`}
|
||||
type="number"
|
||||
{...register('annualConsumption')}
|
||||
/>
|
||||
<Input label="Grundpreis (€/Monat)" type="number" step="0.01" {...register('basePrice')} />
|
||||
{contractType === 'GAS' && (
|
||||
<Input
|
||||
label="Jahresverbrauch (kWh)"
|
||||
type="number"
|
||||
{...register('annualConsumptionKwh')}
|
||||
/>
|
||||
)}
|
||||
<Input label="Grundpreis (€/Monat)" type="number" step="any" {...register('basePrice')} />
|
||||
<Input
|
||||
label={`Arbeitspreis (ct/${contractType === 'ELECTRICITY' ? 'kWh' : 'm³'})`}
|
||||
label="Arbeitspreis (€/kWh)"
|
||||
type="number"
|
||||
step="0.01"
|
||||
step="any"
|
||||
{...register('unitPrice')}
|
||||
/>
|
||||
<Input label="Bonus (€)" type="number" step="0.01" {...register('bonus')} />
|
||||
|
||||
Reference in New Issue
Block a user