Skip to content

Commit

Permalink
#5265 Show different Bestellkontrolle views in Jasper based on type (#…
Browse files Browse the repository at this point in the history
…5268)

#5265 Show different Bestellkontrolle views in Jasper based on type
  • Loading branch information
metas-ts committed Jun 3, 2019
2 parents 0b8642d + 4cb30d7 commit 28c3e14
Show file tree
Hide file tree
Showing 8 changed files with 236 additions and 103 deletions.
@@ -0,0 +1,16 @@
-- 2019-06-03T12:21:04.111
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,AllowProcessReRun,Classname,CopyFromProcess,Created,CreatedBy,EntityType,IsActive,IsApplySecuritySettings,IsBetaFunctionality,IsDirectPrint,IsOneInstanceOnly,IsReport,IsServerProcess,IsTranslateExcelHeaders,IsUseBPartnerLanguage,JasperReport,LockWaitTimeout,Name,RefreshAllAfterExecution,ShowHelp,Type,Updated,UpdatedBy,Value) VALUES ('3',0,0,541142,'N','de.metas.report.jasper.client.process.JasperReportStarter','N',TO_TIMESTAMP('2019-06-03 12:21:03','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','N','N','N','Y','N','Y','Y','@PREFIX@de/metas/docs/sales/ordercheckup_combined/report.jasper',0,'Bestellkontrolle(both)','N','N','JasperReports',TO_TIMESTAMP('2019-06-03 12:21:03','YYYY-MM-DD HH24:MI:SS'),100,'C_Order_MFGWarehouse_Report_Combined')
;

-- 2019-06-03T12:21:04.128
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Process_ID=541142 AND NOT EXISTS (SELECT 1 FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID)
;

-- 2019-06-03T12:23:53.663
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_PrintFormat (AD_Client_ID,AD_Org_ID,AD_PrintColor_ID,AD_PrintFont_ID,AD_Printformat_Group,AD_PrintFormat_ID,AD_PrintPaper_ID,AD_PrintTableFormat_ID,AD_Table_ID,CreateCopy,Created,CreatedBy,FooterMargin,HeaderMargin,IsActive,IsDefault,IsForm,IsStandardHeaderFooter,IsTableBased,JasperProcess_ID,Name,Updated,UpdatedBy) VALUES (0,0,100,540008,'SO',540097,102,100,540683,'N',TO_TIMESTAMP('2019-06-03 12:23:53','YYYY-MM-DD HH24:MI:SS'),100,0,0,'Y','N','N','Y','Y',541142,'C_Order_MFGWarehouse_Report_Combined',TO_TIMESTAMP('2019-06-03 12:23:53','YYYY-MM-DD HH24:MI:SS'),100)
;

UPDATE C_Doc_Outbound_Config set AD_PrintFormat_ID = 540097 WHERE C_Doc_Outbound_Config_ID=540002;
@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.5.1.final using JasperReports Library version 6.5.1 -->
<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="report" pageWidth="595" pageHeight="842" columnWidth="595" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75a2aa1b-054b-4e2c-a446-decff1fbf38e">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="erptest.xml"/>
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<parameter name="M_Warehouse_ID" class="java.math.BigDecimal"/>
<parameter name="C_BPartner_ID" class="java.math.BigDecimal"/>
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA[".\\"]]></defaultValueExpression>
</parameter>
<parameter name="RECORD_ID" class="java.lang.Integer"/>
<parameter name="ad_language" class="java.lang.String">
<defaultValueExpression><![CDATA[$P{REPORT_LOCALE}.toString()]]></defaultValueExpression>
</parameter>
<parameter name="DatePromised" class="java.util.Date"/>
<parameter name="barcodeURL" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["http://xxxxxxxx:8080/adempiereJasper/BarcodeServlet"]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[SELECT
r.AD_Org_ID,
r.DocStatus,
r.PrintName,
r.C_BPartner_Location_ID,
r.C_Order_ID,
r.reportdocumenttype
FROM report.RV_C_Order_MFGWarehouse_Report_Header r
WHERE true
AND
CASE
WHEN $P{RECORD_ID} IS NOT NULL
THEN r.C_Order_MFGWarehouse_Report_ID = $P{RECORD_ID}
WHEN $P{C_BPartner_ID} IS NOT NULL AND $P{DatePromised}::date IS NOT NULL
THEN r.C_BPartner_ID = $P{C_BPartner_ID} AND r.DatePromised::date = $P{DatePromised}::date AND r.ReportDocumentType='WH'
ELSE false -- shall never nappen
END
LIMIT 1
;]]>
</queryString>
<field name="ad_org_id" class="java.math.BigDecimal">
<property name="com.jaspersoft.studio.field.label" value="ad_org_id"/>
</field>
<field name="docstatus" class="java.lang.String">
<property name="com.jaspersoft.studio.field.label" value="docstatus"/>
</field>
<field name="printname" class="java.lang.String">
<property name="com.jaspersoft.studio.field.label" value="printname"/>
</field>
<field name="c_bpartner_location_id" class="java.math.BigDecimal">
<property name="com.jaspersoft.studio.field.label" value="c_bpartner_location_id"/>
</field>
<field name="c_order_id" class="java.math.BigDecimal">
<property name="com.jaspersoft.studio.field.label" value="c_order_id"/>
</field>
<field name="reportdocumenttype" class="java.lang.String">
<property name="com.jaspersoft.studio.field.label" value="reportdocumenttype"/>
</field>
<detail>
<band height="64" splitType="Stretch">
<subreport isUsingCache="true">
<reportElement key="subreport-3" x="0" y="0" width="595" height="30" uuid="1f8f6c71-814f-4233-a1bd-a8b9181b8384">
<printWhenExpression><![CDATA[$F{reportdocumenttype}.equals("WH")]]></printWhenExpression>
</reportElement>
<subreportParameter name="M_Warehouse_ID">
<subreportParameterExpression><![CDATA[$P{M_Warehouse_ID}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="ad_language">
<subreportParameterExpression><![CDATA[$P{ad_language}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="RECORD_ID">
<subreportParameterExpression><![CDATA[$P{RECORD_ID}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="C_BPartner_ID">
<subreportParameterExpression><![CDATA[$P{C_BPartner_ID}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="DatePromised">
<subreportParameterExpression><![CDATA[$P{DatePromised}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="barcodeURL">
<subreportParameterExpression><![CDATA[$P{barcodeURL}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="SUBREPORT_DIR">
<subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["de/metas/docs/sales/ordercheckup_old/report.jasper"]]></subreportExpression>
</subreport>
<subreport isUsingCache="true">
<reportElement key="subreport-3" x="-1" y="0" width="595" height="30" uuid="79f6d3a6-493e-4e66-bbc5-cc6ec0e7fcbb">
<printWhenExpression><![CDATA[$F{reportdocumenttype}.equals("PL")]]></printWhenExpression>
</reportElement>
<subreportParameter name="ad_language">
<subreportParameterExpression><![CDATA[$P{ad_language}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="RECORD_ID">
<subreportParameterExpression><![CDATA[$P{RECORD_ID}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="barcodeURL">
<subreportParameterExpression><![CDATA[$P{barcodeURL}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="SUBREPORT_DIR">
<subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["de/metas/docs/sales/ordercheckup_with_barcode/report.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
</jasperReport>
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.2.2.final using JasperReports Library version 6.2.2 -->
<!-- 2017-04-27T11:53:31 -->
<!-- Created with Jaspersoft Studio version 6.5.1.final using JasperReports Library version 6.5.1 -->
<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="report" pageWidth="595" pageHeight="842" columnWidth="595" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="be165937-8a54-45bb-9624-cc1da8b204f3">
<property name="ireport.scriptlethandling" value="0"/>
<property name="ireport.encoding" value="UTF-8"/>
Expand Down Expand Up @@ -63,7 +62,7 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center">
<font fontName="SansSerif" size="48" isBold="true" isItalic="true" isStrikeThrough="false" />
<font fontName="Arial" size="48" isBold="true" isItalic="true" isStrikeThrough="false"/>
</textElement>
<textFieldExpression><![CDATA[(($F{docstatus}.equals("DR")) ? $R{drafted} :
(($F{docstatus}.equals("IN")) ? $R{invalid} : null))]]></textFieldExpression>
Expand Down Expand Up @@ -191,14 +190,14 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Right">
<font size="9" isBold="false"/>
<font fontName="Arial" size="9" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER} + "/ "]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="textField-63" x="444" y="20" width="63" height="12" forecolor="#000000" backcolor="#FFFFFF" uuid="f7a3323d-5e4a-4108-b089-3a8763707882"/>
<textElement textAlignment="Right" markup="none">
<font size="9" isBold="false"/>
<font fontName="Arial" size="9" isBold="false"/>
</textElement>
<text><![CDATA[Seite]]></text>
</staticText>
Expand All @@ -211,7 +210,7 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Right">
<font size="9" isBold="false"/>
<font fontName="Arial" size="9" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
Expand Down
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.2.2.final using JasperReports Library version 6.2.2 -->
<!-- 2016-12-20T18:01:42 -->
<!-- Created with Jaspersoft Studio version 6.5.1.final using JasperReports Library version 6.5.1 -->
<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="report_description" pageWidth="595" pageHeight="170" columnWidth="595" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="76495d90-b1ae-4c08-8670-90019f94d24a">
<property name="ireport.scriptlethandling" value="0"/>
<property name="ireport.encoding" value="UTF-8"/>
Expand Down Expand Up @@ -81,28 +80,28 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement>
<font size="10" isBold="false"/>
<font fontName="Arial" size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{reference}]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="textField-6" x="365" y="62" width="135" height="13" forecolor="#000000" uuid="bd068152-b0a3-45cb-b96a-bcefd6c351e1"/>
<textElement textAlignment="Left" markup="none">
<font size="10" isBold="true" />
<font fontName="Arial" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Kd.-Bestellnummer]]></text>
</staticText>
<staticText>
<reportElement key="textField-6" x="365" y="90" width="97" height="13" forecolor="#000000" uuid="44c496d6-bc82-4c9a-b96b-db76a659ebd7"/>
<textElement textAlignment="Left" markup="none">
<font size="10" isBold="true" isUnderline="true" />
<font fontName="Arial" size="10" isBold="true" isUnderline="true"/>
</textElement>
<text><![CDATA[Lieferung an:]]></text>
</staticText>
<staticText>
<reportElement key="textField-6" x="90" y="63" width="218" height="13" forecolor="#000000" uuid="343b743c-921e-474a-a8eb-12320275ef79"/>
<textElement textAlignment="Left" markup="none">
<font size="10" isBold="true" />
<font fontName="Arial" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Abw. Anlieferort]]></text>
</staticText>
Expand All @@ -115,14 +114,14 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement>
<font size="10" isBold="false"/>
<font fontName="Arial" size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{handoverlocation}]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="textField-6" x="90" y="8" width="218" height="13" forecolor="#000000" uuid="2d94c569-3bc2-49b0-a3c8-c3b965d541fb"/>
<textElement textAlignment="Left" markup="none">
<font size="10" isBold="true" />
<font fontName="Arial" size="10" isBold="true"/>
</textElement>
<text><![CDATA[AnsprechpartnerIn / Telefon]]></text>
</staticText>
Expand All @@ -137,7 +136,7 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement>
<font size="10" isBold="false"/>
<font fontName="Arial" size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{cont_name} + " / " + $F{cont_phone}]]></textFieldExpression>
</textField>
Expand All @@ -150,21 +149,21 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement>
<font size="10" isBold="false"/>
<font fontName="Arial" size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{cont_fax}]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="textField-6" x="90" y="35" width="218" height="13" forecolor="#000000" uuid="0efbbf25-8d77-49c0-b29d-e6c0ef6c1198"/>
<textElement textAlignment="Left" markup="none">
<font size="10" isBold="true" />
<font fontName="Arial" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Fax-Nr.]]></text>
</staticText>
<staticText>
<reportElement key="textField-6" x="90" y="90" width="218" height="13" forecolor="#000000" uuid="343b743c-921e-474a-a8eb-12320275ef79"/>
<textElement textAlignment="Left" markup="none">
<font size="10" isBold="true" />
<font fontName="Arial" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Abfahrts- / Abholzeit]]></text>
</staticText>
Expand All @@ -177,14 +176,14 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement>
<font size="10" isBold="false"/>
<font fontName="Arial" size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{preparationdate}]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="textField-6" x="365" y="8" width="135" height="13" forecolor="#000000" uuid="bd068152-b0a3-45cb-b96a-bcefd6c351e1"/>
<textElement textAlignment="Left" markup="none">
<font size="10" isBold="true" />
<font fontName="Arial" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Auftragsnummer]]></text>
</staticText>
Expand All @@ -197,7 +196,7 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement>
<font size="10" isBold="false"/>
<font fontName="Arial" size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{document_no}]]></textFieldExpression>
</textField>
Expand All @@ -210,7 +209,7 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement>
<font size="10" isBold="true"/>
<font fontName="Arial" size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{reportdocumenttypename}]]></textFieldExpression>
</textField>
Expand All @@ -223,7 +222,7 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement>
<font size="10" isBold="true"/>
<font fontName="Arial" size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Produktionsstätte: "]]></textFieldExpression>
</textField>
Expand All @@ -238,7 +237,7 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement>
<font size="10" isBold="true"/>
<font fontName="Arial" size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Lager: "]]></textFieldExpression>
</textField>
Expand All @@ -251,7 +250,7 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement>
<font size="10" isBold="false"/>
<font fontName="Arial" size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{plantname}]]></textFieldExpression>
</textField>
Expand All @@ -264,19 +263,22 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement>
<font size="10" isBold="false"/>
<font fontName="Arial" size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{warehousename}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="365" y="35" width="135" height="13" uuid="bd34a761-a5df-4c31-aafe-7a140e1101fa"/>
<textElement>
<font isBold="true"/>
<font fontName="Arial" isBold="true"/>
</textElement>
<text><![CDATA[Zugesagter Termin]]></text>
</staticText>
<textField pattern="dd.MM.yyyy / HH:mm">
<reportElement x="365" y="48" width="135" height="13" uuid="39e8a0f7-fcc6-40fa-aa95-987d777aa9d1"/>
<textElement>
<font fontName="Arial"/>
</textElement>
<textFieldExpression><![CDATA[$F{datepromised}]]></textFieldExpression>
</textField>
</band>
Expand All @@ -291,14 +293,14 @@ LIMIT 1
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement>
<font size="10" isBold="false"/>
<font fontName="Arial" size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$P{DatePromised}]]></textFieldExpression>
</textField>
<staticText>
<reportElement key="textField-6" x="365" y="8" width="135" height="13" forecolor="#000000" uuid="bd068152-b0a3-45cb-b96a-bcefd6c351e1"/>
<textElement textAlignment="Left" markup="none">
<font size="10" isBold="true" />
<font fontName="Arial" size="10" isBold="true"/>
</textElement>
<text><![CDATA[Datum]]></text>
</staticText>
Expand Down

0 comments on commit 28c3e14

Please sign in to comment.