GLAccount

Struct GLAccount 

Source
pub struct GLAccount {
Show 20 fields pub account_number: String, pub short_description: String, pub long_description: String, pub account_type: AccountType, pub sub_type: AccountSubType, pub account_class: String, pub account_group: String, pub is_control_account: bool, pub is_suspense_account: bool, pub parent_account: Option<String>, pub hierarchy_level: u8, pub normal_debit_balance: bool, pub is_postable: bool, pub is_blocked: bool, pub allowed_doc_types: Vec<String>, pub requires_cost_center: bool, pub requires_profit_center: bool, pub industry_weights: IndustryWeights, pub typical_frequency: f64, pub typical_amount_range: (f64, f64),
}
Expand description

Individual GL account definition.

Represents a single account in the chart of accounts with all necessary metadata for realistic transaction generation.

Fields§

§account_number: String

Account number (e.g., “100000”, “400100”)

§short_description: String

Short description

§long_description: String

Long description

§account_type: AccountType

Primary account type

§sub_type: AccountSubType

Detailed sub-type classification

§account_class: String

Account class code (first digit typically)

§account_group: String

Account group for reporting

§is_control_account: bool

Is this a control account (subledger summary)

§is_suspense_account: bool

Is this a suspense/clearing account

§parent_account: Option<String>

Parent account number (for hierarchies)

§hierarchy_level: u8

Account hierarchy level (1 = top level)

§normal_debit_balance: bool

Normal balance side (true = debit, false = credit)

§is_postable: bool

Is posting allowed directly to this account

§is_blocked: bool

Is this account blocked for posting

§allowed_doc_types: Vec<String>

Allowed document types for this account

§requires_cost_center: bool

Required cost center assignment

§requires_profit_center: bool

Required profit center assignment

§industry_weights: IndustryWeights

Industry sector relevance scores (0.0-1.0)

§typical_frequency: f64

Typical transaction frequency (transactions per month)

§typical_amount_range: (f64, f64)

Typical transaction amount range (min, max)

Implementations§

Source§

impl GLAccount

Source

pub fn new( account_number: String, description: String, account_type: AccountType, sub_type: AccountSubType, ) -> Self

Create a new GL account with minimal required fields.

Source

pub fn account_code(&self) -> &str

Get account code (alias for account_number).

Source

pub fn description(&self) -> &str

Get description (alias for short_description).

Trait Implementations§

Source§

impl Clone for GLAccount

Source§

fn clone(&self) -> GLAccount

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 GLAccount

Source§

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

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

impl<'de> Deserialize<'de> for GLAccount

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 Serialize for GLAccount

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

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, 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> 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,