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
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
|
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
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
|