details: https://code.openbravo.com/erp/devel/pi/rev/a119852c1397
changeset: 16730:a119852c1397
user: Javier Etxarri <javier.echarri <at> openbravo.com>
date: Fri Jun 01 14:17:42 2012 +0200
summary: Backout issue 20440
diffstat:
src/org/openbravo/common/actionhandler/SRMOPickEditLines.java | 31 ++++------
1 files changed, 14 insertions(+), 17 deletions(-)
diffs (53 lines):
diff -r f7c7018e0df9 -r a119852c1397
src/org/openbravo/common/actionhandler/SRMOPickEditLines.java
--- a/src/org/openbravo/common/actionhandler/SRMOPickEditLines.java Thu May
31 21:37:06 2012 +0200
+++ b/src/org/openbravo/common/actionhandler/SRMOPickEditLines.java Fri Jun
01 14:17:42 2012 +0200
@@ -249,14 +249,12 @@
if (isDefultPriceList) {
throw new OBException("NoDefaultPriceList");
} else {
- // If pl was the Business Partner's price list, there was no fit
price list for it so
- // take
+ // If pl was the Business Partner's price list, there was no fit
price list for it so take
// the default price list.
- try {
- pl = getDefaultPriceList(o.getClient().getId(),
o.getOrganization().getId(), isSalesPL);
- earliestPlv = getEarliestPriceListVersion(pl, orderDate);
- } catch (Exception e) {
- // There is no fit price list version.
+ pl = getDefaultPriceList(o.getClient().getId(),
o.getOrganization().getId(), isSalesPL);
+ earliestPlv = getEarliestPriceListVersion(pl, orderDate);
+ // There is no fit price list version.
+ if (earliestPlv == null) {
throw new OBException("NoDefaultPriceList");
}
}
@@ -269,20 +267,19 @@
} else if (prices != null) {
return prices;
} else {
- try {
- pl = getDefaultPriceList(o.getClient().getId(),
o.getOrganization().getId(), isSalesPL);
- earliestPlv = getEarliestPriceListVersion(pl, orderDate);
- } catch (Exception e) {
+ pl = getDefaultPriceList(o.getClient().getId(),
o.getOrganization().getId(), isSalesPL);
+ earliestPlv = getEarliestPriceListVersion(pl, orderDate);
+ if (earliestPlv == null) {
throw new OBException("NoDefaultPriceList");
- }
- prices = getProductPricesFromPLV(strProductId, earliestPlv);
- if (prices == null) {
- throw new OBException("NoProductInDefaultPriceList");
} else {
- return prices;
+ prices = getProductPricesFromPLV(strProductId, earliestPlv);
+ if (prices == null) {
+ throw new OBException("NoProductInDefaultPriceList");
+ } else {
+ return prices;
+ }
}
}
-
}
return null;
} finally {
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits