[2026-01-18 09:33:29] [INFO] ===========================================
[2026-01-18 09:33:29] [INFO] ReceivingInventoryProcessor Log
[2026-01-18 09:33:29] [INFO] Receive ID: 000019bd-073c-7ce2-c9bb-8d77424d6a71
[2026-01-18 09:33:29] [INFO] Timestamp: 2026-01-18 09:33:29
[2026-01-18 09:33:29] [INFO] ===========================================
[2026-01-18 09:33:29] [INFO] START: updateInventoryTransactions
[2026-01-18 09:33:29] [DEBUG] Context: {"receive_id":"000019bd-073c-7ce2-c9bb-8d77424d6a71","table":"receiving","tenant_id":"0194a8b2-1234-7123-8123-123456789abc","department_id":null,"workflow_id":24}
[2026-01-18 09:33:29] [DEBUG] Fetching receiving record
[2026-01-18 09:33:29] [DEBUG] Species ID: 000019bd-0733-749f-e02a-ebb44eecd3b8
[2026-01-18 09:33:29] [DEBUG] Fetching inventory_txn records
[2026-01-18 09:33:29] [INFO] Found 3 inventory_txn records
[2026-01-18 09:33:29] [DEBUG] Processing txn: 019bd073-cde1-7bcd-80b6-e07131e70aa4 | group_name: NULL
[2026-01-18 09:33:29] [DEBUG] No group_name, looking up default product for species
[2026-01-18 09:33:29] [DEBUG] No mapping found, trying product name: Fish 1
[2026-01-18 09:33:29] [WARN] No product found for txn 019bd073-cde1-7bcd-80b6-e07131e70aa4 (group: none)
[2026-01-18 09:33:29] [DEBUG] Processing txn: 019bd073-cdef-7811-b280-691e7972677b | group_name: Curry Piece 
[2026-01-18 09:33:29] [DEBUG] Looking up product for species+group
[2026-01-18 09:33:29] [DEBUG] No mapping found, trying product name: Fish 1 - Curry Piece 
[2026-01-18 09:33:29] [DEBUG] Found product by name: 019bd073-357f-7031-a9a1-df12c16c5286
[2026-01-18 09:33:29] [DEBUG] Updating txn 019bd073-cdef-7811-b280-691e7972677b with product_id: 019bd073-357f-7031-a9a1-df12c16c5286
[2026-01-18 09:33:29] [INFO] Updated txn 019bd073-cdef-7811-b280-691e7972677b → product_id: 019bd073-357f-7031-a9a1-df12c16c5286
[2026-01-18 09:33:29] [DEBUG] Processing txn: 019bd073-cdf1-72eb-a903-a8cae321547c | group_name: Whole
[2026-01-18 09:33:29] [DEBUG] Looking up product for species+group
[2026-01-18 09:33:29] [DEBUG] No mapping found, trying product name: Fish 1 - Whole
[2026-01-18 09:33:29] [DEBUG] Found product by name: 019bd073-3582-7d14-9649-7411070905a8
[2026-01-18 09:33:29] [DEBUG] Updating txn 019bd073-cdf1-72eb-a903-a8cae321547c with product_id: 019bd073-3582-7d14-9649-7411070905a8
[2026-01-18 09:33:29] [INFO] Updated txn 019bd073-cdf1-72eb-a903-a8cae321547c → product_id: 019bd073-3582-7d14-9649-7411070905a8
[2026-01-18 09:33:29] [INFO] Audit file saved: /var/www/POS/storage/receiving/receiving_inventory_000019bd-073c-7ce2-c9bb-8d77424d6a71_2026-01-18_09-33-29.json
[2026-01-18 09:33:29] [INFO] COMPLETE: Updated 2, Skipped 1, Errors 0
[2026-01-18 09:33:29] [INFO] Method returned: {"success":true,"message":"Inventory transactions updated with product_id","receive_id":"000019bd-073c-7ce2-c9bb-8d77424d6a71","species_id":"000019bd-0733-749f-e02a-ebb44eecd3b8","transactions_found":3,"updated":2,"skipped":1,"errors":0,"updates":[{"txn_id":"019bd073-cdef-7811-b280-691e7972677b","product_id":"019bd073-357f-7031-a9a1-df12c16c5286","group_name":"Curry Piece "},{"txn_id":"019bd073-cdf1-72eb-a903-a8cae321547c","product_id":"019bd073-3582-7d14-9649-7411070905a8","group_name":"Whole"}],"saved_to":"\/var\/www\/POS\/storage\/receiving\/receiving_inventory_000019bd-073c-7ce2-c9bb-8d77424d6a71_2026-01-18_09-33-29.json","log_file":"\/var\/www\/POS\/storage\/receiving\/logs\/receiving_000019bd-073c-7ce2-c9bb-8d77424d6a71_2026-01-18_09-33-29.log"}
[2026-01-18 09:33:29] [INFO] PhpFunctionStep constructed with config: {"type":"php_function","class":"App\\\\Services\\\\WorkflowSteps\\\\PhpFunctionStep","method":"updateInventoryTransactions","params":["{receive_id}","{context}"]}
[2026-01-18 09:33:29] [INFO] === PhpFunctionStep::execute CALLED ===
[2026-01-18 09:33:29] [INFO] Context: {"receive_id":"000019bd-073c-7ce2-c9bb-8d77424d6a71","table":"receiving","tenant_id":"0194a8b2-1234-7123-8123-123456789abc","department_id":null,"workflow_id":24}
[2026-01-18 09:33:29] [INFO] Config: {"type":"php_function","class":"App\\\\Services\\\\WorkflowSteps\\\\PhpFunctionStep","method":"updateInventoryTransactions","params":["{receive_id}","{context}"]}
[2026-01-18 09:33:29] [INFO] Resolved param {receive_id} from context key: receive_id
[2026-01-18 09:33:29] [INFO] Resolved param {context} from context key: context
[2026-01-18 09:33:29] [INFO] Calling method: updateInventoryTransactions with 2 params
[2026-01-18 09:33:29] [INFO] ===========================================
[2026-01-18 09:33:29] [INFO] ReceivingInventoryProcessor Log
[2026-01-18 09:33:29] [INFO] Receive ID: 000019bd-073c-7ce2-c9bb-8d77424d6a71
[2026-01-18 09:33:29] [INFO] Timestamp: 2026-01-18 09:33:29
[2026-01-18 09:33:29] [INFO] ===========================================
[2026-01-18 09:33:29] [INFO] START: updateInventoryTransactions
[2026-01-18 09:33:29] [DEBUG] Context: {"receive_id":"000019bd-073c-7ce2-c9bb-8d77424d6a71","table":"receiving","tenant_id":"0194a8b2-1234-7123-8123-123456789abc","department_id":null,"workflow_id":24}
[2026-01-18 09:33:29] [DEBUG] Fetching receiving record
[2026-01-18 09:33:29] [DEBUG] Species ID: 000019bd-0733-749f-e02a-ebb44eecd3b8
[2026-01-18 09:33:29] [DEBUG] Fetching inventory_txn records
[2026-01-18 09:33:29] [INFO] Found 3 inventory_txn records
[2026-01-18 09:33:29] [DEBUG] Processing txn: 019bd073-cde1-7bcd-80b6-e07131e70aa4 | group_name: NULL
[2026-01-18 09:33:29] [DEBUG] No group_name, looking up default product for species
[2026-01-18 09:33:29] [DEBUG] No mapping found, trying product name: Fish 1
[2026-01-18 09:33:29] [WARN] No product found for txn 019bd073-cde1-7bcd-80b6-e07131e70aa4 (group: none)
[2026-01-18 09:33:29] [DEBUG] Processing txn: 019bd073-cdef-7811-b280-691e7972677b | group_name: Curry Piece 
[2026-01-18 09:33:29] [DEBUG] Looking up product for species+group
[2026-01-18 09:33:29] [DEBUG] No mapping found, trying product name: Fish 1 - Curry Piece 
[2026-01-18 09:33:29] [DEBUG] Found product by name: 019bd073-357f-7031-a9a1-df12c16c5286
[2026-01-18 09:33:29] [DEBUG] Updating txn 019bd073-cdef-7811-b280-691e7972677b with product_id: 019bd073-357f-7031-a9a1-df12c16c5286
[2026-01-18 09:33:29] [INFO] Updated txn 019bd073-cdef-7811-b280-691e7972677b → product_id: 019bd073-357f-7031-a9a1-df12c16c5286
[2026-01-18 09:33:29] [DEBUG] Processing txn: 019bd073-cdf1-72eb-a903-a8cae321547c | group_name: Whole
[2026-01-18 09:33:29] [DEBUG] Looking up product for species+group
[2026-01-18 09:33:29] [DEBUG] No mapping found, trying product name: Fish 1 - Whole
[2026-01-18 09:33:29] [DEBUG] Found product by name: 019bd073-3582-7d14-9649-7411070905a8
[2026-01-18 09:33:29] [DEBUG] Updating txn 019bd073-cdf1-72eb-a903-a8cae321547c with product_id: 019bd073-3582-7d14-9649-7411070905a8
[2026-01-18 09:33:29] [INFO] Updated txn 019bd073-cdf1-72eb-a903-a8cae321547c → product_id: 019bd073-3582-7d14-9649-7411070905a8
[2026-01-18 09:33:29] [INFO] Audit file saved: /var/www/POS/storage/receiving/receiving_inventory_000019bd-073c-7ce2-c9bb-8d77424d6a71_2026-01-18_09-33-29.json
[2026-01-18 09:33:29] [INFO] COMPLETE: Updated 2, Skipped 1, Errors 0
[2026-01-18 09:33:29] [INFO] Method returned: {"success":true,"message":"Inventory transactions updated with product_id","receive_id":"000019bd-073c-7ce2-c9bb-8d77424d6a71","species_id":"000019bd-0733-749f-e02a-ebb44eecd3b8","transactions_found":3,"updated":2,"skipped":1,"errors":0,"updates":[{"txn_id":"019bd073-cdef-7811-b280-691e7972677b","product_id":"019bd073-357f-7031-a9a1-df12c16c5286","group_name":"Curry Piece "},{"txn_id":"019bd073-cdf1-72eb-a903-a8cae321547c","product_id":"019bd073-3582-7d14-9649-7411070905a8","group_name":"Whole"}],"saved_to":"\/var\/www\/POS\/storage\/receiving\/receiving_inventory_000019bd-073c-7ce2-c9bb-8d77424d6a71_2026-01-18_09-33-29.json","log_file":"\/var\/www\/POS\/storage\/receiving\/logs\/receiving_000019bd-073c-7ce2-c9bb-8d77424d6a71_2026-01-18_09-33-29.log"}
