-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Item prices does not work #500
Comments
I can confirm that the average price is not displayed correctly. Can you elaborate what you mean with incorrect description and values for the statistics? Screenshot perhaps? |
Have you re-ran setup? |
hi no ...I will do and I will let you know thank U |
You always need to re-run setup if you change JS files in order to be compiled and minified into a master .js file. |
I have problem with re-run Warning: Division by zero 500 Internal Server Error - ContextErrorException Stack Trace in src/PartKeepr/PartBundle/Entity/Part.php at line 724 - |
I just added a fix, can you replace the Part.php file again with the latest from the repository? |
hi so far so good...... thank U so much :) P.S any idea about current statistics problems? |
Not yet, I will need to have a look tomorrow |
hello another problem with avg price. for example you are adding 10 items with price 1 euro. Avg price will be 1 euro.....(okay :)) ... later you are removing this stock to 0 Avg price will be 0 ( okay :))...but if you again are you going to add stock 10 with price 1 euro you will get avg price 2 euro ( this is not okay :( ) regards |
if you will be add 10 items with price 1 euro and later remove to 0 and again add and remove ....avg price will be increase 2,3,4,5 .......depends on add/remove times. best regards |
This is probably related to #302 The average price is currently calculated by the sum of all parts divided by the sum of all prices. |
I have found temporary fix for this problem. If you are adding item with minus price of avg price for 1 item then you can add new stock with correct avg price later one. For example 1 item with 1 euro ....avg 1....then remove 1 item avg price 0. After adding again 1 item with 1 euro ...avg price 2 euro....but if you wll be add 1 item with -1 euro avg price going to be 1 :).... |
I hope is clear.... |
looks like when the stock is 0 after remove items. Avg price is keeping last value of item prices. If you try add new item with new price from scratch. The avg price will be calculate: previous price + new price; |
when stock is 0 previous price should not be take for calculation only new price |
Hi @FELICITUS ,
Probably the code below is somewhat more clear. I've commented the original code to make the comparing easier.
|
[Bugfix]: Item prices does not work #500
[Bugfix]: Item prices (negative total stock followed by positive entry) (Bugfix for #601)
I believe the issue should be fixed thanks to @tinutac, can you confirm? |
No feedback given for an extended period of time, closing. |
hi
Items does not show prices. Avg price is always 0. Current Statistics show incorrect description and values for Parts with price and Parts without price
regards
The text was updated successfully, but these errors were encountered: