# After Upgrade 7.8 to 8.0 - Import of SEPA Statement CAMT.052 failing

**URL:** https://discuss.tryton.org/t/after-upgrade-7-8-to-8-0-import-of-sepa-statement-camt-052-failing/9265
**Category:** Developer
**Tags:** accounting
**Created:** [June 21, 2026, 10:00am UTC](https://discuss.tryton.org/t/after-upgrade-7-8-to-8-0-import-of-sepa-statement-camt-052-failing/9265 "2026-06-21T10:00:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![chrisexner](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@chrisexner](https://discuss.tryton.org/u/chrisexner)
#### Post date: [June 21, 2026, 10:00am UTC](https://discuss.tryton.org/t/after-upgrade-7-8-to-8-0-import-of-sepa-statement-camt-052-failing/9265/1 "2026-06-21T10:00:36Z")

</div>

Attached you will find a Statement of german Sparkasse Pforzheim-Calw in CAMT.052 Format.

Before Upgrade to 8.0, import of statements worked fine.  
Since 8.0 import failes while missing the Amount in Detail.

Does this file not conform to the Standard ISO20022? (must the Amount always be present in the \<NtryDtls\>?)

In 7.8 the Amount was taken from \<Ntry\>

```auto
def _camt_amount(self, node, detail=None):
        amount = Decimal(node.findtext('./{*}Amt'))
        if node.findtext('./{*}CdtDbtInd') == 'DBIT':
            amount *= -1
        return amount

```

Whereas 8.0 only takes the Amound from \<Ntry\> if no Detail is available:

```auto
 def _camt_amount(self, entry, detail=None):
        if detail is not None:
            amount = Decimal(detail.findtext('./{*}AmtDtls/{*}TxAmt/{*}Amt'))
        else:
            amount = Decimal(entry.findtext('./{*}Amt'))
        if entry.findtext('./{*}CdtDbtInd') == 'DBIT':
            amount *= -1
        return amount

```

CAMT.052 file in question:

```auto
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.052.001.02" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:camt.052.001.02 camt.052.001.02.xsd">
	<BkToCstmrAcctRpt>
		<GrpHdr>
			<MsgId>camt52_20260524041004__ONLINEBA</MsgId>
			<CreDtTm>2026-05-24T04:10:04+02:00</CreDtTm>
			<MsgPgntn>
				<PgNb>1</PgNb>
				<LastPgInd>true</LastPgInd>
			</MsgPgntn>
		</GrpHdr>
		<Rpt>
			<Id>camt052_ONLINEBA</Id>
			<ElctrncSeqNb>00000</ElctrncSeqNb>
			<CreDtTm>2026-05-24T04:10:04+02:00</CreDtTm>
			<Acct>
				<Id>
					<IBAN>DEXX66650085XXXXXXXXXX</IBAN>
				</Id>
				<Ccy>EUR</Ccy>
				<Svcr>
					<FinInstnId>
						<BIC>PZHSDE66XXX</BIC>
						<Nm>Sparkasse Pforzheim Calw</Nm>
						<Othr>
							<Id>DE144189922</Id>
							<Issr>UmsStId</Issr>
						</Othr>
					</FinInstnId>
				</Svcr>
			</Acct>
			<Bal>
				<Tp>
					<CdOrPrtry>
						<Cd>PRCD</Cd>
					</CdOrPrtry>
				</Tp>
				<Amt Ccy="EUR">1050.00</Amt>
				<CdtDbtInd>CRDT</CdtDbtInd>
				<Dt>
					<Dt>2026-05-21</Dt>
				</Dt>
			</Bal>
			<Bal>
				<Tp>
					<CdOrPrtry>
						<Cd>CLBD</Cd>
					</CdOrPrtry>
				</Tp>
				<Amt Ccy="EUR">1000.00</Amt>
				<CdtDbtInd>CRDT</CdtDbtInd>
				<Dt>
					<Dt>2026-05-22</Dt>
				</Dt>
			</Bal>
			<Ntry>
				<Amt Ccy="EUR">50.00</Amt>
				<CdtDbtInd>DBIT</CdtDbtInd>
				<Sts>BOOK</Sts>
				<BookgDt>
					<Dt>2026-05-22</Dt>
				</BookgDt>
				<ValDt>
					<Dt>2026-05-22</Dt>
				</ValDt>
				<AcctSvcrRef>NONREF</AcctSvcrRef>
				<BkTxCd/>
				<NtryDtls>
					<TxDtls>
						<Refs>
							<EndToEndId>STRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXFF</EndToEndId>
							<MndtId>YXXXXXXXXXXXXXXL</MndtId>
							<Prtry>
								<Tp>FI-UMSATZ-ID</Tp>
								<Ref>2026-05-22-00.XX.XX.XXXXXX</Ref>
							</Prtry>
						</Refs>
						<BkTxCd>
							<Prtry>
								<Cd>NDDT+XXX+XXXX+888</Cd>
								<Issr>DK</Issr>
							</Prtry>
						</BkTxCd>
						<RltdPties>
							<Dbtr>
								<Nm>XXXXXXXXXX FLOOR 3 BLOCK 3 MIESIAN PLAZA</Nm>
							</Dbtr>
							<DbtrAcct>
								<Id>
									<IBAN>DEXX66650085XXXXXXXXXX</IBAN>
								</Id>
							</DbtrAcct>
							<Cdtr>
								<Nm>Starlink Internet Services Limited</Nm>
								<Id>
									<PrvtId>
										<Othr>
											<Id>IE22ZZZ362416</Id>
										</Othr>
									</PrvtId>
								</Id>
							</Cdtr>
							<CdtrAcct>
								<Id>
									<IBAN>IE30CITI99005132956548</IBAN>
								</Id>
							</CdtrAcct>
						</RltdPties>
						<RltdAgts>
							<DbtrAgt>
								<FinInstnId>
									<BIC>PZHSDE66</BIC>
								</FinInstnId>
							</DbtrAgt>
							<CdtrAgt>
								<FinInstnId>
									<BIC>STTOIE22</BIC>
								</FinInstnId>
							</CdtrAgt>
						</RltdAgts>
						<RmtInf>
							<Ustrd>STARLINK INTERNET</Ustrd>
						</RmtInf>
					</TxDtls>
				</NtryDtls>
				<AddtlNtryInf>FOLGELASTSCHRIFT</AddtlNtryInf>
			</Ntry>
		</Rpt>
	</BkToCstmrAcctRpt>
</Document>

```

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [June 22, 2026, 8:51am UTC](https://discuss.tryton.org/t/after-upgrade-7-8-to-8-0-import-of-sepa-statement-camt-052-failing/9265/2 "2026-06-22T08:51:13Z")

</div>

Indeed `TxDtls` is not required to contain an `AmtDtls`.  
So [SEPA statement: batch payment not parsed correctly? (#13823) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/13823) did not consider that the transaction details may be missing.  
Now the problem is how to deal if there are multiple `TxDtls` without any `AmtDtls`. I guess we should make a single origin for the `Ntry`.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [June 22, 2026, 9:15am UTC](https://discuss.tryton.org/t/after-upgrade-7-8-to-8-0-import-of-sepa-statement-camt-052-failing/9265/3 "2026-06-22T09:15:23Z")

</div>

> [@ced](#):
>
> Now the problem is how to deal if there are multiple `TxDtls` without any `AmtDtls`. I guess we should make a single origin for the `Ntry`.

I guess it will not happen as it does not make much sense.

I filled [Missing amount in transaction details for CAMT.05x (#14904) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/14904)
