auxi.modelling.business.structure module¶
This module provides an classes used to create a business structure.
-
class
auxi.modelling.business.structure.
Activity
(name, start=datetime.datetime(1, 1, 1, 0, 0), end=datetime.datetime(9999, 12, 31, 23, 59, 59, 999999), interval=1, description=None)¶ Bases:
auxi.core.objects.NamedObject
Represents an activity base class. An activity will typically represent a transaction activity in a business.
Parameters: - name – The name.
- description – The description.
- start – The datetime the activity should be started.
- end – The datetime the activity should be run until.
- interval – The interval of the activity.
-
get_referenced_accouts
()¶ Retrieve the general ledger accounts referenced in this instance.
Returns: The referenced accounts.
-
name
¶
-
prepare_to_run
(clock, period_count)¶ Prepare the activity for execution.
Parameters: - clock – The clock containing the execution start time and execution period information.
- period_count – The total amount of periods this activity will be requested to be run for.
-
set_parent_path
(value)¶ Set the parent path and the path from the new parent path.
Parameters: value – The path to the object’s parent
-
class
auxi.modelling.business.structure.
Component
(name, gl, description=None)¶ Bases:
auxi.core.objects.NamedObject
Represents an component class. A component class that represents a component of an entity. A component has business activities
Parameters: - name – The name.
- description – The description.
-
add_activity
(activity)¶ Add an activity to the component.
Parameters: activity – The activity.
-
create_component
(name, description=None)¶ Create a sub component in the business component.
Parameters: - name – The new component’s name.
- description – The new component’s description.
Returns: The created component.
-
get_activity
(name)¶ Retrieve an activity given its name.
Parameters: name – The name of the activity. Returns: The activity.
-
get_component
(name)¶ Retrieve a child component given its name.
Parameters: name – The name of the component. Returns: The component.
-
name
¶
-
prepare_to_run
(clock, period_count)¶ Prepare the component for execution.
Parameters: - clock – The clock containing the execution start time and execution period information.
- period_count – The total amount of periods this activity will be requested to be run for.
-
remove_component
(name)¶ Remove a sub component from the component.
Parameters: name – The name of the component to remove.
-
run
(clock, generalLedger)¶ Execute the component at the current clock cycle.
Parameters: - clock – The clock containing the current execution time and period information.
- generalLedger – The general ledger into which to create the transactions.
-
set_parent_path
(value)¶ Set the parent path and the path from the new parent path.
Parameters: value – The path to the object’s parent.
-
class
auxi.modelling.business.structure.
Entity
(name, gl_structure, description=None)¶ Bases:
auxi.core.objects.NamedObject
Represents an entity class. An entity consists of business components e.g. Sales department. It executes its components and performs financial year end transcations.
Parameters: - name – The name.
- gl_structure – The general ledger structure the entity’s general ledger will be initialized with.
- description – The description.
- period_count – The number of periods the entity should be run for.
-
create_component
(name, description=None)¶ Create a component in the business entity.
Parameters: - name – The component’s name.
- description – The component’s description.
Returns: The created component.
-
name
¶
-
prepare_to_run
(clock, period_count)¶ Prepare the entity for execution.
Parameters: - clock – The clock containing the execution start time and execution period information.
- period_count – The total amount of periods this activity will be requested to be run for.
-
remove_component
(name)¶ Remove a component from the entity.
Parameters: name – The name of the component to remove.
-
run
(clock)¶ Execute the entity at the current clock cycle.
Parameters: clock – The clock containing the current execution time and period information.
-
set_parent_path
(value)¶ Set the parent path and the path from the new parent path.
Parameters: value – The path to the object’s parent