PartKeepr icon indicating copy to clipboard operation
PartKeepr copied to clipboard

Auto-Fill Distributors selects lowest price without regarding Packaging Unit

Open nils-z opened this issue 8 years ago • 5 comments

System Information

  • PartKeepr Version: git e4cd430
  • Reproducible on the demo system: Yes

How to reproduce

  • Create at least two distributor entries for a part, for example:

    • Order number A, packaging unit 1, price per item 1€
    • Order number B, packaging unit 1000, price per item 0,80€
  • Create a project report for a project which needs your part once

  • Auto-Fill Distributors

  • partkeepr will fill in order number B and set the price to 0,80€

Obviously, it should fill in order number A as I only need the part once, so 1*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 avatar Aug 22 '17 12:08 nils-z

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.

nils-z avatar Aug 25 '17 12:08 nils-z

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

berndoJ avatar Aug 05 '18 14:08 berndoJ

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

xxv avatar Jan 02 '19 01:01 xxv

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

xxv avatar Jan 02 '19 01:01 xxv

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.

berndoJ avatar May 24 '20 19:05 berndoJ