<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.20.6.final using JasperReports Library version 6.20.6-5c96b6aa8a39ac1dc6b6bea4b81168e16dd39231  -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Shipment Lines" language="groovy" isFloatColumnFooter="true" pageWidth="511" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="511" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="f9d9d1f8-fe9a-441d-b3a9-4cd1a4cfd9a9">
	<property name="com.jaspersoft.studio.data.defaultdataadapter" value="iDempiere Production"/>
	<template><![CDATA["styles.jrtx"]]></template>
	<parameter name="RECORD_ID" class="java.lang.Integer" isForPrompting="false">
		<defaultValueExpression><![CDATA[1036057]]></defaultValueExpression>
	</parameter>
	<queryString language="SQL">
		<![CDATA[SELECT
    il.line,
    il.m_inoutline_id,
    il.m_product_id,
    iol.c_charge_id,
    COALESCE(il.qtyentered, il.movementqty)          AS qty,
    il.uomsymbol,
    COALESCE(p.value, il.productvalue)               AS productvalue,
    p.value                                          AS barcode_value,
    NULLIF(btrim(il.upc), '')                        AS upc,
    NULLIF(btrim(p.sku), '')                         AS sku,
    NULLIF(btrim(p.mpn), '')                         AS mpn,
    p.weight                                         AS weight,
    p.isbom                                          AS isbom,
    COALESCE(pt.name, ct.name, ch.name, il.name)     AS name,
    NULLIF(btrim(iol.description), '')               AS description,
    COALESCE(NULLIF(btrim(pt.documentnote), ''),
             NULLIF(btrim(il.documentnote), ''))     AS documentnote,
    il.m_locator_value,
    il.m_inout_id                                    AS record_id
FROM m_inout_line_v il
JOIN m_inoutline iol       ON iol.m_inoutline_id = il.m_inoutline_id
LEFT JOIN m_product p      ON p.m_product_id = il.m_product_id
LEFT JOIN m_product_trl pt ON pt.m_product_id = p.m_product_id AND pt.ad_language = 'de_DE'
LEFT JOIN c_charge ch      ON ch.c_charge_id = iol.c_charge_id
LEFT JOIN c_charge_trl ct  ON ct.c_charge_id = ch.c_charge_id AND ct.ad_language = 'de_DE'
WHERE il.m_inout_id = $P{RECORD_ID}
  AND iol.isdescription = 'N'
  AND (il.m_product_id IS NOT NULL OR iol.c_charge_id IS NOT NULL)
ORDER BY il.line, il.m_inoutline_id]]>
	</queryString>
	<field name="line" class="java.math.BigDecimal"/>
	<field name="m_inoutline_id" class="java.lang.Integer"/>
	<field name="m_product_id" class="java.lang.Integer"/>
	<field name="c_charge_id" class="java.lang.Integer"/>
	<field name="qty" class="java.math.BigDecimal"/>
	<field name="uomsymbol" class="java.lang.String"/>
	<field name="productvalue" class="java.lang.String"/>
	<field name="barcode_value" class="java.lang.String"/>
	<field name="upc" class="java.lang.String"/>
	<field name="sku" class="java.lang.String"/>
	<field name="mpn" class="java.lang.String"/>
	<field name="weight" class="java.math.BigDecimal"/>
	<field name="isbom" class="java.lang.String"/>
	<field name="name" class="java.lang.String"/>
	<field name="description" class="java.lang.String"/>
	<field name="documentnote" class="java.lang.String"/>
	<field name="m_locator_value" class="java.lang.String"/>
	<field name="record_id" class="java.lang.Integer"/>
	<variable name="qty_sum" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[($F{qty} == null || $F{m_product_id} == null) ? java.math.BigDecimal.ZERO : $F{qty}]]></variableExpression>
	</variable>
	<variable name="weight_sum" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[($F{qty} == null || $F{weight} == null || $F{m_product_id} == null) ? java.math.BigDecimal.ZERO : $F{qty}.multiply($F{weight})]]></variableExpression>
	</variable>
	<columnHeader>
		<band height="14" splitType="Stretch">
			<staticText>
				<reportElement x="5" y="1" width="18" height="11" uuid="4d2c3f1a-0001-4a5b-8c6d-1e2f3a4b5c01"/>
				<textElement textAlignment="Left"><font fontName="SansSerif" size="8" isBold="true"/></textElement>
				<text><![CDATA[Pos]]></text>
			</staticText>
			<staticText>
				<reportElement x="22" y="1" width="112" height="11" uuid="4d2c3f1a-0003-4a5b-8c6d-1e2f3a4b5c03"/>
				<textElement textAlignment="Left"><font fontName="SansSerif" size="8" isBold="true"/></textElement>
				<text><![CDATA[Artikel-Nr.]]></text>
			</staticText>
			<staticText>
				<reportElement x="140" y="1" width="180" height="11" uuid="4d2c3f1a-0004-4a5b-8c6d-1e2f3a4b5c04"/>
				<textElement textAlignment="Left"><font fontName="SansSerif" size="8" isBold="true"/></textElement>
				<text><![CDATA[Bezeichnung]]></text>
			</staticText>
			<staticText>
				<reportElement x="322" y="1" width="48" height="11" uuid="4d2c3f1a-0002-4a5b-8c6d-1e2f3a4b5c02"/>
				<textElement textAlignment="Center"><font fontName="SansSerif" size="8" isBold="true"/></textElement>
				<text><![CDATA[Menge]]></text>
			</staticText>
			<staticText>
				<reportElement x="392" y="1" width="78" height="11" uuid="4d2c3f1a-0005-4a5b-8c6d-1e2f3a4b5c05"/>
				<textElement textAlignment="Center"><font fontName="SansSerif" size="8" isBold="true"/></textElement>
				<text><![CDATA[Lagerort]]></text>
			</staticText>
			<staticText>
				<reportElement x="468" y="1" width="38" height="11" uuid="4d2c3f1a-0007-4a5b-8c6d-1e2f3a4b5c07"/>
				<textElement textAlignment="Right"><font fontName="SansSerif" size="8" isBold="true"/></textElement>
				<text><![CDATA[Gewicht]]></text>
			</staticText>
			<line>
				<reportElement x="0" y="13" width="511" height="1" uuid="4d2c3f1a-0006-4a5b-8c6d-1e2f3a4b5c06"/>
				<graphicElement><pen lineWidth="2.0"/></graphicElement>
			</line>
		</band>
	</columnHeader>
	<detail>
		<band height="54" splitType="Prevent">
			<rectangle>
				<reportElement stretchType="ContainerHeight" mode="Opaque" x="0" y="0" width="511" height="54" backcolor="#EFEFEF" uuid="5c3d4e2b-0011-4b6c-9d7e-2f3a4b5c6d11">
					<printWhenExpression><![CDATA[$V{REPORT_COUNT} % 2 == 0]]></printWhenExpression>
				</reportElement>
				<graphicElement><pen lineWidth="0.0"/></graphicElement>
			</rectangle>
			<textField pattern="#0" isBlankWhenNull="true">
				<reportElement style="Report Monospace Font" x="5" y="3" width="18" height="11" uuid="5c3d4e2b-0001-4b6c-9d7e-2f3a4b5c6d01"/>
				<textElement textAlignment="Left"><font fontName="SansSerif" size="8"/></textElement>
				<textFieldExpression><![CDATA[$F{line}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Opaque" x="5" y="17" width="18" height="10" backcolor="#444444" forecolor="#FFFFFF" uuid="5c3d4e2b-0016-4b6c-9d7e-2f3a4b5c6d16">
					<printWhenExpression><![CDATA["Y".equals($F{isbom})]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="SansSerif" size="6" isBold="true"/></textElement>
				<text><![CDATA[BOM]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement style="Report Standard Font" x="22" y="3" width="112" height="12" uuid="5c3d4e2b-0003-4b6c-9d7e-2f3a4b5c6d03"/>
				<textElement textAlignment="Left"><font fontName="SansSerif" size="9" isBold="true"/></textElement>
				<textFieldExpression><![CDATA[$F{productvalue}]]></textFieldExpression>
			</textField>
			<textField textAdjust="CutText" isBlankWhenNull="true">
				<reportElement style="Report Standard Font" x="22" y="15" width="30" height="37" uuid="5c3d4e2b-0019-4b6c-9d7e-2f3a4b5c6d19"/>
				<textElement textAlignment="Left"><font fontName="SansSerif" size="9"/><paragraph lineSpacing="Fixed" lineSpacingSize="11"/></textElement>
				<textFieldExpression><![CDATA[({ String ean, String sku, String mpn ->
    def l = []
    if (ean != null) l << "EAN"
    if (sku != null) l << "SKU"
    if (mpn != null) l << "MPN"
    l.isEmpty() ? null : l.join("\n")
})($F{upc}, $F{sku}, $F{mpn})]]></textFieldExpression>
			</textField>
			<textField textAdjust="CutText" isBlankWhenNull="true">
				<reportElement style="Report Standard Font" x="52" y="15" width="84" height="37" uuid="5c3d4e2b-0020-4b6c-9d7e-2f3a4b5c6d20"/>
				<textElement textAlignment="Left"><font fontName="SansSerif" size="9"/><paragraph lineSpacing="Fixed" lineSpacingSize="11"/></textElement>
				<textFieldExpression><![CDATA[({ String ean, String sku, String mpn ->
    def l = []
    if (ean != null) l << ean
    if (sku != null) l << sku
    if (mpn != null) l << mpn
    l.isEmpty() ? null : l.join("\n")
})($F{upc}, $F{sku}, $F{mpn})]]></textFieldExpression>
			</textField>
			<textField textAdjust="CutText" isBlankWhenNull="true">
				<reportElement style="Report Standard Font" x="140" y="3" width="180" height="11" uuid="5c3d4e2b-0004-4b6c-9d7e-2f3a4b5c6d04"/>
				<textElement textAlignment="Left"><font fontName="SansSerif" size="8" isBold="true"/></textElement>
				<textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
			</textField>
			<textField textAdjust="CutText" isBlankWhenNull="true">
				<reportElement style="Report Standard Font" x="140" y="14" width="180" height="30" uuid="5c3d4e2b-0021-4b6c-9d7e-2f3a4b5c6d21"/>
				<textElement textAlignment="Left"><font fontName="SansSerif" size="7" isItalic="true"/></textElement>
				<textFieldExpression><![CDATA[({ String n, String note, String d ->
    def parts = []
    if (note != null) parts << note
    if (d != null && !d.equals(n)) parts << d
    parts.isEmpty() ? null : parts.join("\n")
})($F{name}, $F{documentnote}, $F{description})]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement style="Report Monospace Font" x="322" y="4" width="48" height="29" uuid="5c3d4e2b-0002-4b6c-9d7e-2f3a4b5c6d02">
					<printWhenExpression><![CDATA[$F{m_product_id} != null]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Right" verticalAlignment="Top" markup="styled"><font fontName="SansSerif" size="7"/></textElement>
				<textFieldExpression><![CDATA[$F{qty} == null ? "" : ("<style size=\"22\" isBold=\"true\">" + new java.text.DecimalFormat("#,##0.###", new java.text.DecimalFormatSymbols(new java.util.Locale("de","DE"))).format($F{qty}) + "</style>" + ($F{uomsymbol} == null ? "" : " " + $F{uomsymbol}.replace("&", "&amp;").replace("<", "&lt;")))]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement style="Report Standard Font" x="392" y="5" width="24" height="19" uuid="5c3d4e2b-0005-4b6c-9d7e-2f3a4b5c6d05">
					<printWhenExpression><![CDATA[$F{m_locator_value} != null && $F{m_locator_value}.split("-").length > 0 && $F{m_locator_value}.split("-").length > 1]]></printWhenExpression>
				</reportElement>
				<box padding="1" leftPadding="1" rightPadding="1"><pen lineWidth="0.5" lineColor="#808080"/></box>
				<textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="SansSerif" size="10"/></textElement>
				<textFieldExpression><![CDATA[$F{m_locator_value}.split("-")[0].trim()]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement style="Report Standard Font" x="419" y="5" width="24" height="19" uuid="5c3d4e2b-0013-4b6c-9d7e-2f3a4b5c6d13">
					<printWhenExpression><![CDATA[$F{m_locator_value} != null && $F{m_locator_value}.split("-").length > 1 && $F{m_locator_value}.split("-").length > 1]]></printWhenExpression>
				</reportElement>
				<box padding="1" leftPadding="1" rightPadding="1"><pen lineWidth="0.5" lineColor="#808080"/></box>
				<textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="SansSerif" size="10"/></textElement>
				<textFieldExpression><![CDATA[$F{m_locator_value}.split("-")[1].trim()]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement style="Report Standard Font" x="446" y="5" width="24" height="19" uuid="5c3d4e2b-0014-4b6c-9d7e-2f3a4b5c6d14">
					<printWhenExpression><![CDATA[$F{m_locator_value} != null && $F{m_locator_value}.split("-").length > 2 && $F{m_locator_value}.split("-").length > 1]]></printWhenExpression>
				</reportElement>
				<box padding="1" leftPadding="1" rightPadding="1"><pen lineWidth="0.5" lineColor="#808080"/></box>
				<textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="SansSerif" size="10"/></textElement>
				<textFieldExpression><![CDATA[$F{m_locator_value}.split("-")[2].trim()]]></textFieldExpression>
			</textField>
			<textField textAdjust="CutText" isBlankWhenNull="true">
				<reportElement style="Report Standard Font" x="392" y="5" width="78" height="19" uuid="5c3d4e2b-0015-4b6c-9d7e-2f3a4b5c6d15">
					<printWhenExpression><![CDATA[$F{m_locator_value} != null && $F{m_locator_value}.split("-").length == 1]]></printWhenExpression>
				</reportElement>
				<box padding="1" leftPadding="1" rightPadding="1"><pen lineWidth="0.5" lineColor="#808080"/></box>
				<textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="SansSerif" size="8"/></textElement>
				<textFieldExpression><![CDATA[$F{m_locator_value}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement style="Report Standard Font" x="468" y="3" width="38" height="11" uuid="5c3d4e2b-0012-4b6c-9d7e-2f3a4b5c6d12"/>
				<textElement textAlignment="Right"><font fontName="SansSerif" size="8"/></textElement>
				<textFieldExpression><![CDATA[($F{weight} == null || $F{weight}.signum() == 0) ? null : new java.text.DecimalFormat("#,##0.###", new java.text.DecimalFormatSymbols(new java.util.Locale("de","DE"))).format($F{weight}) + " kg"]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band height="3" splitType="Stretch">
			<line>
				<reportElement x="0" y="1" width="511" height="1" uuid="6d4e5f3c-0001-4c7d-8e9f-3a4b5c6d7e01"/>
				<graphicElement><pen lineWidth="0.5"/></graphicElement>
			</line>
		</band>
	</columnFooter>
	<summary>
		<band height="17" splitType="Prevent">
			<line>
				<reportElement x="0" y="0" width="511" height="1" uuid="e4f6a5b7-0004-4d8e-9fa0-4b5c6d7e8f04"/>
				<graphicElement><pen lineWidth="0.5"/></graphicElement>
			</line>
			<staticText>
				<reportElement x="140" y="3" width="160" height="12" forecolor="#7A7A7A" uuid="e4f6a5b7-0001-4d8e-9fa0-4b5c6d7e8f01"/>
				<textElement textAlignment="Left"><font fontName="SansSerif" size="8" isBold="true"/></textElement>
				<text><![CDATA[Gesamt]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement style="Report Monospace Font" x="322" y="3" width="48" height="12" forecolor="#7A7A7A" uuid="e4f6a5b7-0002-4d8e-9fa0-4b5c6d7e8f02"/>
				<textElement textAlignment="Right"><font fontName="SansSerif" size="8" isBold="true"/></textElement>
				<textFieldExpression><![CDATA[new java.text.DecimalFormat("#,##0.###", new java.text.DecimalFormatSymbols(new java.util.Locale("de","DE"))).format($V{qty_sum})]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement style="Report Standard Font" x="471" y="3" width="40" height="12" forecolor="#7A7A7A" uuid="e4f6a5b7-0003-4d8e-9fa0-4b5c6d7e8f03"/>
				<textElement textAlignment="Right"><font fontName="SansSerif" size="8" isBold="true"/></textElement>
				<textFieldExpression><![CDATA[$V{weight_sum}.signum() == 0 ? null : new java.text.DecimalFormat("#,##0.###", new java.text.DecimalFormatSymbols(new java.util.Locale("de","DE"))).format($V{weight_sum}) + " kg"]]></textFieldExpression>
			</textField>
		</band>
	</summary>
</jasperReport>
