pub struct VendorGenerator { /* private fields */ }Expand description
Generator for vendor master data.
Implementations§
Source§impl VendorGenerator
impl VendorGenerator
Sourcepub fn with_config(seed: u64, config: VendorGeneratorConfig) -> Self
pub fn with_config(seed: u64, config: VendorGeneratorConfig) -> Self
Create a new vendor generator with custom configuration.
Sourcepub fn with_network_config(
seed: u64,
config: VendorGeneratorConfig,
network_config: VendorNetworkConfig,
) -> Self
pub fn with_network_config( seed: u64, config: VendorGeneratorConfig, network_config: VendorNetworkConfig, ) -> Self
Create a new vendor generator with network configuration.
Sourcepub fn set_coa_framework(&mut self, framework: CoAFramework)
pub fn set_coa_framework(&mut self, framework: CoAFramework)
Set the accounting framework for auxiliary GL account generation.
Sourcepub fn set_network_config(&mut self, network_config: VendorNetworkConfig)
pub fn set_network_config(&mut self, network_config: VendorNetworkConfig)
Set network configuration.
Sourcepub fn set_country_pack(&mut self, pack: CountryPack)
pub fn set_country_pack(&mut self, pack: CountryPack)
Set the country pack for locale-aware generation.
Sourcepub fn set_counter_offset(&mut self, offset: usize)
pub fn set_counter_offset(&mut self, offset: usize)
Set a counter offset so that generated IDs start after a given value.
This is used when generating vendors for multiple companies in parallel to ensure globally unique IDs. For example, if company 0 generates 100 vendors (V-000001..V-000100), company 1 should set offset=100 so its vendors start at V-000101.
Sourcepub fn generate_vendor(
&mut self,
company_code: &str,
_effective_date: NaiveDate,
) -> Vendor
pub fn generate_vendor( &mut self, company_code: &str, _effective_date: NaiveDate, ) -> Vendor
Generate a single vendor.
Sourcepub fn generate_intercompany_vendor(
&mut self,
company_code: &str,
partner_company_code: &str,
effective_date: NaiveDate,
) -> Vendor
pub fn generate_intercompany_vendor( &mut self, company_code: &str, partner_company_code: &str, effective_date: NaiveDate, ) -> Vendor
Generate an intercompany vendor (always intercompany).
Sourcepub fn generate_vendor_pool(
&mut self,
count: usize,
company_code: &str,
effective_date: NaiveDate,
) -> VendorPool
pub fn generate_vendor_pool( &mut self, count: usize, company_code: &str, effective_date: NaiveDate, ) -> VendorPool
Generate a vendor pool with specified count.
Sourcepub fn generate_vendor_pool_with_ic(
&mut self,
count: usize,
company_code: &str,
partner_company_codes: &[String],
effective_date: NaiveDate,
) -> VendorPool
pub fn generate_vendor_pool_with_ic( &mut self, count: usize, company_code: &str, partner_company_codes: &[String], effective_date: NaiveDate, ) -> VendorPool
Generate a vendor pool with intercompany vendors.
Sourcepub fn generate_vendor_network(
&mut self,
company_code: &str,
effective_date: NaiveDate,
total_annual_spend: Decimal,
) -> VendorNetwork
pub fn generate_vendor_network( &mut self, company_code: &str, effective_date: NaiveDate, total_annual_spend: Decimal, ) -> VendorNetwork
Generate a complete vendor network with tiered supply chain.
Sourcepub fn generate_vendor_pool_with_network(
&mut self,
company_code: &str,
effective_date: NaiveDate,
total_annual_spend: Decimal,
) -> (VendorPool, VendorNetwork)
pub fn generate_vendor_pool_with_network( &mut self, company_code: &str, effective_date: NaiveDate, total_annual_spend: Decimal, ) -> (VendorPool, VendorNetwork)
Generate a vendor pool with network relationships.