Same layout as the Strom page: grid and dialog for the bills (warm and cold water in m3 and CHF, base costs; total m3 and CHF are computed), stored per mandator in water.json, and charts for consumption and total costs with the period toggle (bill, calendar year, half-year). The period grouping is now generic: ElectricityPeriod becomes BillPeriod<T> over IPeriodBill<T>, implemented by ElectricityBill and WaterBill. water.json can be edited in the JSON editor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
545 B
C#
18 lines
545 B
C#
using System;
|
|
|
|
namespace Schaad.Accounting.Models
|
|
{
|
|
/// <summary>
|
|
/// A bill over a period (e.g. the yearly NeoVac electricity or water bill), so it can be
|
|
/// grouped into calendar periods by <see cref="BillPeriod{T}"/>.
|
|
/// </summary>
|
|
public interface IPeriodBill<in T>
|
|
{
|
|
DateOnly PeriodFrom { get; set; }
|
|
|
|
DateOnly PeriodTo { get; set; }
|
|
|
|
/// <summary>Adds <paramref name="share"/> (0..1) of the other bill's values to this one.</summary>
|
|
void AddShare(T other, decimal share);
|
|
}
|
|
}
|