DB has no sales_order_id/shipment_plan_id/item_info_id columns
(mhkim original work shipped without migration DDL), so the re-applied
INSERT would error at runtime. Roll back to jskim-side column list
to keep outbound registration working; getProductionResults endpoint
restoration is unaffected.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolved 11 conflicts by taking the jskim side. mhkim-side changes lost
in conflict zones (to be re-applied separately):
backend-node/
- outboundController.ts: source_table/sales_order_id/shipment_plan_id/item_info_id columns in outbound_mng INSERT
- popProductionController.ts: ensureLoadingInstance/insertPackagingRows imports and material auto-input + inventory_stock deduction block
- workInstructionController.ts: getProcessResults function for production-result right panel
- routes/workInstructionRoutes.ts: GET /:wiId/process-results route
frontend/
- COMPANY_7/production/work-instruction/page.tsx: Lock icon, detailId/locked fields on WorkRow, locked column and lock icon in items table
- COMPANY_8/10/16/28/29/production/work-instruction/page.tsx: expandedItems._qty payload (batch-split) replaced by jskim confirmItems.qty + infos
- COMPANY_8/logistics/inbound-outbound/page.tsx: autoFilter true replaced by autoFilter:{enabled:false}
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add InventoryMoveSend component for new inventory-move outbound type
- Add pop/outbound/inventory-move page for all 9 companies
- Refactor outbound type components (Production/Sales/Return/Subcontractor/Supplied/Etc)
- Refactor OutboundCartPage and OutboundManage
- Apply changes across COMPANY_7/8/9/10/16/28/29/30/31
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add InventoryMoveReceive component for new inventory-move inbound type
- Add pop/inbound/inventory-move page for all 9 companies
- Remove deprecated InboundCart.tsx (replaced by InboundCartPage)
- Refactor inbound type components (Purchase/Production/Recovery/Return/Subcontractor/Supplied/Change/Error)
- Apply changes across COMPANY_7/8/9/10/16/28/29/30/31
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Updated the outbound and outsourcing outbound controllers to replace `source_type` with `source_table` for improved clarity and consistency in data handling.
- Enhanced the work instruction controller to include automatic migration for the `work_instruction_info` table, allowing for better management of work instruction notes.
- Implemented new logic to handle material input types in the work instruction detail modal, supporting both automatic and manual input methods.
- Added new routes for retrieving work instruction information, facilitating better data retrieval for editing purposes.
(TASK: ERP-node-095, ERP-node-096)
- Added validation for `materialOverrides` in the `save` function of the work instruction controller, ensuring proper structure and required fields.
- Implemented logic to handle the insertion and deletion of material input details based on the provided `materialOverrides`, maintaining data integrity during edits.
- Introduced new routes for retrieving BOM tree and material overrides, enhancing the work instruction management process.
- Updated the frontend to support new material mapping features, including a structured approach for handling BOM substitutes and material inputs.
(TASK: ERP-node-090)
- Added `inventory_unit` to the item selection query in the outbound controller to improve data retrieval.
- Updated the multi-table Excel service to exclude overlapping headers between parent and child levels, ensuring accurate data insertion.
- Introduced new category combobox components for better user interaction in the supplied item page.
- Enhanced the inbound-outbound page to correctly map user IDs, including super admin handling for user information retrieval.
(TASK: ERP-XXX)
- Implemented a new endpoint for batch registration of process equipment, allowing users to add multiple equipment codes at once while skipping duplicates.
- Enhanced error handling to provide detailed feedback on the registration process, including the number of successfully inserted and skipped items.
- Updated the process info routes to include the new batch registration functionality.
(TASK: ERP-node-087)
- Added automatic migration to include a new column `batch_use` in the `item_info` table, allowing for batch usage management.
- Implemented logic to prevent deletion of work instructions that are in progress or completed, ensuring data integrity.
- Enhanced the `getBomBaseQtyMap` function to return batch usage status for items, defaulting to 'Y' if not specified.
- Introduced warnings for overdue items and insufficient production time in the production plan management, allowing users to proceed with caution.
(TASK: ERP-node-074, ERP-node-075, ERP-node-076)
- Introduced new routes for customer contact management, allowing for the retrieval of customer contact information.
- Updated the user management functionality to include validation for the hire date, ensuring proper date format and handling of null values.
- Enhanced the save user functionality to accommodate the new hire date field, maintaining existing values when not provided.
(TASK: ERP-XXX)
- Added checks to ensure that only orders with a positive quantity are included in the order summary by using COALESCE to handle null values.
- Updated the query logic to improve data integrity and accuracy in the order summary results.
(TASK: ERP-XXX)
- Added new fields for delivery details in the shipping order controller, including delivery date, delivery destination ID, and delivery address.
- Implemented validation logic to ensure that only confirmed sales orders can be processed, preventing the registration of shipments for orders that are waiting, canceled, or completed.
- Updated the save functionality to handle new delivery-related fields and improved error handling for blocked orders.
- Enhanced the shipping plan controller to include status checks and automatic updates based on changes in order quantities.
(TASK: ERP-047)
- Introduced helper functions to calculate working days while skipping weekends, improving the accuracy of date calculations in production planning.
- Updated the logic for determining start and end dates based on lead time and production capacity, ensuring that weekend days are excluded from the calculations.
- Refactored existing date calculation code in the `previewSchedule` and `generateSchedule` functions to utilize the new helper methods for better maintainability and clarity.
(TASK: ERP-XXX)
- Introduced multiple new routes for COMPANY_31, including master data management for item info, department, company, options, and various sales and production pages.
- Each route is dynamically imported to enhance performance and user experience.
- Updated the admin page renderer to accommodate the new COMPANY_31 structure, ensuring seamless navigation and access to the new functionalities.
(TASK: ERP-XXX)
- Introduced multiple new pages for design management, including Change Management, Design Request, My Work, Project, Task Management, Equipment Info, and Inspection Record.
- Each page includes relevant UI components such as tables, forms, and modals for managing design-related tasks and equipment inspections.
- Implemented state management and API integration for fetching and manipulating design requests and equipment data.
- Enhanced user experience with dynamic search filters and responsive layouts.
(TASK: ERP-XXX)
- Updated the shipping order controller to improve customer name retrieval by removing unnecessary partner_id fallback.
- Implemented shipment plan number allocation logic in the shipping plan controller, ensuring unique numbering based on defined rules or fallback mechanisms.
- Enhanced the batch save functionality to include the new shipment plan number in the database insertions.
- Added new state management for production and shipment plans in the Cutting Plan page, allowing for better organization and retrieval of related data.
- Introduced delivery location field in the sales order page, improving data entry for shipping details.
(TASK: ERP-XXX)
- Added new API endpoints to retrieve the work standard tree by item and to copy work standards from a source item to target items, supporting conflict strategies.
- Enhanced the backend logic to handle the retrieval and copying of work standards, including validation for required parameters and error handling.
- Introduced a new modal component in the frontend for managing the copy operation, allowing users to select target items and define conflict resolution strategies.
(TASK: ERP-029)
- Introduced a new API endpoint to retrieve all substitutes for a given BOM ID, allowing for bulk retrieval of substitute items.
- Enhanced the BOM service to support the new functionality, including company code filtering and versioning options.
- Updated the BOM management page to integrate the new substitute retrieval feature, enabling users to manage substitutes more effectively during the copy process.
- Added necessary state management and UI elements for handling substitutes in the copy modal.
(TASK: ERP-028)
- Introduced a new API endpoint to copy a BOM tree to multiple target items, allowing for efficient duplication of BOM structures.
- Implemented payload validation to ensure correct data format and integrity during the copy process.
- Added a modal in the frontend for managing the BOM copy operation, including options for conflict resolution and progress tracking.
- Enhanced the BOM service with necessary logic for handling BOM copies, including versioning and error handling.
(TASK: ERP-028)
- New POP inventory move page and API (popInventoryMoveController, popInventoryMove client) deployed across COMPANY_7/8/9/10/16/29/30
- Updates to shared POP components (PopShell, AcceptProcessModal, ProcessWork) and inout-manage/inventory pages
- COMPANY_7 POP.md updated with new scope notes
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Introduced a new field for '담당영업사원' (Internal Manager) in the customer management table, enhancing data visibility.
- Integrated the SmartSelect component for selecting internal managers, allowing users to easily choose from a list of employees.
- Updated data mapping to include internal manager information in the customer data structure, ensuring accurate display and functionality.
- Added UI elements for managing the internal manager selection, including a clear button to reset the selection.
(TASK: ERP-XXX)
- Updated the item search logic to include additional filters for both item name and item number, improving search accuracy.
- Implemented an API call to fetch item information based on the search keyword, allowing for dynamic filtering of results.
- Adjusted the state management to handle cases where no items are found, ensuring a smooth user experience.
(TASK: ERP-031)
- Added new routes and controller for subcontractor stock management, including endpoints for vendor summaries, stock details, history, adjustments, and scrap management.
- Integrated the subcontractor stock service to handle business logic related to inventory adjustments and history tracking.
- Developed frontend components for managing subcontractor stock, including modals for adjustments and history viewing, enhancing user interaction and data management.
(TASK: ERP-026)
- Modified the receiving controller to include the `inventory_unit` field in the item selection query.
- Updated the frontend components across multiple company pages to reference the new `inventory_unit` field instead of the previous `unit` field, ensuring consistency in data handling.
- Removed hardcoded company code from API calls to allow for dynamic fetching of item information.
(TASK: ERP-030)