rule_id: tenant-invoice-history
version: 1
status: draft

scope:
  tenant_id: parameter
  currency: USD
  timezone: UTC

billing_period:
  field: created_at
  start_inclusive: period_start
  end_exclusive: period_end

filters:
  exclude_deleted: true

grouping:
  month: created_at UTC calendar month
  preserve_invoice_type: true

amounts:
  authoritative_fields:
    - cost_price
    - raw_price
  arithmetic: decimal
  display_scale: 2

