pat123 Posted February 6, 2014 Share Posted February 6, 2014 The prices I enter are BTW-included prices (2 digits) but the system automatically calculates the net-price with also 2 digits (although 3 or 4 are sometimesneeded) So can I change this ? - or disable the auto-calculation of net-prices - or possibility thaqt prices are entered with 3-digits (and if needed used for further calculation F.e. when I enter a taks-included price (21%) of 4.70 , the net-price is 3.884297521 (for ease 3.885 ) The system reduces this to 3.88 and displays the price as attach. (a "fake"-pricerule ) However if I enter 4.71 ( which is net : 3.89256 or 3.89) the "fake"-rule is not there. Or does the system has a problem with rounding of ? (3.8849 : fourth digit is 9 so 3.885 and then ??? to go to a 2-digit number) Link to comment Share on other sites More sharing options...
stottycabanas Posted February 7, 2014 Share Posted February 7, 2014 Hi Pat, just for info: the standard method of rounding to 2 decimal places involves adding 0.005 to the pre-rounded number and then truncating the result after 2 decimal places. In your example the 4th digit is irrelevant. Cheers, Dave Link to comment Share on other sites More sharing options...
pat123 Posted February 7, 2014 Author Share Posted February 7, 2014 Daar ben ik niet mee akkoord want dit is niet de wijz waarop afronden gebeurt : bv (zie Wikipedia) pi (3,141592654...) afronden op: 2 cijfers na de komma: 3,14 (want op de 4 volgt een 1) 3 cijfers na de komma: 3,142 (want op de 1 volgt een 5 → de 1 verhogen tot 2) 1,7995 afronden op: 2 cijfers na de komma: 1,80 3 cijfers na de komma: 1,800 -1,235 afronden op: 2 cijfers achter de komma: -1,24 Gebruiken we de prestashop-manier van afronden op pi : 3,141592654 ++ 0.005 = 3.146... dus cijfer 3 is een 6 => 3.15 Dus pi is opeens 3.15 !!!! Daar ben ik niet mee akkoord want dit is niet de wijz waarop afronden gebeurt : bv (zie Wikipedia) pi (3,141592654...) afronden op: 2 cijfers na de komma: 3,14 (want op de 4 volgt een 1) 3 cijfers na de komma: 3,142 (want op de 1 volgt een 5 → de 1 verhogen tot 2) 1,7995 afronden op: 2 cijfers na de komma: 1,80 3 cijfers na de komma: 1,800 -1,235 afronden op: 2 cijfers achter de komma: -1,24 Gebruiken we de prestashop-manier van afronden op pi : 3,141592654 ++ 0.005 = 3.146... dus cijfer 3 is een 6 => 3.15 Dus pi is opeens 3.15 !!!! Dus het derde cijfer is wel relevant Link to comment Share on other sites More sharing options...
stottycabanas Posted February 7, 2014 Share Posted February 7, 2014 (edited) Absoluut niet! Terug naar het Engels. Your example with pi involved 2 rounding steps, not one. You cannot say that because pi to 3 d.p. is 3.146 and 3.146 to 2 d.p is 3.15, therefore pi to 2 d.p. is 3.15. It just doesn't work like that. I knew my maths degree would come in handy one day. mvg, Dave Edit - for clarity, 3.141592654 + 0.005 = 3.146592654. Then truncate after 2 d.p. (i.e. no further rounding), to get 3.14. Wikipedia is correct, but I'm afraid you are not. Edited February 7, 2014 by stottycabanas (see edit history) Link to comment Share on other sites More sharing options...
pat123 Posted February 7, 2014 Author Share Posted February 7, 2014 OK, I made a mistake (I am not a math-specialist, you apparently are) But how do you explain the "fake"-pricerules I have. As you can see in file 4.70.jpg the 4.70 price is striked through as if a price-)rule (involving 0% discount) is valid. this is not the case when the price is 4.71 (4.71.jpg) And for the record there is no special price for this product (see prijsregel.jpg) Link to comment Share on other sites More sharing options...
stottycabanas Posted February 7, 2014 Share Posted February 7, 2014 Pat, I can't explain that off the top of my head, but I notice you had this strikethrough problem before in a thread you've marked as solved: http://www.prestashop.com/forums/topic/306375-solved-price-strike-through-although-not-in-promotion/ Is it possible to apply the same solution as before? Cheers, Dave Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now