Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

InvoiceCalculator

Namespace OfficeIMO.Invoicing
Assembly OfficeIMO.Invoicing
Modifiers static

Shared decimal arithmetic for invoice XML, validation and visible presentation.

Inheritance

  • Object
  • InvoiceCalculator

Methods

public static InvoiceCalculation Calculate(Invoice invoice) #
Returns: InvoiceCalculation

Calculates line totals, category-level VAT and the amount due, or returns retained declared values for an aggregate-only invoice.

Parameters

invoice OfficeIMO.Invoicing.Invoice requiredposition: 0
public static Decimal RoundAmount(Decimal value) #
Returns: Decimal

Rounds to two decimal places using XPath round semantics (ties towards positive infinity).

Parameters

value System.Decimal requiredposition: 0
UpdateDeclaredAmounts 2 overloads
public static InvoiceCalculation UpdateDeclaredAmounts(Invoice invoice) #
Returns: InvoiceCalculation

Explicitly replaces source-declared amounts after editing prices, quantities, taxes or adjustments.

Parameters

invoice OfficeIMO.Invoicing.Invoice requiredposition: 0
public static InvoiceCalculation UpdateDeclaredAmounts(Invoice invoice, Nullable<Decimal> taxExchangeRate) #
Returns: InvoiceCalculation

Recalculates 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 requiredposition: 0
Invoice to update after editing.
taxExchangeRate System.Nullable{System.Decimal} requiredposition: 1
Accounting-currency units per invoice-currency unit, chosen by the caller for the applicable tax point.