partkeepr / PartKeepr

Open Source Inventory Management
http://www.partkeepr.org
GNU General Public License v3.0
1.4k stars 403 forks source link

Auto-Fill Distributors selects lowest price without regarding Packaging Unit #887

Open nils-z opened 7 years ago

nils-z commented 7 years ago

System Information

How to reproduce

Obviously, it should fill in order number A as I only need the part once, so1*1€ < 1000*0,80€. Partkeepr has all information to decide which order number is the better one for this order.

This becomes a problem when using the octopart plugin which fills in the large order quantities from Digikey and others. This bug makes the Auto-Fill feature quite useless as it chooses always the order numbers with the lowest price, which is in most cases the one for are large packaging quantity.

nils-z commented 7 years ago

Reproduction in demo system:

Create part with distributor entries

image

Create project with part

image

Auto-Fill project report

image

In the last screenshot you can see partkeepr fills in order number B with order amount 1. But partkeepr knows that you can't order 1 piece of B for 0,80€, you would have to take 1000 pieces as you can see in the first screenshot.

berndoJ commented 6 years ago

I am having the same issue. Want to add some different price steps for resistors, as they get cheaper per resistor in higher volume.

xxv commented 5 years ago

May be related to https://github.com/partkeepr/PartKeepr/issues/341

xxv commented 5 years ago

Related: https://github.com/partkeepr/PartKeepr/issues/404

berndoJ commented 4 years ago

This is related to #341 and #404. (As @xxv already mentioned)

However, I do not think that this is a "Backend" bug. This was fixed by me in the JS frontend, just created a pull request (see #341 or #404 for links to that request).

It is quite confusing seeing this as being classified as a "Bug" and the other issues as "Feature Requests". I think that all should be labeled as "Bug" because it does not make sense that PartKeepr would choose a distributor with a packaging unit larger than the part count.