Hi Jacques
There's a small bug in this commit: public static final int taxFinalScale = UtilNumber.getBigDecimalRoundingMode ("salestax.final.decimals"); Should be: public static final int taxFinalScale = UtilNumber.getBigDecimalScale(" salestax.final.decimals"); Regards Scott On 25/05/07, [hidden email] <[hidden email]> wrote: > > Author: jleroux > Date: Fri May 25 02:59:47 2007 > New Revision: 541607 > > URL: http://svn.apache.org/viewvc?view=rev&rev=541607 > Log: > A patch from Nicolas Malin "Price rounding, don't use UtilNumber.java for > scale" (https://issues.apache.org/jira/browse/OFBIZ-1035). > In trunk rev. 541606 > > Modified: > > ofbiz/branches/release4.0/applications/product/src/org/ofbiz/product/price/PriceServices.java > > Modified: > ofbiz/branches/release4.0/applications/product/src/org/ofbiz/product/price/PriceServices.java > URL: > http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/product/src/org/ofbiz/product/price/PriceServices.java?view=diff&rev=541607&r1=541606&r2=541607 > > ============================================================================== > --- > ofbiz/branches/release4.0/applications/product/src/org/ofbiz/product/price/PriceServices.java > (original) > +++ > ofbiz/branches/release4.0/applications/product/src/org/ofbiz/product/price/PriceServices.java > Fri May 25 02:59:47 2007 > @@ -34,6 +34,7 @@ > import org.ofbiz.base.util.Debug; > import org.ofbiz.base.util.UtilDateTime; > import org.ofbiz.base.util.UtilMisc; > +import org.ofbiz.base.util.UtilNumber; > import org.ofbiz.base.util.UtilProperties; > import org.ofbiz.base.util.UtilValidate; > import org.ofbiz.entity.GenericDelegator; > @@ -59,6 +60,10 @@ > public static final BigDecimal ONE_BASE = new BigDecimal("1.000"); > public static final BigDecimal PERCENT_SCALE = new BigDecimal(" > 100.000"); > > + public static final int taxCalcScale = UtilNumber.getBigDecimalScale > ("salestax.calc.decimals"); > + public static final int taxFinalScale = > UtilNumber.getBigDecimalRoundingMode("salestax.final.decimals"); > + public static final int taxRounding = > UtilNumber.getBigDecimalRoundingMode("salestax.rounding"); > + > /** > * <p>Calculates the price of a product from pricing rules given the > following input, and of course access to the database:</p> > * <ul> > @@ -616,8 +621,8 @@ > // okay, now we have the calculated price, see if we should add > in tax and if so do it > if ("Y".equals(checkIncludeVat) && productStore != null && > "Y".equals(productStore.getString("showPricesWithVatTax"))) { > Map calcTaxForDisplayContext = UtilMisc.toMap("productStoreId", > productStore.get("productStoreId"), > - "productId", productId, "quantity", new > BigDecimal(quantity), > - "basePrice", new BigDecimal(((Double) result.get > ("price")).doubleValue())); > + "productId", productId, "quantity", > BigDecimal.valueOf(quantity), > + "basePrice", BigDecimal.valueOf(((Double) result.get > ("price")).doubleValue())); > if (UtilValidate.isNotEmpty(partyId)) { > calcTaxForDisplayContext.put("billToPartyId", partyId); > } > @@ -628,18 +633,26 @@ > return ServiceUtil.returnError("Error calculating VAT > tax (with calcTaxForDisplay service)", null, null, calcTaxForDisplayResult); > } > // taxTotal, taxPercentage, priceWithTax > - result.put("price", new Double(((BigDecimal) > calcTaxForDisplayResult.get("priceWithTax")).doubleValue())); > + result.put("price", Double.valueOf(((BigDecimal) > calcTaxForDisplayResult.get("priceWithTax")).doubleValue())); > > // based on the taxPercentage calculate the other > amounts, including: listPrice, defaultPrice, averageCost, promoPrice, > competitivePrice > BigDecimal taxPercentage = (BigDecimal) > calcTaxForDisplayResult.get("taxPercentage"); > - BigDecimal taxMultiplier = ONE_BASE.add( > taxPercentage.divide(PERCENT_SCALE, 3)); > - if (result.get("listPrice") != null) result.put("listPrice", > new Double((new BigDecimal (((Double) result.get("listPrice")).doubleValue())).multiply(taxMultiplier).setScale(2, > BigDecimal.ROUND_HALF_UP).doubleValue())); > - if (result.get("defaultPrice") != null) result.put("defaultPrice", > new Double((new BigDecimal (((Double) result.get("defaultPrice")).doubleValue())).multiply(taxMultiplier).setScale(2, > BigDecimal.ROUND_HALF_UP).doubleValue())); > - if (result.get("averageCost") != null) result.put("averageCost", > new Double((new BigDecimal (((Double) result.get("averageCost")).doubleValue())).multiply(taxMultiplier).setScale(2, > BigDecimal.ROUND_HALF_UP).doubleValue())); > - > - if (result.get("promoPrice") != null) result.put("promoPrice", > new Double((new BigDecimal (((Double) result.get("promoPrice")).doubleValue())).multiply(taxMultiplier).setScale(2, > BigDecimal.ROUND_HALF_UP).doubleValue())); > - if (result.get("competitivePrice") != null) result.put("competitivePrice", > new Double((new BigDecimal (((Double) result.get("competitivePrice")).doubleValue())).multiply(taxMultiplier).setScale(2, > BigDecimal.ROUND_HALF_UP).doubleValue())); > - > + BigDecimal taxMultiplier = ONE_BASE.add( > taxPercentage.divide(PERCENT_SCALE, taxCalcScale)); > + if (result.get("listPrice") != null) { > + result.put("listPrice", Double.valueOf( > BigDecimal.valueOf(((Double) result.get("listPrice")).doubleValue()).multiply(taxMultiplier).setScale( > taxFinalScale, taxRounding ).doubleValue())); > + } > + if (result.get("defaultPrice") != null) { > + result.put("defaultPrice", Double.valueOf( > BigDecimal.valueOf(((Double) result.get("defaultPrice")).doubleValue()).multiply(taxMultiplier).setScale( > taxFinalScale, taxRounding ).doubleValue())); > + } > + if (result.get("averageCost") != null) { > + result.put("averageCost", Double.valueOf( > BigDecimal.valueOf(((Double) result.get("averageCost")).doubleValue()).multiply(taxMultiplier).setScale( > taxFinalScale, taxRounding ).doubleValue())); > + } > + if (result.get("promoPrice") != null) { > + result.put("promoPrice", Double.valueOf( > BigDecimal.valueOf(((Double) result.get("promoPrice")).doubleValue()).multiply(taxMultiplier).setScale( > taxFinalScale, taxRounding ).doubleValue())); > + } > + if (result.get("competitivePrice") != null) { > + result.put("competitivePrice", Double.valueOf( > BigDecimal.valueOf(((Double) result.get("competitivePrice")).doubleValue()).multiply(taxMultiplier).setScale( > taxFinalScale, taxRounding ).doubleValue())); > + } > } catch (GenericServiceException e) { > String errMsg = "Error calculating VAT tax (with > calcTaxForDisplay service): " + e.toString(); > Debug.logError(e, errMsg, module); > > > |
REMOVE ME
REMOVE ME REMOVE ME REMOVE ME REMOVE ME --------------------------------- New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes. |
Administrator
|
In reply to this post by Scott Gray
Hi Scott,
Indubitably, thanks for this. Jacques ----- Message d'origine ----- De : "Scott Gray" <[hidden email]> À : <[hidden email]> Envoyé : samedi 26 mai 2007 22:28 Objet : Re: svn commit: r541607 - /ofbiz/branches/release4.0/applications/product/src/org/ofbiz/product/pr ice/PriceServices.java > Hi Jacques > > There's a small bug in this commit: > public static final int taxFinalScale = UtilNumber.getBigDecimalRoundingMode > ("salestax.final.decimals"); > > Should be: > public static final int taxFinalScale = UtilNumber.getBigDecimalScale(" > salestax.final.decimals"); > > Regards > Scott > > On 25/05/07, [hidden email] <[hidden email]> wrote: > > > > Author: jleroux > > Date: Fri May 25 02:59:47 2007 > > New Revision: 541607 > > > > URL: http://svn.apache.org/viewvc?view=rev&rev=541607 > > Log: > > A patch from Nicolas Malin "Price rounding, don't use > > scale" (https://issues.apache.org/jira/browse/OFBIZ-1035). > > In trunk rev. 541606 > > > > Modified: > > > > ofbiz/branches/release4.0/applications/product/src/org/ofbiz/product/pri ce/PriceServices.java > > > > Modified: > > ofbiz/branches/release4.0/applications/product/src/org/ofbiz/product/pri ce/PriceServices.java > > URL: > > http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/product/src/org/ofbiz/product/price/PriceServices.java?view=diff&rev=541607&r1=541606&r2=541607 > > > > ======================================================================== ====== > > --- > > ofbiz/branches/release4.0/applications/product/src/org/ofbiz/product/pri ce/PriceServices.java > > (original) > > +++ > > ofbiz/branches/release4.0/applications/product/src/org/ofbiz/product/pri ce/PriceServices.java > > Fri May 25 02:59:47 2007 > > @@ -34,6 +34,7 @@ > > import org.ofbiz.base.util.Debug; > > import org.ofbiz.base.util.UtilDateTime; > > import org.ofbiz.base.util.UtilMisc; > > +import org.ofbiz.base.util.UtilNumber; > > import org.ofbiz.base.util.UtilProperties; > > import org.ofbiz.base.util.UtilValidate; > > import org.ofbiz.entity.GenericDelegator; > > @@ -59,6 +60,10 @@ > > public static final BigDecimal ONE_BASE = new > > public static final BigDecimal PERCENT_SCALE = new BigDecimal(" > > 100.000"); > > > > + public static final int taxCalcScale = UtilNumber.getBigDecimalScale > > ("salestax.calc.decimals"); > > + public static final int taxFinalScale = > > UtilNumber.getBigDecimalRoundingMode("salestax.final.decimals"); > > + public static final int taxRounding = > > UtilNumber.getBigDecimalRoundingMode("salestax.rounding"); > > + > > /** > > * <p>Calculates the price of a product from pricing rules given the > > following input, and of course access to the database:</p> > > * <ul> > > @@ -616,8 +621,8 @@ > > // okay, now we have the calculated price, see if we should add > > in tax and if so do it > > if ("Y".equals(checkIncludeVat) && productStore != null && > > "Y".equals(productStore.getString("showPricesWithVatTax"))) { > > Map calcTaxForDisplayContext = UtilMisc.toMap("productStoreId", > > productStore.get("productStoreId"), > > - "productId", productId, "quantity", new > > BigDecimal(quantity), > > - "basePrice", new BigDecimal(((Double) result.get > > ("price")).doubleValue())); > > + "productId", productId, "quantity", > > BigDecimal.valueOf(quantity), > > + "basePrice", BigDecimal.valueOf(((Double) result.get > > ("price")).doubleValue())); > > if (UtilValidate.isNotEmpty(partyId)) { > > calcTaxForDisplayContext.put("billToPartyId", partyId); > > } > > @@ -628,18 +633,26 @@ > > return ServiceUtil.returnError("Error calculating VAT > > tax (with calcTaxForDisplay service)", null, null, calcTaxForDisplayResult); > > } > > // taxTotal, taxPercentage, priceWithTax > > - result.put("price", new Double(((BigDecimal) > > calcTaxForDisplayResult.get("priceWithTax")).doubleValue())); > > + result.put("price", Double.valueOf(((BigDecimal) > > calcTaxForDisplayResult.get("priceWithTax")).doubleValue())); > > > > // based on the taxPercentage calculate the other > > amounts, including: listPrice, defaultPrice, averageCost, promoPrice, > > competitivePrice > > BigDecimal taxPercentage = (BigDecimal) > > calcTaxForDisplayResult.get("taxPercentage"); > > - BigDecimal taxMultiplier = ONE_BASE.add( > > taxPercentage.divide(PERCENT_SCALE, 3)); > > - if (result.get("listPrice") != null) result.put("listPrice", > > new Double((new BigDecimal (((Double) result.get("listPrice")).doubleValue())).multiply(taxMultiplier).setScal e(2, > > BigDecimal.ROUND_HALF_UP).doubleValue())); > > - if (result.get("defaultPrice") != null) result.put("defaultPrice", > > new Double((new BigDecimal (((Double) result.get("defaultPrice")).doubleValue())).multiply(taxMultiplier).setS cale(2, > > BigDecimal.ROUND_HALF_UP).doubleValue())); > > - if (result.get("averageCost") != null) result.put("averageCost", > > new Double((new BigDecimal (((Double) result.get("averageCost")).doubleValue())).multiply(taxMultiplier).setSc ale(2, > > BigDecimal.ROUND_HALF_UP).doubleValue())); > > - > > - if (result.get("promoPrice") != null) result.put("promoPrice", > > new Double((new BigDecimal (((Double) result.get("promoPrice")).doubleValue())).multiply(taxMultiplier).setSca le(2, > > BigDecimal.ROUND_HALF_UP).doubleValue())); > > - if (result.get("competitivePrice") != null) result.put("competitivePrice", > > new Double((new BigDecimal (((Double) result.get("competitivePrice")).doubleValue())).multiply(taxMultiplier). setScale(2, > > BigDecimal.ROUND_HALF_UP).doubleValue())); > > - > > + BigDecimal taxMultiplier = ONE_BASE.add( > > taxPercentage.divide(PERCENT_SCALE, taxCalcScale)); > > + if (result.get("listPrice") != null) { > > + result.put("listPrice", Double.valueOf( > > BigDecimal.valueOf(((Double) result.get("listPrice")).doubleValue()).multiply(taxMultiplier).setScale ( > > taxFinalScale, taxRounding ).doubleValue())); > > + } > > + if (result.get("defaultPrice") != null) { > > + result.put("defaultPrice", Double.valueOf( > > BigDecimal.valueOf(((Double) result.get("defaultPrice")).doubleValue()).multiply(taxMultiplier).setSc ale( > > taxFinalScale, taxRounding ).doubleValue())); > > + } > > + if (result.get("averageCost") != null) { > > + result.put("averageCost", Double.valueOf( > > BigDecimal.valueOf(((Double) result.get("averageCost")).doubleValue()).multiply(taxMultiplier).setSca le( > > taxFinalScale, taxRounding ).doubleValue())); > > + } > > + if (result.get("promoPrice") != null) { > > + result.put("promoPrice", Double.valueOf( > > BigDecimal.valueOf(((Double) result.get("promoPrice")).doubleValue()).multiply(taxMultiplier).setScal e( > > taxFinalScale, taxRounding ).doubleValue())); > > + } > > + if (result.get("competitivePrice") != null) { > > + result.put("competitivePrice", Double.valueOf( > > BigDecimal.valueOf(((Double) result.get("competitivePrice")).doubleValue()).multiply(taxMultiplier).s etScale( > > taxFinalScale, taxRounding ).doubleValue())); > > + } > > } catch (GenericServiceException e) { > > String errMsg = "Error calculating VAT tax (with > > calcTaxForDisplay service): " + e.toString(); > > Debug.logError(e, errMsg, module); > > > > > > > |
In reply to this post by PhantomsHorridC
Are you getting a reply from dev-unsubscribe? You should get a message
asking you to confirm your request. If your not getting a reply check your spam box On 27/05/07, PhantomsHorridC <[hidden email]> wrote: > > REMOVE ME > REMOVE ME > REMOVE ME > REMOVE ME > REMOVE ME > > > --------------------------------- > New Yahoo! Mail is the ultimate force in competitive emailing. Find out > more at the Yahoo! Mail Championships. Plus: play games and win prizes. |
Nope, getting no messages from dev-unsubscribe
Scott Gray <[hidden email]> wrote: Are you getting a reply from dev-unsubscribe? You should get a message asking you to confirm your request. If your not getting a reply check your spam box On 27/05/07, PhantomsHorridC wrote: > > REMOVE ME > REMOVE ME > REMOVE ME > REMOVE ME > REMOVE ME > > > --------------------------------- > New Yahoo! Mail is the ultimate force in competitive emailing. Find out > more at the Yahoo! Mail Championships. Plus: play games and win prizes. --------------------------------- What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship. |
Did you check your spam folder?
On 27/05/07, PhantomsHorridC <[hidden email]> wrote: > > Nope, getting no messages from dev-unsubscribe > > Scott Gray <[hidden email]> wrote: Are you getting a reply from > dev-unsubscribe? You should get a message > asking you to confirm your request. > > If your not getting a reply check your spam box > > On 27/05/07, PhantomsHorridC wrote: > > > > REMOVE ME > > REMOVE ME > > REMOVE ME > > REMOVE ME > > REMOVE ME > > > > > > --------------------------------- > > New Yahoo! Mail is the ultimate force in competitive emailing. Find out > > more at the Yahoo! Mail Championships. Plus: play games and win prizes. > > > > --------------------------------- > What kind of emailer are you? Find out today - get a free analysis of your > email personality. Take the quiz at the Yahoo! Mail Championship. |
Yep, checked the whole account
Scott Gray <[hidden email]> wrote: Did you check your spam folder? On 27/05/07, PhantomsHorridC wrote: > > Nope, getting no messages from dev-unsubscribe > > Scott Gray wrote: Are you getting a reply from > dev-unsubscribe? You should get a message > asking you to confirm your request. > > If your not getting a reply check your spam box > > On 27/05/07, PhantomsHorridC wrote: > > > > REMOVE ME > > REMOVE ME > > REMOVE ME > > REMOVE ME > > REMOVE ME > > > > > > --------------------------------- > > New Yahoo! Mail is the ultimate force in competitive emailing. Find out > > more at the Yahoo! Mail Championships. Plus: play games and win prizes. > > > > --------------------------------- > What kind of emailer are you? Find out today - get a free analysis of your > email personality. Take the quiz at the Yahoo! Mail Championship. --------------------------------- Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for your freeaccount today. |
I'm not sure who can check into this for dude, but we should. My guess is that there is a mismatch as this has always worked in the past. How can I look into the mailing list participants? Besides, I still want to track down the person with the auto-attachment response message.
Cheers, Tim -- Tim Ruppert HotWax Media o:801.649.6594 f:801.649.6595 On May 26, 2007, at 8:08 PM, PhantomsHorridC wrote:
smime.p7s (3K) Download Attachment |
Right now I'm the only moderator on the ofbiz mailing lists and previous polls for volunteers (among the PMC members preferably) have had limited interest, though I think things have changes since then and there are those who would help. We'll work on improving this situation. In the mean time it's one of many things to do, and it'll take a few minutes because I have to look up the mailing list commands (I don't really like the ASF mailing list software, having no web management UI). I don't use it frequently enough to know the commands by heart, especially not for trying to figure out what someone's subscribed email address is and why they aren't able to unsubscribe. It's also possible that the moderation is messed up somehow so I'm not getting notifications about this, in which case I'll have to send a request to the infrastructure mailing list and have one of the infra guys look at it. In fact in the nearly 1 full year of our mailing lists being at the ASF we have not had one single case like this where someone couldn't unsubscribe. Not one single case. We have had cases where someone's unsubscribe confirmation emails were getting caught by a junk mail filter, but once that was resolved it was fine. We've also had cases where people didn't know their subscribed email address, but looking at the message headers for one of the messages coming through the mailing list can get you that information. So far these suggestions haven't helped in this case, so I'll have to do some playing to see what's up and find the address (hopefully the one reported...) and then unsubscribe it. -David Tim Ruppert wrote: > I'm not sure who can check into this for dude, but we should. My guess > is that there is a mismatch as this has always worked in the past. How > can I look into the mailing list participants? Besides, I still want to > track down the person with the auto-attachment response message. > > Cheers, > Tim > -- > Tim Ruppert > HotWax Media > http://www.hotwaxmedia.com > > o:801.649.6594 > f:801.649.6595 > > > On May 26, 2007, at 8:08 PM, PhantomsHorridC wrote: > >> Yep, checked the whole account >> >> Scott Gray <[hidden email] <mailto:[hidden email]>> wrote: Did >> you check your spam folder? >> >> On 27/05/07, PhantomsHorridC wrote: >>> >>> Nope, getting no messages from dev-unsubscribe >>> >>> Scott Gray wrote: Are you getting a reply from >>> dev-unsubscribe? You should get a message >>> asking you to confirm your request. >>> >>> If your not getting a reply check your spam box >>> >>> On 27/05/07, PhantomsHorridC wrote: >>>> >>>> REMOVE ME >>>> REMOVE ME >>>> REMOVE ME >>>> REMOVE ME >>>> REMOVE ME >>>> >>>> >>>> --------------------------------- >>>> New Yahoo! Mail is the ultimate force in competitive emailing. Find out >>>> more at the Yahoo! Mail Championships. Plus: play games and win prizes. >>> >>> >>> >>> --------------------------------- >>> What kind of emailer are you? Find out today - get a free analysis of >>> your >>> email personality. Take the quiz at the Yahoo! Mail Championship. >> >> >> >> --------------------------------- >> Yahoo! Mail is the world's favourite email. Don't settle for less, >> sign up for your freeaccount today. > |
David E Jones schrieb:
[..] > In the mean time it's one of many things to do, and it'll take a few > minutes because I have to look up the mailing list commands (I don't To unsubscribe: dev-unsubscribe-madtechie3000=yahoo.co.uk(at)ofbiz.apache.org and dev-list(at)ofbiz.apache.org to see who is subscribed (if he's using another email adress) For more see http://apache.org/dev/committers.html#mail-moderate Christian |
Thanks Christian - I'll give it a look.
Cheers, Tim -- Tim Ruppert HotWax Media o:801.649.6594 f:801.649.6595 On May 28, 2007, at 5:55 PM, Christian Geisert wrote:
smime.p7s (3K) Download Attachment |
In reply to this post by PhantomsHorridC
A quick suggestion, maybe the unsubscribe address you're using is for the old
[hidden email] rather than [hidden email]? Regards, Karl Martindale |
In reply to this post by Tim Ruppert
Tim Ruppert schrieb:
> Thanks Christian - I'll give it a look. This can be done only by the moderator :-| Christian |
I found that out :)
Cheers, Tim -- Tim Ruppert HotWax Media o:801.649.6594 f:801.649.6595 On May 29, 2007, at 2:01 AM, Christian Geisert wrote:
smime.p7s (3K) Download Attachment |
Free forum by Nabble | Edit this page |