API Reference
Class
InvoiceCalculator
Shared decimal arithmetic for invoice XML, validation and visible presentation.
Inheritance
- Object
- InvoiceCalculator
Methods
public static InvoiceCalculation Calculate(Invoice invoice) #Returns:
InvoiceCalculationCalculates line totals, category-level VAT and the amount due, or returns retained declared values for an aggregate-only invoice.
Parameters
- invoice OfficeIMO.Invoicing.Invoice
public static Decimal RoundAmount(Decimal value) #Returns:
DecimalRounds to two decimal places using XPath round semantics (ties towards positive infinity).
Parameters
- value System.Decimal
UpdateDeclaredAmounts 2 overloads
public static InvoiceCalculation UpdateDeclaredAmounts(Invoice invoice) #Returns:
InvoiceCalculationExplicitly replaces source-declared amounts after editing prices, quantities, taxes or adjustments.
Parameters
- invoice OfficeIMO.Invoicing.Invoice
public static InvoiceCalculation UpdateDeclaredAmounts(Invoice invoice, Nullable<Decimal> taxExchangeRate) #Returns:
InvoiceCalculationRecalculates declared amounts. An explicit positive rate converts invoice VAT to accounting currency; without a rate, a changed VAT total invalidates its retained foreign-currency amount.
Parameters
- invoice OfficeIMO.Invoicing.Invoice
- Invoice to update after editing.
- taxExchangeRate System.Nullable{System.Decimal}
- Accounting-currency units per invoice-currency unit, chosen by the caller for the applicable tax point.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object