diff --git a/modules/edocument_uncefact/template/16B-CII/CrossIndustryInvoice.xml b/modules/edocument_uncefact/template/16B-CII/CrossIndustryInvoice.xml
index e5f8027c29..87ce726702 100644
--- a/modules/edocument_uncefact/template/16B-CII/CrossIndustryInvoice.xml
+++ b/modules/edocument_uncefact/template/16B-CII/CrossIndustryInvoice.xml
@@ -78,14 +78,14 @@ this repository contains the full copyright notices and license terms. -->
- ${format(Decimal(str(line.quantity * this.type_sign)), 'f')}
+ ${format(abs(Decimal(str(line.quantity))), 'f')}
${TradeTax(tax.tax)}
- ${format(line.amount.normalize(), 'f')}
+ ${format((line.amount * this.type_sign).normalize(), 'f')}