details: /erp/devel/pi/rev/3b9f9beef98a
changeset: 8789:3b9f9beef98a
user: Ioritz Cia <ioritz.cia <at> openbravo.com>
date: Wed Nov 03 09:13:59 2010 +0100
summary: Fixes issue 0014577: The image printed in the printable templates is
taken from the right place.
diffstat:
src/org/openbravo/erpCommon/utility/Utility.java | 16 ++++++++++++++++
src/org/openbravo/erpReports/C_OrderJR.jrxml | 2 +-
src/org/openbravo/erpReports/RptC_Invoice.jrxml | 2 +-
src/org/openbravo/erpReports/RptC_OrderPO.jrxml | 2 +-
src/org/openbravo/erpReports/RptM_InOut.jrxml | 2 +-
5 files changed, 20 insertions(+), 4 deletions(-)
diffs (74 lines):
diff -r 2e1ceb2f6523 -r 3b9f9beef98a
src/org/openbravo/erpCommon/utility/Utility.java
--- a/src/org/openbravo/erpCommon/utility/Utility.java Wed Nov 03 11:30:09
2010 +0100
+++ b/src/org/openbravo/erpCommon/utility/Utility.java Wed Nov 03 09:13:59
2010 +0100
@@ -2672,6 +2672,22 @@
} else if ("banner-production".equals(logo)) {
img = OBDal.getInstance().get(SystemInformation.class,
"0").getProductionBannerImage();
return defaultImageLogo(img, "web/images/blank.gif");
+ } else if ("yourcompanylegal".equals(logo)) {
+ if (org != null && !org.equals("")) {
+ Organization organization =
OBDal.getInstance().get(Organization.class, org);
+ img =
organization.getOrganizationInformationList().get(0).getYourCompanyDocumentImage();
+ }
+ if (img == null) {
+
+ img = OBDal.getInstance().get(ClientInformation.class,
+
OBContext.getOBContext().getCurrentClient().getId()).getYourCompanyDocumentImage();
+
+ if (img == null) {
+ img = OBDal.getInstance().get(SystemInformation.class, "0")
+ .getYourCompanyDocumentImage();
+ }
+ }
+ return defaultImageLogo(img, "web/images/CompanyLogo_big.png");
} else {
log4j.error("Logo key does not exist: " + logo);
return getBlankImage();
diff -r 2e1ceb2f6523 -r 3b9f9beef98a
src/org/openbravo/erpReports/C_OrderJR.jrxml
--- a/src/org/openbravo/erpReports/C_OrderJR.jrxml Wed Nov 03 11:30:09
2010 +0100
+++ b/src/org/openbravo/erpReports/C_OrderJR.jrxml Wed Nov 03 09:13:59
2010 +0100
@@ -359,7 +359,7 @@
</reportElement>
<box></box>
<graphicElement
stretchType="NoStretch"/>
- <imageExpression
class="java.awt.Image"><![CDATA[org.openbravo.erpCommon.utility.Utility.showImageLogo("yourcompanydoc",
$F{ORGANIZATIONID})]]></imageExpression>
+ <imageExpression
class="java.awt.Image"><![CDATA[org.openbravo.erpCommon.utility.Utility.showImageLogo("yourcompanylegal",
$F{ORGANIZATIONID})]]></imageExpression>
</image>
<textField isStretchWithOverflow="false"
isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"
hyperlinkTarget="Self" >
<reportElement
diff -r 2e1ceb2f6523 -r 3b9f9beef98a
src/org/openbravo/erpReports/RptC_Invoice.jrxml
--- a/src/org/openbravo/erpReports/RptC_Invoice.jrxml Wed Nov 03 11:30:09
2010 +0100
+++ b/src/org/openbravo/erpReports/RptC_Invoice.jrxml Wed Nov 03 09:13:59
2010 +0100
@@ -432,7 +432,7 @@
<rightPen lineWidth="0.0"
lineStyle="Solid" lineColor="#000000"/>
</box>
<graphicElement
stretchType="NoStretch"/>
- <imageExpression
class="java.awt.Image"><![CDATA[org.openbravo.erpCommon.utility.Utility.showImageLogo("yourcompanydoc",
$F{ORGANIZATIONID})]]></imageExpression>
+ <imageExpression
class="java.awt.Image"><![CDATA[org.openbravo.erpCommon.utility.Utility.showImageLogo("yourcompanylegal",
$F{ORGANIZATIONID})]]></imageExpression>
</image>
<textField isStretchWithOverflow="true"
isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"
hyperlinkTarget="Self" >
<reportElement
diff -r 2e1ceb2f6523 -r 3b9f9beef98a
src/org/openbravo/erpReports/RptC_OrderPO.jrxml
--- a/src/org/openbravo/erpReports/RptC_OrderPO.jrxml Wed Nov 03 11:30:09
2010 +0100
+++ b/src/org/openbravo/erpReports/RptC_OrderPO.jrxml Wed Nov 03 09:13:59
2010 +0100
@@ -323,7 +323,7 @@
<rightPen lineWidth="0.0"
lineStyle="Solid" lineColor="#000000"/>
</box>
<graphicElement
stretchType="NoStretch"/>
- <imageExpression
class="java.awt.Image"><![CDATA[org.openbravo.erpCommon.utility.Utility.showImageLogo("yourcompanydoc",
$F{ORGANIZATIONID})]]></imageExpression>
+ <imageExpression
class="java.awt.Image"><![CDATA[org.openbravo.erpCommon.utility.Utility.showImageLogo("yourcompanylegal",
$F{ORGANIZATIONID})]]></imageExpression>
</image>
<line direction="TopDown">
<reportElement
diff -r 2e1ceb2f6523 -r 3b9f9beef98a
src/org/openbravo/erpReports/RptM_InOut.jrxml
--- a/src/org/openbravo/erpReports/RptM_InOut.jrxml Wed Nov 03 11:30:09
2010 +0100
+++ b/src/org/openbravo/erpReports/RptM_InOut.jrxml Wed Nov 03 09:13:59
2010 +0100
@@ -386,7 +386,7 @@
</reportElement>
<box></box>
<graphicElement
stretchType="NoStretch"/>
- <imageExpression
class="java.awt.Image"><![CDATA[org.openbravo.erpCommon.utility.Utility.showImageLogo("yourcompanydoc",
$F{organizationid})]]></imageExpression>
+ <imageExpression
class="java.awt.Image"><![CDATA[org.openbravo.erpCommon.utility.Utility.showImageLogo("yourcompanylegal",
$F{organizationid})]]></imageExpression>
</image>
<textField isStretchWithOverflow="false"
isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"
hyperlinkTarget="Self" >
<reportElement
------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware,
phishing sites, and compromised hosts - saving your company time,
money, and embarrassment. Learn More!
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits