Skip to main content

FrameworkAccounts

Struct FrameworkAccounts 

Source
pub struct FrameworkAccounts {
Show 51 fields pub ar_control: String, pub ap_control: String, pub inventory: String, pub fixed_assets: String, pub accumulated_depreciation: String, pub gr_ir_clearing: String, pub ic_ar_clearing: String, pub ic_ap_clearing: String, pub operating_cash: String, pub bank_account: String, pub petty_cash: String, pub product_revenue: String, pub service_revenue: String, pub ic_revenue: String, pub purchase_discount_income: String, pub other_revenue: String, pub sales_discounts: String, pub sales_returns: String, pub cogs: String, pub raw_materials: String, pub depreciation_expense: String, pub salaries_wages: String, pub rent: String, pub interest_expense: String, pub purchase_discounts: String, pub fx_gain_loss: String, pub bad_debt: String, pub sales_tax_payable: String, pub vat_payable: String, pub input_vat: String, pub tax_receivable: String, pub tax_expense: String, pub deferred_tax_liability: String, pub deferred_tax_asset: String, pub accrued_expenses: String, pub accrued_salaries: String, pub unearned_revenue: String, pub short_term_debt: String, pub long_term_debt: String, pub ic_payable: String, pub common_stock: String, pub retained_earnings: String, pub current_year_earnings: String, pub cta: String, pub income_summary: String, pub dividends_paid: String, pub general_suspense: String, pub payroll_clearing: String, pub bank_reconciliation_suspense: String, pub provisions: String, pub audit_export: AuditExportConfig, /* private fields */
}
Expand description

Maps semantic account purposes to framework-specific GL codes.

Downstream generators use field names (ar_control, cogs, …) instead of hard-coded account numbers, making them framework-agnostic.

Fields§

§ar_control: String§ap_control: String§inventory: String§fixed_assets: String§accumulated_depreciation: String§gr_ir_clearing: String§ic_ar_clearing: String§ic_ap_clearing: String§operating_cash: String§bank_account: String§petty_cash: String§product_revenue: String§service_revenue: String§ic_revenue: String§purchase_discount_income: String§other_revenue: String§sales_discounts: String§sales_returns: String§cogs: String§raw_materials: String§depreciation_expense: String§salaries_wages: String§rent: String§interest_expense: String§purchase_discounts: String§fx_gain_loss: String§bad_debt: String§sales_tax_payable: String§vat_payable: String§input_vat: String§tax_receivable: String§tax_expense: String§deferred_tax_liability: String§deferred_tax_asset: String§accrued_expenses: String§accrued_salaries: String§unearned_revenue: String§short_term_debt: String§long_term_debt: String§ic_payable: String§common_stock: String§retained_earnings: String§current_year_earnings: String§cta: String§income_summary: String§dividends_paid: String§general_suspense: String§payroll_clearing: String§bank_reconciliation_suspense: String§provisions: String§audit_export: AuditExportConfig

Implementations§

Source§

impl FrameworkAccounts

Source

pub fn classify(&self, account: &str) -> AccountCategory

Classify an account number using this framework’s rules.

Source

pub fn classify_account_type(&self, account_code: &str) -> AccountType

Classify an account code into an AccountType using this framework’s rules.

Maps the framework-specific AccountCategory to the balance-sheet oriented AccountType (Asset, Liability, Equity, Revenue, Expense).

Source

pub fn classify_trial_balance_category( &self, account_code: &str, ) -> TrialBalanceCategory

Classify an account code into a TrialBalanceCategory using this framework’s rules.

Provides the finer-grained trial-balance grouping (CurrentAssets, NonCurrentAssets, etc.) derived from the framework classifier.

Source

pub fn us_gaap() -> Self

US GAAP (default) — 4-digit accounts from crate::accounts.

Source

pub fn ifrs() -> Self

IFRS — uses the same numbering conventions as US GAAP.

Source

pub fn french_gaap() -> Self

French GAAP (PCG) — 6-digit accounts from crate::pcg.

Source

pub fn german_gaap() -> Self

German GAAP (HGB) — 4-digit SKR04 accounts from crate::skr.

Source

pub fn for_framework(framework: &str) -> Self

Select accounts for a given AccountingFramework from datasynth-standards.

This is the primary entry point — other code should not hard-code framework detection logic.

Trait Implementations§

Source§

impl Clone for FrameworkAccounts

Source§

fn clone(&self) -> FrameworkAccounts

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for FrameworkAccounts

Source§

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

Formats the value using the given formatter. Read more

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more