Skip to main content

ReportMapping

Struct ReportMapping 

Source
pub struct ReportMapping {
    pub report: String,
    pub country: Country,
    pub version: String,
    pub valid_from: Date,
    pub into: String,
    pub status: MappingStatus,
    pub accounts: BTreeMap<AccountId, String>,
    pub credit_accounts: BTreeMap<AccountId, String>,
    pub vat_accounts: Option<VatAccounts>,
    pub vat_settlement: Option<VatSettlement>,
    pub taxes: Vec<TaxRule>,
}
Expand description

How the harmonised chart and the tax codes fall into one version of a national report.

Fields§

§report: String

The report, e.g. de-ustva, de-hgb-266.

§country: Country

The country.

§version: String

The version of the report, e.g. a year or a taxonomy version.

§valid_from: Date

The first day of the periods it applies to.

§into: String

The harmonised chart it maps, as name/version.

§status: MappingStatus

Whether tax advisers have reviewed it.

§accounts: BTreeMap<AccountId, String>

Account → position. A mapping holds for the account and every account that refines it, unless a refinement has its own; left out when the report is computed from tax codes alone.

§credit_accounts: BTreeMap<AccountId, String>

Account → position for a credit balance, where it differs (a bank account in overdraft).

§vat_accounts: Option<VatAccounts>

The accounts that hold VAT; with taxes.

§vat_settlement: Option<VatSettlement>

The fields for postings on VAT accounts without a tax code: payments to and refunds from the tax office.

§taxes: Vec<TaxRule>

The fields each tax code fills.

Implementations§

Source§

impl ReportMapping

Source

pub fn de_ustva_2026() -> Self

The German VAT return of 2026 (Umsatzsteuer-Voranmeldung), from tax codes (spec/data/reports/).

Source

pub fn de_hgb_266_2026() -> Self

The German balance sheet of 2026 (HGB § 266).

Source

pub fn de_hgb_275_gkv_2026() -> Self

The German profit and loss account of 2026, by nature of expense (HGB § 275 Abs. 2).

Source

pub fn de_euer_2025() -> Self

The German income statement on a cash basis of 2025 (Anlage EÜR, § 4 Abs. 3 EStG).

Source

pub fn position( &self, account: &AccountId, parents: &BTreeMap<AccountId, AccountId>, credit: bool, ) -> Option<&str>

The position of an account: its own mapping or the nearest of the accounts it refines; for a credit balance the credit mapping, where there is one.

Trait Implementations§

Source§

impl Clone for ReportMapping

Source§

fn clone(&self) -> ReportMapping

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ReportMapping

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ReportMapping

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ReportMapping

Source§

impl Object for ReportMapping

Source§

const TYPE: &'static str = "report_mapping"

The type, written as "type" when the object stands on its own.
Source§

impl PartialEq for ReportMapping

Source§

fn eq(&self, other: &ReportMapping) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ReportMapping

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ReportMapping

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.