Skip to content
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

Implement Features #341 / #404 #1127

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

berndoJ
Copy link

@berndoJ berndoJ commented May 24, 2020

Implements the feature described in issue(s) #341 / #404 (related / duplicates)

This simply adds a check to the report calculation (frontend JavaScript) which takes the packagingUnit into account.

If the part count (so the missing parts which have to be ordered) is not larger than the packagingUnit of the part distributor, that distributor is omitted (by the continue keyword).

Implements the feature described in issue partkeepr#341 / partkeepr#404 (related / duplicates)

This simply adds a check to the report calculation which takes the packagingUnit into account.

If the part count (so the missing parts which have to be ordered) is not larger than the packagingUnit of the part distributor, that distributor is omitted (by the continue keyword).
@codecov-commenter
Copy link

codecov-commenter commented May 24, 2020

Codecov Report

Merging #1127 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1127   +/-   ##
=========================================
  Coverage     37.09%   37.09%           
  Complexity     1798     1798           
=========================================
  Files           258      258           
  Lines          5729     5729           
=========================================
  Hits           2125     2125           
  Misses         3604     3604           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd9ab4c...7b1d103. Read the comment docs.

@christianlupus
Copy link
Collaborator

See my comment on the other issue. I will have a look at things soon.

@christianlupus
Copy link
Collaborator

christianlupus commented Jun 18, 2020

This should avoid that the calculated price does not use the lowest price per item available while ignoring the minimum order volume.

The following case from #404 is now a problem as no distributor will be found at all:

Partkeepr should probably use the price per part of the next lower order quantity, failing that, bump up the "Amount to Order" to the next higher order quantity as set up in the distributor tab of a part. That way the actual to-order cost is correctly reflected.

If all offers by potential distributors are sorted out, no bumping can happen.

Additionally, this PR is related to issue #1133. We might need to round up the amount to the next full size of the package.

@berndoJ
Copy link
Author

berndoJ commented Jun 19, 2020

I agree. If it is decided that this is the way package sizes should be dealt with, Partkeepr should calculate the lowest possible price using the following rules:

  1. Choose the distributor with the lowest price @ needed part count.

  2. If no distributor is found, bump up the ordering amount to the minimum required.

  3. Additionally, check if the current total price is acutally lower than the overall prices for the price steps. E.g. if a resistor in 1-of qty costs $0.09 and in 10-of qty $0.01 and you want to order 2 resistors, it would be cheaper to actually bump up the component count to 10 and order them, as the total would only be $0.10 and not $0.18. I've run across this case a few times already, so this would also improve things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants