feat: add project requisites and agreement cancellation
This commit is contained in:
@@ -28,6 +28,17 @@ class KS2ExportHeader:
|
||||
period_to: date | None
|
||||
comment: str
|
||||
status: str
|
||||
# Official requisites (DOC-B10)
|
||||
investor_name: str = ""
|
||||
customer_name: str = ""
|
||||
contractor_name: str = ""
|
||||
construction_name: str = ""
|
||||
object_name: str = ""
|
||||
contract_amount: str = ""
|
||||
contractor_signer_name: str = ""
|
||||
contractor_signer_position: str = ""
|
||||
customer_signer_name: str = ""
|
||||
customer_signer_position: str = ""
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -60,7 +71,7 @@ def build_ks2_export_dto(db, ks2_document) -> KS2ExportDocument:
|
||||
|
||||
header = KS2ExportHeader(
|
||||
project_name=project.name if project else "",
|
||||
customer=project.customer if project and project.customer else "",
|
||||
customer=project.effective_customer_name if project else "",
|
||||
contract_number=project.contract_number if project and project.contract_number else "",
|
||||
contract_date=project.contract_date if project else None,
|
||||
currency=project.currency if project and project.currency else "",
|
||||
@@ -70,5 +81,15 @@ def build_ks2_export_dto(db, ks2_document) -> KS2ExportDocument:
|
||||
period_to=ks2_document.reporting_period_to,
|
||||
comment=ks2_document.comment or "",
|
||||
status=ks2_document.status or "",
|
||||
investor_name=project.investor_name if project and project.investor_name else "",
|
||||
customer_name=project.effective_customer_name if project else "",
|
||||
contractor_name=project.contractor_name if project and project.contractor_name else "",
|
||||
construction_name=project.construction_name if project and project.construction_name else "",
|
||||
object_name=project.object_name if project and project.object_name else "",
|
||||
contract_amount=str(project.contract_amount) if project and project.contract_amount is not None else "",
|
||||
contractor_signer_name=project.contractor_signer_name if project and project.contractor_signer_name else "",
|
||||
contractor_signer_position=project.contractor_signer_position if project and project.contractor_signer_position else "",
|
||||
customer_signer_name=project.customer_signer_name if project and project.customer_signer_name else "",
|
||||
customer_signer_position=project.customer_signer_position if project and project.customer_signer_position else "",
|
||||
)
|
||||
return KS2ExportDocument(header=header, items=items, total=total)
|
||||
|
||||
Reference in New Issue
Block a user