{"action":"created","issue":{"url":"https://api.github.com/repos/partkeepr/PartKeepr/issues/334","labels_url":"https://api.github.com/repos/partkeepr/PartKeepr/issues/334/labels{/name}","comments_url":"https://api.github.com/repos/partkeepr/PartKeepr/issues/334/comments","events_url":"https://api.github.com/repos/partkeepr/PartKeepr/issues/334/events","html_url":"https://github.com/partkeepr/PartKeepr/issues/334","id":18758821,"number":334,"title":"Project Report's Amount to Order Should Include Part's Min. Stock Level.","user":{"login":"slylandro","id":5251306,"avatar_url":"https://avatars.githubusercontent.com/u/5251306?v=3","gravatar_id":"","url":"https://api.github.com/users/slylandro","html_url":"https://github.com/slylandro","followers_url":"https://api.github.com/users/slylandro/followers","following_url":"https://api.github.com/users/slylandro/following{/other_user}","gists_url":"https://api.github.com/users/slylandro/gists{/gist_id}","starred_url":"https://api.github.com/users/slylandro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slylandro/subscriptions","organizations_url":"https://api.github.com/users/slylandro/orgs","repos_url":"https://api.github.com/users/slylandro/repos","events_url":"https://api.github.com/users/slylandro/events{/privacy}","received_events_url":"https://api.github.com/users/slylandro/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/partkeepr/PartKeepr/labels/Feature%20Request","name":"Feature Request","color":"02e10c"},{"url":"https://api.github.com/repos/partkeepr/PartKeepr/labels/Low%20Priority","name":"Low Priority","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2013-08-29T21:33:50Z","updated_at":"2015-10-13T17:02:39Z","closed_at":null,"body":"Hi,\r\nIt appears that in the Project Report, that the Amount to Order value doesn't reflect what the part's Minimum Stock level is.  For example, this part has a Stock level of 1 (green) and a Min. Stock level of 1 (red).\r\n\r\n![image](https://f.cloud.github.com/assets/5251306/1053442/9c6d0d8a-10f0-11e3-81e3-cf43137f97bf.png)\r\n\r\nIn a Project Report, the project Quantity for this part is 1 and Availability is 1.  However, the Amount to Order is 0.  Therefore if this part is used from stock, then Min. Stock level will fall below 1.\r\n\r\n![image](https://f.cloud.github.com/assets/5251306/1053529/02db0ea4-10f2-11e3-97ea-5c233e372ae1.png)\r\n\r\nAm I misunderstanding the meaning of the Min. Stock level?  In my mind, Partkeepr should maintain the Min. Stock level here.  For myself, I keep a min. stock level of certain parts in case I need a spare due to defective parts.  The only way I see this as acceptable is if there was also a Stock Replenishment Report that would output a parts list of parts that need to be ordered to bring stock levels back up to minimum, which might not be a bad thing to have in any case.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25350150-project-report-s-amount-to-order-should-include-part-s-min-stock-level?utm_campaign=plugin&utm_content=tracker%2F333673&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F333673&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/partkeepr/PartKeepr/issues/comments/147778642","html_url":"https://github.com/partkeepr/PartKeepr/issues/334#issuecomment-147778642","issue_url":"https://api.github.com/repos/partkeepr/PartKeepr/issues/334","id":147778642,"user":{"login":"felicitus","id":162974,"avatar_url":"https://avatars.githubusercontent.com/u/162974?v=3","gravatar_id":"","url":"https://api.github.com/users/felicitus","html_url":"https://github.com/felicitus","followers_url":"https://api.github.com/users/felicitus/followers","following_url":"https://api.github.com/users/felicitus/following{/other_user}","gists_url":"https://api.github.com/users/felicitus/gists{/gist_id}","starred_url":"https://api.github.com/users/felicitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felicitus/subscriptions","organizations_url":"https://api.github.com/users/felicitus/orgs","repos_url":"https://api.github.com/users/felicitus/repos","events_url":"https://api.github.com/users/felicitus/events{/privacy}","received_events_url":"https://api.github.com/users/felicitus/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T17:02:38Z","updated_at":"2015-10-13T17:02:38Z","body":"This issue could be resolved using #435 as soon as m:n relations are in place.\r\n\r\n@slylandro one question regarding this: As the parts to distributor relationship is a m:n relationship, this isn't that trivial - would it be okay to put one column per distributor&order number in the result?\r\n\r\nLike this:\r\n\r\nPart Name  | Distributor 1 | Distributor 1 OrderNo | Distributor 2 | Distributor 2 OrderNo\r\n------------- | ------------- | ---- | --- | --- | ---\r\n7805  | Farnell | 123456 | DigiKey | ND-123456\r\n7806  | Farnell | 12356 | |"}}