<?php

declare( strict_types=1 );

namespace Brightfern\Invoice\Model;

/**
 * Document monetary totals (BG-22). Every field is computed by the mapper and
 * re-verified by the validator against the BR-CO-10..16 schematron rules.
 *
 *   BT-106  Sum of line net amounts          (Σ BT-131).
 *   BT-107  Sum of document-level allowances.
 *   BT-108  Sum of document-level charges.
 *   BT-109  Tax exclusive amount            (BT-106 − BT-107 + BT-108).
 *   BT-110  Tax total amount                (Σ BT-117) — held on the breakdown,
 *           mirrored here for convenience.
 *   BT-112  Tax inclusive amount            (BT-109 + BT-110).
 *   BT-113  Paid amount (prepaid).
 *   BT-114  Rounding amount.
 *   BT-115  Amount due for payment          (BT-112 − BT-113 + BT-114).
 */
final class MonetaryTotals {
	public float $lineExtensionAmount = 0.0; // BT-106.
	public float $allowanceTotalAmount = 0.0; // BT-107.
	public float $chargeTotalAmount = 0.0;    // BT-108.
	public float $taxExclusiveAmount = 0.0;   // BT-109.
	public float $taxTotalAmount = 0.0;       // BT-110.
	public float $taxInclusiveAmount = 0.0;   // BT-112.
	public float $prepaidAmount = 0.0;        // BT-113.
	public float $payableRoundingAmount = 0.0; // BT-114.
	public float $payableAmount = 0.0;        // BT-115.
}
