pas.views.settlement_run
Attributes
Functions
|
|
|
|
|
A page where all exports are listed and grouped by category. |
|
Get totals for a specific commission grouped by party. |
|
Get totals grouped by party. |
|
Entry point for almost all settlement PDF generations. |
|
Get settlement data for a specific commission. |
|
Generate HTML for settlement PDF. |
|
|
|
Get totals for a specific party. |
|
Debug function to trace party export data retrieval |
|
|
|
Get settlement data for a specific party. |
|
Generate export data for a specific entity in a settlement run. |
|
Generate export data for a specific entity (commission, party or |
|
|
|
Module Contents
- pas.views.settlement_run.PDF_CSS = Multiline-String[source]
Show Value
""" @page { size: A4; margin: 2.5cm 0.75cm 2cm 0.75cm; /* top right bottom left */ @top-right { content: "Staatskanzlei"; font-family: Helvetica, Arial, sans-serif; font-size: 8pt; } } body { font-family: Helvetica, Arial, sans-serif; font-size: 7pt; line-height: 1.2; } table { border-collapse: collapse; margin-top: 1cm; width: 100%; table-layout: fixed; } /* Journal entries table - updated column widths */ .journal-table th:nth-child(1), /* Date */ .journal-table td:nth-child(1) { width: 20pt; } .journal-table th:nth-child(2), /* Personnel Number */ .journal-table td:nth-child(2) { width: 20pt; } .journal-table th:nth-child(3), /* Person */ .journal-table td:nth-child(3) { width: 80pt; } .journal-table th:nth-child(4), /* Type */ .journal-table td:nth-child(4) { width: 170pt; } .journal-table th:nth-child(5), /* Value */ .journal-table td:nth-child(5), .journal-table th:nth-child(6), /* CHF */ .journal-table td:nth-child(6), .journal-table th:nth-child(7), /* CHF + TZ */ .journal-table td:nth-child(7) { width: 30pt; } /* Party summary table */ .summary-table th:nth-child(1), /* Name */ .summary-table td:nth-child(1) { width: 120pt; } .summary-table th:nth-child(2), /* Meetings */ .summary-table td:nth-child(2), .summary-table th:nth-child(3), /* Expenses */ .summary-table td:nth-child(3), .summary-table th:nth-child(4), /* Total */ .summary-table td:nth-child(4), .summary-table th:nth-child(5), /* COLA */ .summary-table td:nth-child(5), .summary-table th:nth-child(6), /* Final */ .summary-table td:nth-child(6) { width: 60pt; } /* Dark header for title row */ th[colspan="6"] { background-color: #707070; color: white; font-weight: bold; text-align: left; padding: 2pt; border: 1pt solid #000; } th:not([colspan]) { background-color: #d5d7d9; font-weight: bold; text-align: left; padding: 2pt; border: 1pt solid #000; } td { padding: 2pt; border: 1pt solid #000; } tr:nth-child(even):not(.total-row) td { background-color: #f3f3f3; } .numeric { text-align: right; } .total-row { font-weight: bold; background-color: #d5d7d9; } .summary-table { margin-top: 2cm; /* page-break-before: always; */ } """
- pas.views.settlement_run.view_settlement_runs(self: onegov.pas.collections.SettlementRunCollection, request: onegov.town6.request.TownRequest) onegov.core.types.RenderData [source]
- pas.views.settlement_run.add_settlement_run(self: onegov.pas.collections.SettlementRunCollection, request: onegov.town6.request.TownRequest, form: onegov.pas.forms.SettlementRunForm) RenderData | Response [source]
- pas.views.settlement_run.view_settlement_run(self: onegov.pas.models.SettlementRun, request: onegov.town6.request.TownRequest) onegov.core.types.RenderData [source]
A page where all exports are listed and grouped by category.
- pas.views.settlement_run._get_commission_totals(settlement_run: onegov.pas.models.SettlementRun, request: onegov.town6.request.TownRequest, commission: onegov.pas.models.Commission) list[TotalRow] [source]
Get totals for a specific commission grouped by party.
- pas.views.settlement_run._get_party_totals_for_export_all(self: onegov.pas.models.SettlementRun, request: onegov.town6.request.TownRequest) list[tuple[str, decimal.Decimal, decimal.Decimal, decimal.Decimal, decimal.Decimal, decimal.Decimal]] [source]
Get totals grouped by party.
- pas.views.settlement_run.generate_settlement_pdf(settlement_run: onegov.pas.models.SettlementRun, request: onegov.town6.request.TownRequest, entity_type: Literal['all', 'commission', 'party', 'parliamentarian'], entity: onegov.pas.models.Commission | onegov.pas.models.Party | onegov.pas.models.Parliamentarian | None = None) bytes [source]
Entry point for almost all settlement PDF generations.
- pas.views.settlement_run._get_commission_settlement_data(settlement_run: onegov.pas.models.SettlementRun, request: onegov.town6.request.TownRequest, commission: onegov.pas.models.Commission) list[SettlementDataRow] [source]
Get settlement data for a specific commission.
- pas.views.settlement_run._generate_settlement_html(settlement_data: list[SettlementDataRow], totals: list[TotalRow], subtitle: str) str [source]
Generate HTML for settlement PDF.
- pas.views.settlement_run._get_data_export_all(self: onegov.pas.models.SettlementRun, request: onegov.town6.request.TownRequest) list[SettlementDataRow] [source]
- pas.views.settlement_run.get_party_specific_totals(settlement_run: onegov.pas.models.SettlementRun, request: onegov.town6.request.TownRequest, party: onegov.pas.models.Party) list[TotalRow] [source]
Get totals for a specific party.
- pas.views.settlement_run.debug_party_export(settlement_run: onegov.pas.models.SettlementRun, request: onegov.town6.request.TownRequest, party: onegov.pas.models.Party) None [source]
Debug function to trace party export data retrieval
- pas.views.settlement_run.debug_party_export2(settlement_run: onegov.pas.models.SettlementRun, request: onegov.town6.request.TownRequest, party: onegov.pas.models.Party) None [source]
- pas.views.settlement_run._get_party_settlement_data(settlement_run: onegov.pas.models.SettlementRun, request: onegov.town6.request.TownRequest, party: onegov.pas.models.Party) list[SettlementDataRow] [source]
Get settlement data for a specific party.
- pas.views.settlement_run.view_settlement_run_all_export(self: onegov.pas.path.SettlementRunAllExport, request: onegov.town6.request.TownRequest) webob.Response [source]
Generate export data for a specific entity in a settlement run.
- pas.views.settlement_run.view_settlement_run_export(self: onegov.pas.path.SettlementRunExport, request: onegov.town6.request.TownRequest) webob.Response [source]
Generate export data for a specific entity (commission, party or parliamentarian) in a settlement run.