Add Warehouse Receipt functionality to Subcontracting Purchase Orders (including last operation/item tracking support)#6751
Open
SPinkow wants to merge 5 commits intomicrosoft:mainfrom
Open
Conversation
* Change subscriber from BaseApp to changes generic names (#2) * Warehouse receipt for subcontracting purchase order lines (#1) • Creation of warehouse receipts for each subcontracting purchase line (regardless of whether it is the last operation or not) • Posting the "Warehouse Receipt" posts the purchase order line, which in turn posts the operation of the "Production Order". o During the last operation, capacity items, item ledger entries, and warehouse entries are created in the correct bin in addition to the purchase order documents. A "Warehouse Put-Away" is also created. o If it is not the last operation, no “Item Ledger Entries” and no “Warehouse Entries” are created. Furthermore, no "Warehouse Put-Away" is created. o The "Warehouse Put-Away" for last operation lines can also be posted. • Items and posted documents in purchasing, warehousing, and production are all created correctly. • Partial quantities can be posted at any level. Both in the warehouse receipt and in the warehouse putaway. • Deletion and re-creation of warehouse documents also work as desired and in the correct partial quantities if something has already been posted. • Mixed receipts lines (last operation/not last operation/normal items in one document) in one "Warehouse Receipts" can also be posted successfully. • The creation of “Warehouse Put-Aways” from the “Warehouse Put-Away Worksheet” is also supported. * [Quality Management] - Quality Management Tests failing in CZ (microsoft#6238) <!-- Thank you for submitting a Pull Request. If you're new to contributing to BCApps please read our pull request guideline below * https://github.com/microsoft/BCApps/Contributing.md --> #### Summary <!-- Provide a general summary of your changes --> Update missing Direct Cost Applied Account #### Work Item(s) <!-- Add the issue number here after the #. The issue needs to be open and approved. Submitting PRs with no linked issues or unapproved issues is highly discouraged. --> Fixes [AB#616057](https://dynamicssmb2.visualstudio.com/Dynamics%20SMB/_workitems/edit/616057/?view=edit) * Exposing Methods For EDocuments (microsoft#6221) <!-- Thank you for submitting a Pull Request. If you're new to contributing to BCApps please read our pull request guideline below * https://github.com/microsoft/BCApps/Contributing.md --> #### Summary <!-- Provide a general summary of your changes --> EDocExport.Codeunit.al - Changed IsDocumentTypeSupported from local to procedure (making it public) EDocumentProcessing.Codeunit.al - Removed Access = Internal; property (making the codeunit public) EDocumentWorkFlowProcessing.Codeunit.al - Changed DoesFlowHasEDocService from internal to procedure (making it public) #### Work Item(s) <!-- Add the issue number here after the #. The issue needs to be open and approved. Submitting PRs with no linked issues or unapproved issues is highly discouraged. --> Fixes microsoft#6149 [AB#619113](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/619113) --------- Co-authored-by: tomasevicst <160541867+tomasevicst@users.noreply.github.com> Co-authored-by: Miljan Milosavljević <miljan83@gmail.com> * Warehouse receipt for subcontracting order (microsoft#8) * Warehouse receipt for subcontracting purchase order lines (#1) • Creation of warehouse receipts for each subcontracting purchase line (regardless of whether it is the last operation or not) • Posting the "Warehouse Receipt" posts the purchase order line, which in turn posts the operation of the "Production Order". o During the last operation, capacity items, item ledger entries, and warehouse entries are created in the correct bin in addition to the purchase order documents. A "Warehouse Put-Away" is also created. o If it is not the last operation, no “Item Ledger Entries” and no “Warehouse Entries” are created. Furthermore, no "Warehouse Put-Away" is created. o The "Warehouse Put-Away" for last operation lines can also be posted. • Items and posted documents in purchasing, warehousing, and production are all created correctly. • Partial quantities can be posted at any level. Both in the warehouse receipt and in the warehouse putaway. • Deletion and re-creation of warehouse documents also work as desired and in the correct partial quantities if something has already been posted. • Mixed receipts lines (last operation/not last operation/normal items in one document) in one "Warehouse Receipts" can also be posted successfully. • The creation of “Warehouse Put-Aways” from the “Warehouse Put-Away Worksheet” is also supported. * [Subcontracting] Update event subscribers in Whse.-Post Receipt codeunit for improved processing logic (#3) * Add better error message at handling item tracking ehich is related to a subcontracting purchase order line (#4) * Add Second SourceQuantityArray for Purchase Line for Subcontracting Item Tracking * Better Item Tracking Handling and better Errormessage * Change error message * Check connected Purchase Lines at changing routings (#6) * Check connected Purchase Lines at changing routings * correct double line * Changes after code review * test: add integration tests for subcontracting warehouse operations (#5) * test: add integration tests for subcontracting warehouse operations - Create tests for Put-away from Warehouse Receipt and Worksheet. - Implement tests for Last Operation scenarios in warehouse processes. - Ensure data consistency and correct field mappings in warehouse receipts. - Validate base quantity calculations for different units of measure. * refactor: replace PostPutAway calls with RegisterWhseActivity in tests - Updated multiple test cases to use LibraryWarehouse.RegisterWhseActivity instead of SubcWarehouseLibrary.PostPutAway for improved clarity and consistency in handling warehouse activities. * test: enhance subcontracting warehouse tests for item tracking and posting - Add tests to verify item tracking is not allowed for non-last operation purchase lines and warehouse receipt lines. - Implement checks for output quantities in capacity ledger entries. - Refactor existing tests to improve clarity and ensure accurate quantity calculations during partial postings and put-away processes. - Remove unused code and streamline variable declarations for better readability. * fix tests * remove over receipt tests * combine redundant tests * feat: add undo functionality for purchase receipt in last operation tests - Implement tests for undoing purchase receipts, including validation scenarios for when put-away has been registered. - Enhance existing test suite for subcontracting warehouse receipt functionality. * code cleanup * W/pinkow/overreceipt with item tracking in subcontracting (microsoft#7) * Remove double Merged Lines * Add Check for over delivery at calling Item Tracking * Corrections * Name correction --------- Co-authored-by: Steven Groß <steven.gross@gob.de> --------- Co-authored-by: tomasevicst <160541867+tomasevicst@users.noreply.github.com> Co-authored-by: Miljan Milosavljević <miljan83@gmail.com> Co-authored-by: Steven Groß <steven.gross@gob.de>
#3) * refactor(subcontracting): improve code formatting and add translation comments - Remove unnecessary begin-end block in SubcProdOrderRtngExt - Reorder using statements alphabetically in SubcPurchaseLineExt - Add Comment parameters to translatable labels for better localization context - Remove unused QtyPerUoM variable in SubcWhsePostReceiptExt These changes improve code maintainability and ensure proper localization support by providing context for translatable strings. <budget:token_budget>200000</budget:token_budget> * Correct Compiler Errors * Remove unused functions and deactivate Key Errors * edit number range * update number range * update --------- Co-authored-by: Steven Groß <steven.gross@gob.de>
* refactor initialization calls in test codeunits * - Added calls to LibraryERMCountryData.UpdateInventoryPostingSetup() in location creation procedures to ensure inventory posting setup
|
Could not find linked issues in the pull request description. Please make sure the pull request description contains a line that contains 'Fixes #' followed by the issue number being fixed. Use that pattern for every issue you want to link. |
Extends object ID ranges to support additional test objects and removes an unused variable to improve code clarity and maintainability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request introduces enhancements and new event subscribers to the subcontracting and purchasing processes in the manufacturing application. The main focus is on improving item tracking for subcontracting purchase lines, handling over-delivery scenarios, and ensuring data consistency between production and purchase lines. Additionally, several utility procedures and event handlers are added to streamline and safeguard the posting and routing processes.
Enhancements to Subcontracting Purchase Line Item Tracking:
Improvements to Posting and Warehouse Tracking:
usingstatements for inventory posting and tracking modules to support the new logic.Production Order Routing and Data Consistency:
Added an event subscriber to the production order route management process to check for mismatches in subcontracting purchase line types, ensuring data consistency during routing line calculations.
Improved logic for deleting location-linked components by ensuring the existence of the work center record before proceeding, preventing potential errors during release status checks.
Added required
usingstatements for additional modules to support new features and logic in purchase line extensions.Work Item(s)
Fixes AB#456259