Class TaxDocumentDto
- Namespace
- Integrations.Contracts.Tax
- Assembly
- Integrations.Contracts.dll
Amounts are rounded to the currency's minor units. TotalTaxFunctional is in the entity's base currency.
public sealed record TaxDocumentDto : IEquatable<TaxDocumentDto>
- Inheritance
-
TaxDocumentDto
- Implements
- Inherited Members
Constructors
TaxDocumentDto(Guid, string, TaxDirection, TaxDocumentKind, TaxDocumentStatus, string?, string, string, string, DateOnly, string, string?, string?, string?, string?, string, string, Guid?, decimal?, decimal, decimal, decimal, decimal, decimal, IReadOnlyList<TaxLineDto>, Guid?, string?, DateTimeOffset, DateTimeOffset?, DateTimeOffset?, DateTimeOffset?)
Amounts are rounded to the currency's minor units. TotalTaxFunctional is in the entity's base currency.
public TaxDocumentDto(Guid Id, string EntityId, TaxDirection Direction, TaxDocumentKind Kind, TaxDocumentStatus Status, string? StatusReason, string SourceSystem, string SourceDocumentId, string ProviderDocumentCode, DateOnly DocumentDate, string CounterpartyCode, string? CounterpartyName, string? WorkOrderNumber, string? PurchaseOrderNumber, string? InvoiceNumber, string CurrencyCode, string FunctionalCurrency, Guid? FxLockId, decimal? ExchangeRate, decimal TotalAmount, decimal TotalTaxable, decimal TotalExempt, decimal TotalTax, decimal TotalTaxFunctional, IReadOnlyList<TaxLineDto> Lines, Guid? OriginalDocumentId, string? Provider, DateTimeOffset CreatedAt, DateTimeOffset? CalculatedAt, DateTimeOffset? CommittedAt, DateTimeOffset? VoidedAt)
Parameters
IdGuidDocument id.
EntityIdstringOwning entity.
DirectionTaxDirectionReceivable or payable.
KindTaxDocumentKindInvoice or credit.
StatusTaxDocumentStatusLifecycle status.
StatusReasonstringWhy it is PendingTax or Failed, if it is.
SourceSystemstringCalling system (idempotency key).
SourceDocumentIdstringCaller's document id (idempotency key).
ProviderDocumentCodestringCode the document has at the tax provider; stable across replacements and retries.
DocumentDateDateOnlyDocument and tax date.
CounterpartyCodestringClient or vendor code.
CounterpartyNamestringClient or vendor name.
WorkOrderNumberstringWork order reference.
PurchaseOrderNumberstringPO reference.
InvoiceNumberstringInvoice, bill or credit memo number.
CurrencyCodestringDocument currency.
FunctionalCurrencystringEntity's base currency.
FxLockIdGuid?Exchange-rate lock used, when the currencies differ.
ExchangeRatedecimal?Locked rate from document to functional currency.
TotalAmountdecimalSum of line amounts.
TotalTaxabledecimalSum of taxable amounts.
TotalExemptdecimalSum of exempt amounts.
TotalTaxdecimalTotal tax in the document currency.
TotalTaxFunctionaldecimalTotal tax in the functional currency, at the locked rate.
LinesIReadOnlyList<TaxLineDto>Calculated lines.
OriginalDocumentIdGuid?On a credit: the invoice it reverses.
ProviderstringTax engine that calculated it.
CreatedAtDateTimeOffsetWhen it was first received.
CalculatedAtDateTimeOffset?When tax was last calculated.
CommittedAtDateTimeOffset?When it was committed.
VoidedAtDateTimeOffset?When it was voided.
Properties
CalculatedAt
When tax was last calculated.
public DateTimeOffset? CalculatedAt { get; init; }
Property Value
CommittedAt
When it was committed.
public DateTimeOffset? CommittedAt { get; init; }
Property Value
CounterpartyCode
Client or vendor code.
public string CounterpartyCode { get; init; }
Property Value
CounterpartyName
Client or vendor name.
public string? CounterpartyName { get; init; }
Property Value
CreatedAt
When it was first received.
public DateTimeOffset CreatedAt { get; init; }
Property Value
CurrencyCode
Document currency.
public string CurrencyCode { get; init; }
Property Value
Direction
Receivable or payable.
public TaxDirection Direction { get; init; }
Property Value
DocumentDate
Document and tax date.
public DateOnly DocumentDate { get; init; }
Property Value
EntityId
Owning entity.
public string EntityId { get; init; }
Property Value
ExchangeRate
Locked rate from document to functional currency.
public decimal? ExchangeRate { get; init; }
Property Value
FunctionalCurrency
Entity's base currency.
public string FunctionalCurrency { get; init; }
Property Value
FxLockId
Exchange-rate lock used, when the currencies differ.
public Guid? FxLockId { get; init; }
Property Value
- Guid?
Id
Document id.
public Guid Id { get; init; }
Property Value
InvoiceNumber
Invoice, bill or credit memo number.
public string? InvoiceNumber { get; init; }
Property Value
Kind
Invoice or credit.
public TaxDocumentKind Kind { get; init; }
Property Value
Lines
Calculated lines.
public IReadOnlyList<TaxLineDto> Lines { get; init; }
Property Value
OriginalDocumentId
On a credit: the invoice it reverses.
public Guid? OriginalDocumentId { get; init; }
Property Value
- Guid?
Provider
Tax engine that calculated it.
public string? Provider { get; init; }
Property Value
ProviderDocumentCode
Code the document has at the tax provider; stable across replacements and retries.
public string ProviderDocumentCode { get; init; }
Property Value
PurchaseOrderNumber
PO reference.
public string? PurchaseOrderNumber { get; init; }
Property Value
SourceDocumentId
Caller's document id (idempotency key).
public string SourceDocumentId { get; init; }
Property Value
SourceSystem
Calling system (idempotency key).
public string SourceSystem { get; init; }
Property Value
Status
Lifecycle status.
public TaxDocumentStatus Status { get; init; }
Property Value
StatusReason
Why it is PendingTax or Failed, if it is.
public string? StatusReason { get; init; }
Property Value
TotalAmount
Sum of line amounts.
public decimal TotalAmount { get; init; }
Property Value
TotalExempt
Sum of exempt amounts.
public decimal TotalExempt { get; init; }
Property Value
TotalTax
Total tax in the document currency.
public decimal TotalTax { get; init; }
Property Value
TotalTaxFunctional
Total tax in the functional currency, at the locked rate.
public decimal TotalTaxFunctional { get; init; }
Property Value
TotalTaxable
Sum of taxable amounts.
public decimal TotalTaxable { get; init; }
Property Value
VoidedAt
When it was voided.
public DateTimeOffset? VoidedAt { get; init; }
Property Value
WorkOrderNumber
Work order reference.
public string? WorkOrderNumber { get; init; }