Refine linkage report spacing

This commit is contained in:
2026-07-14 09:54:00 +02:00
parent 808e75daa6
commit 5a644d430b
2 changed files with 26 additions and 19 deletions

View File

@@ -1732,9 +1732,11 @@ class ShipmentIn(metaclass=PoolMeta):
rows = []
if purchase_lines:
rows.append(('Purchases', '', purchase_total, purchase_total))
rows.append((
'Purchases', '', purchase_total, purchase_total,
'major'))
if sale_lines:
rows.append(('Sales', '', sale_total, sale_total))
rows.append(('Sales', '', sale_total, sale_total, 'major'))
fee_total = Decimal('0')
fee_rows = {}
@@ -1744,12 +1746,12 @@ class ShipmentIn(metaclass=PoolMeta):
fee_total += amount
fee_rows[label] = fee_rows.get(label, Decimal('0')) + amount
for label, amount in fee_rows.items():
rows.append(('Costs', label, amount, amount))
rows.append(('Costs', label, amount, amount, 'cost'))
if rows:
rows.append(('Costs', 'Total', fee_total, fee_total))
rows.append(('Costs', 'Total', fee_total, fee_total, 'cost'))
pnl = purchase_total + sale_total + fee_total
rows.append(('P&L', '', pnl, pnl))
rows.append(('P&L', '', pnl, pnl, 'pnl'))
return rows
def _get_report_linkage_movement_rows(self):
@@ -2013,7 +2015,7 @@ class ShipmentIn(metaclass=PoolMeta):
def report_linkage_summary_rows(self):
return self._report_table_rows(
self._get_report_linkage_summary_rows(),
('group', 'cost_type', 'estimated', 'validated'),
('group', 'cost_type', 'estimated', 'validated', 'kind'),
{'estimated', 'validated'})
@property

View File

@@ -1184,30 +1184,31 @@
<style:style style:name="LKDetAmountW" style:family="table-column"><style:table-column-properties style:column-width="3.75cm"/></style:style>
<style:style style:name="LKSigW" style:family="table-column"><style:table-column-properties style:column-width="6.975cm"/></style:style>
<style:style style:name="LKTitleRow" style:family="table-row"><style:table-row-properties style:min-row-height="0.46cm"/></style:style>
<style:style style:name="LKHeadRow" style:family="table-row"><style:table-row-properties style:min-row-height="0.48cm"/></style:style>
<style:style style:name="LKSectionRow" style:family="table-row"><style:table-row-properties style:min-row-height="0.55cm"/></style:style>
<style:style style:name="LKSmallRow" style:family="table-row"><style:table-row-properties style:min-row-height="0.31cm"/></style:style>
<style:style style:name="LKBankRow" style:family="table-row"><style:table-row-properties style:min-row-height="0.78cm"/></style:style>
<style:style style:name="LKSignatureRow" style:family="table-row"><style:table-row-properties style:min-row-height="3.5cm"/></style:style>
<style:style style:name="LKHeadRow" style:family="table-row"><style:table-row-properties style:min-row-height="0.54cm"/></style:style>
<style:style style:name="LKSectionRow" style:family="table-row"><style:table-row-properties style:min-row-height="0.42cm"/></style:style>
<style:style style:name="LKSmallRow" style:family="table-row"><style:table-row-properties style:min-row-height="0.27cm"/></style:style>
<style:style style:name="LKBankRow" style:family="table-row"><style:table-row-properties style:min-row-height="0.56cm"/></style:style>
<style:style style:name="LKSignatureRow" style:family="table-row"><style:table-row-properties style:min-row-height="2.45cm"/></style:style>
<style:style style:name="LKHeaderCell" style:family="table-cell"><style:table-cell-properties fo:padding="0.02cm" fo:border="none"/></style:style>
<style:style style:name="LKNoBorder" style:family="table-cell"><style:table-cell-properties fo:padding="0.025cm" fo:border="none"/></style:style>
<style:style style:name="LKBlue" style:family="table-cell"><style:table-cell-properties fo:background-color="#69b4f0" fo:padding="0.03cm" fo:border="1pt solid #000000"><style:background-image/></style:table-cell-properties></style:style>
<style:style style:name="LKLine" style:family="table-cell"><style:table-cell-properties fo:padding="0.03cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="1pt solid #000000"/></style:style>
<style:style style:name="LKBlue" style:family="table-cell"><style:table-cell-properties fo:background-color="#69b4f0" fo:padding="0.015cm" fo:border="1pt solid #000000"><style:background-image/></style:table-cell-properties></style:style>
<style:style style:name="LKLine" style:family="table-cell"><style:table-cell-properties fo:padding="0.015cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="1pt solid #000000"/></style:style>
<style:style style:name="LKZero" style:family="paragraph"><style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" fo:line-height="1%"/><style:text-properties fo:font-size="1pt"/></style:style>
<style:style style:name="LKSpacer" style:family="paragraph"><style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.08cm" fo:line-height="1%"/><style:text-properties fo:font-size="2pt"/></style:style>
<style:style style:name="LKPageBreak" style:family="paragraph"><style:paragraph-properties fo:break-before="page" fo:margin-top="0cm" fo:margin-bottom="0cm"/><style:text-properties fo:font-size="1pt"/></style:style>
<style:style style:name="LKTitle" style:family="paragraph"><style:paragraph-properties fo:text-align="center" fo:margin-top="0cm" fo:margin-bottom="0.03cm" fo:line-height="100%"/><style:text-properties style:font-name="Arial" fo:font-size="16pt" fo:font-weight="bold"/></style:style>
<style:style style:name="LKTitle" style:family="paragraph"><style:paragraph-properties fo:text-align="start" fo:margin-top="0cm" fo:margin-bottom="0.03cm" fo:line-height="100%"/><style:text-properties style:font-name="Arial" fo:font-size="16pt" fo:font-weight="bold"/></style:style>
<style:style style:name="LKLogo" style:family="paragraph"><style:paragraph-properties fo:margin-top="0.08cm" fo:margin-bottom="0cm" fo:line-height="100%"/><style:text-properties style:font-name="Arial" fo:font-size="8pt"/></style:style>
<style:style style:name="LKHeadLabel" style:family="paragraph"><style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" fo:line-height="100%"/><style:text-properties style:font-name="Arial" fo:font-size="8pt" fo:font-weight="bold"/></style:style>
<style:style style:name="LKHeadValue" style:family="paragraph"><style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" fo:line-height="100%"/><style:text-properties style:font-name="Arial" fo:font-size="8pt"/></style:style>
<style:style style:name="LKSectionText" style:family="paragraph"><style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" fo:line-height="100%"/><style:text-properties style:font-name="Arial" fo:font-size="10pt" fo:font-weight="bold"/></style:style>
<style:style style:name="LKSectionText" style:family="paragraph"><style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" fo:line-height="100%"/><style:text-properties style:font-name="Arial" fo:font-size="11pt" fo:font-weight="bold"/></style:style>
<style:style style:name="LKCell" style:family="paragraph"><style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" fo:line-height="100%"/><style:text-properties style:font-name="Arial" fo:font-size="8pt"/></style:style>
<style:style style:name="LKCellRight" style:family="paragraph" style:parent-style-name="LKCell"><style:paragraph-properties fo:text-align="end"/><style:text-properties style:font-name="Arial" fo:font-size="8pt"/></style:style>
<style:style style:name="LKCellCenter" style:family="paragraph" style:parent-style-name="LKCell"><style:paragraph-properties fo:text-align="center"/></style:style>
<style:style style:name="LKBold" style:family="paragraph" style:parent-style-name="LKCell"><style:text-properties style:font-name="Arial" fo:font-size="8pt" fo:font-weight="bold"/></style:style>
<style:style style:name="LKBoldRight" style:family="paragraph" style:parent-style-name="LKBold"><style:paragraph-properties fo:text-align="end"/><style:text-properties style:font-name="Arial" fo:font-size="8pt" fo:font-weight="bold"/></style:style>
<style:style style:name="LKSignatureName" style:family="paragraph"><style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm"/><style:text-properties style:font-name="Arial" fo:font-size="26pt"/></style:style>
<style:style style:name="LKSignatureSmall" style:family="paragraph"><style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm"/><style:text-properties style:font-name="Arial" fo:font-size="11pt"/></style:style>
<style:style style:name="LKSignatureName" style:family="paragraph"><style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm"/><style:text-properties style:font-name="Arial" fo:font-size="16pt"/></style:style>
<style:style style:name="LKSignatureSmall" style:family="paragraph"><style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm"/><style:text-properties style:font-name="Arial" fo:font-size="16pt"/></style:style>
<style:style style:name="LKSignatureLine" style:family="paragraph"><style:paragraph-properties fo:margin-top="1.05cm" fo:margin-bottom="0cm" fo:border-top="0.75pt solid #000000"/><style:text-properties style:font-name="Arial" fo:font-size="1pt"/></style:style>
<style:style style:name="LKSummaryTable" style:family="table"><style:table-properties style:width="12.0cm" table:align="left"/></style:style>
@@ -1432,7 +1433,12 @@
<table:table-column table:style-name="LKSumGroupW"/><table:table-column table:style-name="LKSumCostW"/><table:table-column table:style-name="LKSumAmountW"/><table:table-column table:style-name="LKSumAmountW"/>
<table:table-row table:style-name="LKSmallRow"><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKBold">Group</text:p></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKBold">Cost Type</text:p></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKBoldRight">Estimated</text:p></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKBoldRight">Validated</text:p></table:table-cell></table:table-row>
<table:table-row table:style-name="LKZeroRow"><table:table-cell table:style-name="LKNoBorder" office:value-type="string" table:number-columns-spanned="4"><text:p text:style-name="LKZero"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;row in shipment.report_linkage_summary_rows&quot;&gt;</text:placeholder></text:p></table:table-cell><table:covered-table-cell/><table:covered-table-cell/><table:covered-table-cell/></table:table-row>
<table:table-row table:style-name="LKZeroRow"><table:table-cell table:style-name="LKNoBorder" office:value-type="string" table:number-columns-spanned="4"><text:p text:style-name="LKZero"><text:placeholder text:placeholder-type="text">&lt;if test=&quot;row[&apos;kind&apos;] == &apos;pnl&apos;&quot;&gt;</text:placeholder></text:p></table:table-cell><table:covered-table-cell/><table:covered-table-cell/><table:covered-table-cell/></table:table-row>
<table:table-row table:style-name="LKSmallRow"><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKCell"><text:placeholder text:placeholder-type="text">&lt;row[&apos;group&apos;]&gt;</text:placeholder></text:p></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKCell"><text:placeholder text:placeholder-type="text">&lt;row[&apos;cost_type&apos;]&gt;</text:placeholder></text:p></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKBoldRight"><text:placeholder text:placeholder-type="text">&lt;row[&apos;estimated&apos;]&gt;</text:placeholder></text:p></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKBoldRight"><text:placeholder text:placeholder-type="text">&lt;row[&apos;validated&apos;]&gt;</text:placeholder></text:p></table:table-cell></table:table-row>
<table:table-row table:style-name="LKZeroRow"><table:table-cell table:style-name="LKNoBorder" office:value-type="string" table:number-columns-spanned="4"><text:p text:style-name="LKZero"><text:placeholder text:placeholder-type="text">&lt;/if&gt;</text:placeholder></text:p></table:table-cell><table:covered-table-cell/><table:covered-table-cell/><table:covered-table-cell/></table:table-row>
<table:table-row table:style-name="LKZeroRow"><table:table-cell table:style-name="LKNoBorder" office:value-type="string" table:number-columns-spanned="4"><text:p text:style-name="LKZero"><text:placeholder text:placeholder-type="text">&lt;if test=&quot;row[&apos;kind&apos;] != &apos;pnl&apos;&quot;&gt;</text:placeholder></text:p></table:table-cell><table:covered-table-cell/><table:covered-table-cell/><table:covered-table-cell/></table:table-row>
<table:table-row table:style-name="LKSmallRow"><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKCell"><text:placeholder text:placeholder-type="text">&lt;row[&apos;group&apos;]&gt;</text:placeholder></text:p></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKCell"><text:placeholder text:placeholder-type="text">&lt;row[&apos;cost_type&apos;]&gt;</text:placeholder></text:p></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKCellRight"><text:placeholder text:placeholder-type="text">&lt;row[&apos;estimated&apos;]&gt;</text:placeholder></text:p></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKCellRight"><text:placeholder text:placeholder-type="text">&lt;row[&apos;validated&apos;]&gt;</text:placeholder></text:p></table:table-cell></table:table-row>
<table:table-row table:style-name="LKZeroRow"><table:table-cell table:style-name="LKNoBorder" office:value-type="string" table:number-columns-spanned="4"><text:p text:style-name="LKZero"><text:placeholder text:placeholder-type="text">&lt;/if&gt;</text:placeholder></text:p></table:table-cell><table:covered-table-cell/><table:covered-table-cell/><table:covered-table-cell/></table:table-row>
<table:table-row table:style-name="LKZeroRow"><table:table-cell table:style-name="LKNoBorder" office:value-type="string" table:number-columns-spanned="4"><text:p text:style-name="LKZero"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p></table:table-cell><table:covered-table-cell/><table:covered-table-cell/><table:covered-table-cell/></table:table-row>
</table:table>
<text:p text:style-name="LKSpacer"/>
@@ -1684,8 +1690,7 @@
<text:p text:style-name="LKSpacer"/>
<table:table table:name="LKSignatures" table:style-name="LKFull">
<table:table-column table:style-name="LKSigW"/><table:table-column table:style-name="LKSigW"/><table:table-column table:style-name="LKSigW"/><table:table-column table:style-name="LKSigW"/>
<table:table-row table:style-name="LKSignatureRow"><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKSignatureName">Oliver</text:p><text:p text:style-name="LKSignatureName">Gysler</text:p></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKSignatureName">Jeremie</text:p><text:p text:style-name="LKSignatureName">COLLOT</text:p></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKSignatureSmall">Stephane</text:p><text:p text:style-name="LKSignatureSmall">Monnard</text:p></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"></table:table-cell></table:table-row>
<table:table-row table:style-name="LKSignatureRow"><table:table-cell table:style-name="LKNoBorder" office:value-type="string"></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string" table:number-columns-spanned="2"><text:p text:style-name="LKSignatureName">Steve</text:p><text:p text:style-name="LKSignatureName">Zaccarini</text:p></table:table-cell><table:covered-table-cell/><table:table-cell table:style-name="LKNoBorder" office:value-type="string"></table:table-cell></table:table-row>
<table:table-row table:style-name="LKSignatureRow"><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKSignatureName">Oliver</text:p><text:p text:style-name="LKSignatureName">Gysler</text:p><text:p text:style-name="LKSignatureLine"/></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKSignatureName">Jeremie</text:p><text:p text:style-name="LKSignatureName">COLLOT</text:p><text:p text:style-name="LKSignatureLine"/></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKSignatureName">Stephane</text:p><text:p text:style-name="LKSignatureName">Monnard</text:p><text:p text:style-name="LKSignatureLine"/></table:table-cell><table:table-cell table:style-name="LKNoBorder" office:value-type="string"><text:p text:style-name="LKSignatureName">Steve</text:p><text:p text:style-name="LKSignatureName">Zaccarini</text:p><text:p text:style-name="LKSignatureLine"/></table:table-cell></table:table-row>
</table:table>
<text:p text:style-name="LKZero"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
</office:text>