You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2010/10/14 10:04:48 UTC
svn commit: r1022409 -
/ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java
Author: hansbak
Date: Thu Oct 14 08:04:48 2010
New Revision: 1022409
URL: http://svn.apache.org/viewvc?rev=1022409&view=rev
Log:
correction on commit 1000753 attachment name list is optional making send invoice fail
Modified:
ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java
Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java?rev=1022409&r1=1022408&r2=1022409&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java Thu Oct 14 08:04:48 2010
@@ -491,11 +491,12 @@ public class EmailServices {
for (int i = 0; i < xslfoAttachScreenLocationList.size(); i++) {
String xslfoAttachScreenLocation = xslfoAttachScreenLocationList.get(i);
- String attachmentName = attachmentNameList.get(i);
- if (UtilValidate.isEmpty(attachmentName)) {
- attachmentName = "Details" + i + ".pdf";
+ String attachmentName = "Details.pdf";
+ if (UtilValidate.isNotEmpty(attachmentNameList) && attachmentNameList.size() >= i) {
+ attachmentName = attachmentNameList.get(i);
+ } else {
+ attachmentName = "Details.pdf";
}
-
isMultiPart = true;
// start processing fo pdf attachment
try {