Financial¤
Financial
dataclass
¤
Financial(
capital_expenditure: CapitalExpenditure | None = None,
purchase_year: int = 0,
warranty_expiration_date: date | None = None,
)
Represents the financial element in an equipment register.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
capital_expenditure
|
CapitalExpenditure | None
|
The equipment is a capital expenditure. |
None
|
purchase_year
|
int
|
The (approximate) year that the equipment was purchased.
A value of |
0
|
warranty_expiration_date
|
date | None
|
Approximate date that the warranty expires. |
None
|
capital_expenditure
class-attribute
instance-attribute
¤
capital_expenditure: CapitalExpenditure | None = None
The equipment is a capital expenditure.
purchase_year
class-attribute
instance-attribute
¤
purchase_year: int = 0
The (approximate) year that the equipment was purchased. A value of 0
represents that the year is unknown.
warranty_expiration_date
class-attribute
instance-attribute
¤
warranty_expiration_date: date | None = None
Approximate date that the warranty expires.
from_xml
classmethod
¤
Convert an XML element into a Financial instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
element
|
Element[str]
|
A financial XML element from an equipment register. |
required |
Returns:
Type | Description |
---|---|
Financial
|
The Financial instance. |
Source code in src/msl/equipment/schema.py
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 |
|
to_xml
¤
Convert the Financial class into an XML element.
Returns:
Type | Description |
---|---|
Element[str]
|
The Financial as an XML element. |
Source code in src/msl/equipment/schema.py
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 |
|