CapitalExpenditure¤
CapitalExpenditure
dataclass
¤
Represents the capitalExpenditure element in an equipment register.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
asset_number
|
str
|
The asset number in the financial system. |
required |
depreciation_end_year
|
int
|
The year (inclusive) that depreciation ends for the asset. |
required |
price
|
float
|
The purchase price of the asset. |
required |
currency
|
str
|
The currency associated with the |
required |
depreciation_end_year
instance-attribute
¤
depreciation_end_year: int
The year (inclusive) that depreciation ends for the asset.
from_xml
classmethod
¤
from_xml(element: Element[str]) -> CapitalExpenditure
Convert an XML element into a CapitalExpenditure instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element
|
Element[str]
|
A capitalExpenditure XML element from an equipment register. |
required |
Returns:
| Type | Description |
|---|---|
CapitalExpenditure
|
The CapitalExpenditure instance. |
Source code in src/msl/equipment/schema.py
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | |
to_xml
¤
Convert the CapitalExpenditure class into an XML element.
Returns:
| Type | Description |
|---|---|
Element[str]
|
The CapitalExpenditure as an XML element. |
Source code in src/msl/equipment/schema.py
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | |