[2026-09-14 00:48:45] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 01:34:09] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 03:24:19] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 04:55:02] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 06:26:42] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 08:01:23] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 08:11:31] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 08:21:29] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 08:31:29] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 08:33:14] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 08:33:14] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 08:33:14] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 08:33:14] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 08:33:14] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 08:33:14] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 08:33:14] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 08:33:14] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 08:33:14] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 08:33:28] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 08:33:58] live.INFO: Fetching tax rate for product ID: 66  
[2026-09-14 08:33:58] live.INFO: Product ID 66 has no tax assigned.  
[2026-09-14 08:34:04] live.INFO: Fetching tax rate for product ID: 66  
[2026-09-14 08:34:04] live.INFO: Product ID 66 has no tax assigned.  
[2026-09-14 08:34:04] live.INFO: Fetching tax rate for product ID: 66  
[2026-09-14 08:34:04] live.INFO: Product ID 66 has no tax assigned.  
[2026-09-14 08:34:05] live.INFO: Fetching tax rate for product ID: 66  
[2026-09-14 08:34:05] live.INFO: Product ID 66 has no tax assigned.  
[2026-09-14 08:34:05] live.INFO: Fetching tax rate for product ID: 66  
[2026-09-14 08:34:05] live.INFO: Product ID 66 has no tax assigned.  
[2026-09-14 08:34:06] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 08:34:18] live.INFO: Fetching tax rate for product ID: 66  
[2026-09-14 08:34:18] live.INFO: Product ID 66 has no tax assigned.  
[2026-09-14 08:34:19] live.INFO: Fetching tax rate for product ID: 66  
[2026-09-14 08:34:19] live.INFO: Product ID 66 has no tax assigned.  
[2026-09-14 08:34:19] live.INFO: Fetching tax rate for product ID: 66  
[2026-09-14 08:34:19] live.INFO: Product ID 66 has no tax assigned.  
[2026-09-14 08:34:20] live.INFO: Fetching tax rate for product ID: 66  
[2026-09-14 08:34:20] live.INFO: Product ID 66 has no tax assigned.  
[2026-09-14 08:34:34] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 08:42:38] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 08:51:30] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 09:02:33] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 09:08:37] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 09:08:37] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 09:08:37] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 09:08:37] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 09:08:37] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 09:08:37] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 09:08:37] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 09:08:37] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 09:08:37] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 09:12:22] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 09:16:35] live.INFO: Fetching tax rate for product ID: 66  
[2026-09-14 09:16:35] live.INFO: Product ID 66 has no tax assigned.  
[2026-09-14 09:16:43] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 09:16:54] live.INFO: filterProduct method called {"business_id":8,"search_term":"test","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 09:16:54] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 09:16:54] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 09:16:54] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 09:16:54] live.DEBUG: Applying search filters {"search_term":"test","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 09:16:54] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 09:16:54] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 09:16:54] live.DEBUG: Added lot number fields to select  
[2026-09-14 09:16:54] live.INFO: filterProduct completed successfully {"result_count":3,"business_id":8,"search_term":"test"} 
[2026-09-14 09:16:55] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 09:16:58] live.INFO: Product Row Debug - RELOADED {"product_id":28,"product_name":"test1j","discount_allowed":true,"has_global_discount":true,"global_discount_type":null,"global_discount_amount":null,"discounts_count":3,"discounts":[{"id":9,"product_id":28,"business_id":8,"from_quantity":6,"to_quantity":10,"discount_type":"fixed","discount_amount":3.0,"created_at":"2026-07-20T15:36:57.000000Z","updated_at":"2026-07-21T12:00:49.000000Z"},{"id":10,"product_id":28,"business_id":8,"from_quantity":11,"to_quantity":15,"discount_type":"fixed","discount_amount":5.0,"created_at":"2026-07-20T15:36:57.000000Z","updated_at":"2026-07-21T12:00:49.000000Z"},{"id":13,"product_id":28,"business_id":8,"from_quantity":16,"to_quantity":null,"discount_type":"fixed","discount_amount":6.0,"created_at":"2026-07-21T09:26:41.000000Z","updated_at":"2026-07-21T12:00:49.000000Z"}],"base_price":4000.0,"discounts_json":"[{\"id\":9,\"product_id\":28,\"business_id\":8,\"from_quantity\":6,\"to_quantity\":10,\"discount_type\":\"fixed\",\"discount_amount\":3,\"created_at\":\"2026-07-20T15:36:57.000000Z\",\"updated_at\":\"2026-07-21T12:00:49.000000Z\"},{\"id\":10,\"product_id\":28,\"business_id\":8,\"from_quantity\":11,\"to_quantity\":15,\"discount_type\":\"fixed\",\"discount_amount\":5,\"created_at\":\"2026-07-20T15:36:57.000000Z\",\"updated_at\":\"2026-07-21T12:00:49.000000Z\"},{\"id\":13,\"product_id\":28,\"business_id\":8,\"from_quantity\":16,\"to_quantity\":null,\"discount_type\":\"fixed\",\"discount_amount\":6,\"created_at\":\"2026-07-21T09:26:41.000000Z\",\"updated_at\":\"2026-07-21T12:00:49.000000Z\"}]","multiplier":1,"unit_prices":{"1":{"unit_id":1,"unit_name":"Pc","unit_price":4000.0,"multiplier":1,"has_price":true},"64":{"unit_id":64,"unit_name":"CTN","unit_price":11000.0,"multiplier":"4.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 09:17:13] live.INFO: Credit Limit Check Started {"contact_id":"866","status":"final","final_total":"8000.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 09:17:13] live.DEBUG: Payment Calculation {"final_total":8000.0,"curr_total_payment":0.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 09:17:13] live.INFO: Credit Limit Check Skipped - No Credit Limit Set {"contact_id":"866","contact_name":""} 
[2026-09-14 09:17:13] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 09:17:13] live.INFO: is_mpesa_sale value: true  
[2026-09-14 09:17:13] live.INFO: Journal Entry Case: FULL CREDIT SALE {"transaction_id":1855,"final_total":8000.0,"amount_paid":0.0,"balance_due":8000.0} 
[2026-09-14 09:17:13] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1855,"entries":[{"transaction_id":1855,"created_by_id":229,"transaction_number":"TRX-6aa791697bb878.20276276","payment_detail_id":1320,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 09:17:13","updated_at":"2026-09-14 09:17:13","chart_of_account_id":23,"debit":null,"credit":8000.0},{"transaction_id":1855,"created_by_id":229,"transaction_number":"TRX-6aa791697bb878.20276276","payment_detail_id":1320,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 09:17:13","updated_at":"2026-09-14 09:17:13","chart_of_account_id":19,"debit":8000.0,"credit":null}]} 
[2026-09-14 09:17:13] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1179,"purchase_line_id":1089,"quantity":2.0,"created_at":"2026-09-14 09:17:13","updated_at":"2026-09-14 09:17:13"}]} 
[2026-09-14 09:17:13] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 09:17:13] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":7880.0} 
[2026-09-14 09:17:13] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1855,"contact_id":866,"customer_name":"test x1","has_tin":false,"has_digitax_id":false} 
[2026-09-14 09:17:13] live.ERROR: ETIMS: Missing item_id for product {"product_id":28} 
[2026-09-14 09:17:13] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 09:17:13] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1855  
[2026-09-14 09:17:31] live.INFO: Credit Limit Check Started {"contact_id":"866","status":"final","final_total":"12000.00","is_credit_sale":"1","exclude_transaction_id":"1855"} 
[2026-09-14 09:17:31] live.DEBUG: Payment Calculation {"final_total":12000.0,"curr_total_payment":0,"is_credit_sale":true,"payment_count":1} 
[2026-09-14 09:17:31] live.INFO: Credit Limit Check Skipped - No Credit Limit Set {"contact_id":"866","contact_name":""} 
[2026-09-14 09:17:31] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1179,"purchase_line_id":1089,"quantity":1.0,"created_at":"2026-09-14 09:17:31","updated_at":"2026-09-14 09:17:31"}]} 
[2026-09-14 09:17:31] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 09:17:31] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":11820.0} 
[2026-09-14 09:17:31] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1855,"contact_id":866,"customer_name":"test x1","has_tin":false,"has_digitax_id":false} 
[2026-09-14 09:17:31] live.ERROR: ETIMS: Missing item_id for product {"product_id":28} 
[2026-09-14 09:17:31] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 09:17:31] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1855  
[2026-09-14 09:17:33] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 09:17:47] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 09:21:29] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 09:31:22] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 09:41:30] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 09:51:28] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 10:02:21] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 10:11:30] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 10:21:29] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 10:32:32] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 10:42:32] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 10:51:30] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 11:02:21] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 11:11:30] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 11:22:21] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 11:31:31] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 11:37:35] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 11:37:35] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 11:37:35] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 11:37:35] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 11:37:35] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 11:37:35] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 11:37:35] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 11:37:35] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 11:37:35] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152120854.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 11:37:44] live.INFO: filterProduct method called {"business_id":8,"search_term":"hp","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 11:37:44] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 11:37:44] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 11:37:44] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 11:37:44] live.DEBUG: Applying search filters {"search_term":"hp","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 11:37:44] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 11:37:44] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 11:37:44] live.DEBUG: Added lot number fields to select  
[2026-09-14 11:37:44] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"hp"} 
[2026-09-14 11:37:45] live.INFO: Product Row Debug - RELOADED {"product_id":153,"product_name":"Hp Spectre New 8gb / 256gb ssd","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":40000.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"1":{"unit_id":1,"unit_name":"Pc","unit_price":4000.0,"multiplier":1,"has_price":true},"64":{"unit_id":64,"unit_name":"CTN","unit_price":11000.0,"multiplier":"4.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 11:37:46] live.INFO: Fetching tax rate for product ID: 153  
[2026-09-14 11:37:46] live.INFO: Product ID 153 has no tax assigned.  
[2026-09-14 11:37:49] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 11:39:11] live.INFO: filterProduct method called {"business_id":8,"search_term":"hp","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 11:39:11] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 11:39:11] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 11:39:11] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 11:39:11] live.DEBUG: Applying search filters {"search_term":"hp","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 11:39:11] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 11:39:11] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 11:39:11] live.DEBUG: Added lot number fields to select  
[2026-09-14 11:39:11] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"hp"} 
[2026-09-14 11:39:12] live.INFO: Product Row Debug - RELOADED {"product_id":153,"product_name":"Hp Spectre New 8gb / 256gb ssd","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":40000.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"1":{"unit_id":1,"unit_name":"Pc","unit_price":4000.0,"multiplier":1,"has_price":true},"64":{"unit_id":64,"unit_name":"CTN","unit_price":11000.0,"multiplier":"4.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 11:39:12] live.INFO: Fetching tax rate for product ID: 153  
[2026-09-14 11:39:12] live.INFO: Product ID 153 has no tax assigned.  
[2026-09-14 11:39:18] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 11:41:30] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 11:43:05] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 11:43:05] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 11:43:05] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 11:43:05] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 11:43:05] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9161932.64000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 11:43:05] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 11:43:05] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 11:43:05] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 11:43:05] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9161932.64000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 11:44:10] live.INFO: === About to call saveProductNewUnitRelationships === {"product_id":358,"request_units":[{"actual_name":"pieces","unit_id":"282","short_name":"pcs","relation_unit_id":null,"relation_qty":"1","price":"30"}],"page_batch_id":"20260914_114329_9004"} 
[2026-09-14 11:44:10] live.INFO: === saveProductNewUnitRelationships START === {"product_id":358,"product_name":"Default"} 
[2026-09-14 11:44:10] live.INFO: Units data received {"units_data":[{"actual_name":"pieces","unit_id":"282","short_name":"pcs","relation_unit_id":null,"relation_qty":"1","price":"30"}],"count":1} 
[2026-09-14 11:44:10] live.INFO: Processing unit index: 0 {"unit_data":{"actual_name":"pieces","unit_id":"282","short_name":"pcs","relation_unit_id":null,"relation_qty":"1","price":"30"}} 
[2026-09-14 11:44:10] live.INFO: Unit found by ID {"unit_id":282,"actual_name":"pieces"} 
[2026-09-14 11:44:10] live.INFO: Unit lookup result {"found":"yes","unit_id":282,"method":"by_id"} 
[2026-09-14 11:44:10] live.INFO: Updating existing unit {"unit_id":282} 
[2026-09-14 11:44:10] live.INFO: Updated unit_price {"new_price":30.0} 
[2026-09-14 11:44:10] live.INFO: Unit updated successfully  
[2026-09-14 11:44:10] live.INFO: Setting as BASE unit {"unit_id":282} 
[2026-09-14 11:44:10] live.INFO: Base unit saved {"base_unit_id":282} 
[2026-09-14 11:44:10] live.INFO: First pass complete {"created_units_count":1,"base_unit_id":282} 
[2026-09-14 11:44:10] live.INFO: === SECOND PASS: Setting relations first ===  
[2026-09-14 11:44:10] live.INFO: === SECOND PASS: Calculating cumulative multipliers ===  
[2026-09-14 11:44:10] live.INFO: === saveProductNewUnitRelationships END ===  
[2026-09-14 11:44:11] live.INFO: OpeningStockController::add - Location Data {"product_id":"358","business_id":43,"locations":{"Illuminate\\Support\\Collection":{"39":"Greenfield Supermarket Ltd (BL0001)"}},"available_locations":[39]} 
[2026-09-14 11:44:11] live.INFO: OpeningStockController::add - Serial Numbers Check {"product_id":"358","business_id":43,"has_serial_numbers":{"39":false},"total_locations_with_serial":0} 
[2026-09-14 11:51:30] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 11:53:39] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 11:53:39] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 11:53:39] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 11:53:39] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 11:53:39] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 11:53:39] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 11:53:39] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 11:53:39] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 11:53:39] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152120854.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 12:01:30] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 12:11:09] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 12:11:11] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:11:11] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 12:11:11] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 12:11:11] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:11:11] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9161932.64000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 12:11:11] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:11:11] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 12:11:11] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 12:11:11] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9161932.64000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 12:18:12] live.INFO: === About to call saveProductNewUnitRelationships === {"product_id":359,"request_units":[{"actual_name":"tablets","unit_id":"283","short_name":"tbt","relation_unit_id":null,"relation_qty":"1","price":"10"}],"page_batch_id":"20260914_121655_9923"} 
[2026-09-14 12:18:12] live.INFO: === saveProductNewUnitRelationships START === {"product_id":359,"product_name":"mara moja today"} 
[2026-09-14 12:18:12] live.INFO: Units data received {"units_data":[{"actual_name":"tablets","unit_id":"283","short_name":"tbt","relation_unit_id":null,"relation_qty":"1","price":"10"}],"count":1} 
[2026-09-14 12:18:12] live.INFO: Processing unit index: 0 {"unit_data":{"actual_name":"tablets","unit_id":"283","short_name":"tbt","relation_unit_id":null,"relation_qty":"1","price":"10"}} 
[2026-09-14 12:18:12] live.INFO: Unit found by ID {"unit_id":283,"actual_name":"tablets"} 
[2026-09-14 12:18:12] live.INFO: Unit lookup result {"found":"yes","unit_id":283,"method":"by_id"} 
[2026-09-14 12:18:12] live.INFO: Updating existing unit {"unit_id":283} 
[2026-09-14 12:18:12] live.INFO: Updated unit_price {"new_price":10.0} 
[2026-09-14 12:18:12] live.INFO: Unit updated successfully  
[2026-09-14 12:18:12] live.INFO: Setting as BASE unit {"unit_id":283} 
[2026-09-14 12:18:12] live.INFO: Base unit saved {"base_unit_id":283} 
[2026-09-14 12:18:12] live.INFO: First pass complete {"created_units_count":1,"base_unit_id":283} 
[2026-09-14 12:18:12] live.INFO: === SECOND PASS: Setting relations first ===  
[2026-09-14 12:18:12] live.INFO: === SECOND PASS: Calculating cumulative multipliers ===  
[2026-09-14 12:18:12] live.INFO: === saveProductNewUnitRelationships END ===  
[2026-09-14 12:18:13] live.INFO: OpeningStockController::add - Location Data {"product_id":"359","business_id":43,"locations":{"Illuminate\\Support\\Collection":{"39":"Greenfield Supermarket Ltd (BL0001)"}},"available_locations":[39]} 
[2026-09-14 12:18:13] live.INFO: OpeningStockController::add - Serial Numbers Check {"product_id":"359","business_id":43,"has_serial_numbers":{"39":false},"total_locations_with_serial":0} 
[2026-09-14 12:19:06] live.INFO: filterProduct method called {"business_id":43,"search_term":"mar","location_id":"39","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:19:06] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:19:06] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:19:06] live.DEBUG: Applying search filters {"search_term":"mar","search_type":"like","search_fields":["name","sku"]} 
[2026-09-14 12:19:06] live.DEBUG: LIKE search conditions applied {"fields":["name","sku"]} 
[2026-09-14 12:19:06] live.DEBUG: Applying location filter {"location_id":"39"} 
[2026-09-14 12:19:06] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":43,"search_term":"mar"} 
[2026-09-14 12:19:07] live.INFO: Product Row Debug - RELOADED {"product_id":359,"product_name":"mara moja today","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":10.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"283":{"unit_id":283,"unit_name":"tablets","unit_price":10.0,"multiplier":1,"has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 12:19:33] live.INFO: Credit Limit Check Started {"contact_id":"703","status":"final","final_total":"500.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 12:19:33] live.DEBUG: Payment Calculation {"final_total":500.0,"curr_total_payment":500.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 12:19:33] live.INFO: Credit Limit Check Skipped - Fully Paid {"final_total":500.0,"curr_total_payment":500.0} 
[2026-09-14 12:19:33] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 12:19:33] live.INFO: is_mpesa_sale value: true  
[2026-09-14 12:19:33] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":true,"is_valid_mpesa_sale":false,"payment_method_input":"cash","mpesa_transaction_id":null,"transaction_id":1857} 
[2026-09-14 12:19:33] live.INFO: Journal Entry Case: FULL CASH PAYMENT {"transaction_id":1857,"final_total":500.0,"amount_paid":500.0,"balance_due":0} 
[2026-09-14 12:19:33] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1857,"entries":[{"transaction_id":1857,"created_by_id":293,"transaction_number":"TRX-6aa7bc253ac054.34932937","payment_detail_id":1321,"location_id":"39","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:19:33","updated_at":"2026-09-14 12:19:33","chart_of_account_id":15441,"debit":null,"credit":500.0},{"transaction_id":1857,"created_by_id":293,"transaction_number":"TRX-6aa7bc253ac054.34932937","payment_detail_id":1321,"location_id":"39","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:19:33","updated_at":"2026-09-14 12:19:33","chart_of_account_id":15445,"debit":500.0,"credit":null}]} 
[2026-09-14 12:19:33] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1180,"purchase_line_id":1596,"quantity":50.0,"created_at":"2026-09-14 12:19:33","updated_at":"2026-09-14 12:19:33"}]} 
[2026-09-14 12:19:33] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 12:19:33] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":100.0} 
[2026-09-14 12:19:33] live.ERROR: ETIMS settings not found for business ID: 43  
[2026-09-14 12:19:33] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1857  
[2026-09-14 12:19:48] live.INFO: filterProduct method called {"business_id":43,"search_term":"mara","location_id":"39","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:19:48] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:19:48] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:19:48] live.DEBUG: Applying search filters {"search_term":"mara","search_type":"like","search_fields":["name","sku"]} 
[2026-09-14 12:19:48] live.DEBUG: LIKE search conditions applied {"fields":["name","sku"]} 
[2026-09-14 12:19:48] live.DEBUG: Applying location filter {"location_id":"39"} 
[2026-09-14 12:19:48] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":43,"search_term":"mara"} 
[2026-09-14 12:19:49] live.INFO: Product Row Debug - RELOADED {"product_id":359,"product_name":"mara moja today","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":10.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"283":{"unit_id":283,"unit_name":"tablets","unit_price":10.0,"multiplier":1,"has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 12:20:13] live.INFO: Loaded Payment Settings: {"type":"till","short_code":"3582003","child_number":"3582003","till_no":5699724,"passkey":"8df9b4d855b77a20bd2257ee86f2b482b1816237e0e248e39ff8cbd3e73aabff","consumer_key":"W9AyBGwLeBRq0FAkn2FG3g9EJK9fF3nKwGTzG2pNtByd5tnQ","consumer_secret":"nziTooyd6JS0GC08ZG7456Ab531RVYOI1AyeZNXpDKha0xQ6mEvbFtOiAVAjlhyc","site_url":"https://now.riset.cloud/","payment_options":"[\"custom_pay_1\"]"} 
[2026-09-14 12:20:13] live.INFO: STK Push Request Received. {"request_input":{"phone":"0793310938","amount":"500.00"}} 
[2026-09-14 12:20:13] live.INFO: Phone number formatted. {"formatted_phone":"254793310938"} 
[2026-09-14 12:20:13] live.INFO: Phone and Amount after formatting. {"phone":"254793310938","amount":500} 
[2026-09-14 12:20:13] live.INFO: Timestamp for STK Push: {"timestamp":"20260914120913"} 
[2026-09-14 12:20:13] live.INFO: Transaction type determined. {"transaction_type":"CustomerBuyGoodsOnline"} 
[2026-09-14 12:20:13] live.INFO: PartyB to be used in STK Push. {"type":"till","partyB":5699724,"short_code":"3582003","child_number":"3582003","till_no":5699724} 
[2026-09-14 12:20:13] live.INFO: Callback URLs set. {"callbackURL":"https://now.riset.cloud/api/payment/callback","validationURL":"https://now.riset.cloud/api/payment/validation"} 
[2026-09-14 12:20:13] live.INFO: Loaded Payment Settings: {"type":"till","short_code":"3582003","child_number":"3582003","till_no":5699724,"passkey":"8df9b4d855b77a20bd2257ee86f2b482b1816237e0e248e39ff8cbd3e73aabff","consumer_key":"W9AyBGwLeBRq0FAkn2FG3g9EJK9fF3nKwGTzG2pNtByd5tnQ","consumer_secret":"nziTooyd6JS0GC08ZG7456Ab531RVYOI1AyeZNXpDKha0xQ6mEvbFtOiAVAjlhyc","site_url":"https://now.riset.cloud/","payment_options":"[\"custom_pay_1\"]"} 
[2026-09-14 12:20:13] live.INFO: Generated password for M-Pesa STK Push. {"password":"MzU4MjAwMzhkZjliNGQ4NTViNzdhMjBiZDIyNTdlZTg2ZjJiNDgyYjE4MTYyMzdlMGUyNDhlMzlmZjhjYmQzZTczYWFiZmYyMDI2MDkxNDEyMDkxMw=="} 
[2026-09-14 12:20:13] live.INFO: Payload prepared for STK Push. {"payload":{"BusinessShortCode":"3582003","Password":"MzU4MjAwMzhkZjliNGQ4NTViNzdhMjBiZDIyNTdlZTg2ZjJiNDgyYjE4MTYyMzdlMGUyNDhlMzlmZjhjYmQzZTczYWFiZmYyMDI2MDkxNDEyMDkxMw==","Timestamp":"20260914120913","TransactionType":"CustomerBuyGoodsOnline","Amount":500,"PartyA":"254793310938","PartyB":5699724,"PhoneNumber":"254793310938","CallBackURL":"https://now.riset.cloud/api/payment/callback","AccountReference":12,"TransactionDesc":"Biz"}} 
[2026-09-14 12:20:13] live.INFO: Loaded Payment Settings: {"type":"till","short_code":"3582003","child_number":"3582003","till_no":5699724,"passkey":"8df9b4d855b77a20bd2257ee86f2b482b1816237e0e248e39ff8cbd3e73aabff","consumer_key":"W9AyBGwLeBRq0FAkn2FG3g9EJK9fF3nKwGTzG2pNtByd5tnQ","consumer_secret":"nziTooyd6JS0GC08ZG7456Ab531RVYOI1AyeZNXpDKha0xQ6mEvbFtOiAVAjlhyc","site_url":"https://now.riset.cloud/","payment_options":"[\"custom_pay_1\"]"} 
[2026-09-14 12:20:14] live.INFO: Loaded Payment Settings: {"type":"till","short_code":"3582003","child_number":"3582003","till_no":5699724,"passkey":"8df9b4d855b77a20bd2257ee86f2b482b1816237e0e248e39ff8cbd3e73aabff","consumer_key":"W9AyBGwLeBRq0FAkn2FG3g9EJK9fF3nKwGTzG2pNtByd5tnQ","consumer_secret":"nziTooyd6JS0GC08ZG7456Ab531RVYOI1AyeZNXpDKha0xQ6mEvbFtOiAVAjlhyc","site_url":"https://now.riset.cloud/","payment_options":"[\"custom_pay_1\"]"} 
[2026-09-14 12:20:14] live.INFO: Registering URLs. {"shortCode":"3582003","confirmationURL":"https://now.riset.cloud/api/payment/callback","validationURL":"https://now.riset.cloud/api/payment/validation"} 
[2026-09-14 12:20:15] live.INFO: URL registration response. {"response":"{
                    \"requestId\":\"4e91-4406-942a-bfac3692de5111312157\",
                    \"errorCode\": \"500.003.1001\",
                    \"errorMessage\": \"URLs are already registered\"
                }
            "} 
[2026-09-14 12:20:16] live.INFO: STK Push response received. {"response":{"MerchantRequestID":"0956-4a7e-897e-561c4cf95e4310091856","CheckoutRequestID":"ws_CO_14092026122016055793310938","ResponseCode":"0","ResponseDescription":"Success. Request accepted for processing","CustomerMessage":"Success. Request accepted for processing"}} 
[2026-09-14 12:21:09] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 12:24:37] live.INFO: filterProduct method called {"business_id":43,"search_term":"mara","location_id":"39","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:24:37] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:24:37] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:24:37] live.DEBUG: Applying search filters {"search_term":"mara","search_type":"like","search_fields":["name","sku"]} 
[2026-09-14 12:24:37] live.DEBUG: LIKE search conditions applied {"fields":["name","sku"]} 
[2026-09-14 12:24:37] live.DEBUG: Applying location filter {"location_id":"39"} 
[2026-09-14 12:24:37] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":43,"search_term":"mara"} 
[2026-09-14 12:24:37] live.INFO: Product Row Debug - RELOADED {"product_id":359,"product_name":"mara moja today","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":10.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"283":{"unit_id":283,"unit_name":"tablets","unit_price":10.0,"multiplier":1,"has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 12:24:53] live.INFO: Credit Limit Check Started {"contact_id":"703","status":"final","final_total":"1000.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 12:24:53] live.DEBUG: Payment Calculation {"final_total":1000.0,"curr_total_payment":1300.0,"is_credit_sale":false,"payment_count":2} 
[2026-09-14 12:24:53] live.INFO: Credit Limit Check Skipped - Fully Paid {"final_total":1000.0,"curr_total_payment":1300.0} 
[2026-09-14 12:24:54] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 12:24:54] live.INFO: is_mpesa_sale value: true  
[2026-09-14 12:24:54] live.INFO: Journal Entry Case: FULL CASH PAYMENT {"transaction_id":1858,"final_total":1000.0,"amount_paid":1000.0,"balance_due":0} 
[2026-09-14 12:24:54] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1858,"entries":[{"transaction_id":1858,"created_by_id":293,"transaction_number":"TRX-6aa7bd660e4fc9.61988626","payment_detail_id":1322,"location_id":"39","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:24:54","updated_at":"2026-09-14 12:24:54","chart_of_account_id":15441,"debit":null,"credit":1000.0},{"transaction_id":1858,"created_by_id":293,"transaction_number":"TRX-6aa7bd660e4fc9.61988626","payment_detail_id":1322,"location_id":"39","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:24:54","updated_at":"2026-09-14 12:24:54","chart_of_account_id":15445,"debit":1000.0,"credit":null}]} 
[2026-09-14 12:24:54] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1181,"purchase_line_id":1596,"quantity":100.0,"created_at":"2026-09-14 12:24:54","updated_at":"2026-09-14 12:24:54"}]} 
[2026-09-14 12:24:54] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 12:24:54] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":200.0} 
[2026-09-14 12:24:54] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1858  
[2026-09-14 12:25:23] live.INFO: Credit Limit Check Started {"contact_id":"703","status":"final","final_total":"1,000.00","is_credit_sale":"0","exclude_transaction_id":"1858"} 
[2026-09-14 12:25:23] live.DEBUG: Payment Calculation {"final_total":1000.0,"curr_total_payment":1000.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 12:25:23] live.INFO: Credit Limit Check Skipped - Fully Paid {"final_total":1000.0,"curr_total_payment":1000.0} 
[2026-09-14 12:25:23] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":false,"is_valid_mpesa_sale":false,"payment_method_input":"cash","mpesa_transaction_id":null,"transaction_id":1858} 
[2026-09-14 12:25:23] live.ERROR: ETIMS settings not found for business ID: 43  
[2026-09-14 12:25:23] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1858  
[2026-09-14 12:26:36] live.INFO: Purchases array from request {"purchases":[{"product_id":"359","variation_id":"364","quantity":"100","product_unit_id":"283","sub_unit_id":"283","pp_without_discount":"8.00","discount_percent":"0.00","purchase_price":"8.00","purchase_line_tax_id":null,"item_tax":"0.00","purchase_price_inc_tax":"8.00","profit_percent":"25.00","default_sell_price":"10.00","mfg_date":null,"exp_date":null,"imei_numbers":"[]","imei_count":"0"}],"purchases_json":"[{\"product_id\":\"359\",\"variation_id\":\"364\",\"quantity\":\"100\",\"product_unit_id\":\"283\",\"sub_unit_id\":\"283\",\"pp_without_discount\":\"8.00\",\"discount_percent\":\"0.00\",\"purchase_price\":\"8.00\",\"purchase_line_tax_id\":null,\"item_tax\":\"0.00\",\"purchase_price_inc_tax\":\"8.00\",\"profit_percent\":\"25.00\",\"default_sell_price\":\"10.00\",\"mfg_date\":null,\"exp_date\":null,\"imei_numbers\":\"[]\",\"imei_count\":\"0\"}]"} 
[2026-09-14 12:26:36] live.ERROR: ETIMS settings not found for business ID: 43  
[2026-09-14 12:26:36] live.INFO: Purchase lines created {"transaction_id":1859,"purchase_lines_count":1,"purchase_lines":[{"id":1597,"transaction_id":1859,"product_id":359,"variation_id":364,"quantity":100.0,"secondary_unit_quantity":"0.0000","pp_without_discount":"8.0000","discount_percent":"0.00","purchase_price":"8.0000","purchase_price_inc_tax":"8.0000","item_tax":"0.0000","tax_id":null,"purchase_requisition_line_id":null,"purchase_order_line_id":null,"quantity_sold":"0.0000","quantity_adjusted":"0.0000","quantity_returned":"0.0000","po_quantity_purchased":"0.0000","mfg_quantity_used":"0.0000","mfg_date":null,"exp_date":null,"lot_number":null,"sub_unit_id":null,"created_at":"2026-09-14T09:26:36.000000Z","updated_at":"2026-09-14T09:26:36.000000Z"}]} 
[2026-09-14 12:26:36] live.INFO: Processing purchase row - 0 {"row_index":0,"product_id":"359","variation_id":"364","quantity":"100","has_imei":true,"imei_raw":"[]","purchase_data_keys":["product_id","variation_id","quantity","product_unit_id","sub_unit_id","pp_without_discount","discount_percent","purchase_price","purchase_line_tax_id","item_tax","purchase_price_inc_tax","profit_percent","default_sell_price","mfg_date","exp_date","imei_numbers","imei_count"]} 
[2026-09-14 12:26:36] live.INFO: IMEI Data - Parsed for row 0 {"row_index":0,"imei_count":0,"imei_data":[],"imei_json":"[]"} 
[2026-09-14 12:26:36] live.INFO: IMEI data is empty or invalid for row 0 {"imeiData":[]} 
[2026-09-14 12:26:37] live.INFO: Purchase created successfully with IMEI data {"transaction_id":1859,"ref_no":"PO2026/0018","final_total":800.0} 
[2026-09-14 12:28:37] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:28:37] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 12:28:37] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 12:28:37] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 12:28:37] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 12:28:37] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:28:37] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 12:28:37] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 12:28:37] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152120854.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 12:29:50] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 12:30:01] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 12:30:33] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":false,"is_valid_mpesa_sale":false,"payment_method_input":"custom_pay_1","mpesa_transaction_id":null,"transaction_id":1860} 
[2026-09-14 12:31:09] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 12:31:18] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2025-12-31","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 12:31:18] live.INFO: Opening stock calculation - including all transactions {"date":"2025-12-31"} 
[2026-09-14 12:31:18] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2025-12-31')"} 
[2026-09-14 12:31:18] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2025-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2025-12-31'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:31:18] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"2932570.28400000","is_opening":true,"date":"2025-12-31"} 
[2026-09-14 12:31:18] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-12-31","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 12:31:18] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-12-31' (includes all types except purchase_order)"} 
[2026-09-14 12:31:18] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-12-31'","bindings":["purchase_order",43]} 
[2026-09-14 12:31:18] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-12-31"} 
[2026-09-14 12:31:19] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2025-12-31","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 12:31:19] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 12:31:19] live.INFO: Opening stock calculation - including all transactions {"date":"2025-12-31"} 
[2026-09-14 12:31:19] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2025-12-31')"} 
[2026-09-14 12:31:19] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2025-12-31') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2025-12-31'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:31:19] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"5040630.00000000","is_opening":true,"date":"2025-12-31"} 
[2026-09-14 12:31:19] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-12-31","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 12:31:19] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 12:31:19] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-12-31' (includes all types except purchase_order)"} 
[2026-09-14 12:31:19] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-12-31') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-12-31'","bindings":["purchase_order",43]} 
[2026-09-14 12:31:19] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7588682.50000000","is_opening":false,"date":"2026-12-31"} 
[2026-09-14 12:31:25] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 12:31:25] live.ERROR: str_contains(): Argument #1 ($haystack) must be of type string, Closure given {"userId":21,"exception":"[object] (TypeError(code: 0): str_contains(): Argument #1 ($haystack) must be of type string, Closure given at /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Support/Str.php:242)
[stacktrace]
#0 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Support/Str.php(242): str_contains(Object(Closure), '@')
#1 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Support/Str.php(693): Illuminate\\Support\\Str::contains(Object(Closure), Array)
#2 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Routing/Route.php(307): Illuminate\\Support\\Str::parseCallback(Object(Closure))
#3 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Routing/Route.php(287): Illuminate\\Routing\\Route->parseControllerCallback()
#4 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Routing/Route.php(272): Illuminate\\Routing\\Route->getControllerClass()
#5 /home/risetclo/r.riset.cloud/app/Http/Middleware/PreventDirectBrowserAccess.php(87): Illuminate\\Routing\\Route->getController()
#6 /home/risetclo/r.riset.cloud/app/Http/Middleware/PreventDirectBrowserAccess.php(29): App\\Http\\Middleware\\PreventDirectBrowserAccess->isDirectBrowserAccess(Object(Illuminate\\Http\\Request))
#7 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\PreventDirectBrowserAccess->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#8 /home/risetclo/r.riset.cloud/app/Http/Middleware/CheckStockTake.php(47): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#9 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\CheckStockTake->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#10 /home/risetclo/r.riset.cloud/app/Http/Middleware/CheckUserLogin.php(22): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#11 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\CheckUserLogin->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#12 /home/risetclo/r.riset.cloud/app/Http/Middleware/AdminSidebarMenu.php(1281): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#13 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\AdminSidebarMenu->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#14 /home/risetclo/r.riset.cloud/app/Http/Middleware/Timezone.php(30): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#15 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\Timezone->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#16 /home/risetclo/r.riset.cloud/app/Http/Middleware/Language.php(25): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#17 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\Language->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#18 /home/risetclo/r.riset.cloud/app/Http/Middleware/SetSessionData.php(52): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#19 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\SetSessionData->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#20 /home/risetclo/r.riset.cloud/app/Http/Middleware/IsInstalled.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#21 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\IsInstalled->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#22 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#23 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#24 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#25 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Auth\\Middleware\\Authenticate->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#26 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#27 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#28 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#29 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#30 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#31 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store), Object(Closure))
#32 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#33 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#34 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#35 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#36 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#37 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#38 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Routing/Router.php(797): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#39 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Routing/Router.php(776): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#40 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Routing/Router.php(740): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#41 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Routing/Router.php(729): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#42 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(190): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#43 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#44 /home/risetclo/r.riset.cloud/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#45 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#46 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#47 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#48 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#49 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#50 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#51 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#52 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#53 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#54 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#55 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#56 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#57 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Http\\Middleware\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#58 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#59 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Http\\Middleware\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#60 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#61 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#62 /home/risetclo/r.riset.cloud/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#63 /home/risetclo/r.riset.cloud/public/index.php(51): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#64 {main}
"} 
[2026-09-14 12:31:30] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 12:31:30] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 12:31:30] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 12:31:30] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:31:30] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163532.64000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 12:31:30] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 12:31:30] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 12:31:30] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 12:31:30] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 12:31:31] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 12:31:31] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 12:31:31] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 12:31:31] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 12:31:31] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:31:31] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7589182.50000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 12:31:31] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 12:31:31] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 12:31:31] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 12:31:31] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 12:31:31] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7588682.50000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 12:31:38] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:31:38] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 12:31:38] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 12:31:38] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 12:31:38] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 12:31:38] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:31:38] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 12:31:38] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 12:31:38] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 12:32:01] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-12","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 12:32:01] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-12"} 
[2026-09-14 12:32:01] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-12')"} 
[2026-09-14 12:32:01] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-12') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-12'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:32:01] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163532.64000000","is_opening":true,"date":"2026-09-12"} 
[2026-09-14 12:32:01] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 12:32:01] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-13' (includes all types except purchase_order)"} 
[2026-09-14 12:32:01] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-13'","bindings":["purchase_order",43]} 
[2026-09-14 12:32:01] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163532.64000000","is_opening":false,"date":"2026-09-13"} 
[2026-09-14 12:32:01] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-12","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 12:32:01] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 12:32:01] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-12"} 
[2026-09-14 12:32:01] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-12')"} 
[2026-09-14 12:32:01] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-12') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-12'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:32:01] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7589182.50000000","is_opening":true,"date":"2026-09-12"} 
[2026-09-14 12:32:01] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 12:32:01] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 12:32:01] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-13' (includes all types except purchase_order)"} 
[2026-09-14 12:32:01] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-13'","bindings":["purchase_order",43]} 
[2026-09-14 12:32:01] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7589182.50000000","is_opening":false,"date":"2026-09-13"} 
[2026-09-14 12:32:42] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 12:32:42] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 12:32:42] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 12:32:42] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:32:42] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163532.64000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 12:32:42] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 12:32:42] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 12:32:42] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 12:32:42] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 12:32:42] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 12:32:42] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 12:32:42] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 12:32:42] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 12:32:42] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:32:42] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7589182.50000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 12:32:42] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 12:32:42] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 12:32:42] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 12:32:42] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 12:32:42] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7588682.50000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 12:33:03] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 12:33:08] live.INFO: filterProduct method called {"business_id":8,"search_term":"pana","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:33:08] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:33:08] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:33:08] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 12:33:08] live.DEBUG: Applying search filters {"search_term":"pana","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 12:33:08] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 12:33:08] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:33:08] live.DEBUG: Added lot number fields to select  
[2026-09-14 12:33:08] live.INFO: filterProduct completed successfully {"result_count":3,"business_id":8,"search_term":"pana"} 
[2026-09-14 12:33:10] live.INFO: Product Row Debug - RELOADED {"product_id":15,"product_name":"Panandol Extra","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":10.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"9":{"unit_id":9,"unit_name":"Pcc","unit_price":66.0,"multiplier":1,"has_price":true},"258":{"unit_id":258,"unit_name":"kk","unit_price":300.0,"multiplier":"5.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 12:33:11] live.INFO: Fetching tax rate for product ID: 15  
[2026-09-14 12:33:11] live.INFO: Product ID 15 has no tax assigned.  
[2026-09-14 12:33:14] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 12:33:15] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-08-31","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 12:33:15] live.INFO: Opening stock calculation - including all transactions {"date":"2026-08-31"} 
[2026-09-14 12:33:15] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-08-31')"} 
[2026-09-14 12:33:15] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-08-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-08-31'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:33:15] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"6255077.61200000","is_opening":true,"date":"2026-08-31"} 
[2026-09-14 12:33:15] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-30","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 12:33:15] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-30' (includes all types except purchase_order)"} 
[2026-09-14 12:33:15] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-30') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-30'","bindings":["purchase_order",43]} 
[2026-09-14 12:33:15] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-09-30"} 
[2026-09-14 12:33:16] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-08-31","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 12:33:16] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 12:33:16] live.INFO: Opening stock calculation - including all transactions {"date":"2026-08-31"} 
[2026-09-14 12:33:16] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-08-31')"} 
[2026-09-14 12:33:16] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-08-31') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-08-31'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:33:16] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7347860.00000000","is_opening":true,"date":"2026-08-31"} 
[2026-09-14 12:33:16] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-30","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 12:33:16] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 12:33:16] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-30' (includes all types except purchase_order)"} 
[2026-09-14 12:33:16] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-30') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-30'","bindings":["purchase_order",43]} 
[2026-09-14 12:33:16] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7588682.50000000","is_opening":false,"date":"2026-09-30"} 
[2026-09-14 12:33:33] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:33:33] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 12:33:33] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 12:33:33] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 12:33:33] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 12:33:33] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:33:33] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 12:33:33] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 12:33:33] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 12:34:30] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:34:30] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 12:34:30] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 12:34:30] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:34:30] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163532.64000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 12:34:30] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:34:30] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 12:34:30] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 12:34:30] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 12:34:31] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-08-15","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:34:31] live.INFO: Opening stock calculation - including all transactions {"date":"2026-08-15"} 
[2026-09-14 12:34:31] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-08-15')"} 
[2026-09-14 12:34:31] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-08-15') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-08-15'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:34:31] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"6255077.61200000","is_opening":true,"date":"2026-08-15"} 
[2026-09-14 12:34:31] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:34:31] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 12:34:31] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 12:34:31] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 12:34:32] live.INFO: === About to call saveProductNewUnitRelationships === {"product_id":360,"request_units":[{"actual_name":"Pc","unit_id":"284","short_name":"pc","relation_unit_id":null,"relation_qty":"1","price":"200"},{"actual_name":"boxy","unit_id":"285","short_name":"bx","relation_unit_id":"284","relation_qty":"6","price":"1050"}],"page_batch_id":"20260914_123327_2714"} 
[2026-09-14 12:34:32] live.INFO: === saveProductNewUnitRelationships START === {"product_id":360,"product_name":"tewstt"} 
[2026-09-14 12:34:32] live.INFO: Units data received {"units_data":[{"actual_name":"Pc","unit_id":"284","short_name":"pc","relation_unit_id":null,"relation_qty":"1","price":"200"},{"actual_name":"boxy","unit_id":"285","short_name":"bx","relation_unit_id":"284","relation_qty":"6","price":"1050"}],"count":2} 
[2026-09-14 12:34:32] live.INFO: Processing unit index: 0 {"unit_data":{"actual_name":"Pc","unit_id":"284","short_name":"pc","relation_unit_id":null,"relation_qty":"1","price":"200"}} 
[2026-09-14 12:34:32] live.INFO: Unit found by ID {"unit_id":284,"actual_name":"Pc"} 
[2026-09-14 12:34:32] live.INFO: Unit lookup result {"found":"yes","unit_id":284,"method":"by_id"} 
[2026-09-14 12:34:32] live.INFO: Updating existing unit {"unit_id":284} 
[2026-09-14 12:34:32] live.INFO: Updated allow_decimal {"new_allow_decimal":1} 
[2026-09-14 12:34:32] live.INFO: Updated unit_price {"new_price":200.0} 
[2026-09-14 12:34:32] live.INFO: Unit updated successfully  
[2026-09-14 12:34:32] live.INFO: Setting as BASE unit {"unit_id":284} 
[2026-09-14 12:34:32] live.INFO: Base unit saved {"base_unit_id":284} 
[2026-09-14 12:34:32] live.INFO: Processing unit index: 1 {"unit_data":{"actual_name":"boxy","unit_id":"285","short_name":"bx","relation_unit_id":"284","relation_qty":"6","price":"1050"}} 
[2026-09-14 12:34:32] live.INFO: Unit found by ID {"unit_id":285,"actual_name":"boxy"} 
[2026-09-14 12:34:32] live.INFO: Unit lookup result {"found":"yes","unit_id":285,"method":"by_id"} 
[2026-09-14 12:34:32] live.INFO: Updating existing unit {"unit_id":285} 
[2026-09-14 12:34:32] live.INFO: Updated unit_price {"new_price":1050.0} 
[2026-09-14 12:34:32] live.INFO: Unit updated successfully  
[2026-09-14 12:34:32] live.INFO: First pass complete {"created_units_count":2,"base_unit_id":284} 
[2026-09-14 12:34:32] live.INFO: === SECOND PASS: Setting relations first ===  
[2026-09-14 12:34:32] live.INFO: Setting relation for unit {"unit_id":285,"unit_name":"boxy","relation_unit_id":284,"relation_unit_name":"Pc","relation_qty":6.0} 
[2026-09-14 12:34:32] live.INFO: Relation saved to database {"unit_id":285,"rel_unit_id":284,"rel_unit_qty":6.0,"base_unit_id":284} 
[2026-09-14 12:34:32] live.INFO: === SECOND PASS: Calculating cumulative multipliers ===  
[2026-09-14 12:34:32] live.INFO: Calculating cumulative multiplier for unit {"unit_id":285,"unit_name":"boxy"} 
[2026-09-14 12:34:32] live.INFO: === calculateCumulativeMultiplier START === {"unit_id":285,"business_id":8} 
[2026-09-14 12:34:32] live.INFO: Unit found {"unit_id":285,"unit_name":"boxy","rel_unit_id":284,"rel_unit_qty":"6.0000","base_unit_id":284} 
[2026-09-14 12:34:32] live.INFO: Starting cumulative multiplier {"initial_multiplier":6.0} 
[2026-09-14 12:34:32] live.INFO: Traversing up chain depth: 0 {"current_unit_id":284} 
[2026-09-14 12:34:32] live.INFO: Parent unit found {"parent_unit_id":284,"parent_unit_name":"Pc","parent_rel_unit_id":null,"parent_rel_unit_qty":"1.0000"} 
[2026-09-14 12:34:32] live.INFO: Reached base unit (no rel_unit_id), stopping  
[2026-09-14 12:34:32] live.INFO: Chain traversal complete {"chain":"boxy (285) -> Pc (284)","final_cumulative_multiplier":6.0,"depth_traversed":0} 
[2026-09-14 12:34:32] live.INFO: === calculateCumulativeMultiplier END === {"result":6.0} 
[2026-09-14 12:34:32] live.INFO: Cumulative multiplier calculated {"unit_id":285,"unit_name":"boxy","cumulative_multiplier":6.0} 
[2026-09-14 12:34:32] live.INFO: Unit saved with cumulative multiplier {"unit_id":285,"unit_name":"boxy","base_unit_multiplier":6.0} 
[2026-09-14 12:34:32] live.INFO: === saveProductNewUnitRelationships END ===  
[2026-09-14 12:34:32] live.INFO: OpeningStockController::add - Location Data {"product_id":"360","business_id":8,"locations":{"Illuminate\\Support\\Collection":{"9":"BQT GENERAL BUSINESS (BL0001)","10":"BQT BRANCH 1 (BL0002)","12":"BQT BRANCH 2 (BL0003)","14":"BQT BRANCH 3 (BL0004)"}},"available_locations":[9]} 
[2026-09-14 12:34:32] live.INFO: OpeningStockController::add - Serial Numbers Check {"product_id":"360","business_id":8,"has_serial_numbers":{"9":false},"total_locations_with_serial":0} 
[2026-09-14 12:34:33] live.INFO: Digitax upload skipped: No tax number provided {"contact_id":877,"contact_name":"","contact_type":"supplier"} 
[2026-09-14 12:34:36] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-08-15","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:34:36] live.INFO: Opening stock calculation - including all transactions {"date":"2026-08-15"} 
[2026-09-14 12:34:36] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-08-15')"} 
[2026-09-14 12:34:36] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-08-15') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-08-15'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:34:36] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"6255077.61200000","is_opening":true,"date":"2026-08-15"} 
[2026-09-14 12:34:36] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:34:36] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 12:34:36] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 12:34:36] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 12:35:13] live.INFO: Digitax upload skipped: No tax number provided {"contact_id":878,"contact_name":"Susan","contact_type":"customer"} 
[2026-09-14 12:35:18] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:35:18] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 12:35:18] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 12:35:18] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 12:35:18] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163532.64000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 12:35:18] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 12:35:18] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 12:35:18] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 12:35:18] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 12:35:29] live.INFO: Digitax operation skipped: No tax number {"contact_id":878} 
[2026-09-14 12:38:23] live.INFO: === saveProductUnitRelationships START === {"product_id":360,"product_name":"tewstt"} 
[2026-09-14 12:38:23] live.INFO: Units data received {"units_data":[{"actual_name":"284","unit_id":"284","short_name":"pc","allow_decimal":"1","relation_unit_id":null,"relation_qty":"1","price":"300"},{"actual_name":"285","unit_id":"285","short_name":"bx","allow_decimal":"1","relation_unit_id":"284","relation_qty":"6.0000","price":"1050.0000"}],"count":2} 
[2026-09-14 12:38:23] live.INFO: Processing unit index: 0 {"unit_data":{"actual_name":"284","unit_id":"284","short_name":"pc","allow_decimal":"1","relation_unit_id":null,"relation_qty":"1","price":"300"}} 
[2026-09-14 12:38:23] live.INFO: Unit found by ID {"unit_id":284,"actual_name":"Pc"} 
[2026-09-14 12:38:23] live.INFO: Updated unit_price {"new_price":300.0} 
[2026-09-14 12:38:23] live.WARNING: Skipping actual_name update - value looks like an ID {"actual_name":"284","unit_id":284} 
[2026-09-14 12:38:23] live.INFO: Setting as BASE unit {"unit_id":284} 
[2026-09-14 12:38:23] live.INFO: Unit saved {"unit_id":284,"unit_name":"Pc","is_base":true} 
[2026-09-14 12:38:23] live.INFO: Processing unit index: 1 {"unit_data":{"actual_name":"285","unit_id":"285","short_name":"bx","allow_decimal":"1","relation_unit_id":"284","relation_qty":"6.0000","price":"1050.0000"}} 
[2026-09-14 12:38:23] live.INFO: Unit found by ID {"unit_id":285,"actual_name":"boxy"} 
[2026-09-14 12:38:23] live.WARNING: Skipping actual_name update - value looks like an ID {"actual_name":"285","unit_id":285} 
[2026-09-14 12:38:23] live.INFO: Unit saved {"unit_id":285,"unit_name":"boxy","is_base":false} 
[2026-09-14 12:38:23] live.INFO: First pass complete {"created_units_count":2,"unit_ids_to_keep":[284,285],"base_unit_id":284} 
[2026-09-14 12:38:23] live.INFO: === SECOND PASS: Setting relations first ===  
[2026-09-14 12:38:23] live.INFO: Setting relation for unit {"unit_id":285,"unit_name":"boxy","relation_unit_id":284,"relation_unit_name":"Pc","relation_qty":6.0} 
[2026-09-14 12:38:23] live.INFO: Relation saved to database {"unit_id":285,"rel_unit_id":284,"rel_unit_qty":6.0,"base_unit_id":284} 
[2026-09-14 12:38:23] live.INFO: === SECOND PASS: Calculating cumulative multipliers ===  
[2026-09-14 12:38:23] live.INFO: Calculating cumulative multiplier for unit {"unit_id":285,"unit_name":"boxy"} 
[2026-09-14 12:38:23] live.INFO: === calculateCumulativeMultiplier START === {"unit_id":285,"business_id":8} 
[2026-09-14 12:38:23] live.INFO: Unit found {"unit_id":285,"unit_name":"boxy","rel_unit_id":284,"rel_unit_qty":"6.0000","base_unit_id":284} 
[2026-09-14 12:38:23] live.INFO: Starting cumulative multiplier {"initial_multiplier":6.0} 
[2026-09-14 12:38:23] live.INFO: Traversing up chain depth: 0 {"current_unit_id":284} 
[2026-09-14 12:38:23] live.INFO: Parent unit found {"parent_unit_id":284,"parent_unit_name":"Pc","parent_rel_unit_id":null,"parent_rel_unit_qty":"1.0000"} 
[2026-09-14 12:38:23] live.INFO: Reached base unit (no rel_unit_id), stopping  
[2026-09-14 12:38:23] live.INFO: Chain traversal complete {"chain":"boxy (285) -> Pc (284)","final_cumulative_multiplier":6.0,"depth_traversed":0} 
[2026-09-14 12:38:23] live.INFO: === calculateCumulativeMultiplier END === {"result":6.0} 
[2026-09-14 12:38:23] live.INFO: Cumulative multiplier calculated {"unit_id":285,"unit_name":"boxy","cumulative_multiplier":6.0} 
[2026-09-14 12:38:23] live.INFO: Unit saved with cumulative multiplier {"unit_id":285,"unit_name":"boxy","base_unit_multiplier":6.0} 
[2026-09-14 12:38:23] live.INFO: === Cleaning up unused units === {"unit_ids_to_keep":[284,285],"base_unit_id":284,"page_batch_id":"20260914_123327_2714"} 
[2026-09-14 12:38:23] live.INFO: Units to delete {"count":0,"unit_ids":[]} 
[2026-09-14 12:38:23] live.INFO: === saveProductUnitRelationships END ===  
[2026-09-14 12:38:44] live.INFO: filterProduct method called {"business_id":8,"search_term":"tw","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:38:44] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:38:44] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:38:44] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 12:38:44] live.DEBUG: Applying search filters {"search_term":"tw","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 12:38:44] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 12:38:44] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:38:44] live.DEBUG: Added lot number fields to select  
[2026-09-14 12:38:44] live.INFO: filterProduct completed successfully {"result_count":0,"business_id":8,"search_term":"tw"} 
[2026-09-14 12:38:47] live.INFO: filterProduct method called {"business_id":8,"search_term":"tew","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:38:47] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:38:47] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:38:47] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 12:38:47] live.DEBUG: Applying search filters {"search_term":"tew","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 12:38:47] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 12:38:47] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:38:47] live.DEBUG: Added lot number fields to select  
[2026-09-14 12:38:47] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"tew"} 
[2026-09-14 12:38:49] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 12:38:53] live.INFO: filterProduct method called {"business_id":8,"search_term":"tew","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:38:53] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:38:53] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:38:53] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 12:38:53] live.DEBUG: Applying search filters {"search_term":"tew","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 12:38:53] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 12:38:53] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:38:53] live.DEBUG: Added lot number fields to select  
[2026-09-14 12:38:53] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"tew"} 
[2026-09-14 12:39:11] live.INFO: filterProduct method called {"business_id":8,"search_term":"test","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:39:11] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:39:11] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:39:11] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 12:39:11] live.DEBUG: Applying search filters {"search_term":"test","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 12:39:11] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 12:39:11] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:39:11] live.DEBUG: Added lot number fields to select  
[2026-09-14 12:39:11] live.INFO: filterProduct completed successfully {"result_count":3,"business_id":8,"search_term":"test"} 
[2026-09-14 12:39:11] live.INFO: === About to call saveProductNewUnitRelationships === {"product_id":361,"request_units":[{"actual_name":"Pc","unit_id":"286","short_name":"Pc","relation_unit_id":null,"relation_qty":"1","price":"30"},{"actual_name":"Pkt","unit_id":"287","short_name":"pkt","relation_unit_id":"286","relation_qty":"75","price":"345"}],"page_batch_id":"20260914_123553_4855"} 
[2026-09-14 12:39:11] live.INFO: === saveProductNewUnitRelationships START === {"product_id":361,"product_name":"Amoxicillin 500mg"} 
[2026-09-14 12:39:11] live.INFO: Units data received {"units_data":[{"actual_name":"Pc","unit_id":"286","short_name":"Pc","relation_unit_id":null,"relation_qty":"1","price":"30"},{"actual_name":"Pkt","unit_id":"287","short_name":"pkt","relation_unit_id":"286","relation_qty":"75","price":"345"}],"count":2} 
[2026-09-14 12:39:11] live.INFO: Processing unit index: 0 {"unit_data":{"actual_name":"Pc","unit_id":"286","short_name":"Pc","relation_unit_id":null,"relation_qty":"1","price":"30"}} 
[2026-09-14 12:39:11] live.INFO: Unit found by ID {"unit_id":286,"actual_name":"Pc"} 
[2026-09-14 12:39:11] live.INFO: Unit lookup result {"found":"yes","unit_id":286,"method":"by_id"} 
[2026-09-14 12:39:11] live.INFO: Updating existing unit {"unit_id":286} 
[2026-09-14 12:39:11] live.INFO: Updated unit_price {"new_price":30.0} 
[2026-09-14 12:39:11] live.INFO: Unit updated successfully  
[2026-09-14 12:39:11] live.INFO: Setting as BASE unit {"unit_id":286} 
[2026-09-14 12:39:11] live.INFO: Base unit saved {"base_unit_id":286} 
[2026-09-14 12:39:11] live.INFO: Processing unit index: 1 {"unit_data":{"actual_name":"Pkt","unit_id":"287","short_name":"pkt","relation_unit_id":"286","relation_qty":"75","price":"345"}} 
[2026-09-14 12:39:11] live.INFO: Unit found by ID {"unit_id":287,"actual_name":"Pkt"} 
[2026-09-14 12:39:11] live.INFO: Unit lookup result {"found":"yes","unit_id":287,"method":"by_id"} 
[2026-09-14 12:39:11] live.INFO: Updating existing unit {"unit_id":287} 
[2026-09-14 12:39:11] live.INFO: Updated unit_price {"new_price":345.0} 
[2026-09-14 12:39:11] live.INFO: Unit updated successfully  
[2026-09-14 12:39:11] live.INFO: First pass complete {"created_units_count":2,"base_unit_id":286} 
[2026-09-14 12:39:11] live.INFO: === SECOND PASS: Setting relations first ===  
[2026-09-14 12:39:11] live.INFO: Setting relation for unit {"unit_id":287,"unit_name":"Pkt","relation_unit_id":286,"relation_unit_name":"Pc","relation_qty":75.0} 
[2026-09-14 12:39:11] live.INFO: Relation saved to database {"unit_id":287,"rel_unit_id":286,"rel_unit_qty":75.0,"base_unit_id":286} 
[2026-09-14 12:39:11] live.INFO: === SECOND PASS: Calculating cumulative multipliers ===  
[2026-09-14 12:39:11] live.INFO: Calculating cumulative multiplier for unit {"unit_id":287,"unit_name":"Pkt"} 
[2026-09-14 12:39:11] live.INFO: === calculateCumulativeMultiplier START === {"unit_id":287,"business_id":8} 
[2026-09-14 12:39:11] live.INFO: Unit found {"unit_id":287,"unit_name":"Pkt","rel_unit_id":286,"rel_unit_qty":"75.0000","base_unit_id":286} 
[2026-09-14 12:39:11] live.INFO: Starting cumulative multiplier {"initial_multiplier":75.0} 
[2026-09-14 12:39:11] live.INFO: Traversing up chain depth: 0 {"current_unit_id":286} 
[2026-09-14 12:39:11] live.INFO: Parent unit found {"parent_unit_id":286,"parent_unit_name":"Pc","parent_rel_unit_id":null,"parent_rel_unit_qty":"1.0000"} 
[2026-09-14 12:39:11] live.INFO: Reached base unit (no rel_unit_id), stopping  
[2026-09-14 12:39:11] live.INFO: Chain traversal complete {"chain":"Pkt (287) -> Pc (286)","final_cumulative_multiplier":75.0,"depth_traversed":0} 
[2026-09-14 12:39:11] live.INFO: === calculateCumulativeMultiplier END === {"result":75.0} 
[2026-09-14 12:39:11] live.INFO: Cumulative multiplier calculated {"unit_id":287,"unit_name":"Pkt","cumulative_multiplier":75.0} 
[2026-09-14 12:39:11] live.INFO: Unit saved with cumulative multiplier {"unit_id":287,"unit_name":"Pkt","base_unit_multiplier":75.0} 
[2026-09-14 12:39:11] live.INFO: === saveProductNewUnitRelationships END ===  
[2026-09-14 12:39:12] live.INFO: OpeningStockController::add - Location Data {"product_id":"361","business_id":8,"locations":{"Illuminate\\Support\\Collection":{"9":"BQT GENERAL BUSINESS (BL0001)","10":"BQT BRANCH 1 (BL0002)","12":"BQT BRANCH 2 (BL0003)","14":"BQT BRANCH 3 (BL0004)"}},"available_locations":[9]} 
[2026-09-14 12:39:12] live.INFO: OpeningStockController::add - Serial Numbers Check {"product_id":"361","business_id":8,"has_serial_numbers":{"9":false},"total_locations_with_serial":0} 
[2026-09-14 12:39:15] live.INFO: filterProduct method called {"business_id":8,"search_term":"tew","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:39:15] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:39:15] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:39:15] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 12:39:15] live.DEBUG: Applying search filters {"search_term":"tew","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 12:39:15] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 12:39:15] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:39:15] live.DEBUG: Added lot number fields to select  
[2026-09-14 12:39:15] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"tew"} 
[2026-09-14 12:39:17] live.INFO: Product Row Debug - RELOADED {"product_id":360,"product_name":"tewstt","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":300.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"284":{"unit_id":284,"unit_name":"Pc","unit_price":300.0,"multiplier":1,"has_price":true},"285":{"unit_id":285,"unit_name":"boxy","unit_price":1050.0,"multiplier":"6.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 12:39:18] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 12:39:20] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:20] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:21] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:21] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:21] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:21] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:24] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:24] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:26] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:26] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:26] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:26] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:27] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:27] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:30] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:30] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:32] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:32] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:33] live.INFO: Credit Limit Check Started {"contact_id":"94","status":"draft","final_total":"4200.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 12:39:33] live.INFO: Credit Limit Check Skipped - Draft or Sales Order {"status":"draft","type":"not_set"} 
[2026-09-14 12:39:33] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 12:39:33] live.INFO: is_mpesa_sale value: true  
[2026-09-14 12:39:33] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1861  
[2026-09-14 12:39:33] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:33] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:33] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:33] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:34] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:34] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:34] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:34] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:35] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:35] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:35] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:35] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:36] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:36] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:36] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:36] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:37] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:37] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:39:37] live.INFO: Fetching tax rate for product ID: 360  
[2026-09-14 12:39:37] live.INFO: Tax rate for product ID 360 is: 16%  
[2026-09-14 12:40:00] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 12:40:49] live.INFO: === About to call saveProductNewUnitRelationships === {"product_id":362,"request_units":[{"actual_name":"df","unit_id":"288","short_name":"df","relation_unit_id":null,"relation_qty":"1","price":"120"},{"actual_name":"dr","unit_id":"289","short_name":"dr","relation_unit_id":"288","relation_qty":"10","price":"1100"}],"page_batch_id":"20260914_123956_7875"} 
[2026-09-14 12:40:49] live.INFO: === saveProductNewUnitRelationships START === {"product_id":362,"product_name":"df"} 
[2026-09-14 12:40:49] live.INFO: Units data received {"units_data":[{"actual_name":"df","unit_id":"288","short_name":"df","relation_unit_id":null,"relation_qty":"1","price":"120"},{"actual_name":"dr","unit_id":"289","short_name":"dr","relation_unit_id":"288","relation_qty":"10","price":"1100"}],"count":2} 
[2026-09-14 12:40:49] live.INFO: Processing unit index: 0 {"unit_data":{"actual_name":"df","unit_id":"288","short_name":"df","relation_unit_id":null,"relation_qty":"1","price":"120"}} 
[2026-09-14 12:40:49] live.INFO: Unit found by ID {"unit_id":288,"actual_name":"df"} 
[2026-09-14 12:40:49] live.INFO: Unit lookup result {"found":"yes","unit_id":288,"method":"by_id"} 
[2026-09-14 12:40:49] live.INFO: Updating existing unit {"unit_id":288} 
[2026-09-14 12:40:49] live.INFO: Updated allow_decimal {"new_allow_decimal":1} 
[2026-09-14 12:40:49] live.INFO: Updated unit_price {"new_price":120.0} 
[2026-09-14 12:40:49] live.INFO: Unit updated successfully  
[2026-09-14 12:40:49] live.INFO: Setting as BASE unit {"unit_id":288} 
[2026-09-14 12:40:49] live.INFO: Base unit saved {"base_unit_id":288} 
[2026-09-14 12:40:49] live.INFO: Processing unit index: 1 {"unit_data":{"actual_name":"dr","unit_id":"289","short_name":"dr","relation_unit_id":"288","relation_qty":"10","price":"1100"}} 
[2026-09-14 12:40:49] live.INFO: Unit found by ID {"unit_id":289,"actual_name":"dr"} 
[2026-09-14 12:40:49] live.INFO: Unit lookup result {"found":"yes","unit_id":289,"method":"by_id"} 
[2026-09-14 12:40:49] live.INFO: Updating existing unit {"unit_id":289} 
[2026-09-14 12:40:49] live.INFO: Updated unit_price {"new_price":1100.0} 
[2026-09-14 12:40:49] live.INFO: Unit updated successfully  
[2026-09-14 12:40:49] live.INFO: First pass complete {"created_units_count":2,"base_unit_id":288} 
[2026-09-14 12:40:49] live.INFO: === SECOND PASS: Setting relations first ===  
[2026-09-14 12:40:49] live.INFO: Setting relation for unit {"unit_id":289,"unit_name":"dr","relation_unit_id":288,"relation_unit_name":"df","relation_qty":10.0} 
[2026-09-14 12:40:49] live.INFO: Relation saved to database {"unit_id":289,"rel_unit_id":288,"rel_unit_qty":10.0,"base_unit_id":288} 
[2026-09-14 12:40:49] live.INFO: === SECOND PASS: Calculating cumulative multipliers ===  
[2026-09-14 12:40:49] live.INFO: Calculating cumulative multiplier for unit {"unit_id":289,"unit_name":"dr"} 
[2026-09-14 12:40:49] live.INFO: === calculateCumulativeMultiplier START === {"unit_id":289,"business_id":8} 
[2026-09-14 12:40:49] live.INFO: Unit found {"unit_id":289,"unit_name":"dr","rel_unit_id":288,"rel_unit_qty":"10.0000","base_unit_id":288} 
[2026-09-14 12:40:49] live.INFO: Starting cumulative multiplier {"initial_multiplier":10.0} 
[2026-09-14 12:40:49] live.INFO: Traversing up chain depth: 0 {"current_unit_id":288} 
[2026-09-14 12:40:49] live.INFO: Parent unit found {"parent_unit_id":288,"parent_unit_name":"df","parent_rel_unit_id":null,"parent_rel_unit_qty":"1.0000"} 
[2026-09-14 12:40:49] live.INFO: Reached base unit (no rel_unit_id), stopping  
[2026-09-14 12:40:49] live.INFO: Chain traversal complete {"chain":"dr (289) -> df (288)","final_cumulative_multiplier":10.0,"depth_traversed":0} 
[2026-09-14 12:40:49] live.INFO: === calculateCumulativeMultiplier END === {"result":10.0} 
[2026-09-14 12:40:49] live.INFO: Cumulative multiplier calculated {"unit_id":289,"unit_name":"dr","cumulative_multiplier":10.0} 
[2026-09-14 12:40:49] live.INFO: Unit saved with cumulative multiplier {"unit_id":289,"unit_name":"dr","base_unit_multiplier":10.0} 
[2026-09-14 12:40:49] live.INFO: === saveProductNewUnitRelationships END ===  
[2026-09-14 12:40:50] live.INFO: OpeningStockController::add - Location Data {"product_id":"362","business_id":8,"locations":{"Illuminate\\Support\\Collection":{"9":"BQT GENERAL BUSINESS (BL0001)","10":"BQT BRANCH 1 (BL0002)","12":"BQT BRANCH 2 (BL0003)","14":"BQT BRANCH 3 (BL0004)"}},"available_locations":[9]} 
[2026-09-14 12:40:50] live.INFO: OpeningStockController::add - Serial Numbers Check {"product_id":"362","business_id":8,"has_serial_numbers":{"9":false},"total_locations_with_serial":0} 
[2026-09-14 12:41:09] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 12:41:46] live.INFO: Purchases array from request {"purchases":[{"product_id":"361","variation_id":"366","quantity":"30","product_unit_id":"286","sub_unit_id":"287","pp_without_discount":"1,050.00","discount_percent":"0.00","purchase_price":"1,050.00","purchase_line_tax_id":null,"item_tax":"0.00","purchase_price_inc_tax":"1,050.00","profit_percent":"114.29","default_sell_price":"2,250.00","lot_number":"Btch098","mfg_date":null,"exp_date":"03/27/2027","imei_numbers":"[]","imei_count":"0"}],"purchases_json":"[{\"product_id\":\"361\",\"variation_id\":\"366\",\"quantity\":\"30\",\"product_unit_id\":\"286\",\"sub_unit_id\":\"287\",\"pp_without_discount\":\"1,050.00\",\"discount_percent\":\"0.00\",\"purchase_price\":\"1,050.00\",\"purchase_line_tax_id\":null,\"item_tax\":\"0.00\",\"purchase_price_inc_tax\":\"1,050.00\",\"profit_percent\":\"114.29\",\"default_sell_price\":\"2,250.00\",\"lot_number\":\"Btch098\",\"mfg_date\":null,\"exp_date\":\"03\\/27\\/2027\",\"imei_numbers\":\"[]\",\"imei_count\":\"0\"}]"} 
[2026-09-14 12:41:46] live.WARNING: Digitax stock update skipped: Missing item_id for product_id 361  
[2026-09-14 12:41:46] live.INFO: Purchase lines created {"transaction_id":1862,"purchase_lines_count":1,"purchase_lines":[{"id":1598,"transaction_id":1862,"product_id":361,"variation_id":366,"quantity":2250.0,"secondary_unit_quantity":"0.0000","pp_without_discount":"14.0000","discount_percent":"0.00","purchase_price":"14.0000","purchase_price_inc_tax":"14.0000","item_tax":"0.0000","tax_id":null,"purchase_requisition_line_id":null,"purchase_order_line_id":null,"quantity_sold":"0.0000","quantity_adjusted":"0.0000","quantity_returned":"0.0000","po_quantity_purchased":"0.0000","mfg_quantity_used":"0.0000","mfg_date":null,"exp_date":"2027-03-27","lot_number":"Btch098","sub_unit_id":287,"created_at":"2026-09-14T09:41:46.000000Z","updated_at":"2026-09-14T09:41:46.000000Z"}]} 
[2026-09-14 12:41:46] live.INFO: Processing purchase row - 0 {"row_index":0,"product_id":"361","variation_id":"366","quantity":"30","has_imei":true,"imei_raw":"[]","purchase_data_keys":["product_id","variation_id","quantity","product_unit_id","sub_unit_id","pp_without_discount","discount_percent","purchase_price","purchase_line_tax_id","item_tax","purchase_price_inc_tax","profit_percent","default_sell_price","lot_number","mfg_date","exp_date","imei_numbers","imei_count"]} 
[2026-09-14 12:41:46] live.INFO: IMEI Data - Parsed for row 0 {"row_index":0,"imei_count":0,"imei_data":[],"imei_json":"[]"} 
[2026-09-14 12:41:46] live.INFO: IMEI data is empty or invalid for row 0 {"imeiData":[]} 
[2026-09-14 12:41:46] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":false,"is_valid_mpesa_sale":false,"payment_method_input":"bank_transfer","mpesa_transaction_id":null,"transaction_id":1862} 
[2026-09-14 12:41:47] live.INFO: Purchase created successfully with IMEI data {"transaction_id":1862,"ref_no":"PO2026/0193","final_total":31500.0} 
[2026-09-14 12:42:15] live.INFO: === STOCK UNITS REPORT - View Load ===  
[2026-09-14 12:42:15] live.INFO: Business ID: 8  
[2026-09-14 12:42:15] live.INFO: Default page entries: 100  
[2026-09-14 12:42:15] live.INFO: Business Locations count: 4  
[2026-09-14 12:42:15] live.INFO: Categories count: 29  
[2026-09-14 12:42:16] live.INFO: === STOCK UNITS REPORT - AJAX Request ===  
[2026-09-14 12:42:16] live.INFO: Parameters - Business ID: 8, Location ID: ALL, Category ID: ALL  
[2026-09-14 12:42:16] live.INFO: Products found: 90  
[2026-09-14 12:42:17] live.INFO: Location data processed  
[2026-09-14 12:42:17] live.INFO: Stock data processed  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 362, Stock: 0, Price: 120.0000, Value: 0  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 0, Base: df, Target: dr  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 0  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: dr, Stock in unit: 0, Unit Price: 1100.0000, Calculated Value: 0  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 361, Stock: 2250.0000, Price: 30.0000, Value: 67500  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 2250.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 75.0000, Result: 30  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 30, Unit Price: 345.0000, Calculated Value: 10350  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 360, Stock: 0, Price: 300.0000, Value: 0  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 0, Base: pc, Target: bx  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 6.0000, Result: 0  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: bx, Stock in unit: 0, Unit Price: 1050.0000, Calculated Value: 0  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 347, Stock: 40.0000, Price: 150.0000, Value: 6000  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 40.0000, Base: t1, Target: t2  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 3.3333333333333  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: t2, Stock in unit: 3.3333333333333, Unit Price: 1350.0000, Calculated Value: 4500  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 341, Stock: 888.0000, Price: 44.0000, Value: 39072  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 888.0000, Base: dsfg, Target: fdd  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 4.0000, Result: 222  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: fdd, Stock in unit: 222, Unit Price: 333.0000, Calculated Value: 73926  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 340, Stock: 100.0000, Price: 10.0000, Value: 1000  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 100.0000, Base: pcs, Target: kg  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 100.0000, Result: 1  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: kg, Stock in unit: 1, Unit Price: 250.0000, Calculated Value: 250  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 339, Stock: 45586.0000, Price: 10.0000, Value: 455860  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:17] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:17] live.WARNING: No conversion found, returning original: 45586.0000  
[2026-09-14 12:42:17] live.INFO: No unit price for: pkt, using base stock value: 455860  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 56.0000, Result: 814.03571428571  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 814.03571428571, Unit Price: 265.0000, Calculated Value: 215719.46428571  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 338, Stock: 109.0000, Price: 740.0000, Value: 80660  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 334, Stock: 113.0000, Price: 200.0000, Value: 22600  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 333, Stock: 30.0000, Price: 200.0000, Value: 6000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 332, Stock: 101.0000, Price: 200.0000, Value: 20200  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 331, Stock: 183.0000, Price: 2000.0000, Value: 366000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 330, Stock: 80.0000, Price: 130.0000, Value: 10400  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 160  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: grms, Stock in unit: 160, Unit Price: 65.0000, Calculated Value: 10400  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 320  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: grms, Stock in unit: 320, Unit Price: 35.0000, Calculated Value: 11200  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 329, Stock: 77.0000, Price: 30.0000, Value: 2310  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: g  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 154  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: g, Stock in unit: 154, Unit Price: 15.0000, Calculated Value: 2310  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: 5g  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 308  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: 5g, Stock in unit: 308, Unit Price: 20.0000, Calculated Value: 6160  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 328, Stock: 83.0000, Price: 25.0000, Value: 2075  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 83.0000, Base: pc, Target: bali  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 6.9166666666667  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: bali, Stock in unit: 6.9166666666667, Unit Price: 2400.0000, Calculated Value: 16600  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 327, Stock: 4250.0000, Price: 120.0000, Value: 510000  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:17] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:17] live.WARNING: No conversion found, returning original: 4250.0000  
[2026-09-14 12:42:17] live.INFO: No unit price for: gm, using base stock value: 510000  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: bg  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 50.0000, Result: 85  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: bg, Stock in unit: 85, Unit Price: 25000.0000, Calculated Value: 2125000  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 1.0000, Result: 4250  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: gm, Stock in unit: 4250, Unit Price: 60.0000, Calculated Value: 255000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 326, Stock: 500.0000, Price: 230.0000, Value: 115000  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 500.0000, Base: pkt, Target: bl  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 41.666666666667  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: bl, Stock in unit: 41.666666666667, Unit Price: 2200.0000, Calculated Value: 91666.666666667  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 325, Stock: 950.0000, Price: 10.0000, Value: 9500  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Bx  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 72.0000, Result: 13.194444444444  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: Bx, Stock in unit: 13.194444444444, Unit Price: 540.0000, Calculated Value: 7125  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Pkt  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 79.166666666667  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 79.166666666667, Unit Price: 125.0000, Calculated Value: 9895.8333333333  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 324, Stock: 153.0000, Price: 50.0000, Value: 7650  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A2  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 2.0000, Result: 76.5  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: A2, Stock in unit: 76.5, Unit Price: 95.0000, Calculated Value: 7267.5  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A3  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 20.0000, Result: 7.65  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: A3, Stock in unit: 7.65, Unit Price: 900.0000, Calculated Value: 6885  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 323, Stock: 45.0000, Price: 4000.0000, Value: 180000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 322, Stock: 0, Price: 116.0000, Value: 0  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 0, Base: ssari, Target: rrasi  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: rrasi, Stock in unit: 0, Unit Price: 2000.0000, Calculated Value: 0  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 321, Stock: 9999.0000, Price: 12.0000, Value: 119988  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS2  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 1999.8  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: SS2, Stock in unit: 1999.8, Unit Price: 60.0000, Calculated Value: 119988  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS3  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 40.0000, Result: 249.975  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: SS3, Stock in unit: 249.975, Unit Price: 450.0000, Calculated Value: 112488.75  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: ss41  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 400.0000, Result: 24.9975  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: ss41, Stock in unit: 24.9975, Unit Price: 1000.0000, Calculated Value: 24997.5  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 319, Stock: 989.5000, Price: 22.0000, Value: 21769  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: AD  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 968.0000, Result: 1.0222107438017  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: AD, Stock in unit: 1.0222107438017, Unit Price: 2340.0000, Calculated Value: 2391.9731404959  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: WET  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 22.0000, Result: 44.977272727273  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: WET, Stock in unit: 44.977272727273, Unit Price: 334.0000, Calculated Value: 15022.409090909  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: wss  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 1979  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: wss, Stock in unit: 1979, Unit Price: 15.0000, Calculated Value: 29685  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 315, Stock: 457.0000, Price: 5.0000, Value: 2285  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MPckt  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 45.7  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: MPckt, Stock in unit: 45.7, Unit Price: 48.0000, Calculated Value: 2193.6  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MBx  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 120.0000, Result: 3.8083333333333  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: MBx, Stock in unit: 3.8083333333333, Unit Price: 580.0000, Calculated Value: 2208.8333333333  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 314, Stock: 997.0000, Price: 20.0000, Value: 19940  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Packet  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 83.083333333333  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: Packet, Stock in unit: 83.083333333333, Unit Price: 110.0000, Calculated Value: 9139.1666666667  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Carton  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 96.0000, Result: 10.385416666667  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: Carton, Stock in unit: 10.385416666667, Unit Price: 700.0000, Calculated Value: 7269.7916666667  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: hero  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 576.0000, Result: 1.7309027777778  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: hero, Stock in unit: 1.7309027777778, Unit Price: 524.0000, Calculated Value: 906.99305555556  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 313, Stock: 0, Price: 77.0000, Value: 0  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: Pkt  
[2026-09-14 12:42:17] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:17] live.INFO: Level 0 - Unit: Pkt, Multiplier: 12.0000, Factor: 12  
[2026-09-14 12:42:17] live.INFO: Fallback conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 0, Unit Price: 125.0000, Calculated Value: 0  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: swn  
[2026-09-14 12:42:17] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:17] live.WARNING: No conversion found, returning original: 0  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: swn, Stock in unit: 0, Unit Price: 430.0000, Calculated Value: 0  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 312, Stock: 109.0000, Price: 15.0000, Value: 1635  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 109.0000, Base: Pc-1x, Target: Ctn -28  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 112.0000, Result: 0.97321428571429  
[2026-09-14 12:42:17] live.INFO: No unit price for: Ctn -28, using base stock value: 1635  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 308, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 306, Stock: 6.0000, Price: 4000.0000, Value: 24000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 302, Stock: 378.0000, Price: 4000.0000, Value: 1512000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 296, Stock: 0, Price: 50.0000, Value: 0  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 295, Stock: 10.0000, Price: 100.0000, Value: 1000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 294, Stock: 8.0000, Price: 1.0000, Value: 8  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 293, Stock: 90.0000, Price: 4000.0000, Value: 360000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 292, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 290, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 289, Stock: 98.1000, Price: 60.0000, Value: 5886  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 288, Stock: 92.7000, Price: 50.0000, Value: 4635  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 287, Stock: 97.5000, Price: 40.0000, Value: 3900  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 286, Stock: 100.0000, Price: 70.0000, Value: 7000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 285, Stock: 0.5000, Price: 50.0000, Value: 25  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 284, Stock: 29.0000, Price: 4000.0000, Value: 116000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 283, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 272, Stock: 104.0000, Price: 4000.0000, Value: 416000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 268, Stock: 119.0000, Price: 4000.0000, Value: 476000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 267, Stock: 109.0000, Price: 4000.0000, Value: 436000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 262, Stock: 313.0000, Price: 66.0000, Value: 20658  
[2026-09-14 12:42:17] live.INFO: convertStockToUnit - Stock: 313.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:17] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 62.6  
[2026-09-14 12:42:17] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 62.6, Unit Price: 300.0000, Calculated Value: 18780  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 258, Stock: 244.0000, Price: 11000.0000, Value: 2684000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 224, Stock: 96.0000, Price: 4000.0000, Value: 384000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 217, Stock: -63.0000, Price: 4000.0000, Value: -252000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 201, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 153, Stock: 76.0000, Price: 4000.0000, Value: 304000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 151, Stock: 152.0000, Price: 800.0000, Value: 121600  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 92, Stock: 2.0000, Price: 4000.0000, Value: 8000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 78, Stock: 0, Price: 5000.0000, Value: 0  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 77, Stock: 50.0000, Price: 4000.0000, Value: 200000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 73, Stock: 46.0000, Price: 4000.0000, Value: 184000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 66, Stock: 263.0000, Price: 4000.0000, Value: 1052000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 53, Stock: 10.0000, Price: 4000.0000, Value: 40000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 52, Stock: 1200.0000, Price: 1000.0000, Value: 1200000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 51, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 50, Stock: 193.0000, Price: 4000.0000, Value: 772000  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 49, Stock: 284.5000, Price: 800.0000, Value: 227600  
[2026-09-14 12:42:17] live.INFO: Stock value calculation - Product: 48, Stock: 6.0000, Price: 250.0000, Value: 1500  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 47, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 46, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 43, Stock: 70.0000, Price: 2400.0000, Value: 168000  
[2026-09-14 12:42:18] live.INFO: === STOCK UNITS REPORT - AJAX Request ===  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 42, Stock: 38.0000, Price: 1000.0000, Value: 38000  
[2026-09-14 12:42:18] live.INFO: Parameters - Business ID: 8, Location ID: ALL, Category ID: ALL  
[2026-09-14 12:42:18] live.INFO: Products found: 90  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 41, Stock: 49.0000, Price: 100.0000, Value: 4900  
[2026-09-14 12:42:18] live.INFO: Location data processed  
[2026-09-14 12:42:18] live.INFO: Stock data processed  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 362, Stock: 0, Price: 120.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: df, Target: dr  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: dr, Stock in unit: 0, Unit Price: 1100.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 361, Stock: 2250.0000, Price: 30.0000, Value: 67500  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 2250.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 75.0000, Result: 30  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 30, Unit Price: 345.0000, Calculated Value: 10350  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 360, Stock: 0, Price: 300.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: pc, Target: bx  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 6.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: bx, Stock in unit: 0, Unit Price: 1050.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 347, Stock: 40.0000, Price: 150.0000, Value: 6000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 40.0000, Base: t1, Target: t2  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 3.3333333333333  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: t2, Stock in unit: 3.3333333333333, Unit Price: 1350.0000, Calculated Value: 4500  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 341, Stock: 888.0000, Price: 44.0000, Value: 39072  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 888.0000, Base: dsfg, Target: fdd  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 4.0000, Result: 222  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: fdd, Stock in unit: 222, Unit Price: 333.0000, Calculated Value: 73926  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 340, Stock: 100.0000, Price: 10.0000, Value: 1000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 100.0000, Base: pcs, Target: kg  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 100.0000, Result: 1  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: kg, Stock in unit: 1, Unit Price: 250.0000, Calculated Value: 250  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 339, Stock: 45586.0000, Price: 10.0000, Value: 455860  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:18] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:18] live.WARNING: No conversion found, returning original: 45586.0000  
[2026-09-14 12:42:18] live.INFO: No unit price for: pkt, using base stock value: 455860  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 56.0000, Result: 814.03571428571  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 814.03571428571, Unit Price: 265.0000, Calculated Value: 215719.46428571  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 338, Stock: 109.0000, Price: 740.0000, Value: 80660  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 334, Stock: 113.0000, Price: 200.0000, Value: 22600  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 333, Stock: 30.0000, Price: 200.0000, Value: 6000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 332, Stock: 101.0000, Price: 200.0000, Value: 20200  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 331, Stock: 183.0000, Price: 2000.0000, Value: 366000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 330, Stock: 80.0000, Price: 130.0000, Value: 10400  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 160  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: grms, Stock in unit: 160, Unit Price: 65.0000, Calculated Value: 10400  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 320  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: grms, Stock in unit: 320, Unit Price: 35.0000, Calculated Value: 11200  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 329, Stock: 77.0000, Price: 30.0000, Value: 2310  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: g  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 154  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: g, Stock in unit: 154, Unit Price: 15.0000, Calculated Value: 2310  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: 5g  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 308  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: 5g, Stock in unit: 308, Unit Price: 20.0000, Calculated Value: 6160  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 40, Stock: 36.0000, Price: 900.0000, Value: 32400  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 328, Stock: 83.0000, Price: 25.0000, Value: 2075  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 83.0000, Base: pc, Target: bali  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 6.9166666666667  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: bali, Stock in unit: 6.9166666666667, Unit Price: 2400.0000, Calculated Value: 16600  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 327, Stock: 4250.0000, Price: 120.0000, Value: 510000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:18] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:18] live.WARNING: No conversion found, returning original: 4250.0000  
[2026-09-14 12:42:18] live.INFO: No unit price for: gm, using base stock value: 510000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: bg  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 50.0000, Result: 85  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: bg, Stock in unit: 85, Unit Price: 25000.0000, Calculated Value: 2125000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 1.0000, Result: 4250  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: gm, Stock in unit: 4250, Unit Price: 60.0000, Calculated Value: 255000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 326, Stock: 500.0000, Price: 230.0000, Value: 115000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 500.0000, Base: pkt, Target: bl  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 41.666666666667  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: bl, Stock in unit: 41.666666666667, Unit Price: 2200.0000, Calculated Value: 91666.666666667  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 325, Stock: 950.0000, Price: 10.0000, Value: 9500  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Bx  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 72.0000, Result: 13.194444444444  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Bx, Stock in unit: 13.194444444444, Unit Price: 540.0000, Calculated Value: 7125  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Pkt  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 79.166666666667  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 79.166666666667, Unit Price: 125.0000, Calculated Value: 9895.8333333333  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 39, Stock: 1187.0000, Price: 290.0000, Value: 344230  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 324, Stock: 153.0000, Price: 50.0000, Value: 7650  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A2  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 2.0000, Result: 76.5  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: A2, Stock in unit: 76.5, Unit Price: 95.0000, Calculated Value: 7267.5  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A3  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 20.0000, Result: 7.65  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: A3, Stock in unit: 7.65, Unit Price: 900.0000, Calculated Value: 6885  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 323, Stock: 45.0000, Price: 4000.0000, Value: 180000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 322, Stock: 0, Price: 116.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: ssari, Target: rrasi  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: rrasi, Stock in unit: 0, Unit Price: 2000.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 321, Stock: 9999.0000, Price: 12.0000, Value: 119988  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS2  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 1999.8  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: SS2, Stock in unit: 1999.8, Unit Price: 60.0000, Calculated Value: 119988  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS3  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 40.0000, Result: 249.975  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: SS3, Stock in unit: 249.975, Unit Price: 450.0000, Calculated Value: 112488.75  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: ss41  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 400.0000, Result: 24.9975  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: ss41, Stock in unit: 24.9975, Unit Price: 1000.0000, Calculated Value: 24997.5  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 319, Stock: 989.5000, Price: 22.0000, Value: 21769  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: AD  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 968.0000, Result: 1.0222107438017  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: AD, Stock in unit: 1.0222107438017, Unit Price: 2340.0000, Calculated Value: 2391.9731404959  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: WET  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 22.0000, Result: 44.977272727273  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: WET, Stock in unit: 44.977272727273, Unit Price: 334.0000, Calculated Value: 15022.409090909  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: wss  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 1979  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: wss, Stock in unit: 1979, Unit Price: 15.0000, Calculated Value: 29685  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 315, Stock: 457.0000, Price: 5.0000, Value: 2285  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MPckt  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 45.7  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: MPckt, Stock in unit: 45.7, Unit Price: 48.0000, Calculated Value: 2193.6  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MBx  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 120.0000, Result: 3.8083333333333  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: MBx, Stock in unit: 3.8083333333333, Unit Price: 580.0000, Calculated Value: 2208.8333333333  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 314, Stock: 997.0000, Price: 20.0000, Value: 19940  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Packet  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 83.083333333333  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Packet, Stock in unit: 83.083333333333, Unit Price: 110.0000, Calculated Value: 9139.1666666667  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Carton  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 96.0000, Result: 10.385416666667  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Carton, Stock in unit: 10.385416666667, Unit Price: 700.0000, Calculated Value: 7269.7916666667  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: hero  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 576.0000, Result: 1.7309027777778  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: hero, Stock in unit: 1.7309027777778, Unit Price: 524.0000, Calculated Value: 906.99305555556  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 313, Stock: 0, Price: 77.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: Pkt  
[2026-09-14 12:42:18] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:18] live.INFO: Level 0 - Unit: Pkt, Multiplier: 12.0000, Factor: 12  
[2026-09-14 12:42:18] live.INFO: Fallback conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 0, Unit Price: 125.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: swn  
[2026-09-14 12:42:18] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:18] live.WARNING: No conversion found, returning original: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: swn, Stock in unit: 0, Unit Price: 430.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 312, Stock: 109.0000, Price: 15.0000, Value: 1635  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 109.0000, Base: Pc-1x, Target: Ctn -28  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 112.0000, Result: 0.97321428571429  
[2026-09-14 12:42:18] live.INFO: No unit price for: Ctn -28, using base stock value: 1635  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 38, Stock: 67.0000, Price: 300.0000, Value: 20100  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 308, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 306, Stock: 6.0000, Price: 4000.0000, Value: 24000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 302, Stock: 378.0000, Price: 4000.0000, Value: 1512000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 296, Stock: 0, Price: 50.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 37, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 36, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 35, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 34, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 33, Stock: 20.0000, Price: 20.0000, Value: 400  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 32, Stock: 200.0000, Price: 10.0000, Value: 2000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 295, Stock: 10.0000, Price: 100.0000, Value: 1000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 31, Stock: 272.0000, Price: 4000.0000, Value: 1088000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 30, Stock: 100.0000, Price: 4000.0000, Value: 400000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 28, Stock: 65.0000, Price: 4000.0000, Value: 260000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 23, Stock: 0.0000, Price: 66.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 0, Unit Price: 300.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 20, Stock: 964.0000, Price: 200.0000, Value: 192800  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 294, Stock: 8.0000, Price: 1.0000, Value: 8  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 19, Stock: 70.0000, Price: 4000.0000, Value: 280000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 18, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:18] live.INFO: === STOCK UNITS REPORT - AJAX Request ===  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 17, Stock: 88.0000, Price: 4000.0000, Value: 352000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 16, Stock: 9829.0000, Price: 15.0000, Value: 147435  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 293, Stock: 90.0000, Price: 4000.0000, Value: 360000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 292, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 290, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 289, Stock: 98.1000, Price: 60.0000, Value: 5886  
[2026-09-14 12:42:18] live.INFO: Parameters - Business ID: 8, Location ID: ALL, Category ID: ALL  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 15, Stock: 10099.0000, Price: 66.0000, Value: 666534  
[2026-09-14 12:42:18] live.INFO: Products found: 90  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 10099.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 2019.8  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 2019.8, Unit Price: 300.0000, Calculated Value: 605940  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 14, Stock: 79.0000, Price: 4000.0000, Value: 316000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 1, Stock: 945.0000, Price: 4000.0000, Value: 3780000  
[2026-09-14 12:42:18] live.INFO: Final formatted data count: 90  
[2026-09-14 12:42:18] live.INFO: Location data processed  
[2026-09-14 12:42:18] live.INFO: Stock data processed  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 362, Stock: 0, Price: 120.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: df, Target: dr  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: dr, Stock in unit: 0, Unit Price: 1100.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 361, Stock: 2250.0000, Price: 30.0000, Value: 67500  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 2250.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 75.0000, Result: 30  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 30, Unit Price: 345.0000, Calculated Value: 10350  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 360, Stock: 0, Price: 300.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: pc, Target: bx  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 6.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: bx, Stock in unit: 0, Unit Price: 1050.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 347, Stock: 40.0000, Price: 150.0000, Value: 6000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 40.0000, Base: t1, Target: t2  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 3.3333333333333  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: t2, Stock in unit: 3.3333333333333, Unit Price: 1350.0000, Calculated Value: 4500  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 341, Stock: 888.0000, Price: 44.0000, Value: 39072  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 888.0000, Base: dsfg, Target: fdd  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 4.0000, Result: 222  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: fdd, Stock in unit: 222, Unit Price: 333.0000, Calculated Value: 73926  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 340, Stock: 100.0000, Price: 10.0000, Value: 1000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 100.0000, Base: pcs, Target: kg  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 100.0000, Result: 1  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: kg, Stock in unit: 1, Unit Price: 250.0000, Calculated Value: 250  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 339, Stock: 45586.0000, Price: 10.0000, Value: 455860  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:18] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:18] live.WARNING: No conversion found, returning original: 45586.0000  
[2026-09-14 12:42:18] live.INFO: No unit price for: pkt, using base stock value: 455860  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 56.0000, Result: 814.03571428571  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 814.03571428571, Unit Price: 265.0000, Calculated Value: 215719.46428571  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 338, Stock: 109.0000, Price: 740.0000, Value: 80660  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 334, Stock: 113.0000, Price: 200.0000, Value: 22600  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 333, Stock: 30.0000, Price: 200.0000, Value: 6000  
[2026-09-14 12:42:18] live.INFO: DataTables response generated successfully  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 332, Stock: 101.0000, Price: 200.0000, Value: 20200  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 331, Stock: 183.0000, Price: 2000.0000, Value: 366000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 330, Stock: 80.0000, Price: 130.0000, Value: 10400  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 160  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: grms, Stock in unit: 160, Unit Price: 65.0000, Calculated Value: 10400  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 320  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: grms, Stock in unit: 320, Unit Price: 35.0000, Calculated Value: 11200  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 329, Stock: 77.0000, Price: 30.0000, Value: 2310  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: g  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 154  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: g, Stock in unit: 154, Unit Price: 15.0000, Calculated Value: 2310  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: 5g  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 308  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: 5g, Stock in unit: 308, Unit Price: 20.0000, Calculated Value: 6160  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 328, Stock: 83.0000, Price: 25.0000, Value: 2075  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 83.0000, Base: pc, Target: bali  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 6.9166666666667  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: bali, Stock in unit: 6.9166666666667, Unit Price: 2400.0000, Calculated Value: 16600  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 327, Stock: 4250.0000, Price: 120.0000, Value: 510000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:18] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:18] live.WARNING: No conversion found, returning original: 4250.0000  
[2026-09-14 12:42:18] live.INFO: No unit price for: gm, using base stock value: 510000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: bg  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 50.0000, Result: 85  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: bg, Stock in unit: 85, Unit Price: 25000.0000, Calculated Value: 2125000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 1.0000, Result: 4250  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: gm, Stock in unit: 4250, Unit Price: 60.0000, Calculated Value: 255000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 326, Stock: 500.0000, Price: 230.0000, Value: 115000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 288, Stock: 92.7000, Price: 50.0000, Value: 4635  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 500.0000, Base: pkt, Target: bl  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 41.666666666667  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: bl, Stock in unit: 41.666666666667, Unit Price: 2200.0000, Calculated Value: 91666.666666667  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 325, Stock: 950.0000, Price: 10.0000, Value: 9500  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Bx  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 72.0000, Result: 13.194444444444  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Bx, Stock in unit: 13.194444444444, Unit Price: 540.0000, Calculated Value: 7125  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Pkt  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 79.166666666667  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 79.166666666667, Unit Price: 125.0000, Calculated Value: 9895.8333333333  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 324, Stock: 153.0000, Price: 50.0000, Value: 7650  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A2  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 2.0000, Result: 76.5  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: A2, Stock in unit: 76.5, Unit Price: 95.0000, Calculated Value: 7267.5  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A3  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 20.0000, Result: 7.65  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: A3, Stock in unit: 7.65, Unit Price: 900.0000, Calculated Value: 6885  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 323, Stock: 45.0000, Price: 4000.0000, Value: 180000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 322, Stock: 0, Price: 116.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: ssari, Target: rrasi  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: rrasi, Stock in unit: 0, Unit Price: 2000.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 321, Stock: 9999.0000, Price: 12.0000, Value: 119988  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS2  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 1999.8  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: SS2, Stock in unit: 1999.8, Unit Price: 60.0000, Calculated Value: 119988  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS3  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 40.0000, Result: 249.975  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: SS3, Stock in unit: 249.975, Unit Price: 450.0000, Calculated Value: 112488.75  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: ss41  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 400.0000, Result: 24.9975  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: ss41, Stock in unit: 24.9975, Unit Price: 1000.0000, Calculated Value: 24997.5  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 319, Stock: 989.5000, Price: 22.0000, Value: 21769  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: AD  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 968.0000, Result: 1.0222107438017  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: AD, Stock in unit: 1.0222107438017, Unit Price: 2340.0000, Calculated Value: 2391.9731404959  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: WET  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 22.0000, Result: 44.977272727273  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: WET, Stock in unit: 44.977272727273, Unit Price: 334.0000, Calculated Value: 15022.409090909  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: wss  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 1979  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: wss, Stock in unit: 1979, Unit Price: 15.0000, Calculated Value: 29685  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 315, Stock: 457.0000, Price: 5.0000, Value: 2285  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MPckt  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 45.7  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: MPckt, Stock in unit: 45.7, Unit Price: 48.0000, Calculated Value: 2193.6  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MBx  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 120.0000, Result: 3.8083333333333  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: MBx, Stock in unit: 3.8083333333333, Unit Price: 580.0000, Calculated Value: 2208.8333333333  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 314, Stock: 997.0000, Price: 20.0000, Value: 19940  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 287, Stock: 97.5000, Price: 40.0000, Value: 3900  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Packet  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 83.083333333333  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Packet, Stock in unit: 83.083333333333, Unit Price: 110.0000, Calculated Value: 9139.1666666667  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Carton  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 96.0000, Result: 10.385416666667  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Carton, Stock in unit: 10.385416666667, Unit Price: 700.0000, Calculated Value: 7269.7916666667  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: hero  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 576.0000, Result: 1.7309027777778  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: hero, Stock in unit: 1.7309027777778, Unit Price: 524.0000, Calculated Value: 906.99305555556  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 313, Stock: 0, Price: 77.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: Pkt  
[2026-09-14 12:42:18] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:18] live.INFO: Level 0 - Unit: Pkt, Multiplier: 12.0000, Factor: 12  
[2026-09-14 12:42:18] live.INFO: Fallback conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 0, Unit Price: 125.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: swn  
[2026-09-14 12:42:18] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:18] live.WARNING: No conversion found, returning original: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: swn, Stock in unit: 0, Unit Price: 430.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 312, Stock: 109.0000, Price: 15.0000, Value: 1635  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 109.0000, Base: Pc-1x, Target: Ctn -28  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 112.0000, Result: 0.97321428571429  
[2026-09-14 12:42:18] live.INFO: No unit price for: Ctn -28, using base stock value: 1635  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 308, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 306, Stock: 6.0000, Price: 4000.0000, Value: 24000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 302, Stock: 378.0000, Price: 4000.0000, Value: 1512000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 296, Stock: 0, Price: 50.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 286, Stock: 100.0000, Price: 70.0000, Value: 7000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 295, Stock: 10.0000, Price: 100.0000, Value: 1000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 285, Stock: 0.5000, Price: 50.0000, Value: 25  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 294, Stock: 8.0000, Price: 1.0000, Value: 8  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 284, Stock: 29.0000, Price: 4000.0000, Value: 116000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 283, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 272, Stock: 104.0000, Price: 4000.0000, Value: 416000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 268, Stock: 119.0000, Price: 4000.0000, Value: 476000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 267, Stock: 109.0000, Price: 4000.0000, Value: 436000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 262, Stock: 313.0000, Price: 66.0000, Value: 20658  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 313.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 62.6  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 62.6, Unit Price: 300.0000, Calculated Value: 18780  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 258, Stock: 244.0000, Price: 11000.0000, Value: 2684000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 293, Stock: 90.0000, Price: 4000.0000, Value: 360000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 292, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 290, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 289, Stock: 98.1000, Price: 60.0000, Value: 5886  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 224, Stock: 96.0000, Price: 4000.0000, Value: 384000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 217, Stock: -63.0000, Price: 4000.0000, Value: -252000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 201, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 153, Stock: 76.0000, Price: 4000.0000, Value: 304000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 151, Stock: 152.0000, Price: 800.0000, Value: 121600  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 288, Stock: 92.7000, Price: 50.0000, Value: 4635  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 287, Stock: 97.5000, Price: 40.0000, Value: 3900  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 92, Stock: 2.0000, Price: 4000.0000, Value: 8000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 78, Stock: 0, Price: 5000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 286, Stock: 100.0000, Price: 70.0000, Value: 7000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 77, Stock: 50.0000, Price: 4000.0000, Value: 200000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 73, Stock: 46.0000, Price: 4000.0000, Value: 184000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 66, Stock: 263.0000, Price: 4000.0000, Value: 1052000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 53, Stock: 10.0000, Price: 4000.0000, Value: 40000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 52, Stock: 1200.0000, Price: 1000.0000, Value: 1200000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 285, Stock: 0.5000, Price: 50.0000, Value: 25  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 51, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 50, Stock: 193.0000, Price: 4000.0000, Value: 772000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 49, Stock: 284.5000, Price: 800.0000, Value: 227600  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 284, Stock: 29.0000, Price: 4000.0000, Value: 116000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 283, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 272, Stock: 104.0000, Price: 4000.0000, Value: 416000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 268, Stock: 119.0000, Price: 4000.0000, Value: 476000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 267, Stock: 109.0000, Price: 4000.0000, Value: 436000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 262, Stock: 313.0000, Price: 66.0000, Value: 20658  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 313.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 62.6  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 62.6, Unit Price: 300.0000, Calculated Value: 18780  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 258, Stock: 244.0000, Price: 11000.0000, Value: 2684000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 48, Stock: 6.0000, Price: 250.0000, Value: 1500  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 47, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 224, Stock: 96.0000, Price: 4000.0000, Value: 384000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 46, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 217, Stock: -63.0000, Price: 4000.0000, Value: -252000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 43, Stock: 70.0000, Price: 2400.0000, Value: 168000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 201, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 153, Stock: 76.0000, Price: 4000.0000, Value: 304000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 151, Stock: 152.0000, Price: 800.0000, Value: 121600  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 42, Stock: 38.0000, Price: 1000.0000, Value: 38000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 92, Stock: 2.0000, Price: 4000.0000, Value: 8000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 78, Stock: 0, Price: 5000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 41, Stock: 49.0000, Price: 100.0000, Value: 4900  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 77, Stock: 50.0000, Price: 4000.0000, Value: 200000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 73, Stock: 46.0000, Price: 4000.0000, Value: 184000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 66, Stock: 263.0000, Price: 4000.0000, Value: 1052000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 53, Stock: 10.0000, Price: 4000.0000, Value: 40000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 40, Stock: 36.0000, Price: 900.0000, Value: 32400  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 52, Stock: 1200.0000, Price: 1000.0000, Value: 1200000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 39, Stock: 1187.0000, Price: 290.0000, Value: 344230  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 51, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 50, Stock: 193.0000, Price: 4000.0000, Value: 772000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 49, Stock: 284.5000, Price: 800.0000, Value: 227600  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 38, Stock: 67.0000, Price: 300.0000, Value: 20100  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 48, Stock: 6.0000, Price: 250.0000, Value: 1500  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 37, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 36, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 35, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 34, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 33, Stock: 20.0000, Price: 20.0000, Value: 400  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 47, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 46, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 43, Stock: 70.0000, Price: 2400.0000, Value: 168000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 32, Stock: 200.0000, Price: 10.0000, Value: 2000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 42, Stock: 38.0000, Price: 1000.0000, Value: 38000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 31, Stock: 272.0000, Price: 4000.0000, Value: 1088000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 30, Stock: 100.0000, Price: 4000.0000, Value: 400000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 28, Stock: 65.0000, Price: 4000.0000, Value: 260000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 23, Stock: 0.0000, Price: 66.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 0, Unit Price: 300.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 20, Stock: 964.0000, Price: 200.0000, Value: 192800  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 41, Stock: 49.0000, Price: 100.0000, Value: 4900  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 19, Stock: 70.0000, Price: 4000.0000, Value: 280000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 18, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 17, Stock: 88.0000, Price: 4000.0000, Value: 352000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 16, Stock: 9829.0000, Price: 15.0000, Value: 147435  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 40, Stock: 36.0000, Price: 900.0000, Value: 32400  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 15, Stock: 10099.0000, Price: 66.0000, Value: 666534  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 10099.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 2019.8  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 2019.8, Unit Price: 300.0000, Calculated Value: 605940  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 14, Stock: 79.0000, Price: 4000.0000, Value: 316000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 1, Stock: 945.0000, Price: 4000.0000, Value: 3780000  
[2026-09-14 12:42:18] live.INFO: Final formatted data count: 90  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 39, Stock: 1187.0000, Price: 290.0000, Value: 344230  
[2026-09-14 12:42:18] live.INFO: DataTables response generated successfully  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 38, Stock: 67.0000, Price: 300.0000, Value: 20100  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 37, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 36, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 35, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 34, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 33, Stock: 20.0000, Price: 20.0000, Value: 400  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 32, Stock: 200.0000, Price: 10.0000, Value: 2000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 31, Stock: 272.0000, Price: 4000.0000, Value: 1088000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 30, Stock: 100.0000, Price: 4000.0000, Value: 400000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 28, Stock: 65.0000, Price: 4000.0000, Value: 260000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 23, Stock: 0.0000, Price: 66.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 0, Unit Price: 300.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 20, Stock: 964.0000, Price: 200.0000, Value: 192800  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 19, Stock: 70.0000, Price: 4000.0000, Value: 280000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 18, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 17, Stock: 88.0000, Price: 4000.0000, Value: 352000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 16, Stock: 9829.0000, Price: 15.0000, Value: 147435  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 15, Stock: 10099.0000, Price: 66.0000, Value: 666534  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 10099.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 2019.8  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 2019.8, Unit Price: 300.0000, Calculated Value: 605940  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 14, Stock: 79.0000, Price: 4000.0000, Value: 316000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 1, Stock: 945.0000, Price: 4000.0000, Value: 3780000  
[2026-09-14 12:42:18] live.INFO: Final formatted data count: 90  
[2026-09-14 12:42:18] live.INFO: DataTables response generated successfully  
[2026-09-14 12:42:18] live.INFO: === STOCK UNITS REPORT - AJAX Request ===  
[2026-09-14 12:42:18] live.INFO: Parameters - Business ID: 8, Location ID: ALL, Category ID: ALL  
[2026-09-14 12:42:18] live.INFO: Products found: 90  
[2026-09-14 12:42:18] live.INFO: Location data processed  
[2026-09-14 12:42:18] live.INFO: Stock data processed  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 362, Stock: 0, Price: 120.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: df, Target: dr  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: dr, Stock in unit: 0, Unit Price: 1100.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 361, Stock: 2250.0000, Price: 30.0000, Value: 67500  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 2250.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 75.0000, Result: 30  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 30, Unit Price: 345.0000, Calculated Value: 10350  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 360, Stock: 0, Price: 300.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: pc, Target: bx  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 6.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: bx, Stock in unit: 0, Unit Price: 1050.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 347, Stock: 40.0000, Price: 150.0000, Value: 6000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 40.0000, Base: t1, Target: t2  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 3.3333333333333  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: t2, Stock in unit: 3.3333333333333, Unit Price: 1350.0000, Calculated Value: 4500  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 341, Stock: 888.0000, Price: 44.0000, Value: 39072  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 888.0000, Base: dsfg, Target: fdd  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 4.0000, Result: 222  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: fdd, Stock in unit: 222, Unit Price: 333.0000, Calculated Value: 73926  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 340, Stock: 100.0000, Price: 10.0000, Value: 1000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 100.0000, Base: pcs, Target: kg  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 100.0000, Result: 1  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: kg, Stock in unit: 1, Unit Price: 250.0000, Calculated Value: 250  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 339, Stock: 45586.0000, Price: 10.0000, Value: 455860  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:18] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:18] live.WARNING: No conversion found, returning original: 45586.0000  
[2026-09-14 12:42:18] live.INFO: No unit price for: pkt, using base stock value: 455860  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 56.0000, Result: 814.03571428571  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 814.03571428571, Unit Price: 265.0000, Calculated Value: 215719.46428571  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 338, Stock: 109.0000, Price: 740.0000, Value: 80660  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 334, Stock: 113.0000, Price: 200.0000, Value: 22600  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 333, Stock: 30.0000, Price: 200.0000, Value: 6000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 332, Stock: 101.0000, Price: 200.0000, Value: 20200  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 331, Stock: 183.0000, Price: 2000.0000, Value: 366000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 330, Stock: 80.0000, Price: 130.0000, Value: 10400  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 160  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: grms, Stock in unit: 160, Unit Price: 65.0000, Calculated Value: 10400  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 320  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: grms, Stock in unit: 320, Unit Price: 35.0000, Calculated Value: 11200  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 329, Stock: 77.0000, Price: 30.0000, Value: 2310  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: g  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 154  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: g, Stock in unit: 154, Unit Price: 15.0000, Calculated Value: 2310  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: 5g  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 308  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: 5g, Stock in unit: 308, Unit Price: 20.0000, Calculated Value: 6160  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 328, Stock: 83.0000, Price: 25.0000, Value: 2075  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 83.0000, Base: pc, Target: bali  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 6.9166666666667  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: bali, Stock in unit: 6.9166666666667, Unit Price: 2400.0000, Calculated Value: 16600  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 327, Stock: 4250.0000, Price: 120.0000, Value: 510000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:18] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:18] live.WARNING: No conversion found, returning original: 4250.0000  
[2026-09-14 12:42:18] live.INFO: No unit price for: gm, using base stock value: 510000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: bg  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 50.0000, Result: 85  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: bg, Stock in unit: 85, Unit Price: 25000.0000, Calculated Value: 2125000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 1.0000, Result: 4250  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: gm, Stock in unit: 4250, Unit Price: 60.0000, Calculated Value: 255000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 326, Stock: 500.0000, Price: 230.0000, Value: 115000  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 500.0000, Base: pkt, Target: bl  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 41.666666666667  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: bl, Stock in unit: 41.666666666667, Unit Price: 2200.0000, Calculated Value: 91666.666666667  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 325, Stock: 950.0000, Price: 10.0000, Value: 9500  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Bx  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 72.0000, Result: 13.194444444444  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Bx, Stock in unit: 13.194444444444, Unit Price: 540.0000, Calculated Value: 7125  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Pkt  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 79.166666666667  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 79.166666666667, Unit Price: 125.0000, Calculated Value: 9895.8333333333  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 324, Stock: 153.0000, Price: 50.0000, Value: 7650  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A2  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 2.0000, Result: 76.5  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: A2, Stock in unit: 76.5, Unit Price: 95.0000, Calculated Value: 7267.5  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A3  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 20.0000, Result: 7.65  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: A3, Stock in unit: 7.65, Unit Price: 900.0000, Calculated Value: 6885  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 323, Stock: 45.0000, Price: 4000.0000, Value: 180000  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 322, Stock: 0, Price: 116.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: ssari, Target: rrasi  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: rrasi, Stock in unit: 0, Unit Price: 2000.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 321, Stock: 9999.0000, Price: 12.0000, Value: 119988  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS2  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 1999.8  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: SS2, Stock in unit: 1999.8, Unit Price: 60.0000, Calculated Value: 119988  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS3  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 40.0000, Result: 249.975  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: SS3, Stock in unit: 249.975, Unit Price: 450.0000, Calculated Value: 112488.75  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: ss41  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 400.0000, Result: 24.9975  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: ss41, Stock in unit: 24.9975, Unit Price: 1000.0000, Calculated Value: 24997.5  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 319, Stock: 989.5000, Price: 22.0000, Value: 21769  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: AD  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 968.0000, Result: 1.0222107438017  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: AD, Stock in unit: 1.0222107438017, Unit Price: 2340.0000, Calculated Value: 2391.9731404959  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: WET  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 22.0000, Result: 44.977272727273  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: WET, Stock in unit: 44.977272727273, Unit Price: 334.0000, Calculated Value: 15022.409090909  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: wss  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 1979  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: wss, Stock in unit: 1979, Unit Price: 15.0000, Calculated Value: 29685  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 315, Stock: 457.0000, Price: 5.0000, Value: 2285  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MPckt  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 45.7  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: MPckt, Stock in unit: 45.7, Unit Price: 48.0000, Calculated Value: 2193.6  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MBx  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 120.0000, Result: 3.8083333333333  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: MBx, Stock in unit: 3.8083333333333, Unit Price: 580.0000, Calculated Value: 2208.8333333333  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 314, Stock: 997.0000, Price: 20.0000, Value: 19940  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Packet  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 83.083333333333  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Packet, Stock in unit: 83.083333333333, Unit Price: 110.0000, Calculated Value: 9139.1666666667  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Carton  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 96.0000, Result: 10.385416666667  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Carton, Stock in unit: 10.385416666667, Unit Price: 700.0000, Calculated Value: 7269.7916666667  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: hero  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 576.0000, Result: 1.7309027777778  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: hero, Stock in unit: 1.7309027777778, Unit Price: 524.0000, Calculated Value: 906.99305555556  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 313, Stock: 0, Price: 77.0000, Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: Pkt  
[2026-09-14 12:42:18] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:18] live.INFO: Level 0 - Unit: Pkt, Multiplier: 12.0000, Factor: 12  
[2026-09-14 12:42:18] live.INFO: Fallback conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 0, Unit Price: 125.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: swn  
[2026-09-14 12:42:18] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:18] live.WARNING: No conversion found, returning original: 0  
[2026-09-14 12:42:18] live.INFO: Unit has own price - Unit: swn, Stock in unit: 0, Unit Price: 430.0000, Calculated Value: 0  
[2026-09-14 12:42:18] live.INFO: Stock value calculation - Product: 312, Stock: 109.0000, Price: 15.0000, Value: 1635  
[2026-09-14 12:42:18] live.INFO: convertStockToUnit - Stock: 109.0000, Base: Pc-1x, Target: Ctn -28  
[2026-09-14 12:42:18] live.INFO: Direct conversion - Multiplier: 112.0000, Result: 0.97321428571429  
[2026-09-14 12:42:18] live.INFO: No unit price for: Ctn -28, using base stock value: 1635  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 308, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 306, Stock: 6.0000, Price: 4000.0000, Value: 24000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 302, Stock: 378.0000, Price: 4000.0000, Value: 1512000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 296, Stock: 0, Price: 50.0000, Value: 0  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 295, Stock: 10.0000, Price: 100.0000, Value: 1000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 294, Stock: 8.0000, Price: 1.0000, Value: 8  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 293, Stock: 90.0000, Price: 4000.0000, Value: 360000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 292, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 290, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 289, Stock: 98.1000, Price: 60.0000, Value: 5886  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 288, Stock: 92.7000, Price: 50.0000, Value: 4635  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 287, Stock: 97.5000, Price: 40.0000, Value: 3900  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 286, Stock: 100.0000, Price: 70.0000, Value: 7000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 285, Stock: 0.5000, Price: 50.0000, Value: 25  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 284, Stock: 29.0000, Price: 4000.0000, Value: 116000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 283, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 272, Stock: 104.0000, Price: 4000.0000, Value: 416000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 268, Stock: 119.0000, Price: 4000.0000, Value: 476000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 267, Stock: 109.0000, Price: 4000.0000, Value: 436000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 262, Stock: 313.0000, Price: 66.0000, Value: 20658  
[2026-09-14 12:42:19] live.INFO: convertStockToUnit - Stock: 313.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:19] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 62.6  
[2026-09-14 12:42:19] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 62.6, Unit Price: 300.0000, Calculated Value: 18780  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 258, Stock: 244.0000, Price: 11000.0000, Value: 2684000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 224, Stock: 96.0000, Price: 4000.0000, Value: 384000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 217, Stock: -63.0000, Price: 4000.0000, Value: -252000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 201, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 153, Stock: 76.0000, Price: 4000.0000, Value: 304000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 151, Stock: 152.0000, Price: 800.0000, Value: 121600  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 92, Stock: 2.0000, Price: 4000.0000, Value: 8000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 78, Stock: 0, Price: 5000.0000, Value: 0  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 77, Stock: 50.0000, Price: 4000.0000, Value: 200000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 73, Stock: 46.0000, Price: 4000.0000, Value: 184000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 66, Stock: 263.0000, Price: 4000.0000, Value: 1052000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 53, Stock: 10.0000, Price: 4000.0000, Value: 40000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 52, Stock: 1200.0000, Price: 1000.0000, Value: 1200000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 51, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 50, Stock: 193.0000, Price: 4000.0000, Value: 772000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 49, Stock: 284.5000, Price: 800.0000, Value: 227600  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 48, Stock: 6.0000, Price: 250.0000, Value: 1500  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 47, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 46, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 43, Stock: 70.0000, Price: 2400.0000, Value: 168000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 42, Stock: 38.0000, Price: 1000.0000, Value: 38000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 41, Stock: 49.0000, Price: 100.0000, Value: 4900  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 40, Stock: 36.0000, Price: 900.0000, Value: 32400  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 39, Stock: 1187.0000, Price: 290.0000, Value: 344230  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 38, Stock: 67.0000, Price: 300.0000, Value: 20100  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 37, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 36, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 35, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 34, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 33, Stock: 20.0000, Price: 20.0000, Value: 400  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 32, Stock: 200.0000, Price: 10.0000, Value: 2000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 31, Stock: 272.0000, Price: 4000.0000, Value: 1088000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 30, Stock: 100.0000, Price: 4000.0000, Value: 400000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 28, Stock: 65.0000, Price: 4000.0000, Value: 260000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 23, Stock: 0.0000, Price: 66.0000, Value: 0  
[2026-09-14 12:42:19] live.INFO: convertStockToUnit - Stock: 0.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:19] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 0  
[2026-09-14 12:42:19] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 0, Unit Price: 300.0000, Calculated Value: 0  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 20, Stock: 964.0000, Price: 200.0000, Value: 192800  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 19, Stock: 70.0000, Price: 4000.0000, Value: 280000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 18, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 17, Stock: 88.0000, Price: 4000.0000, Value: 352000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 16, Stock: 9829.0000, Price: 15.0000, Value: 147435  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 15, Stock: 10099.0000, Price: 66.0000, Value: 666534  
[2026-09-14 12:42:19] live.INFO: convertStockToUnit - Stock: 10099.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:19] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 2019.8  
[2026-09-14 12:42:19] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 2019.8, Unit Price: 300.0000, Calculated Value: 605940  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 14, Stock: 79.0000, Price: 4000.0000, Value: 316000  
[2026-09-14 12:42:19] live.INFO: Stock value calculation - Product: 1, Stock: 945.0000, Price: 4000.0000, Value: 3780000  
[2026-09-14 12:42:19] live.INFO: Final formatted data count: 90  
[2026-09-14 12:42:19] live.INFO: DataTables response generated successfully  
[2026-09-14 12:42:21] live.INFO: === STOCK UNITS REPORT - AJAX Request ===  
[2026-09-14 12:42:21] live.INFO: Parameters - Business ID: 8, Location ID: ALL, Category ID: ALL  
[2026-09-14 12:42:21] live.INFO: Products found: 90  
[2026-09-14 12:42:21] live.INFO: Location data processed  
[2026-09-14 12:42:21] live.INFO: Stock data processed  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 362, Stock: 0, Price: 120.0000, Value: 0  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 0, Base: df, Target: dr  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 0  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: dr, Stock in unit: 0, Unit Price: 1100.0000, Calculated Value: 0  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 361, Stock: 2250.0000, Price: 30.0000, Value: 67500  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 2250.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 75.0000, Result: 30  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 30, Unit Price: 345.0000, Calculated Value: 10350  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 360, Stock: 0, Price: 300.0000, Value: 0  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 0, Base: pc, Target: bx  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 6.0000, Result: 0  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: bx, Stock in unit: 0, Unit Price: 1050.0000, Calculated Value: 0  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 347, Stock: 40.0000, Price: 150.0000, Value: 6000  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 40.0000, Base: t1, Target: t2  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 3.3333333333333  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: t2, Stock in unit: 3.3333333333333, Unit Price: 1350.0000, Calculated Value: 4500  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 341, Stock: 888.0000, Price: 44.0000, Value: 39072  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 888.0000, Base: dsfg, Target: fdd  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 4.0000, Result: 222  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: fdd, Stock in unit: 222, Unit Price: 333.0000, Calculated Value: 73926  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 340, Stock: 100.0000, Price: 10.0000, Value: 1000  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 100.0000, Base: pcs, Target: kg  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 100.0000, Result: 1  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: kg, Stock in unit: 1, Unit Price: 250.0000, Calculated Value: 250  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 339, Stock: 45586.0000, Price: 10.0000, Value: 455860  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:21] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:21] live.WARNING: No conversion found, returning original: 45586.0000  
[2026-09-14 12:42:21] live.INFO: No unit price for: pkt, using base stock value: 455860  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 56.0000, Result: 814.03571428571  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 814.03571428571, Unit Price: 265.0000, Calculated Value: 215719.46428571  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 338, Stock: 109.0000, Price: 740.0000, Value: 80660  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 334, Stock: 113.0000, Price: 200.0000, Value: 22600  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 333, Stock: 30.0000, Price: 200.0000, Value: 6000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 332, Stock: 101.0000, Price: 200.0000, Value: 20200  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 331, Stock: 183.0000, Price: 2000.0000, Value: 366000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 330, Stock: 80.0000, Price: 130.0000, Value: 10400  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 160  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: grms, Stock in unit: 160, Unit Price: 65.0000, Calculated Value: 10400  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 320  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: grms, Stock in unit: 320, Unit Price: 35.0000, Calculated Value: 11200  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 329, Stock: 77.0000, Price: 30.0000, Value: 2310  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: g  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 154  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: g, Stock in unit: 154, Unit Price: 15.0000, Calculated Value: 2310  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: 5g  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 308  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: 5g, Stock in unit: 308, Unit Price: 20.0000, Calculated Value: 6160  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 328, Stock: 83.0000, Price: 25.0000, Value: 2075  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 83.0000, Base: pc, Target: bali  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 6.9166666666667  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: bali, Stock in unit: 6.9166666666667, Unit Price: 2400.0000, Calculated Value: 16600  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 327, Stock: 4250.0000, Price: 120.0000, Value: 510000  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:21] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:21] live.WARNING: No conversion found, returning original: 4250.0000  
[2026-09-14 12:42:21] live.INFO: No unit price for: gm, using base stock value: 510000  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: bg  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 50.0000, Result: 85  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: bg, Stock in unit: 85, Unit Price: 25000.0000, Calculated Value: 2125000  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 1.0000, Result: 4250  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: gm, Stock in unit: 4250, Unit Price: 60.0000, Calculated Value: 255000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 326, Stock: 500.0000, Price: 230.0000, Value: 115000  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 500.0000, Base: pkt, Target: bl  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 41.666666666667  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: bl, Stock in unit: 41.666666666667, Unit Price: 2200.0000, Calculated Value: 91666.666666667  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 325, Stock: 950.0000, Price: 10.0000, Value: 9500  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Bx  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 72.0000, Result: 13.194444444444  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: Bx, Stock in unit: 13.194444444444, Unit Price: 540.0000, Calculated Value: 7125  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Pkt  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 79.166666666667  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 79.166666666667, Unit Price: 125.0000, Calculated Value: 9895.8333333333  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 324, Stock: 153.0000, Price: 50.0000, Value: 7650  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A2  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 2.0000, Result: 76.5  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: A2, Stock in unit: 76.5, Unit Price: 95.0000, Calculated Value: 7267.5  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A3  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 20.0000, Result: 7.65  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: A3, Stock in unit: 7.65, Unit Price: 900.0000, Calculated Value: 6885  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 323, Stock: 45.0000, Price: 4000.0000, Value: 180000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 322, Stock: 0, Price: 116.0000, Value: 0  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 0, Base: ssari, Target: rrasi  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: rrasi, Stock in unit: 0, Unit Price: 2000.0000, Calculated Value: 0  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 321, Stock: 9999.0000, Price: 12.0000, Value: 119988  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS2  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 1999.8  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: SS2, Stock in unit: 1999.8, Unit Price: 60.0000, Calculated Value: 119988  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS3  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 40.0000, Result: 249.975  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: SS3, Stock in unit: 249.975, Unit Price: 450.0000, Calculated Value: 112488.75  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: ss41  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 400.0000, Result: 24.9975  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: ss41, Stock in unit: 24.9975, Unit Price: 1000.0000, Calculated Value: 24997.5  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 319, Stock: 989.5000, Price: 22.0000, Value: 21769  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: AD  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 968.0000, Result: 1.0222107438017  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: AD, Stock in unit: 1.0222107438017, Unit Price: 2340.0000, Calculated Value: 2391.9731404959  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: WET  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 22.0000, Result: 44.977272727273  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: WET, Stock in unit: 44.977272727273, Unit Price: 334.0000, Calculated Value: 15022.409090909  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: wss  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 1979  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: wss, Stock in unit: 1979, Unit Price: 15.0000, Calculated Value: 29685  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 315, Stock: 457.0000, Price: 5.0000, Value: 2285  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MPckt  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 45.7  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: MPckt, Stock in unit: 45.7, Unit Price: 48.0000, Calculated Value: 2193.6  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MBx  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 120.0000, Result: 3.8083333333333  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: MBx, Stock in unit: 3.8083333333333, Unit Price: 580.0000, Calculated Value: 2208.8333333333  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 314, Stock: 997.0000, Price: 20.0000, Value: 19940  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Packet  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 83.083333333333  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: Packet, Stock in unit: 83.083333333333, Unit Price: 110.0000, Calculated Value: 9139.1666666667  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Carton  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 96.0000, Result: 10.385416666667  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: Carton, Stock in unit: 10.385416666667, Unit Price: 700.0000, Calculated Value: 7269.7916666667  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: hero  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 576.0000, Result: 1.7309027777778  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: hero, Stock in unit: 1.7309027777778, Unit Price: 524.0000, Calculated Value: 906.99305555556  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 313, Stock: 0, Price: 77.0000, Value: 0  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: Pkt  
[2026-09-14 12:42:21] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:21] live.INFO: Level 0 - Unit: Pkt, Multiplier: 12.0000, Factor: 12  
[2026-09-14 12:42:21] live.INFO: Fallback conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 0, Unit Price: 125.0000, Calculated Value: 0  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: swn  
[2026-09-14 12:42:21] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:21] live.WARNING: No conversion found, returning original: 0  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: swn, Stock in unit: 0, Unit Price: 430.0000, Calculated Value: 0  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 312, Stock: 109.0000, Price: 15.0000, Value: 1635  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 109.0000, Base: Pc-1x, Target: Ctn -28  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 112.0000, Result: 0.97321428571429  
[2026-09-14 12:42:21] live.INFO: No unit price for: Ctn -28, using base stock value: 1635  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 308, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 306, Stock: 6.0000, Price: 4000.0000, Value: 24000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 302, Stock: 378.0000, Price: 4000.0000, Value: 1512000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 296, Stock: 0, Price: 50.0000, Value: 0  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 295, Stock: 10.0000, Price: 100.0000, Value: 1000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 294, Stock: 8.0000, Price: 1.0000, Value: 8  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 293, Stock: 90.0000, Price: 4000.0000, Value: 360000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 292, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 290, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 289, Stock: 98.1000, Price: 60.0000, Value: 5886  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 288, Stock: 92.7000, Price: 50.0000, Value: 4635  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 287, Stock: 97.5000, Price: 40.0000, Value: 3900  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 286, Stock: 100.0000, Price: 70.0000, Value: 7000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 285, Stock: 0.5000, Price: 50.0000, Value: 25  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 284, Stock: 29.0000, Price: 4000.0000, Value: 116000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 283, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 272, Stock: 104.0000, Price: 4000.0000, Value: 416000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 268, Stock: 119.0000, Price: 4000.0000, Value: 476000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 267, Stock: 109.0000, Price: 4000.0000, Value: 436000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 262, Stock: 313.0000, Price: 66.0000, Value: 20658  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 313.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 62.6  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 62.6, Unit Price: 300.0000, Calculated Value: 18780  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 258, Stock: 244.0000, Price: 11000.0000, Value: 2684000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 224, Stock: 96.0000, Price: 4000.0000, Value: 384000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 217, Stock: -63.0000, Price: 4000.0000, Value: -252000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 201, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 153, Stock: 76.0000, Price: 4000.0000, Value: 304000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 151, Stock: 152.0000, Price: 800.0000, Value: 121600  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 92, Stock: 2.0000, Price: 4000.0000, Value: 8000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 78, Stock: 0, Price: 5000.0000, Value: 0  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 77, Stock: 50.0000, Price: 4000.0000, Value: 200000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 73, Stock: 46.0000, Price: 4000.0000, Value: 184000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 66, Stock: 263.0000, Price: 4000.0000, Value: 1052000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 53, Stock: 10.0000, Price: 4000.0000, Value: 40000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 52, Stock: 1200.0000, Price: 1000.0000, Value: 1200000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 51, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 50, Stock: 193.0000, Price: 4000.0000, Value: 772000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 49, Stock: 284.5000, Price: 800.0000, Value: 227600  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 48, Stock: 6.0000, Price: 250.0000, Value: 1500  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 47, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 46, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 43, Stock: 70.0000, Price: 2400.0000, Value: 168000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 42, Stock: 38.0000, Price: 1000.0000, Value: 38000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 41, Stock: 49.0000, Price: 100.0000, Value: 4900  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 40, Stock: 36.0000, Price: 900.0000, Value: 32400  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 39, Stock: 1187.0000, Price: 290.0000, Value: 344230  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 38, Stock: 67.0000, Price: 300.0000, Value: 20100  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 37, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 36, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 35, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 34, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 33, Stock: 20.0000, Price: 20.0000, Value: 400  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 32, Stock: 200.0000, Price: 10.0000, Value: 2000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 31, Stock: 272.0000, Price: 4000.0000, Value: 1088000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 30, Stock: 100.0000, Price: 4000.0000, Value: 400000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 28, Stock: 65.0000, Price: 4000.0000, Value: 260000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 23, Stock: 0.0000, Price: 66.0000, Value: 0  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 0.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 0  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 0, Unit Price: 300.0000, Calculated Value: 0  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 20, Stock: 964.0000, Price: 200.0000, Value: 192800  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 19, Stock: 70.0000, Price: 4000.0000, Value: 280000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 18, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 17, Stock: 88.0000, Price: 4000.0000, Value: 352000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 16, Stock: 9829.0000, Price: 15.0000, Value: 147435  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 15, Stock: 10099.0000, Price: 66.0000, Value: 666534  
[2026-09-14 12:42:21] live.INFO: convertStockToUnit - Stock: 10099.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:21] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 2019.8  
[2026-09-14 12:42:21] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 2019.8, Unit Price: 300.0000, Calculated Value: 605940  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 14, Stock: 79.0000, Price: 4000.0000, Value: 316000  
[2026-09-14 12:42:21] live.INFO: Stock value calculation - Product: 1, Stock: 945.0000, Price: 4000.0000, Value: 3780000  
[2026-09-14 12:42:21] live.INFO: Final formatted data count: 90  
[2026-09-14 12:42:21] live.INFO: DataTables response generated successfully  
[2026-09-14 12:42:22] live.INFO: === STOCK UNITS REPORT - AJAX Request ===  
[2026-09-14 12:42:22] live.INFO: Parameters - Business ID: 8, Location ID: ALL, Category ID: ALL  
[2026-09-14 12:42:22] live.INFO: Products found: 90  
[2026-09-14 12:42:22] live.INFO: Location data processed  
[2026-09-14 12:42:22] live.INFO: Stock data processed  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 362, Stock: 0, Price: 120.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 0, Base: df, Target: dr  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 0  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: dr, Stock in unit: 0, Unit Price: 1100.0000, Calculated Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 361, Stock: 2250.0000, Price: 30.0000, Value: 67500  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 2250.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 75.0000, Result: 30  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 30, Unit Price: 345.0000, Calculated Value: 10350  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 360, Stock: 0, Price: 300.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 0, Base: pc, Target: bx  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 6.0000, Result: 0  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: bx, Stock in unit: 0, Unit Price: 1050.0000, Calculated Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 347, Stock: 40.0000, Price: 150.0000, Value: 6000  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 40.0000, Base: t1, Target: t2  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 3.3333333333333  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: t2, Stock in unit: 3.3333333333333, Unit Price: 1350.0000, Calculated Value: 4500  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 341, Stock: 888.0000, Price: 44.0000, Value: 39072  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 888.0000, Base: dsfg, Target: fdd  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 4.0000, Result: 222  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: fdd, Stock in unit: 222, Unit Price: 333.0000, Calculated Value: 73926  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 340, Stock: 100.0000, Price: 10.0000, Value: 1000  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 100.0000, Base: pcs, Target: kg  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 100.0000, Result: 1  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: kg, Stock in unit: 1, Unit Price: 250.0000, Calculated Value: 250  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 339, Stock: 45586.0000, Price: 10.0000, Value: 455860  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:22] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:22] live.WARNING: No conversion found, returning original: 45586.0000  
[2026-09-14 12:42:22] live.INFO: No unit price for: pkt, using base stock value: 455860  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 56.0000, Result: 814.03571428571  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 814.03571428571, Unit Price: 265.0000, Calculated Value: 215719.46428571  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 338, Stock: 109.0000, Price: 740.0000, Value: 80660  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 334, Stock: 113.0000, Price: 200.0000, Value: 22600  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 333, Stock: 30.0000, Price: 200.0000, Value: 6000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 332, Stock: 101.0000, Price: 200.0000, Value: 20200  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 331, Stock: 183.0000, Price: 2000.0000, Value: 366000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 330, Stock: 80.0000, Price: 130.0000, Value: 10400  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 160  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: grms, Stock in unit: 160, Unit Price: 65.0000, Calculated Value: 10400  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 320  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: grms, Stock in unit: 320, Unit Price: 35.0000, Calculated Value: 11200  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 329, Stock: 77.0000, Price: 30.0000, Value: 2310  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: g  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 154  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: g, Stock in unit: 154, Unit Price: 15.0000, Calculated Value: 2310  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: 5g  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 308  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: 5g, Stock in unit: 308, Unit Price: 20.0000, Calculated Value: 6160  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 328, Stock: 83.0000, Price: 25.0000, Value: 2075  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 83.0000, Base: pc, Target: bali  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 6.9166666666667  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: bali, Stock in unit: 6.9166666666667, Unit Price: 2400.0000, Calculated Value: 16600  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 327, Stock: 4250.0000, Price: 120.0000, Value: 510000  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:22] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:22] live.WARNING: No conversion found, returning original: 4250.0000  
[2026-09-14 12:42:22] live.INFO: No unit price for: gm, using base stock value: 510000  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: bg  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 50.0000, Result: 85  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: bg, Stock in unit: 85, Unit Price: 25000.0000, Calculated Value: 2125000  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 1.0000, Result: 4250  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: gm, Stock in unit: 4250, Unit Price: 60.0000, Calculated Value: 255000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 326, Stock: 500.0000, Price: 230.0000, Value: 115000  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 500.0000, Base: pkt, Target: bl  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 41.666666666667  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: bl, Stock in unit: 41.666666666667, Unit Price: 2200.0000, Calculated Value: 91666.666666667  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 325, Stock: 950.0000, Price: 10.0000, Value: 9500  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Bx  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 72.0000, Result: 13.194444444444  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: Bx, Stock in unit: 13.194444444444, Unit Price: 540.0000, Calculated Value: 7125  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Pkt  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 79.166666666667  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 79.166666666667, Unit Price: 125.0000, Calculated Value: 9895.8333333333  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 324, Stock: 153.0000, Price: 50.0000, Value: 7650  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A2  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 2.0000, Result: 76.5  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: A2, Stock in unit: 76.5, Unit Price: 95.0000, Calculated Value: 7267.5  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A3  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 20.0000, Result: 7.65  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: A3, Stock in unit: 7.65, Unit Price: 900.0000, Calculated Value: 6885  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 323, Stock: 45.0000, Price: 4000.0000, Value: 180000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 322, Stock: 0, Price: 116.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 0, Base: ssari, Target: rrasi  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: rrasi, Stock in unit: 0, Unit Price: 2000.0000, Calculated Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 321, Stock: 9999.0000, Price: 12.0000, Value: 119988  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS2  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 1999.8  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: SS2, Stock in unit: 1999.8, Unit Price: 60.0000, Calculated Value: 119988  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS3  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 40.0000, Result: 249.975  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: SS3, Stock in unit: 249.975, Unit Price: 450.0000, Calculated Value: 112488.75  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: ss41  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 400.0000, Result: 24.9975  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: ss41, Stock in unit: 24.9975, Unit Price: 1000.0000, Calculated Value: 24997.5  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 319, Stock: 989.5000, Price: 22.0000, Value: 21769  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: AD  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 968.0000, Result: 1.0222107438017  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: AD, Stock in unit: 1.0222107438017, Unit Price: 2340.0000, Calculated Value: 2391.9731404959  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: WET  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 22.0000, Result: 44.977272727273  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: WET, Stock in unit: 44.977272727273, Unit Price: 334.0000, Calculated Value: 15022.409090909  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: wss  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 1979  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: wss, Stock in unit: 1979, Unit Price: 15.0000, Calculated Value: 29685  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 315, Stock: 457.0000, Price: 5.0000, Value: 2285  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MPckt  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 45.7  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: MPckt, Stock in unit: 45.7, Unit Price: 48.0000, Calculated Value: 2193.6  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MBx  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 120.0000, Result: 3.8083333333333  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: MBx, Stock in unit: 3.8083333333333, Unit Price: 580.0000, Calculated Value: 2208.8333333333  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 314, Stock: 997.0000, Price: 20.0000, Value: 19940  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Packet  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 83.083333333333  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: Packet, Stock in unit: 83.083333333333, Unit Price: 110.0000, Calculated Value: 9139.1666666667  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Carton  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 96.0000, Result: 10.385416666667  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: Carton, Stock in unit: 10.385416666667, Unit Price: 700.0000, Calculated Value: 7269.7916666667  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: hero  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 576.0000, Result: 1.7309027777778  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: hero, Stock in unit: 1.7309027777778, Unit Price: 524.0000, Calculated Value: 906.99305555556  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 313, Stock: 0, Price: 77.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: Pkt  
[2026-09-14 12:42:22] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:22] live.INFO: Level 0 - Unit: Pkt, Multiplier: 12.0000, Factor: 12  
[2026-09-14 12:42:22] live.INFO: Fallback conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 0, Unit Price: 125.0000, Calculated Value: 0  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: swn  
[2026-09-14 12:42:22] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:22] live.WARNING: No conversion found, returning original: 0  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: swn, Stock in unit: 0, Unit Price: 430.0000, Calculated Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 312, Stock: 109.0000, Price: 15.0000, Value: 1635  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 109.0000, Base: Pc-1x, Target: Ctn -28  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 112.0000, Result: 0.97321428571429  
[2026-09-14 12:42:22] live.INFO: No unit price for: Ctn -28, using base stock value: 1635  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 308, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 306, Stock: 6.0000, Price: 4000.0000, Value: 24000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 302, Stock: 378.0000, Price: 4000.0000, Value: 1512000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 296, Stock: 0, Price: 50.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 295, Stock: 10.0000, Price: 100.0000, Value: 1000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 294, Stock: 8.0000, Price: 1.0000, Value: 8  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 293, Stock: 90.0000, Price: 4000.0000, Value: 360000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 292, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 290, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 289, Stock: 98.1000, Price: 60.0000, Value: 5886  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 288, Stock: 92.7000, Price: 50.0000, Value: 4635  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 287, Stock: 97.5000, Price: 40.0000, Value: 3900  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 286, Stock: 100.0000, Price: 70.0000, Value: 7000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 285, Stock: 0.5000, Price: 50.0000, Value: 25  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 284, Stock: 29.0000, Price: 4000.0000, Value: 116000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 283, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 272, Stock: 104.0000, Price: 4000.0000, Value: 416000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 268, Stock: 119.0000, Price: 4000.0000, Value: 476000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 267, Stock: 109.0000, Price: 4000.0000, Value: 436000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 262, Stock: 313.0000, Price: 66.0000, Value: 20658  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 313.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 62.6  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 62.6, Unit Price: 300.0000, Calculated Value: 18780  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 258, Stock: 244.0000, Price: 11000.0000, Value: 2684000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 224, Stock: 96.0000, Price: 4000.0000, Value: 384000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 217, Stock: -63.0000, Price: 4000.0000, Value: -252000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 201, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 153, Stock: 76.0000, Price: 4000.0000, Value: 304000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 151, Stock: 152.0000, Price: 800.0000, Value: 121600  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 92, Stock: 2.0000, Price: 4000.0000, Value: 8000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 78, Stock: 0, Price: 5000.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 77, Stock: 50.0000, Price: 4000.0000, Value: 200000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 73, Stock: 46.0000, Price: 4000.0000, Value: 184000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 66, Stock: 263.0000, Price: 4000.0000, Value: 1052000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 53, Stock: 10.0000, Price: 4000.0000, Value: 40000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 52, Stock: 1200.0000, Price: 1000.0000, Value: 1200000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 51, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 50, Stock: 193.0000, Price: 4000.0000, Value: 772000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 49, Stock: 284.5000, Price: 800.0000, Value: 227600  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 48, Stock: 6.0000, Price: 250.0000, Value: 1500  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 47, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 46, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 43, Stock: 70.0000, Price: 2400.0000, Value: 168000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 42, Stock: 38.0000, Price: 1000.0000, Value: 38000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 41, Stock: 49.0000, Price: 100.0000, Value: 4900  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 40, Stock: 36.0000, Price: 900.0000, Value: 32400  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 39, Stock: 1187.0000, Price: 290.0000, Value: 344230  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 38, Stock: 67.0000, Price: 300.0000, Value: 20100  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 37, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 36, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 35, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 34, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 33, Stock: 20.0000, Price: 20.0000, Value: 400  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 32, Stock: 200.0000, Price: 10.0000, Value: 2000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 31, Stock: 272.0000, Price: 4000.0000, Value: 1088000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 30, Stock: 100.0000, Price: 4000.0000, Value: 400000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 28, Stock: 65.0000, Price: 4000.0000, Value: 260000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 23, Stock: 0.0000, Price: 66.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 0.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 0  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 0, Unit Price: 300.0000, Calculated Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 20, Stock: 964.0000, Price: 200.0000, Value: 192800  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 19, Stock: 70.0000, Price: 4000.0000, Value: 280000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 18, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 17, Stock: 88.0000, Price: 4000.0000, Value: 352000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 16, Stock: 9829.0000, Price: 15.0000, Value: 147435  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 15, Stock: 10099.0000, Price: 66.0000, Value: 666534  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 10099.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 2019.8  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 2019.8, Unit Price: 300.0000, Calculated Value: 605940  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 14, Stock: 79.0000, Price: 4000.0000, Value: 316000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 1, Stock: 945.0000, Price: 4000.0000, Value: 3780000  
[2026-09-14 12:42:22] live.INFO: Final formatted data count: 90  
[2026-09-14 12:42:22] live.INFO: DataTables response generated successfully  
[2026-09-14 12:42:22] live.INFO: === STOCK UNITS REPORT - AJAX Request ===  
[2026-09-14 12:42:22] live.INFO: Parameters - Business ID: 8, Location ID: ALL, Category ID: ALL  
[2026-09-14 12:42:22] live.INFO: Products found: 90  
[2026-09-14 12:42:22] live.INFO: Location data processed  
[2026-09-14 12:42:22] live.INFO: Stock data processed  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 362, Stock: 0, Price: 120.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 0, Base: df, Target: dr  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 0  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: dr, Stock in unit: 0, Unit Price: 1100.0000, Calculated Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 361, Stock: 2250.0000, Price: 30.0000, Value: 67500  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 2250.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 75.0000, Result: 30  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 30, Unit Price: 345.0000, Calculated Value: 10350  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 360, Stock: 0, Price: 300.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 0, Base: pc, Target: bx  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 6.0000, Result: 0  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: bx, Stock in unit: 0, Unit Price: 1050.0000, Calculated Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 347, Stock: 40.0000, Price: 150.0000, Value: 6000  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 40.0000, Base: t1, Target: t2  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 3.3333333333333  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: t2, Stock in unit: 3.3333333333333, Unit Price: 1350.0000, Calculated Value: 4500  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 341, Stock: 888.0000, Price: 44.0000, Value: 39072  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 888.0000, Base: dsfg, Target: fdd  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 4.0000, Result: 222  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: fdd, Stock in unit: 222, Unit Price: 333.0000, Calculated Value: 73926  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 340, Stock: 100.0000, Price: 10.0000, Value: 1000  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 100.0000, Base: pcs, Target: kg  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 100.0000, Result: 1  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: kg, Stock in unit: 1, Unit Price: 250.0000, Calculated Value: 250  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 339, Stock: 45586.0000, Price: 10.0000, Value: 455860  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:22] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:22] live.WARNING: No conversion found, returning original: 45586.0000  
[2026-09-14 12:42:22] live.INFO: No unit price for: pkt, using base stock value: 455860  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 56.0000, Result: 814.03571428571  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 814.03571428571, Unit Price: 265.0000, Calculated Value: 215719.46428571  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 338, Stock: 109.0000, Price: 740.0000, Value: 80660  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 334, Stock: 113.0000, Price: 200.0000, Value: 22600  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 333, Stock: 30.0000, Price: 200.0000, Value: 6000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 332, Stock: 101.0000, Price: 200.0000, Value: 20200  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 331, Stock: 183.0000, Price: 2000.0000, Value: 366000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 330, Stock: 80.0000, Price: 130.0000, Value: 10400  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 160  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: grms, Stock in unit: 160, Unit Price: 65.0000, Calculated Value: 10400  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 320  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: grms, Stock in unit: 320, Unit Price: 35.0000, Calculated Value: 11200  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 329, Stock: 77.0000, Price: 30.0000, Value: 2310  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: g  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 154  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: g, Stock in unit: 154, Unit Price: 15.0000, Calculated Value: 2310  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: 5g  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 308  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: 5g, Stock in unit: 308, Unit Price: 20.0000, Calculated Value: 6160  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 328, Stock: 83.0000, Price: 25.0000, Value: 2075  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 83.0000, Base: pc, Target: bali  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 6.9166666666667  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: bali, Stock in unit: 6.9166666666667, Unit Price: 2400.0000, Calculated Value: 16600  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 327, Stock: 4250.0000, Price: 120.0000, Value: 510000  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:22] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:22] live.WARNING: No conversion found, returning original: 4250.0000  
[2026-09-14 12:42:22] live.INFO: No unit price for: gm, using base stock value: 510000  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: bg  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 50.0000, Result: 85  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: bg, Stock in unit: 85, Unit Price: 25000.0000, Calculated Value: 2125000  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 1.0000, Result: 4250  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: gm, Stock in unit: 4250, Unit Price: 60.0000, Calculated Value: 255000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 326, Stock: 500.0000, Price: 230.0000, Value: 115000  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 500.0000, Base: pkt, Target: bl  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 41.666666666667  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: bl, Stock in unit: 41.666666666667, Unit Price: 2200.0000, Calculated Value: 91666.666666667  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 325, Stock: 950.0000, Price: 10.0000, Value: 9500  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Bx  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 72.0000, Result: 13.194444444444  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: Bx, Stock in unit: 13.194444444444, Unit Price: 540.0000, Calculated Value: 7125  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Pkt  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 79.166666666667  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 79.166666666667, Unit Price: 125.0000, Calculated Value: 9895.8333333333  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 324, Stock: 153.0000, Price: 50.0000, Value: 7650  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A2  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 2.0000, Result: 76.5  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: A2, Stock in unit: 76.5, Unit Price: 95.0000, Calculated Value: 7267.5  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A3  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 20.0000, Result: 7.65  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: A3, Stock in unit: 7.65, Unit Price: 900.0000, Calculated Value: 6885  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 323, Stock: 45.0000, Price: 4000.0000, Value: 180000  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 322, Stock: 0, Price: 116.0000, Value: 0  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 0, Base: ssari, Target: rrasi  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: rrasi, Stock in unit: 0, Unit Price: 2000.0000, Calculated Value: 0  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 321, Stock: 9999.0000, Price: 12.0000, Value: 119988  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS2  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 1999.8  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: SS2, Stock in unit: 1999.8, Unit Price: 60.0000, Calculated Value: 119988  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS3  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 40.0000, Result: 249.975  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: SS3, Stock in unit: 249.975, Unit Price: 450.0000, Calculated Value: 112488.75  
[2026-09-14 12:42:22] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: ss41  
[2026-09-14 12:42:22] live.INFO: Direct conversion - Multiplier: 400.0000, Result: 24.9975  
[2026-09-14 12:42:22] live.INFO: Unit has own price - Unit: ss41, Stock in unit: 24.9975, Unit Price: 1000.0000, Calculated Value: 24997.5  
[2026-09-14 12:42:22] live.INFO: Stock value calculation - Product: 319, Stock: 989.5000, Price: 22.0000, Value: 21769  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: AD  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 968.0000, Result: 1.0222107438017  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: AD, Stock in unit: 1.0222107438017, Unit Price: 2340.0000, Calculated Value: 2391.9731404959  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: WET  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 22.0000, Result: 44.977272727273  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: WET, Stock in unit: 44.977272727273, Unit Price: 334.0000, Calculated Value: 15022.409090909  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: wss  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 1979  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: wss, Stock in unit: 1979, Unit Price: 15.0000, Calculated Value: 29685  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 315, Stock: 457.0000, Price: 5.0000, Value: 2285  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MPckt  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 45.7  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: MPckt, Stock in unit: 45.7, Unit Price: 48.0000, Calculated Value: 2193.6  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MBx  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 120.0000, Result: 3.8083333333333  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: MBx, Stock in unit: 3.8083333333333, Unit Price: 580.0000, Calculated Value: 2208.8333333333  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 314, Stock: 997.0000, Price: 20.0000, Value: 19940  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Packet  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 83.083333333333  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: Packet, Stock in unit: 83.083333333333, Unit Price: 110.0000, Calculated Value: 9139.1666666667  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Carton  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 96.0000, Result: 10.385416666667  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: Carton, Stock in unit: 10.385416666667, Unit Price: 700.0000, Calculated Value: 7269.7916666667  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: hero  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 576.0000, Result: 1.7309027777778  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: hero, Stock in unit: 1.7309027777778, Unit Price: 524.0000, Calculated Value: 906.99305555556  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 313, Stock: 0, Price: 77.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: Pkt  
[2026-09-14 12:42:23] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:23] live.INFO: Level 0 - Unit: Pkt, Multiplier: 12.0000, Factor: 12  
[2026-09-14 12:42:23] live.INFO: Fallback conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 0, Unit Price: 125.0000, Calculated Value: 0  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: swn  
[2026-09-14 12:42:23] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:23] live.WARNING: No conversion found, returning original: 0  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: swn, Stock in unit: 0, Unit Price: 430.0000, Calculated Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 312, Stock: 109.0000, Price: 15.0000, Value: 1635  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 109.0000, Base: Pc-1x, Target: Ctn -28  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 112.0000, Result: 0.97321428571429  
[2026-09-14 12:42:23] live.INFO: No unit price for: Ctn -28, using base stock value: 1635  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 308, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 306, Stock: 6.0000, Price: 4000.0000, Value: 24000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 302, Stock: 378.0000, Price: 4000.0000, Value: 1512000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 296, Stock: 0, Price: 50.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 295, Stock: 10.0000, Price: 100.0000, Value: 1000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 294, Stock: 8.0000, Price: 1.0000, Value: 8  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 293, Stock: 90.0000, Price: 4000.0000, Value: 360000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 292, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 290, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 289, Stock: 98.1000, Price: 60.0000, Value: 5886  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 288, Stock: 92.7000, Price: 50.0000, Value: 4635  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 287, Stock: 97.5000, Price: 40.0000, Value: 3900  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 286, Stock: 100.0000, Price: 70.0000, Value: 7000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 285, Stock: 0.5000, Price: 50.0000, Value: 25  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 284, Stock: 29.0000, Price: 4000.0000, Value: 116000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 283, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 272, Stock: 104.0000, Price: 4000.0000, Value: 416000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 268, Stock: 119.0000, Price: 4000.0000, Value: 476000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 267, Stock: 109.0000, Price: 4000.0000, Value: 436000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 262, Stock: 313.0000, Price: 66.0000, Value: 20658  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 313.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 62.6  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 62.6, Unit Price: 300.0000, Calculated Value: 18780  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 258, Stock: 244.0000, Price: 11000.0000, Value: 2684000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 224, Stock: 96.0000, Price: 4000.0000, Value: 384000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 217, Stock: -63.0000, Price: 4000.0000, Value: -252000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 201, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 153, Stock: 76.0000, Price: 4000.0000, Value: 304000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 151, Stock: 152.0000, Price: 800.0000, Value: 121600  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 92, Stock: 2.0000, Price: 4000.0000, Value: 8000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 78, Stock: 0, Price: 5000.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 77, Stock: 50.0000, Price: 4000.0000, Value: 200000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 73, Stock: 46.0000, Price: 4000.0000, Value: 184000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 66, Stock: 263.0000, Price: 4000.0000, Value: 1052000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 53, Stock: 10.0000, Price: 4000.0000, Value: 40000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 52, Stock: 1200.0000, Price: 1000.0000, Value: 1200000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 51, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 50, Stock: 193.0000, Price: 4000.0000, Value: 772000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 49, Stock: 284.5000, Price: 800.0000, Value: 227600  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 48, Stock: 6.0000, Price: 250.0000, Value: 1500  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 47, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 46, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 43, Stock: 70.0000, Price: 2400.0000, Value: 168000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 42, Stock: 38.0000, Price: 1000.0000, Value: 38000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 41, Stock: 49.0000, Price: 100.0000, Value: 4900  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 40, Stock: 36.0000, Price: 900.0000, Value: 32400  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 39, Stock: 1187.0000, Price: 290.0000, Value: 344230  
[2026-09-14 12:42:23] live.INFO: === STOCK UNITS REPORT - AJAX Request ===  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 38, Stock: 67.0000, Price: 300.0000, Value: 20100  
[2026-09-14 12:42:23] live.INFO: Parameters - Business ID: 8, Location ID: ALL, Category ID: ALL  
[2026-09-14 12:42:23] live.INFO: Products found: 90  
[2026-09-14 12:42:23] live.INFO: Location data processed  
[2026-09-14 12:42:23] live.INFO: Stock data processed  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 362, Stock: 0, Price: 120.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 0, Base: df, Target: dr  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 0  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: dr, Stock in unit: 0, Unit Price: 1100.0000, Calculated Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 361, Stock: 2250.0000, Price: 30.0000, Value: 67500  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 2250.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 75.0000, Result: 30  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 30, Unit Price: 345.0000, Calculated Value: 10350  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 360, Stock: 0, Price: 300.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 0, Base: pc, Target: bx  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 6.0000, Result: 0  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: bx, Stock in unit: 0, Unit Price: 1050.0000, Calculated Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 347, Stock: 40.0000, Price: 150.0000, Value: 6000  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 40.0000, Base: t1, Target: t2  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 3.3333333333333  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: t2, Stock in unit: 3.3333333333333, Unit Price: 1350.0000, Calculated Value: 4500  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 341, Stock: 888.0000, Price: 44.0000, Value: 39072  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 37, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 888.0000, Base: dsfg, Target: fdd  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 4.0000, Result: 222  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: fdd, Stock in unit: 222, Unit Price: 333.0000, Calculated Value: 73926  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 340, Stock: 100.0000, Price: 10.0000, Value: 1000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 36, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 100.0000, Base: pcs, Target: kg  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 100.0000, Result: 1  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: kg, Stock in unit: 1, Unit Price: 250.0000, Calculated Value: 250  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 35, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 339, Stock: 45586.0000, Price: 10.0000, Value: 455860  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 34, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:23] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:23] live.WARNING: No conversion found, returning original: 45586.0000  
[2026-09-14 12:42:23] live.INFO: No unit price for: pkt, using base stock value: 455860  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 56.0000, Result: 814.03571428571  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 814.03571428571, Unit Price: 265.0000, Calculated Value: 215719.46428571  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 338, Stock: 109.0000, Price: 740.0000, Value: 80660  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 33, Stock: 20.0000, Price: 20.0000, Value: 400  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 334, Stock: 113.0000, Price: 200.0000, Value: 22600  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 333, Stock: 30.0000, Price: 200.0000, Value: 6000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 332, Stock: 101.0000, Price: 200.0000, Value: 20200  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 331, Stock: 183.0000, Price: 2000.0000, Value: 366000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 330, Stock: 80.0000, Price: 130.0000, Value: 10400  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 160  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: grms, Stock in unit: 160, Unit Price: 65.0000, Calculated Value: 10400  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 320  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: grms, Stock in unit: 320, Unit Price: 35.0000, Calculated Value: 11200  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 329, Stock: 77.0000, Price: 30.0000, Value: 2310  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: g  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 154  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: g, Stock in unit: 154, Unit Price: 15.0000, Calculated Value: 2310  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: 5g  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 308  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: 5g, Stock in unit: 308, Unit Price: 20.0000, Calculated Value: 6160  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 328, Stock: 83.0000, Price: 25.0000, Value: 2075  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 83.0000, Base: pc, Target: bali  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 6.9166666666667  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: bali, Stock in unit: 6.9166666666667, Unit Price: 2400.0000, Calculated Value: 16600  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 327, Stock: 4250.0000, Price: 120.0000, Value: 510000  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:23] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:23] live.WARNING: No conversion found, returning original: 4250.0000  
[2026-09-14 12:42:23] live.INFO: No unit price for: gm, using base stock value: 510000  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: bg  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 50.0000, Result: 85  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: bg, Stock in unit: 85, Unit Price: 25000.0000, Calculated Value: 2125000  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 1.0000, Result: 4250  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: gm, Stock in unit: 4250, Unit Price: 60.0000, Calculated Value: 255000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 326, Stock: 500.0000, Price: 230.0000, Value: 115000  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 500.0000, Base: pkt, Target: bl  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 41.666666666667  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: bl, Stock in unit: 41.666666666667, Unit Price: 2200.0000, Calculated Value: 91666.666666667  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 325, Stock: 950.0000, Price: 10.0000, Value: 9500  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Bx  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 72.0000, Result: 13.194444444444  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: Bx, Stock in unit: 13.194444444444, Unit Price: 540.0000, Calculated Value: 7125  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Pkt  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 79.166666666667  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 79.166666666667, Unit Price: 125.0000, Calculated Value: 9895.8333333333  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 32, Stock: 200.0000, Price: 10.0000, Value: 2000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 324, Stock: 153.0000, Price: 50.0000, Value: 7650  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A2  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 2.0000, Result: 76.5  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: A2, Stock in unit: 76.5, Unit Price: 95.0000, Calculated Value: 7267.5  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A3  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 20.0000, Result: 7.65  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: A3, Stock in unit: 7.65, Unit Price: 900.0000, Calculated Value: 6885  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 323, Stock: 45.0000, Price: 4000.0000, Value: 180000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 322, Stock: 0, Price: 116.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 0, Base: ssari, Target: rrasi  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: rrasi, Stock in unit: 0, Unit Price: 2000.0000, Calculated Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 321, Stock: 9999.0000, Price: 12.0000, Value: 119988  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS2  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 1999.8  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: SS2, Stock in unit: 1999.8, Unit Price: 60.0000, Calculated Value: 119988  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS3  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 40.0000, Result: 249.975  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: SS3, Stock in unit: 249.975, Unit Price: 450.0000, Calculated Value: 112488.75  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: ss41  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 400.0000, Result: 24.9975  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: ss41, Stock in unit: 24.9975, Unit Price: 1000.0000, Calculated Value: 24997.5  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 319, Stock: 989.5000, Price: 22.0000, Value: 21769  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: AD  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 968.0000, Result: 1.0222107438017  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: AD, Stock in unit: 1.0222107438017, Unit Price: 2340.0000, Calculated Value: 2391.9731404959  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: WET  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 22.0000, Result: 44.977272727273  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: WET, Stock in unit: 44.977272727273, Unit Price: 334.0000, Calculated Value: 15022.409090909  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: wss  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 1979  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: wss, Stock in unit: 1979, Unit Price: 15.0000, Calculated Value: 29685  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 315, Stock: 457.0000, Price: 5.0000, Value: 2285  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MPckt  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 45.7  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: MPckt, Stock in unit: 45.7, Unit Price: 48.0000, Calculated Value: 2193.6  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MBx  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 120.0000, Result: 3.8083333333333  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: MBx, Stock in unit: 3.8083333333333, Unit Price: 580.0000, Calculated Value: 2208.8333333333  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 314, Stock: 997.0000, Price: 20.0000, Value: 19940  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Packet  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 83.083333333333  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: Packet, Stock in unit: 83.083333333333, Unit Price: 110.0000, Calculated Value: 9139.1666666667  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Carton  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 96.0000, Result: 10.385416666667  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: Carton, Stock in unit: 10.385416666667, Unit Price: 700.0000, Calculated Value: 7269.7916666667  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: hero  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 576.0000, Result: 1.7309027777778  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: hero, Stock in unit: 1.7309027777778, Unit Price: 524.0000, Calculated Value: 906.99305555556  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 313, Stock: 0, Price: 77.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: Pkt  
[2026-09-14 12:42:23] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:23] live.INFO: Level 0 - Unit: Pkt, Multiplier: 12.0000, Factor: 12  
[2026-09-14 12:42:23] live.INFO: Fallback conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 0, Unit Price: 125.0000, Calculated Value: 0  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: swn  
[2026-09-14 12:42:23] live.INFO: Starting multi-level conversion  
[2026-09-14 12:42:23] live.WARNING: No conversion found, returning original: 0  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: swn, Stock in unit: 0, Unit Price: 430.0000, Calculated Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 312, Stock: 109.0000, Price: 15.0000, Value: 1635  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 109.0000, Base: Pc-1x, Target: Ctn -28  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 112.0000, Result: 0.97321428571429  
[2026-09-14 12:42:23] live.INFO: No unit price for: Ctn -28, using base stock value: 1635  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 31, Stock: 272.0000, Price: 4000.0000, Value: 1088000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 30, Stock: 100.0000, Price: 4000.0000, Value: 400000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 28, Stock: 65.0000, Price: 4000.0000, Value: 260000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 23, Stock: 0.0000, Price: 66.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 0.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 0  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 0, Unit Price: 300.0000, Calculated Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 20, Stock: 964.0000, Price: 200.0000, Value: 192800  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 308, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 306, Stock: 6.0000, Price: 4000.0000, Value: 24000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 302, Stock: 378.0000, Price: 4000.0000, Value: 1512000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 296, Stock: 0, Price: 50.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 19, Stock: 70.0000, Price: 4000.0000, Value: 280000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 18, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 17, Stock: 88.0000, Price: 4000.0000, Value: 352000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 16, Stock: 9829.0000, Price: 15.0000, Value: 147435  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 295, Stock: 10.0000, Price: 100.0000, Value: 1000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 15, Stock: 10099.0000, Price: 66.0000, Value: 666534  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 10099.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 2019.8  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 2019.8, Unit Price: 300.0000, Calculated Value: 605940  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 14, Stock: 79.0000, Price: 4000.0000, Value: 316000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 1, Stock: 945.0000, Price: 4000.0000, Value: 3780000  
[2026-09-14 12:42:23] live.INFO: Final formatted data count: 90  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 294, Stock: 8.0000, Price: 1.0000, Value: 8  
[2026-09-14 12:42:23] live.INFO: DataTables response generated successfully  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 293, Stock: 90.0000, Price: 4000.0000, Value: 360000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 292, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 290, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 289, Stock: 98.1000, Price: 60.0000, Value: 5886  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 288, Stock: 92.7000, Price: 50.0000, Value: 4635  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 287, Stock: 97.5000, Price: 40.0000, Value: 3900  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 286, Stock: 100.0000, Price: 70.0000, Value: 7000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 285, Stock: 0.5000, Price: 50.0000, Value: 25  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 284, Stock: 29.0000, Price: 4000.0000, Value: 116000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 283, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 272, Stock: 104.0000, Price: 4000.0000, Value: 416000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 268, Stock: 119.0000, Price: 4000.0000, Value: 476000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 267, Stock: 109.0000, Price: 4000.0000, Value: 436000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 262, Stock: 313.0000, Price: 66.0000, Value: 20658  
[2026-09-14 12:42:23] live.INFO: convertStockToUnit - Stock: 313.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:23] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 62.6  
[2026-09-14 12:42:23] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 62.6, Unit Price: 300.0000, Calculated Value: 18780  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 258, Stock: 244.0000, Price: 11000.0000, Value: 2684000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 224, Stock: 96.0000, Price: 4000.0000, Value: 384000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 217, Stock: -63.0000, Price: 4000.0000, Value: -252000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 201, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 153, Stock: 76.0000, Price: 4000.0000, Value: 304000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 151, Stock: 152.0000, Price: 800.0000, Value: 121600  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 92, Stock: 2.0000, Price: 4000.0000, Value: 8000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 78, Stock: 0, Price: 5000.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 77, Stock: 50.0000, Price: 4000.0000, Value: 200000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 73, Stock: 46.0000, Price: 4000.0000, Value: 184000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 66, Stock: 263.0000, Price: 4000.0000, Value: 1052000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 53, Stock: 10.0000, Price: 4000.0000, Value: 40000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 52, Stock: 1200.0000, Price: 1000.0000, Value: 1200000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 51, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 50, Stock: 193.0000, Price: 4000.0000, Value: 772000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 49, Stock: 284.5000, Price: 800.0000, Value: 227600  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 48, Stock: 6.0000, Price: 250.0000, Value: 1500  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 47, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 46, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 43, Stock: 70.0000, Price: 2400.0000, Value: 168000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 42, Stock: 38.0000, Price: 1000.0000, Value: 38000  
[2026-09-14 12:42:23] live.INFO: Stock value calculation - Product: 41, Stock: 49.0000, Price: 100.0000, Value: 4900  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 40, Stock: 36.0000, Price: 900.0000, Value: 32400  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 39, Stock: 1187.0000, Price: 290.0000, Value: 344230  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 38, Stock: 67.0000, Price: 300.0000, Value: 20100  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 37, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 36, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 35, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 34, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 33, Stock: 20.0000, Price: 20.0000, Value: 400  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 32, Stock: 200.0000, Price: 10.0000, Value: 2000  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 31, Stock: 272.0000, Price: 4000.0000, Value: 1088000  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 30, Stock: 100.0000, Price: 4000.0000, Value: 400000  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 28, Stock: 65.0000, Price: 4000.0000, Value: 260000  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 23, Stock: 0.0000, Price: 66.0000, Value: 0  
[2026-09-14 12:42:24] live.INFO: convertStockToUnit - Stock: 0.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:24] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 0  
[2026-09-14 12:42:24] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 0, Unit Price: 300.0000, Calculated Value: 0  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 20, Stock: 964.0000, Price: 200.0000, Value: 192800  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 19, Stock: 70.0000, Price: 4000.0000, Value: 280000  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 18, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 17, Stock: 88.0000, Price: 4000.0000, Value: 352000  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 16, Stock: 9829.0000, Price: 15.0000, Value: 147435  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 15, Stock: 10099.0000, Price: 66.0000, Value: 666534  
[2026-09-14 12:42:24] live.INFO: convertStockToUnit - Stock: 10099.0000, Base: Pc, Target: 6k  
[2026-09-14 12:42:24] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 2019.8  
[2026-09-14 12:42:24] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 2019.8, Unit Price: 300.0000, Calculated Value: 605940  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 14, Stock: 79.0000, Price: 4000.0000, Value: 316000  
[2026-09-14 12:42:24] live.INFO: Stock value calculation - Product: 1, Stock: 945.0000, Price: 4000.0000, Value: 3780000  
[2026-09-14 12:42:24] live.INFO: Final formatted data count: 90  
[2026-09-14 12:42:24] live.INFO: DataTables response generated successfully  
[2026-09-14 12:43:04] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 12:43:43] live.INFO: filterProduct method called {"business_id":8,"search_term":"am","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:43:43] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:43:43] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:43:43] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 12:43:43] live.DEBUG: Applying search filters {"search_term":"am","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 12:43:43] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 12:43:43] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:43:43] live.DEBUG: Added lot number fields to select  
[2026-09-14 12:43:43] live.INFO: filterProduct completed successfully {"result_count":4,"business_id":8,"search_term":"am"} 
[2026-09-14 12:43:43] live.INFO: filterProduct method called {"business_id":8,"search_term":"amo","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:43:43] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:43:43] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:43:43] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 12:43:43] live.DEBUG: Applying search filters {"search_term":"amo","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 12:43:43] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 12:43:43] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:43:43] live.DEBUG: Added lot number fields to select  
[2026-09-14 12:43:43] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"amo"} 
[2026-09-14 12:43:44] live.INFO: Product Row Debug - RELOADED {"product_id":361,"product_name":"Amoxicillin 500mg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":30.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"286":{"unit_id":286,"unit_name":"Pc","unit_price":30.0,"multiplier":1,"has_price":true},"287":{"unit_id":287,"unit_name":"Pkt","unit_price":345.0,"multiplier":"75.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 12:43:46] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 12:44:02] live.INFO: Credit Limit Check Started {"contact_id":"94","status":"final","final_total":"60.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 12:44:02] live.DEBUG: Payment Calculation {"final_total":60.0,"curr_total_payment":60.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 12:44:02] live.INFO: Credit Limit Check Skipped - Fully Paid {"final_total":60.0,"curr_total_payment":60.0} 
[2026-09-14 12:44:02] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 12:44:02] live.INFO: is_mpesa_sale value: true  
[2026-09-14 12:44:02] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":true,"is_valid_mpesa_sale":false,"payment_method_input":"cash","mpesa_transaction_id":null,"transaction_id":1863} 
[2026-09-14 12:44:02] live.INFO: Journal Entry Case: FULL CASH PAYMENT {"transaction_id":1863,"final_total":60.0,"amount_paid":60.0,"balance_due":0} 
[2026-09-14 12:44:02] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1863,"entries":[{"transaction_id":1863,"created_by_id":21,"transaction_number":"TRX-6aa7c1e2e4b294.60454249","payment_detail_id":1326,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:44:02","updated_at":"2026-09-14 12:44:02","chart_of_account_id":23,"debit":null,"credit":60.0},{"transaction_id":1863,"created_by_id":21,"transaction_number":"TRX-6aa7c1e2e4b294.60454249","payment_detail_id":1326,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:44:02","updated_at":"2026-09-14 12:44:02","chart_of_account_id":27,"debit":60.0,"credit":null}]} 
[2026-09-14 12:44:03] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1183,"purchase_line_id":1598,"quantity":2.0,"created_at":"2026-09-14 12:44:03","updated_at":"2026-09-14 12:44:03"}]} 
[2026-09-14 12:44:03] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 12:44:03] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":32.0} 
[2026-09-14 12:44:03] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1863,"contact_id":94,"customer_name":"Walk-In Customer","has_tin":false,"has_digitax_id":false} 
[2026-09-14 12:44:03] live.ERROR: ETIMS: Missing item_id for product {"product_id":361} 
[2026-09-14 12:44:03] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 12:44:03] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1863  
[2026-09-14 12:44:30] live.INFO: filterProduct method called {"business_id":8,"search_term":"amo","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:44:30] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:44:30] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:44:30] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 12:44:30] live.DEBUG: Applying search filters {"search_term":"amo","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 12:44:30] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 12:44:30] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:44:30] live.DEBUG: Added lot number fields to select  
[2026-09-14 12:44:30] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"amo"} 
[2026-09-14 12:44:30] live.INFO: Product Row Debug - RELOADED {"product_id":361,"product_name":"Amoxicillin 500mg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":30.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"286":{"unit_id":286,"unit_name":"Pc","unit_price":30.0,"multiplier":1,"has_price":true},"287":{"unit_id":287,"unit_name":"Pkt","unit_price":345.0,"multiplier":"75.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 12:44:37] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:37] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:38] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:38] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:38] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:38] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:39] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:39] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:40] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:40] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:41] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:41] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:41] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:41] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:41] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:41] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:42] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:42] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:42] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:42] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:43] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:43] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:44] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:44] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:44] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:44] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:45] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:45] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:45] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:45] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:46] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:46] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:47] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:47] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:47] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:47] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:48] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:48] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:48] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:48] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:49] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:49] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:49] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:49] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:50] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:50] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:50] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:50] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:50] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:50] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:51] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:51] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:51] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:51] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:52] live.INFO: Fetching tax rate for product ID: 361  
[2026-09-14 12:44:52] live.INFO: Product ID 361 has no tax assigned.  
[2026-09-14 12:44:53] live.INFO: Credit Limit Check Started {"contact_id":"94","status":"final","final_total":"690.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 12:44:53] live.DEBUG: Payment Calculation {"final_total":690.0,"curr_total_payment":690.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 12:44:53] live.INFO: Credit Limit Check Skipped - Fully Paid {"final_total":690.0,"curr_total_payment":690.0} 
[2026-09-14 12:44:53] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 12:44:53] live.INFO: is_mpesa_sale value: true  
[2026-09-14 12:44:53] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":true,"is_valid_mpesa_sale":false,"payment_method_input":"cash","mpesa_transaction_id":null,"transaction_id":1864} 
[2026-09-14 12:44:53] live.INFO: Journal Entry Case: FULL CASH PAYMENT {"transaction_id":1864,"final_total":690.0,"amount_paid":690.0,"balance_due":0} 
[2026-09-14 12:44:53] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1864,"entries":[{"transaction_id":1864,"created_by_id":21,"transaction_number":"TRX-6aa7c2151818e3.12171275","payment_detail_id":1327,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:44:53","updated_at":"2026-09-14 12:44:53","chart_of_account_id":23,"debit":null,"credit":690.0},{"transaction_id":1864,"created_by_id":21,"transaction_number":"TRX-6aa7c2151818e3.12171275","payment_detail_id":1327,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:44:53","updated_at":"2026-09-14 12:44:53","chart_of_account_id":27,"debit":690.0,"credit":null}]} 
[2026-09-14 12:44:53] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1184,"purchase_line_id":1598,"quantity":150.0,"created_at":"2026-09-14 12:44:53","updated_at":"2026-09-14 12:44:53"}]} 
[2026-09-14 12:44:53] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 12:44:53] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1864,"contact_id":94,"customer_name":"Walk-In Customer","has_tin":false,"has_digitax_id":false} 
[2026-09-14 12:44:53] live.ERROR: ETIMS: Missing item_id for product {"product_id":361} 
[2026-09-14 12:44:53] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 12:44:53] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1864  
[2026-09-14 12:45:15] live.INFO: filterProduct method called {"business_id":8,"search_term":"amo","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:45:15] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:45:15] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:45:15] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 12:45:15] live.DEBUG: Applying search filters {"search_term":"amo","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 12:45:15] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 12:45:15] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:45:15] live.DEBUG: Added lot number fields to select  
[2026-09-14 12:45:15] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"amo"} 
[2026-09-14 12:45:15] live.INFO: Product Row Debug - RELOADED {"product_id":361,"product_name":"Amoxicillin 500mg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":30.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"286":{"unit_id":286,"unit_name":"Pc","unit_price":30.0,"multiplier":1,"has_price":true},"287":{"unit_id":287,"unit_name":"Pkt","unit_price":345.0,"multiplier":"75.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 12:45:19] live.INFO: Credit Limit Check Started {"contact_id":"94","status":"final","final_total":"30.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 12:45:19] live.DEBUG: Payment Calculation {"final_total":30.0,"curr_total_payment":0.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 12:45:19] live.DEBUG: Contact Credit Limit Retrieved {"contact_id":"94","contact_name":"Walk-In Customer","credit_limit":"0.0000"} 
[2026-09-14 12:45:19] live.INFO: Credit Limit Check - Current Transaction Only {"contact_id":"94","contact_name":"Walk-In Customer","credit_limit":"0.0000","final_total":30.0,"curr_total_payment":0.0,"current_due":30.0,"will_exceed_limit":true} 
[2026-09-14 12:45:19] live.WARNING: Credit Limit Exceeded for Current Transaction {"contact_id":"94","contact_name":"Walk-In Customer","current_due":30.0,"credit_limit":"0.0000","exceeded_by":30.0} 
[2026-09-14 12:45:32] live.INFO: Credit Limit Check Started {"contact_id":"878","status":"final","final_total":"30.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 12:45:32] live.DEBUG: Payment Calculation {"final_total":30.0,"curr_total_payment":0.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 12:45:32] live.INFO: Credit Limit Check Skipped - No Credit Limit Set {"contact_id":"878","contact_name":"Susan"} 
[2026-09-14 12:45:32] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 12:45:32] live.INFO: is_mpesa_sale value: true  
[2026-09-14 12:45:32] live.INFO: Journal Entry Case: FULL CREDIT SALE {"transaction_id":1865,"final_total":30.0,"amount_paid":0.0,"balance_due":30.0} 
[2026-09-14 12:45:32] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1865,"entries":[{"transaction_id":1865,"created_by_id":21,"transaction_number":"TRX-6aa7c23cebc162.26643428","payment_detail_id":1328,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:45:32","updated_at":"2026-09-14 12:45:32","chart_of_account_id":23,"debit":null,"credit":30.0},{"transaction_id":1865,"created_by_id":21,"transaction_number":"TRX-6aa7c23cebc162.26643428","payment_detail_id":1328,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:45:32","updated_at":"2026-09-14 12:45:32","chart_of_account_id":19,"debit":30.0,"credit":null}]} 
[2026-09-14 12:45:32] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1185,"purchase_line_id":1598,"quantity":1.0,"created_at":"2026-09-14 12:45:32","updated_at":"2026-09-14 12:45:32"}]} 
[2026-09-14 12:45:32] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 12:45:32] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":16.0} 
[2026-09-14 12:45:33] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1865,"contact_id":878,"customer_name":"Susan","has_tin":false,"has_digitax_id":false} 
[2026-09-14 12:45:33] live.ERROR: ETIMS: Missing item_id for product {"product_id":361} 
[2026-09-14 12:45:33] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 12:45:33] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1865  
[2026-09-14 12:45:44] live.INFO: filterProduct method called {"business_id":8,"search_term":"amo","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:45:44] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:45:44] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:45:44] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 12:45:44] live.DEBUG: Applying search filters {"search_term":"amo","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 12:45:44] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 12:45:44] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:45:44] live.DEBUG: Added lot number fields to select  
[2026-09-14 12:45:44] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"amo"} 
[2026-09-14 12:45:44] live.INFO: Product Row Debug - RELOADED {"product_id":361,"product_name":"Amoxicillin 500mg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":30.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"286":{"unit_id":286,"unit_name":"Pc","unit_price":30.0,"multiplier":1,"has_price":true},"287":{"unit_id":287,"unit_name":"Pkt","unit_price":345.0,"multiplier":"75.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 12:46:11] live.INFO: Loaded Payment Settings: {"type":"till","short_code":"3582003","child_number":"3582003","till_no":5699724,"passkey":"8df9b4d855b77a20bd2257ee86f2b482b1816237e0e248e39ff8cbd3e73aabff","consumer_key":"W9AyBGwLeBRq0FAkn2FG3g9EJK9fF3nKwGTzG2pNtByd5tnQ","consumer_secret":"nziTooyd6JS0GC08ZG7456Ab531RVYOI1AyeZNXpDKha0xQ6mEvbFtOiAVAjlhyc","site_url":"https://now.riset.cloud/","payment_options":"[\"custom_pay_1\",\"custom_pay_2\"]"} 
[2026-09-14 12:46:11] live.INFO: STK Push Request Received. {"request_input":{"phone":"0711650153","amount":"30.00"}} 
[2026-09-14 12:46:11] live.INFO: Phone number formatted. {"formatted_phone":"254711650153"} 
[2026-09-14 12:46:11] live.INFO: Phone and Amount after formatting. {"phone":"254711650153","amount":30} 
[2026-09-14 12:46:11] live.INFO: Timestamp for STK Push: {"timestamp":"20260914120911"} 
[2026-09-14 12:46:11] live.INFO: Transaction type determined. {"transaction_type":"CustomerBuyGoodsOnline"} 
[2026-09-14 12:46:11] live.INFO: PartyB to be used in STK Push. {"type":"till","partyB":5699724,"short_code":"3582003","child_number":"3582003","till_no":5699724} 
[2026-09-14 12:46:11] live.INFO: Callback URLs set. {"callbackURL":"https://now.riset.cloud/api/payment/callback","validationURL":"https://now.riset.cloud/api/payment/validation"} 
[2026-09-14 12:46:11] live.INFO: Loaded Payment Settings: {"type":"till","short_code":"3582003","child_number":"3582003","till_no":5699724,"passkey":"8df9b4d855b77a20bd2257ee86f2b482b1816237e0e248e39ff8cbd3e73aabff","consumer_key":"W9AyBGwLeBRq0FAkn2FG3g9EJK9fF3nKwGTzG2pNtByd5tnQ","consumer_secret":"nziTooyd6JS0GC08ZG7456Ab531RVYOI1AyeZNXpDKha0xQ6mEvbFtOiAVAjlhyc","site_url":"https://now.riset.cloud/","payment_options":"[\"custom_pay_1\",\"custom_pay_2\"]"} 
[2026-09-14 12:46:11] live.INFO: Generated password for M-Pesa STK Push. {"password":"MzU4MjAwMzhkZjliNGQ4NTViNzdhMjBiZDIyNTdlZTg2ZjJiNDgyYjE4MTYyMzdlMGUyNDhlMzlmZjhjYmQzZTczYWFiZmYyMDI2MDkxNDEyMDkxMQ=="} 
[2026-09-14 12:46:11] live.INFO: Payload prepared for STK Push. {"payload":{"BusinessShortCode":"3582003","Password":"MzU4MjAwMzhkZjliNGQ4NTViNzdhMjBiZDIyNTdlZTg2ZjJiNDgyYjE4MTYyMzdlMGUyNDhlMzlmZjhjYmQzZTczYWFiZmYyMDI2MDkxNDEyMDkxMQ==","Timestamp":"20260914120911","TransactionType":"CustomerBuyGoodsOnline","Amount":30,"PartyA":"254711650153","PartyB":5699724,"PhoneNumber":"254711650153","CallBackURL":"https://now.riset.cloud/api/payment/callback","AccountReference":12,"TransactionDesc":"Biz"}} 
[2026-09-14 12:46:11] live.INFO: Loaded Payment Settings: {"type":"till","short_code":"3582003","child_number":"3582003","till_no":5699724,"passkey":"8df9b4d855b77a20bd2257ee86f2b482b1816237e0e248e39ff8cbd3e73aabff","consumer_key":"W9AyBGwLeBRq0FAkn2FG3g9EJK9fF3nKwGTzG2pNtByd5tnQ","consumer_secret":"nziTooyd6JS0GC08ZG7456Ab531RVYOI1AyeZNXpDKha0xQ6mEvbFtOiAVAjlhyc","site_url":"https://now.riset.cloud/","payment_options":"[\"custom_pay_1\",\"custom_pay_2\"]"} 
[2026-09-14 12:46:12] live.INFO: Loaded Payment Settings: {"type":"till","short_code":"3582003","child_number":"3582003","till_no":5699724,"passkey":"8df9b4d855b77a20bd2257ee86f2b482b1816237e0e248e39ff8cbd3e73aabff","consumer_key":"W9AyBGwLeBRq0FAkn2FG3g9EJK9fF3nKwGTzG2pNtByd5tnQ","consumer_secret":"nziTooyd6JS0GC08ZG7456Ab531RVYOI1AyeZNXpDKha0xQ6mEvbFtOiAVAjlhyc","site_url":"https://now.riset.cloud/","payment_options":"[\"custom_pay_1\",\"custom_pay_2\"]"} 
[2026-09-14 12:46:12] live.INFO: Registering URLs. {"shortCode":"3582003","confirmationURL":"https://now.riset.cloud/api/payment/callback","validationURL":"https://now.riset.cloud/api/payment/validation"} 
[2026-09-14 12:46:13] live.INFO: URL registration response. {"response":"{
                    \"requestId\":\"c3fd-475c-9fbf-193eca707af89897542\",
                    \"errorCode\": \"500.003.1001\",
                    \"errorMessage\": \"URLs are already registered\"
                }
            "} 
[2026-09-14 12:46:14] live.INFO: STK Push response received. {"response":{"MerchantRequestID":"f718-44d8-a5df-b9b3b074c8e712395090","CheckoutRequestID":"ws_CO_14092026124614649711650153","ResponseCode":"0","ResponseDescription":"Success. Request accepted for processing","CustomerMessage":"Success. Request accepted for processing"}} 
[2026-09-14 12:48:38] live.INFO: Credit Limit Check Started {"contact_id":"94","status":"final","final_total":"360.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 12:48:38] live.DEBUG: Payment Calculation {"final_total":360.0,"curr_total_payment":360.0,"is_credit_sale":false,"payment_count":2} 
[2026-09-14 12:48:38] live.INFO: Credit Limit Check Skipped - Fully Paid {"final_total":360.0,"curr_total_payment":360.0} 
[2026-09-14 12:48:38] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 12:48:38] live.INFO: is_mpesa_sale value: true  
[2026-09-14 12:48:38] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":true,"is_valid_mpesa_sale":false,"payment_method_input":"cash","mpesa_transaction_id":null,"transaction_id":1866} 
[2026-09-14 12:48:38] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":true,"is_valid_mpesa_sale":false,"payment_method_input":"custom_pay_4","mpesa_transaction_id":null,"transaction_id":1866} 
[2026-09-14 12:48:38] live.INFO: Journal Entry Case: PARTIAL PAYMENT {"transaction_id":1866,"final_total":360.0,"amount_paid":200.0,"balance_due":160.0} 
[2026-09-14 12:48:38] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1866,"entries":[{"transaction_id":1866,"created_by_id":21,"transaction_number":"TRX-6aa7c2f67ae293.71590278","payment_detail_id":1329,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:48:38","updated_at":"2026-09-14 12:48:38","chart_of_account_id":23,"debit":null,"credit":360.0},{"transaction_id":1866,"created_by_id":21,"transaction_number":"TRX-6aa7c2f67ae293.71590278","payment_detail_id":1329,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:48:38","updated_at":"2026-09-14 12:48:38","chart_of_account_id":27,"debit":200.0,"credit":null},{"transaction_id":1866,"created_by_id":21,"transaction_number":"TRX-6aa7c2f67ae293.71590278","payment_detail_id":1329,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:48:38","updated_at":"2026-09-14 12:48:38","chart_of_account_id":19,"debit":160.0,"credit":null}]} 
[2026-09-14 12:48:38] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1186,"purchase_line_id":1598,"quantity":12.0,"created_at":"2026-09-14 12:48:38","updated_at":"2026-09-14 12:48:38"}]} 
[2026-09-14 12:48:38] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 12:48:38] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":192.0} 
[2026-09-14 12:48:38] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1866,"contact_id":94,"customer_name":"Walk-In Customer","has_tin":false,"has_digitax_id":false} 
[2026-09-14 12:48:38] live.ERROR: ETIMS: Missing item_id for product {"product_id":361} 
[2026-09-14 12:48:38] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 12:48:38] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1866  
[2026-09-14 12:49:17] live.INFO: filterProduct method called {"business_id":8,"search_term":"amo","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:49:17] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:49:17] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:49:17] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 12:49:17] live.DEBUG: Applying search filters {"search_term":"amo","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 12:49:17] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 12:49:17] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:49:17] live.DEBUG: Added lot number fields to select  
[2026-09-14 12:49:17] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"amo"} 
[2026-09-14 12:49:18] live.INFO: Product Row Debug - RELOADED {"product_id":361,"product_name":"Amoxicillin 500mg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":30.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"286":{"unit_id":286,"unit_name":"Pc","unit_price":30.0,"multiplier":1,"has_price":true},"287":{"unit_id":287,"unit_name":"Pkt","unit_price":345.0,"multiplier":"75.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 12:49:35] live.INFO: Credit Limit Check Started {"contact_id":"94","status":"final","final_total":"60.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 12:49:35] live.DEBUG: Payment Calculation {"final_total":60.0,"curr_total_payment":60.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 12:49:35] live.INFO: Credit Limit Check Skipped - Fully Paid {"final_total":60.0,"curr_total_payment":60.0} 
[2026-09-14 12:49:35] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 12:49:35] live.INFO: is_mpesa_sale value: true  
[2026-09-14 12:49:35] live.INFO: Journal Entry Case: FULL CASH PAYMENT {"transaction_id":1867,"final_total":60.0,"amount_paid":60.0,"balance_due":0} 
[2026-09-14 12:49:35] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1867,"entries":[{"transaction_id":1867,"created_by_id":21,"transaction_number":"TRX-6aa7c32f573343.99457035","payment_detail_id":1330,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:49:35","updated_at":"2026-09-14 12:49:35","chart_of_account_id":23,"debit":null,"credit":60.0},{"transaction_id":1867,"created_by_id":21,"transaction_number":"TRX-6aa7c32f573343.99457035","payment_detail_id":1330,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 12:49:35","updated_at":"2026-09-14 12:49:35","chart_of_account_id":27,"debit":60.0,"credit":null}]} 
[2026-09-14 12:49:35] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1187,"purchase_line_id":1598,"quantity":2.0,"created_at":"2026-09-14 12:49:35","updated_at":"2026-09-14 12:49:35"}]} 
[2026-09-14 12:49:35] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 12:49:35] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":32.0} 
[2026-09-14 12:49:49] live.INFO: Credit Limit Check Started {"contact_id":"94","status":"final","final_total":"60.00","is_credit_sale":"0","exclude_transaction_id":"1867"} 
[2026-09-14 12:49:49] live.DEBUG: Payment Calculation {"final_total":60.0,"curr_total_payment":60.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 12:49:49] live.INFO: Credit Limit Check Skipped - Fully Paid {"final_total":60.0,"curr_total_payment":60.0} 
[2026-09-14 12:49:49] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":false,"is_valid_mpesa_sale":false,"payment_method_input":"cash","mpesa_transaction_id":null,"transaction_id":1867} 
[2026-09-14 12:49:49] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1867,"contact_id":94,"customer_name":"Walk-In Customer","has_tin":false,"has_digitax_id":false} 
[2026-09-14 12:49:49] live.ERROR: ETIMS: Missing item_id for product {"product_id":361} 
[2026-09-14 12:49:49] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 12:49:49] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1867  
[2026-09-14 12:49:55] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 12:50:04] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 12:51:01] live.INFO: filterProduct method called {"business_id":8,"search_term":"amo","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:51:01] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:51:01] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:51:01] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 12:51:01] live.DEBUG: Applying search filters {"search_term":"amo","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 12:51:01] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 12:51:01] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:51:01] live.DEBUG: Added lot number fields to select  
[2026-09-14 12:51:01] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"amo"} 
[2026-09-14 12:51:01] live.INFO: Product Row Debug - RELOADED {"product_id":361,"product_name":"Amoxicillin 500mg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":30.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"286":{"unit_id":286,"unit_name":"Pc","unit_price":30.0,"multiplier":1,"has_price":true},"287":{"unit_id":287,"unit_name":"Pkt","unit_price":345.0,"multiplier":"75.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 12:51:09] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 12:51:44] live.INFO: filterProduct method called {"business_id":8,"search_term":"FIFO","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:51:44] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:51:44] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 12:51:44] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 12:51:44] live.DEBUG: Applying search filters {"search_term":"FIFO","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 12:51:44] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 12:51:44] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:51:44] live.DEBUG: Added lot number fields to select  
[2026-09-14 12:51:44] live.INFO: filterProduct completed successfully {"result_count":0,"business_id":8,"search_term":"FIFO"} 
[2026-09-14 12:53:01] live.INFO: === About to call saveProductNewUnitRelationships === {"product_id":363,"request_units":[{"actual_name":"SSa","unit_id":"290","short_name":"ss","relation_unit_id":null,"relation_qty":"1","price":"22"}],"page_batch_id":"20260914_125238_0366"} 
[2026-09-14 12:53:01] live.INFO: === saveProductNewUnitRelationships START === {"product_id":363,"product_name":"Advanced"} 
[2026-09-14 12:53:01] live.INFO: Units data received {"units_data":[{"actual_name":"SSa","unit_id":"290","short_name":"ss","relation_unit_id":null,"relation_qty":"1","price":"22"}],"count":1} 
[2026-09-14 12:53:01] live.INFO: Processing unit index: 0 {"unit_data":{"actual_name":"SSa","unit_id":"290","short_name":"ss","relation_unit_id":null,"relation_qty":"1","price":"22"}} 
[2026-09-14 12:53:01] live.INFO: Unit found by ID {"unit_id":290,"actual_name":"SSa"} 
[2026-09-14 12:53:01] live.INFO: Unit lookup result {"found":"yes","unit_id":290,"method":"by_id"} 
[2026-09-14 12:53:01] live.INFO: Updating existing unit {"unit_id":290} 
[2026-09-14 12:53:01] live.INFO: Updated unit_price {"new_price":22.0} 
[2026-09-14 12:53:01] live.INFO: Unit updated successfully  
[2026-09-14 12:53:01] live.INFO: Setting as BASE unit {"unit_id":290} 
[2026-09-14 12:53:01] live.INFO: Base unit saved {"base_unit_id":290} 
[2026-09-14 12:53:01] live.INFO: First pass complete {"created_units_count":1,"base_unit_id":290} 
[2026-09-14 12:53:01] live.INFO: === SECOND PASS: Setting relations first ===  
[2026-09-14 12:53:01] live.INFO: === SECOND PASS: Calculating cumulative multipliers ===  
[2026-09-14 12:53:01] live.INFO: === saveProductNewUnitRelationships END ===  
[2026-09-14 12:53:01] live.INFO: OpeningStockController::add - Location Data {"product_id":"363","business_id":8,"locations":{"Illuminate\\Support\\Collection":{"9":"BQT GENERAL BUSINESS (BL0001)","10":"BQT BRANCH 1 (BL0002)","12":"BQT BRANCH 2 (BL0003)","14":"BQT BRANCH 3 (BL0004)"}},"available_locations":[10]} 
[2026-09-14 12:53:01] live.INFO: OpeningStockController::add - Serial Numbers Check {"product_id":"363","business_id":8,"has_serial_numbers":{"10":false},"total_locations_with_serial":0} 
[2026-09-14 12:53:42] live.INFO: === STOCK UNITS REPORT - View Load ===  
[2026-09-14 12:53:42] live.INFO: Business ID: 8  
[2026-09-14 12:53:42] live.INFO: Default page entries: 100  
[2026-09-14 12:53:42] live.INFO: Business Locations count: 4  
[2026-09-14 12:53:42] live.INFO: Categories count: 29  
[2026-09-14 12:53:43] live.INFO: === STOCK UNITS REPORT - AJAX Request ===  
[2026-09-14 12:53:43] live.INFO: Parameters - Business ID: 8, Location ID: ALL, Category ID: ALL  
[2026-09-14 12:53:43] live.INFO: Products found: 91  
[2026-09-14 12:53:43] live.INFO: Location data processed  
[2026-09-14 12:53:43] live.INFO: Stock data processed  
[2026-09-14 12:53:43] live.INFO: Stock value calculation - Product: 363, Stock: 0, Price: 22.0000, Value: 0  
[2026-09-14 12:53:43] live.INFO: Stock value calculation - Product: 362, Stock: 0, Price: 120.0000, Value: 0  
[2026-09-14 12:53:43] live.INFO: convertStockToUnit - Stock: 0, Base: df, Target: dr  
[2026-09-14 12:53:43] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 0  
[2026-09-14 12:53:43] live.INFO: Unit has own price - Unit: dr, Stock in unit: 0, Unit Price: 1100.0000, Calculated Value: 0  
[2026-09-14 12:53:43] live.INFO: Stock value calculation - Product: 361, Stock: 2082.0000, Price: 30.0000, Value: 62460  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 2082.0000, Base: Pc, Target: pkt  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 75.0000, Result: 27.76  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 27.76, Unit Price: 345.0000, Calculated Value: 9577.2  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 360, Stock: 0, Price: 300.0000, Value: 0  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 0, Base: pc, Target: bx  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 6.0000, Result: 0  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: bx, Stock in unit: 0, Unit Price: 1050.0000, Calculated Value: 0  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 347, Stock: 40.0000, Price: 150.0000, Value: 6000  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 40.0000, Base: t1, Target: t2  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 3.3333333333333  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: t2, Stock in unit: 3.3333333333333, Unit Price: 1350.0000, Calculated Value: 4500  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 341, Stock: 888.0000, Price: 44.0000, Value: 39072  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 888.0000, Base: dsfg, Target: fdd  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 4.0000, Result: 222  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: fdd, Stock in unit: 222, Unit Price: 333.0000, Calculated Value: 73926  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 340, Stock: 100.0000, Price: 10.0000, Value: 1000  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 100.0000, Base: pcs, Target: kg  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 100.0000, Result: 1  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: kg, Stock in unit: 1, Unit Price: 250.0000, Calculated Value: 250  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 339, Stock: 45586.0000, Price: 10.0000, Value: 455860  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:53:44] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:44] live.WARNING: No conversion found, returning original: 45586.0000  
[2026-09-14 12:53:44] live.INFO: No unit price for: pkt, using base stock value: 455860  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 56.0000, Result: 814.03571428571  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 814.03571428571, Unit Price: 265.0000, Calculated Value: 215719.46428571  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 338, Stock: 109.0000, Price: 740.0000, Value: 80660  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 334, Stock: 113.0000, Price: 200.0000, Value: 22600  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 333, Stock: 30.0000, Price: 200.0000, Value: 6000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 332, Stock: 101.0000, Price: 200.0000, Value: 20200  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 331, Stock: 183.0000, Price: 2000.0000, Value: 366000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 330, Stock: 80.0000, Price: 130.0000, Value: 10400  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 160  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: grms, Stock in unit: 160, Unit Price: 65.0000, Calculated Value: 10400  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 320  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: grms, Stock in unit: 320, Unit Price: 35.0000, Calculated Value: 11200  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 329, Stock: 77.0000, Price: 30.0000, Value: 2310  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: g  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 154  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: g, Stock in unit: 154, Unit Price: 15.0000, Calculated Value: 2310  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: 5g  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 308  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: 5g, Stock in unit: 308, Unit Price: 20.0000, Calculated Value: 6160  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 328, Stock: 83.0000, Price: 25.0000, Value: 2075  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 83.0000, Base: pc, Target: bali  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 6.9166666666667  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: bali, Stock in unit: 6.9166666666667, Unit Price: 2400.0000, Calculated Value: 16600  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 327, Stock: 4250.0000, Price: 120.0000, Value: 510000  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:53:44] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:44] live.WARNING: No conversion found, returning original: 4250.0000  
[2026-09-14 12:53:44] live.INFO: No unit price for: gm, using base stock value: 510000  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: bg  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 50.0000, Result: 85  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: bg, Stock in unit: 85, Unit Price: 25000.0000, Calculated Value: 2125000  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 1.0000, Result: 4250  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: gm, Stock in unit: 4250, Unit Price: 60.0000, Calculated Value: 255000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 326, Stock: 500.0000, Price: 230.0000, Value: 115000  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 500.0000, Base: pkt, Target: bl  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 41.666666666667  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: bl, Stock in unit: 41.666666666667, Unit Price: 2200.0000, Calculated Value: 91666.666666667  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 325, Stock: 950.0000, Price: 10.0000, Value: 9500  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Bx  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 72.0000, Result: 13.194444444444  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: Bx, Stock in unit: 13.194444444444, Unit Price: 540.0000, Calculated Value: 7125  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Pkt  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 79.166666666667  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 79.166666666667, Unit Price: 125.0000, Calculated Value: 9895.8333333333  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 324, Stock: 153.0000, Price: 50.0000, Value: 7650  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A2  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 2.0000, Result: 76.5  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: A2, Stock in unit: 76.5, Unit Price: 95.0000, Calculated Value: 7267.5  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A3  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 20.0000, Result: 7.65  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: A3, Stock in unit: 7.65, Unit Price: 900.0000, Calculated Value: 6885  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 323, Stock: 45.0000, Price: 4000.0000, Value: 180000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 322, Stock: 0, Price: 116.0000, Value: 0  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 0, Base: ssari, Target: rrasi  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: rrasi, Stock in unit: 0, Unit Price: 2000.0000, Calculated Value: 0  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 321, Stock: 9999.0000, Price: 12.0000, Value: 119988  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS2  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 1999.8  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: SS2, Stock in unit: 1999.8, Unit Price: 60.0000, Calculated Value: 119988  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS3  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 40.0000, Result: 249.975  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: SS3, Stock in unit: 249.975, Unit Price: 450.0000, Calculated Value: 112488.75  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: ss41  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 400.0000, Result: 24.9975  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: ss41, Stock in unit: 24.9975, Unit Price: 1000.0000, Calculated Value: 24997.5  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 319, Stock: 989.5000, Price: 22.0000, Value: 21769  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: AD  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 968.0000, Result: 1.0222107438017  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: AD, Stock in unit: 1.0222107438017, Unit Price: 2340.0000, Calculated Value: 2391.9731404959  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: WET  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 22.0000, Result: 44.977272727273  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: WET, Stock in unit: 44.977272727273, Unit Price: 334.0000, Calculated Value: 15022.409090909  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: wss  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 1979  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: wss, Stock in unit: 1979, Unit Price: 15.0000, Calculated Value: 29685  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 315, Stock: 457.0000, Price: 5.0000, Value: 2285  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MPckt  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 45.7  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: MPckt, Stock in unit: 45.7, Unit Price: 48.0000, Calculated Value: 2193.6  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MBx  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 120.0000, Result: 3.8083333333333  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: MBx, Stock in unit: 3.8083333333333, Unit Price: 580.0000, Calculated Value: 2208.8333333333  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 314, Stock: 997.0000, Price: 20.0000, Value: 19940  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Packet  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 83.083333333333  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: Packet, Stock in unit: 83.083333333333, Unit Price: 110.0000, Calculated Value: 9139.1666666667  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Carton  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 96.0000, Result: 10.385416666667  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: Carton, Stock in unit: 10.385416666667, Unit Price: 700.0000, Calculated Value: 7269.7916666667  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: hero  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 576.0000, Result: 1.7309027777778  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: hero, Stock in unit: 1.7309027777778, Unit Price: 524.0000, Calculated Value: 906.99305555556  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 313, Stock: 0, Price: 77.0000, Value: 0  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: Pkt  
[2026-09-14 12:53:44] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:44] live.INFO: Level 0 - Unit: Pkt, Multiplier: 12.0000, Factor: 12  
[2026-09-14 12:53:44] live.INFO: Fallback conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 0, Unit Price: 125.0000, Calculated Value: 0  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: swn  
[2026-09-14 12:53:44] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:44] live.WARNING: No conversion found, returning original: 0  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: swn, Stock in unit: 0, Unit Price: 430.0000, Calculated Value: 0  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 312, Stock: 109.0000, Price: 15.0000, Value: 1635  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 109.0000, Base: Pc-1x, Target: Ctn -28  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 112.0000, Result: 0.97321428571429  
[2026-09-14 12:53:44] live.INFO: No unit price for: Ctn -28, using base stock value: 1635  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 308, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 306, Stock: 6.0000, Price: 4000.0000, Value: 24000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 302, Stock: 378.0000, Price: 4000.0000, Value: 1512000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 296, Stock: 0, Price: 50.0000, Value: 0  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 295, Stock: 10.0000, Price: 100.0000, Value: 1000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 294, Stock: 8.0000, Price: 1.0000, Value: 8  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 293, Stock: 90.0000, Price: 4000.0000, Value: 360000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 292, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 290, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 289, Stock: 98.1000, Price: 60.0000, Value: 5886  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 288, Stock: 92.7000, Price: 50.0000, Value: 4635  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 287, Stock: 97.5000, Price: 40.0000, Value: 3900  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 286, Stock: 100.0000, Price: 70.0000, Value: 7000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 285, Stock: 0.5000, Price: 50.0000, Value: 25  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 284, Stock: 29.0000, Price: 4000.0000, Value: 116000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 283, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 272, Stock: 104.0000, Price: 4000.0000, Value: 416000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 268, Stock: 119.0000, Price: 4000.0000, Value: 476000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 267, Stock: 109.0000, Price: 4000.0000, Value: 436000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 262, Stock: 313.0000, Price: 66.0000, Value: 20658  
[2026-09-14 12:53:44] live.INFO: convertStockToUnit - Stock: 313.0000, Base: Pc, Target: 6k  
[2026-09-14 12:53:44] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 62.6  
[2026-09-14 12:53:44] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 62.6, Unit Price: 300.0000, Calculated Value: 18780  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 258, Stock: 244.0000, Price: 11000.0000, Value: 2684000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 224, Stock: 96.0000, Price: 4000.0000, Value: 384000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 217, Stock: -63.0000, Price: 4000.0000, Value: -252000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 201, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 153, Stock: 76.0000, Price: 4000.0000, Value: 304000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 151, Stock: 152.0000, Price: 800.0000, Value: 121600  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 92, Stock: 2.0000, Price: 4000.0000, Value: 8000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 78, Stock: 0, Price: 5000.0000, Value: 0  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 77, Stock: 50.0000, Price: 4000.0000, Value: 200000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 73, Stock: 46.0000, Price: 4000.0000, Value: 184000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 66, Stock: 263.0000, Price: 4000.0000, Value: 1052000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 53, Stock: 10.0000, Price: 4000.0000, Value: 40000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 52, Stock: 1200.0000, Price: 1000.0000, Value: 1200000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 51, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 50, Stock: 193.0000, Price: 4000.0000, Value: 772000  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 49, Stock: 284.5000, Price: 800.0000, Value: 227600  
[2026-09-14 12:53:44] live.INFO: Stock value calculation - Product: 48, Stock: 6.0000, Price: 250.0000, Value: 1500  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 47, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 46, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 43, Stock: 70.0000, Price: 2400.0000, Value: 168000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 42, Stock: 38.0000, Price: 1000.0000, Value: 38000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 41, Stock: 49.0000, Price: 100.0000, Value: 4900  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 40, Stock: 36.0000, Price: 900.0000, Value: 32400  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 39, Stock: 1187.0000, Price: 290.0000, Value: 344230  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 38, Stock: 67.0000, Price: 300.0000, Value: 20100  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 37, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 36, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 35, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 34, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 33, Stock: 20.0000, Price: 20.0000, Value: 400  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 32, Stock: 200.0000, Price: 10.0000, Value: 2000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 31, Stock: 272.0000, Price: 4000.0000, Value: 1088000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 30, Stock: 100.0000, Price: 4000.0000, Value: 400000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 28, Stock: 65.0000, Price: 4000.0000, Value: 260000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 23, Stock: 0.0000, Price: 66.0000, Value: 0  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 0.0000, Base: Pc, Target: 6k  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 0  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 0, Unit Price: 300.0000, Calculated Value: 0  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 20, Stock: 964.0000, Price: 200.0000, Value: 192800  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 19, Stock: 70.0000, Price: 4000.0000, Value: 280000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 18, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 17, Stock: 88.0000, Price: 4000.0000, Value: 352000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 16, Stock: 9829.0000, Price: 15.0000, Value: 147435  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 15, Stock: 10099.0000, Price: 66.0000, Value: 666534  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 10099.0000, Base: Pc, Target: 6k  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 2019.8  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 2019.8, Unit Price: 300.0000, Calculated Value: 605940  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 14, Stock: 79.0000, Price: 4000.0000, Value: 316000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 1, Stock: 945.0000, Price: 4000.0000, Value: 3780000  
[2026-09-14 12:53:45] live.INFO: Final formatted data count: 91  
[2026-09-14 12:53:45] live.INFO: DataTables response generated successfully  
[2026-09-14 12:53:45] live.INFO: === STOCK UNITS REPORT - AJAX Request ===  
[2026-09-14 12:53:45] live.INFO: Parameters - Business ID: 8, Location ID: ALL, Category ID: ALL  
[2026-09-14 12:53:45] live.INFO: Products found: 91  
[2026-09-14 12:53:45] live.INFO: Location data processed  
[2026-09-14 12:53:45] live.INFO: Stock data processed  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 363, Stock: 0, Price: 22.0000, Value: 0  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 362, Stock: 0, Price: 120.0000, Value: 0  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 0, Base: df, Target: dr  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 0  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: dr, Stock in unit: 0, Unit Price: 1100.0000, Calculated Value: 0  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 361, Stock: 2082.0000, Price: 30.0000, Value: 62460  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 2082.0000, Base: Pc, Target: pkt  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 75.0000, Result: 27.76  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 27.76, Unit Price: 345.0000, Calculated Value: 9577.2  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 360, Stock: 0, Price: 300.0000, Value: 0  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 0, Base: pc, Target: bx  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 6.0000, Result: 0  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: bx, Stock in unit: 0, Unit Price: 1050.0000, Calculated Value: 0  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 347, Stock: 40.0000, Price: 150.0000, Value: 6000  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 40.0000, Base: t1, Target: t2  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 3.3333333333333  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: t2, Stock in unit: 3.3333333333333, Unit Price: 1350.0000, Calculated Value: 4500  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 341, Stock: 888.0000, Price: 44.0000, Value: 39072  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 888.0000, Base: dsfg, Target: fdd  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 4.0000, Result: 222  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: fdd, Stock in unit: 222, Unit Price: 333.0000, Calculated Value: 73926  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 340, Stock: 100.0000, Price: 10.0000, Value: 1000  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 100.0000, Base: pcs, Target: kg  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 100.0000, Result: 1  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: kg, Stock in unit: 1, Unit Price: 250.0000, Calculated Value: 250  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 339, Stock: 45586.0000, Price: 10.0000, Value: 455860  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:53:45] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:45] live.WARNING: No conversion found, returning original: 45586.0000  
[2026-09-14 12:53:45] live.INFO: No unit price for: pkt, using base stock value: 455860  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 56.0000, Result: 814.03571428571  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 814.03571428571, Unit Price: 265.0000, Calculated Value: 215719.46428571  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 338, Stock: 109.0000, Price: 740.0000, Value: 80660  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 334, Stock: 113.0000, Price: 200.0000, Value: 22600  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 333, Stock: 30.0000, Price: 200.0000, Value: 6000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 332, Stock: 101.0000, Price: 200.0000, Value: 20200  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 331, Stock: 183.0000, Price: 2000.0000, Value: 366000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 330, Stock: 80.0000, Price: 130.0000, Value: 10400  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 160  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: grms, Stock in unit: 160, Unit Price: 65.0000, Calculated Value: 10400  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 320  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: grms, Stock in unit: 320, Unit Price: 35.0000, Calculated Value: 11200  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 329, Stock: 77.0000, Price: 30.0000, Value: 2310  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: g  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 154  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: g, Stock in unit: 154, Unit Price: 15.0000, Calculated Value: 2310  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: 5g  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 308  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: 5g, Stock in unit: 308, Unit Price: 20.0000, Calculated Value: 6160  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 328, Stock: 83.0000, Price: 25.0000, Value: 2075  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 83.0000, Base: pc, Target: bali  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 6.9166666666667  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: bali, Stock in unit: 6.9166666666667, Unit Price: 2400.0000, Calculated Value: 16600  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 327, Stock: 4250.0000, Price: 120.0000, Value: 510000  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:53:45] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:45] live.WARNING: No conversion found, returning original: 4250.0000  
[2026-09-14 12:53:45] live.INFO: No unit price for: gm, using base stock value: 510000  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: bg  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 50.0000, Result: 85  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: bg, Stock in unit: 85, Unit Price: 25000.0000, Calculated Value: 2125000  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 1.0000, Result: 4250  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: gm, Stock in unit: 4250, Unit Price: 60.0000, Calculated Value: 255000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 326, Stock: 500.0000, Price: 230.0000, Value: 115000  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 500.0000, Base: pkt, Target: bl  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 41.666666666667  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: bl, Stock in unit: 41.666666666667, Unit Price: 2200.0000, Calculated Value: 91666.666666667  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 325, Stock: 950.0000, Price: 10.0000, Value: 9500  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Bx  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 72.0000, Result: 13.194444444444  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: Bx, Stock in unit: 13.194444444444, Unit Price: 540.0000, Calculated Value: 7125  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Pkt  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 79.166666666667  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 79.166666666667, Unit Price: 125.0000, Calculated Value: 9895.8333333333  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 324, Stock: 153.0000, Price: 50.0000, Value: 7650  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A2  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 2.0000, Result: 76.5  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: A2, Stock in unit: 76.5, Unit Price: 95.0000, Calculated Value: 7267.5  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A3  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 20.0000, Result: 7.65  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: A3, Stock in unit: 7.65, Unit Price: 900.0000, Calculated Value: 6885  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 323, Stock: 45.0000, Price: 4000.0000, Value: 180000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 322, Stock: 0, Price: 116.0000, Value: 0  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 0, Base: ssari, Target: rrasi  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: rrasi, Stock in unit: 0, Unit Price: 2000.0000, Calculated Value: 0  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 321, Stock: 9999.0000, Price: 12.0000, Value: 119988  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS2  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 1999.8  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: SS2, Stock in unit: 1999.8, Unit Price: 60.0000, Calculated Value: 119988  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS3  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 40.0000, Result: 249.975  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: SS3, Stock in unit: 249.975, Unit Price: 450.0000, Calculated Value: 112488.75  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: ss41  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 400.0000, Result: 24.9975  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: ss41, Stock in unit: 24.9975, Unit Price: 1000.0000, Calculated Value: 24997.5  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 319, Stock: 989.5000, Price: 22.0000, Value: 21769  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: AD  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 968.0000, Result: 1.0222107438017  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: AD, Stock in unit: 1.0222107438017, Unit Price: 2340.0000, Calculated Value: 2391.9731404959  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: WET  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 22.0000, Result: 44.977272727273  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: WET, Stock in unit: 44.977272727273, Unit Price: 334.0000, Calculated Value: 15022.409090909  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: wss  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 1979  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: wss, Stock in unit: 1979, Unit Price: 15.0000, Calculated Value: 29685  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 315, Stock: 457.0000, Price: 5.0000, Value: 2285  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MPckt  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 45.7  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: MPckt, Stock in unit: 45.7, Unit Price: 48.0000, Calculated Value: 2193.6  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MBx  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 120.0000, Result: 3.8083333333333  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: MBx, Stock in unit: 3.8083333333333, Unit Price: 580.0000, Calculated Value: 2208.8333333333  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 314, Stock: 997.0000, Price: 20.0000, Value: 19940  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Packet  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 83.083333333333  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: Packet, Stock in unit: 83.083333333333, Unit Price: 110.0000, Calculated Value: 9139.1666666667  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Carton  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 96.0000, Result: 10.385416666667  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: Carton, Stock in unit: 10.385416666667, Unit Price: 700.0000, Calculated Value: 7269.7916666667  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: hero  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 576.0000, Result: 1.7309027777778  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: hero, Stock in unit: 1.7309027777778, Unit Price: 524.0000, Calculated Value: 906.99305555556  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 313, Stock: 0, Price: 77.0000, Value: 0  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: Pkt  
[2026-09-14 12:53:45] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:45] live.INFO: Level 0 - Unit: Pkt, Multiplier: 12.0000, Factor: 12  
[2026-09-14 12:53:45] live.INFO: Fallback conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 0, Unit Price: 125.0000, Calculated Value: 0  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: swn  
[2026-09-14 12:53:45] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:45] live.WARNING: No conversion found, returning original: 0  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: swn, Stock in unit: 0, Unit Price: 430.0000, Calculated Value: 0  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 312, Stock: 109.0000, Price: 15.0000, Value: 1635  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 109.0000, Base: Pc-1x, Target: Ctn -28  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 112.0000, Result: 0.97321428571429  
[2026-09-14 12:53:45] live.INFO: No unit price for: Ctn -28, using base stock value: 1635  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 308, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 306, Stock: 6.0000, Price: 4000.0000, Value: 24000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 302, Stock: 378.0000, Price: 4000.0000, Value: 1512000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 296, Stock: 0, Price: 50.0000, Value: 0  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 295, Stock: 10.0000, Price: 100.0000, Value: 1000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 294, Stock: 8.0000, Price: 1.0000, Value: 8  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 293, Stock: 90.0000, Price: 4000.0000, Value: 360000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 292, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 290, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 289, Stock: 98.1000, Price: 60.0000, Value: 5886  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 288, Stock: 92.7000, Price: 50.0000, Value: 4635  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 287, Stock: 97.5000, Price: 40.0000, Value: 3900  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 286, Stock: 100.0000, Price: 70.0000, Value: 7000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 285, Stock: 0.5000, Price: 50.0000, Value: 25  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 284, Stock: 29.0000, Price: 4000.0000, Value: 116000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 283, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 272, Stock: 104.0000, Price: 4000.0000, Value: 416000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 268, Stock: 119.0000, Price: 4000.0000, Value: 476000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 267, Stock: 109.0000, Price: 4000.0000, Value: 436000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 262, Stock: 313.0000, Price: 66.0000, Value: 20658  
[2026-09-14 12:53:45] live.INFO: convertStockToUnit - Stock: 313.0000, Base: Pc, Target: 6k  
[2026-09-14 12:53:45] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 62.6  
[2026-09-14 12:53:45] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 62.6, Unit Price: 300.0000, Calculated Value: 18780  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 258, Stock: 244.0000, Price: 11000.0000, Value: 2684000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 224, Stock: 96.0000, Price: 4000.0000, Value: 384000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 217, Stock: -63.0000, Price: 4000.0000, Value: -252000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 201, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 153, Stock: 76.0000, Price: 4000.0000, Value: 304000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 151, Stock: 152.0000, Price: 800.0000, Value: 121600  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 92, Stock: 2.0000, Price: 4000.0000, Value: 8000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 78, Stock: 0, Price: 5000.0000, Value: 0  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 77, Stock: 50.0000, Price: 4000.0000, Value: 200000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 73, Stock: 46.0000, Price: 4000.0000, Value: 184000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 66, Stock: 263.0000, Price: 4000.0000, Value: 1052000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 53, Stock: 10.0000, Price: 4000.0000, Value: 40000  
[2026-09-14 12:53:45] live.INFO: Stock value calculation - Product: 52, Stock: 1200.0000, Price: 1000.0000, Value: 1200000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 51, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 50, Stock: 193.0000, Price: 4000.0000, Value: 772000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 49, Stock: 284.5000, Price: 800.0000, Value: 227600  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 48, Stock: 6.0000, Price: 250.0000, Value: 1500  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 47, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 46, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 43, Stock: 70.0000, Price: 2400.0000, Value: 168000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 42, Stock: 38.0000, Price: 1000.0000, Value: 38000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 41, Stock: 49.0000, Price: 100.0000, Value: 4900  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 40, Stock: 36.0000, Price: 900.0000, Value: 32400  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 39, Stock: 1187.0000, Price: 290.0000, Value: 344230  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 38, Stock: 67.0000, Price: 300.0000, Value: 20100  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 37, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 36, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 35, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 34, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 33, Stock: 20.0000, Price: 20.0000, Value: 400  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 32, Stock: 200.0000, Price: 10.0000, Value: 2000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 31, Stock: 272.0000, Price: 4000.0000, Value: 1088000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 30, Stock: 100.0000, Price: 4000.0000, Value: 400000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 28, Stock: 65.0000, Price: 4000.0000, Value: 260000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 23, Stock: 0.0000, Price: 66.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 0.0000, Base: Pc, Target: 6k  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 0  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 0, Unit Price: 300.0000, Calculated Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 20, Stock: 964.0000, Price: 200.0000, Value: 192800  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 19, Stock: 70.0000, Price: 4000.0000, Value: 280000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 18, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 17, Stock: 88.0000, Price: 4000.0000, Value: 352000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 16, Stock: 9829.0000, Price: 15.0000, Value: 147435  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 15, Stock: 10099.0000, Price: 66.0000, Value: 666534  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 10099.0000, Base: Pc, Target: 6k  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 2019.8  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 2019.8, Unit Price: 300.0000, Calculated Value: 605940  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 14, Stock: 79.0000, Price: 4000.0000, Value: 316000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 1, Stock: 945.0000, Price: 4000.0000, Value: 3780000  
[2026-09-14 12:53:46] live.INFO: Final formatted data count: 91  
[2026-09-14 12:53:46] live.INFO: DataTables response generated successfully  
[2026-09-14 12:53:46] live.INFO: === STOCK UNITS REPORT - AJAX Request ===  
[2026-09-14 12:53:46] live.INFO: Parameters - Business ID: 8, Location ID: ALL, Category ID: ALL  
[2026-09-14 12:53:46] live.INFO: Products found: 91  
[2026-09-14 12:53:46] live.INFO: Location data processed  
[2026-09-14 12:53:46] live.INFO: Stock data processed  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 363, Stock: 0, Price: 22.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 362, Stock: 0, Price: 120.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 0, Base: df, Target: dr  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 0  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: dr, Stock in unit: 0, Unit Price: 1100.0000, Calculated Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 361, Stock: 2082.0000, Price: 30.0000, Value: 62460  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 2082.0000, Base: Pc, Target: pkt  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 75.0000, Result: 27.76  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 27.76, Unit Price: 345.0000, Calculated Value: 9577.2  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 360, Stock: 0, Price: 300.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 0, Base: pc, Target: bx  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 6.0000, Result: 0  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: bx, Stock in unit: 0, Unit Price: 1050.0000, Calculated Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 347, Stock: 40.0000, Price: 150.0000, Value: 6000  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 40.0000, Base: t1, Target: t2  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 3.3333333333333  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: t2, Stock in unit: 3.3333333333333, Unit Price: 1350.0000, Calculated Value: 4500  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 341, Stock: 888.0000, Price: 44.0000, Value: 39072  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 888.0000, Base: dsfg, Target: fdd  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 4.0000, Result: 222  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: fdd, Stock in unit: 222, Unit Price: 333.0000, Calculated Value: 73926  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 340, Stock: 100.0000, Price: 10.0000, Value: 1000  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 100.0000, Base: pcs, Target: kg  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 100.0000, Result: 1  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: kg, Stock in unit: 1, Unit Price: 250.0000, Calculated Value: 250  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 339, Stock: 45586.0000, Price: 10.0000, Value: 455860  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:53:46] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:46] live.WARNING: No conversion found, returning original: 45586.0000  
[2026-09-14 12:53:46] live.INFO: No unit price for: pkt, using base stock value: 455860  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 56.0000, Result: 814.03571428571  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 814.03571428571, Unit Price: 265.0000, Calculated Value: 215719.46428571  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 338, Stock: 109.0000, Price: 740.0000, Value: 80660  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 334, Stock: 113.0000, Price: 200.0000, Value: 22600  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 333, Stock: 30.0000, Price: 200.0000, Value: 6000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 332, Stock: 101.0000, Price: 200.0000, Value: 20200  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 331, Stock: 183.0000, Price: 2000.0000, Value: 366000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 330, Stock: 80.0000, Price: 130.0000, Value: 10400  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 160  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: grms, Stock in unit: 160, Unit Price: 65.0000, Calculated Value: 10400  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 320  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: grms, Stock in unit: 320, Unit Price: 35.0000, Calculated Value: 11200  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 329, Stock: 77.0000, Price: 30.0000, Value: 2310  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: g  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 154  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: g, Stock in unit: 154, Unit Price: 15.0000, Calculated Value: 2310  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: 5g  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 308  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: 5g, Stock in unit: 308, Unit Price: 20.0000, Calculated Value: 6160  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 328, Stock: 83.0000, Price: 25.0000, Value: 2075  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 83.0000, Base: pc, Target: bali  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 6.9166666666667  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: bali, Stock in unit: 6.9166666666667, Unit Price: 2400.0000, Calculated Value: 16600  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 327, Stock: 4250.0000, Price: 120.0000, Value: 510000  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:53:46] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:46] live.WARNING: No conversion found, returning original: 4250.0000  
[2026-09-14 12:53:46] live.INFO: No unit price for: gm, using base stock value: 510000  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: bg  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 50.0000, Result: 85  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: bg, Stock in unit: 85, Unit Price: 25000.0000, Calculated Value: 2125000  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 1.0000, Result: 4250  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: gm, Stock in unit: 4250, Unit Price: 60.0000, Calculated Value: 255000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 326, Stock: 500.0000, Price: 230.0000, Value: 115000  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 500.0000, Base: pkt, Target: bl  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 41.666666666667  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: bl, Stock in unit: 41.666666666667, Unit Price: 2200.0000, Calculated Value: 91666.666666667  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 325, Stock: 950.0000, Price: 10.0000, Value: 9500  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Bx  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 72.0000, Result: 13.194444444444  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: Bx, Stock in unit: 13.194444444444, Unit Price: 540.0000, Calculated Value: 7125  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Pkt  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 79.166666666667  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 79.166666666667, Unit Price: 125.0000, Calculated Value: 9895.8333333333  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 324, Stock: 153.0000, Price: 50.0000, Value: 7650  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A2  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 2.0000, Result: 76.5  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: A2, Stock in unit: 76.5, Unit Price: 95.0000, Calculated Value: 7267.5  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A3  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 20.0000, Result: 7.65  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: A3, Stock in unit: 7.65, Unit Price: 900.0000, Calculated Value: 6885  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 323, Stock: 45.0000, Price: 4000.0000, Value: 180000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 322, Stock: 0, Price: 116.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 0, Base: ssari, Target: rrasi  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: rrasi, Stock in unit: 0, Unit Price: 2000.0000, Calculated Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 321, Stock: 9999.0000, Price: 12.0000, Value: 119988  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS2  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 1999.8  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: SS2, Stock in unit: 1999.8, Unit Price: 60.0000, Calculated Value: 119988  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS3  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 40.0000, Result: 249.975  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: SS3, Stock in unit: 249.975, Unit Price: 450.0000, Calculated Value: 112488.75  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: ss41  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 400.0000, Result: 24.9975  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: ss41, Stock in unit: 24.9975, Unit Price: 1000.0000, Calculated Value: 24997.5  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 319, Stock: 989.5000, Price: 22.0000, Value: 21769  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: AD  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 968.0000, Result: 1.0222107438017  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: AD, Stock in unit: 1.0222107438017, Unit Price: 2340.0000, Calculated Value: 2391.9731404959  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: WET  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 22.0000, Result: 44.977272727273  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: WET, Stock in unit: 44.977272727273, Unit Price: 334.0000, Calculated Value: 15022.409090909  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: wss  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 1979  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: wss, Stock in unit: 1979, Unit Price: 15.0000, Calculated Value: 29685  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 315, Stock: 457.0000, Price: 5.0000, Value: 2285  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MPckt  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 45.7  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: MPckt, Stock in unit: 45.7, Unit Price: 48.0000, Calculated Value: 2193.6  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MBx  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 120.0000, Result: 3.8083333333333  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: MBx, Stock in unit: 3.8083333333333, Unit Price: 580.0000, Calculated Value: 2208.8333333333  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 314, Stock: 997.0000, Price: 20.0000, Value: 19940  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Packet  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 83.083333333333  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: Packet, Stock in unit: 83.083333333333, Unit Price: 110.0000, Calculated Value: 9139.1666666667  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Carton  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 96.0000, Result: 10.385416666667  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: Carton, Stock in unit: 10.385416666667, Unit Price: 700.0000, Calculated Value: 7269.7916666667  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: hero  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 576.0000, Result: 1.7309027777778  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: hero, Stock in unit: 1.7309027777778, Unit Price: 524.0000, Calculated Value: 906.99305555556  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 313, Stock: 0, Price: 77.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: Pkt  
[2026-09-14 12:53:46] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:46] live.INFO: Level 0 - Unit: Pkt, Multiplier: 12.0000, Factor: 12  
[2026-09-14 12:53:46] live.INFO: Fallback conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 0, Unit Price: 125.0000, Calculated Value: 0  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: swn  
[2026-09-14 12:53:46] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:46] live.WARNING: No conversion found, returning original: 0  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: swn, Stock in unit: 0, Unit Price: 430.0000, Calculated Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 312, Stock: 109.0000, Price: 15.0000, Value: 1635  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 109.0000, Base: Pc-1x, Target: Ctn -28  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 112.0000, Result: 0.97321428571429  
[2026-09-14 12:53:46] live.INFO: No unit price for: Ctn -28, using base stock value: 1635  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 308, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 306, Stock: 6.0000, Price: 4000.0000, Value: 24000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 302, Stock: 378.0000, Price: 4000.0000, Value: 1512000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 296, Stock: 0, Price: 50.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 295, Stock: 10.0000, Price: 100.0000, Value: 1000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 294, Stock: 8.0000, Price: 1.0000, Value: 8  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 293, Stock: 90.0000, Price: 4000.0000, Value: 360000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 292, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 290, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 289, Stock: 98.1000, Price: 60.0000, Value: 5886  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 288, Stock: 92.7000, Price: 50.0000, Value: 4635  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 287, Stock: 97.5000, Price: 40.0000, Value: 3900  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 286, Stock: 100.0000, Price: 70.0000, Value: 7000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 285, Stock: 0.5000, Price: 50.0000, Value: 25  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 284, Stock: 29.0000, Price: 4000.0000, Value: 116000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 283, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 272, Stock: 104.0000, Price: 4000.0000, Value: 416000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 268, Stock: 119.0000, Price: 4000.0000, Value: 476000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 267, Stock: 109.0000, Price: 4000.0000, Value: 436000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 262, Stock: 313.0000, Price: 66.0000, Value: 20658  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 313.0000, Base: Pc, Target: 6k  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 62.6  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 62.6, Unit Price: 300.0000, Calculated Value: 18780  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 258, Stock: 244.0000, Price: 11000.0000, Value: 2684000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 224, Stock: 96.0000, Price: 4000.0000, Value: 384000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 217, Stock: -63.0000, Price: 4000.0000, Value: -252000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 201, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 153, Stock: 76.0000, Price: 4000.0000, Value: 304000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 151, Stock: 152.0000, Price: 800.0000, Value: 121600  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 92, Stock: 2.0000, Price: 4000.0000, Value: 8000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 78, Stock: 0, Price: 5000.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 77, Stock: 50.0000, Price: 4000.0000, Value: 200000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 73, Stock: 46.0000, Price: 4000.0000, Value: 184000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 66, Stock: 263.0000, Price: 4000.0000, Value: 1052000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 53, Stock: 10.0000, Price: 4000.0000, Value: 40000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 52, Stock: 1200.0000, Price: 1000.0000, Value: 1200000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 51, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 50, Stock: 193.0000, Price: 4000.0000, Value: 772000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 49, Stock: 284.5000, Price: 800.0000, Value: 227600  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 48, Stock: 6.0000, Price: 250.0000, Value: 1500  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 47, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 46, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 43, Stock: 70.0000, Price: 2400.0000, Value: 168000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 42, Stock: 38.0000, Price: 1000.0000, Value: 38000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 41, Stock: 49.0000, Price: 100.0000, Value: 4900  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 40, Stock: 36.0000, Price: 900.0000, Value: 32400  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 39, Stock: 1187.0000, Price: 290.0000, Value: 344230  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 38, Stock: 67.0000, Price: 300.0000, Value: 20100  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 37, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 36, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 35, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 34, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 33, Stock: 20.0000, Price: 20.0000, Value: 400  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 32, Stock: 200.0000, Price: 10.0000, Value: 2000  
[2026-09-14 12:53:46] live.INFO: === STOCK UNITS REPORT - AJAX Request ===  
[2026-09-14 12:53:46] live.INFO: Parameters - Business ID: 8, Location ID: ALL, Category ID: ALL  
[2026-09-14 12:53:46] live.INFO: Products found: 91  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 31, Stock: 272.0000, Price: 4000.0000, Value: 1088000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 30, Stock: 100.0000, Price: 4000.0000, Value: 400000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 28, Stock: 65.0000, Price: 4000.0000, Value: 260000  
[2026-09-14 12:53:46] live.INFO: Location data processed  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 23, Stock: 0.0000, Price: 66.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 0.0000, Base: Pc, Target: 6k  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 0  
[2026-09-14 12:53:46] live.INFO: Stock data processed  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 0, Unit Price: 300.0000, Calculated Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 363, Stock: 0, Price: 22.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 20, Stock: 964.0000, Price: 200.0000, Value: 192800  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 362, Stock: 0, Price: 120.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 0, Base: df, Target: dr  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 0  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: dr, Stock in unit: 0, Unit Price: 1100.0000, Calculated Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 361, Stock: 2082.0000, Price: 30.0000, Value: 62460  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 2082.0000, Base: Pc, Target: pkt  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 75.0000, Result: 27.76  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 27.76, Unit Price: 345.0000, Calculated Value: 9577.2  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 360, Stock: 0, Price: 300.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 0, Base: pc, Target: bx  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 6.0000, Result: 0  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: bx, Stock in unit: 0, Unit Price: 1050.0000, Calculated Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 347, Stock: 40.0000, Price: 150.0000, Value: 6000  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 40.0000, Base: t1, Target: t2  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 3.3333333333333  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: t2, Stock in unit: 3.3333333333333, Unit Price: 1350.0000, Calculated Value: 4500  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 341, Stock: 888.0000, Price: 44.0000, Value: 39072  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 888.0000, Base: dsfg, Target: fdd  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 4.0000, Result: 222  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: fdd, Stock in unit: 222, Unit Price: 333.0000, Calculated Value: 73926  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 340, Stock: 100.0000, Price: 10.0000, Value: 1000  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 100.0000, Base: pcs, Target: kg  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 100.0000, Result: 1  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: kg, Stock in unit: 1, Unit Price: 250.0000, Calculated Value: 250  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 339, Stock: 45586.0000, Price: 10.0000, Value: 455860  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:53:46] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:46] live.WARNING: No conversion found, returning original: 45586.0000  
[2026-09-14 12:53:46] live.INFO: No unit price for: pkt, using base stock value: 455860  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 45586.0000, Base: Pc, Target: pkt  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 56.0000, Result: 814.03571428571  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: pkt, Stock in unit: 814.03571428571, Unit Price: 265.0000, Calculated Value: 215719.46428571  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 338, Stock: 109.0000, Price: 740.0000, Value: 80660  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 334, Stock: 113.0000, Price: 200.0000, Value: 22600  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 333, Stock: 30.0000, Price: 200.0000, Value: 6000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 332, Stock: 101.0000, Price: 200.0000, Value: 20200  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 331, Stock: 183.0000, Price: 2000.0000, Value: 366000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 330, Stock: 80.0000, Price: 130.0000, Value: 10400  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 160  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: grms, Stock in unit: 160, Unit Price: 65.0000, Calculated Value: 10400  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 80.0000, Base: kg, Target: grms  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 320  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: grms, Stock in unit: 320, Unit Price: 35.0000, Calculated Value: 11200  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 329, Stock: 77.0000, Price: 30.0000, Value: 2310  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: g  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 154  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: g, Stock in unit: 154, Unit Price: 15.0000, Calculated Value: 2310  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 77.0000, Base: e, Target: 5g  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 0.2500, Result: 308  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: 5g, Stock in unit: 308, Unit Price: 20.0000, Calculated Value: 6160  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 328, Stock: 83.0000, Price: 25.0000, Value: 2075  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 83.0000, Base: pc, Target: bali  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 6.9166666666667  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: bali, Stock in unit: 6.9166666666667, Unit Price: 2400.0000, Calculated Value: 16600  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 327, Stock: 4250.0000, Price: 120.0000, Value: 510000  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:53:46] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:46] live.WARNING: No conversion found, returning original: 4250.0000  
[2026-09-14 12:53:46] live.INFO: No unit price for: gm, using base stock value: 510000  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: bg  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 50.0000, Result: 85  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: bg, Stock in unit: 85, Unit Price: 25000.0000, Calculated Value: 2125000  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 4250.0000, Base: Kg, Target: gm  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 1.0000, Result: 4250  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: gm, Stock in unit: 4250, Unit Price: 60.0000, Calculated Value: 255000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 326, Stock: 500.0000, Price: 230.0000, Value: 115000  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 500.0000, Base: pkt, Target: bl  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 41.666666666667  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: bl, Stock in unit: 41.666666666667, Unit Price: 2200.0000, Calculated Value: 91666.666666667  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 325, Stock: 950.0000, Price: 10.0000, Value: 9500  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Bx  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 72.0000, Result: 13.194444444444  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: Bx, Stock in unit: 13.194444444444, Unit Price: 540.0000, Calculated Value: 7125  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 950.0000, Base: Pair, Target: Pkt  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 79.166666666667  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 79.166666666667, Unit Price: 125.0000, Calculated Value: 9895.8333333333  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 19, Stock: 70.0000, Price: 4000.0000, Value: 280000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 18, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 17, Stock: 88.0000, Price: 4000.0000, Value: 352000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 16, Stock: 9829.0000, Price: 15.0000, Value: 147435  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 324, Stock: 153.0000, Price: 50.0000, Value: 7650  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A2  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 2.0000, Result: 76.5  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: A2, Stock in unit: 76.5, Unit Price: 95.0000, Calculated Value: 7267.5  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 153.0000, Base: A1, Target: A3  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 20.0000, Result: 7.65  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: A3, Stock in unit: 7.65, Unit Price: 900.0000, Calculated Value: 6885  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 323, Stock: 45.0000, Price: 4000.0000, Value: 180000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 322, Stock: 0, Price: 116.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 0, Base: ssari, Target: rrasi  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: rrasi, Stock in unit: 0, Unit Price: 2000.0000, Calculated Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 321, Stock: 9999.0000, Price: 12.0000, Value: 119988  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS2  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 1999.8  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: SS2, Stock in unit: 1999.8, Unit Price: 60.0000, Calculated Value: 119988  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: SS3  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 40.0000, Result: 249.975  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: SS3, Stock in unit: 249.975, Unit Price: 450.0000, Calculated Value: 112488.75  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 9999.0000, Base: SS1, Target: ss41  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 400.0000, Result: 24.9975  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: ss41, Stock in unit: 24.9975, Unit Price: 1000.0000, Calculated Value: 24997.5  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 319, Stock: 989.5000, Price: 22.0000, Value: 21769  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: AD  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 968.0000, Result: 1.0222107438017  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: AD, Stock in unit: 1.0222107438017, Unit Price: 2340.0000, Calculated Value: 2391.9731404959  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: WET  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 22.0000, Result: 44.977272727273  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: WET, Stock in unit: 44.977272727273, Unit Price: 334.0000, Calculated Value: 15022.409090909  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 989.5000, Base: SS, Target: wss  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 0.5000, Result: 1979  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: wss, Stock in unit: 1979, Unit Price: 15.0000, Calculated Value: 29685  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 315, Stock: 457.0000, Price: 5.0000, Value: 2285  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MPckt  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 10.0000, Result: 45.7  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: MPckt, Stock in unit: 45.7, Unit Price: 48.0000, Calculated Value: 2193.6  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 457.0000, Base: MPc, Target: MBx  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 120.0000, Result: 3.8083333333333  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: MBx, Stock in unit: 3.8083333333333, Unit Price: 580.0000, Calculated Value: 2208.8333333333  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 314, Stock: 997.0000, Price: 20.0000, Value: 19940  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Packet  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 12.0000, Result: 83.083333333333  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: Packet, Stock in unit: 83.083333333333, Unit Price: 110.0000, Calculated Value: 9139.1666666667  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: Carton  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 96.0000, Result: 10.385416666667  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: Carton, Stock in unit: 10.385416666667, Unit Price: 700.0000, Calculated Value: 7269.7916666667  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 997.0000, Base: PPieces, Target: hero  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 576.0000, Result: 1.7309027777778  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: hero, Stock in unit: 1.7309027777778, Unit Price: 524.0000, Calculated Value: 906.99305555556  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 313, Stock: 0, Price: 77.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: Pkt  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 15, Stock: 10099.0000, Price: 66.0000, Value: 666534  
[2026-09-14 12:53:46] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 10099.0000, Base: Pc, Target: 6k  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 2019.8  
[2026-09-14 12:53:46] live.INFO: Level 0 - Unit: Pkt, Multiplier: 12.0000, Factor: 12  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 2019.8, Unit Price: 300.0000, Calculated Value: 605940  
[2026-09-14 12:53:46] live.INFO: Fallback conversion - Multiplier: 12.0000, Result: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 14, Stock: 79.0000, Price: 4000.0000, Value: 316000  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: Pkt, Stock in unit: 0, Unit Price: 125.0000, Calculated Value: 0  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 0, Base: DPc, Target: swn  
[2026-09-14 12:53:46] live.INFO: Starting multi-level conversion  
[2026-09-14 12:53:46] live.WARNING: No conversion found, returning original: 0  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: swn, Stock in unit: 0, Unit Price: 430.0000, Calculated Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 312, Stock: 109.0000, Price: 15.0000, Value: 1635  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 1, Stock: 945.0000, Price: 4000.0000, Value: 3780000  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 109.0000, Base: Pc-1x, Target: Ctn -28  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 112.0000, Result: 0.97321428571429  
[2026-09-14 12:53:46] live.INFO: Final formatted data count: 91  
[2026-09-14 12:53:46] live.INFO: No unit price for: Ctn -28, using base stock value: 1635  
[2026-09-14 12:53:46] live.INFO: DataTables response generated successfully  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 308, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 306, Stock: 6.0000, Price: 4000.0000, Value: 24000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 302, Stock: 378.0000, Price: 4000.0000, Value: 1512000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 296, Stock: 0, Price: 50.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 295, Stock: 10.0000, Price: 100.0000, Value: 1000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 294, Stock: 8.0000, Price: 1.0000, Value: 8  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 293, Stock: 90.0000, Price: 4000.0000, Value: 360000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 292, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 290, Stock: 98.0000, Price: 4000.0000, Value: 392000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 289, Stock: 98.1000, Price: 60.0000, Value: 5886  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 288, Stock: 92.7000, Price: 50.0000, Value: 4635  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 287, Stock: 97.5000, Price: 40.0000, Value: 3900  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 286, Stock: 100.0000, Price: 70.0000, Value: 7000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 285, Stock: 0.5000, Price: 50.0000, Value: 25  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 284, Stock: 29.0000, Price: 4000.0000, Value: 116000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 283, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 272, Stock: 104.0000, Price: 4000.0000, Value: 416000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 268, Stock: 119.0000, Price: 4000.0000, Value: 476000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 267, Stock: 109.0000, Price: 4000.0000, Value: 436000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 262, Stock: 313.0000, Price: 66.0000, Value: 20658  
[2026-09-14 12:53:46] live.INFO: convertStockToUnit - Stock: 313.0000, Base: Pc, Target: 6k  
[2026-09-14 12:53:46] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 62.6  
[2026-09-14 12:53:46] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 62.6, Unit Price: 300.0000, Calculated Value: 18780  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 258, Stock: 244.0000, Price: 11000.0000, Value: 2684000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 224, Stock: 96.0000, Price: 4000.0000, Value: 384000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 217, Stock: -63.0000, Price: 4000.0000, Value: -252000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 201, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 153, Stock: 76.0000, Price: 4000.0000, Value: 304000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 151, Stock: 152.0000, Price: 800.0000, Value: 121600  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 92, Stock: 2.0000, Price: 4000.0000, Value: 8000  
[2026-09-14 12:53:46] live.INFO: Stock value calculation - Product: 78, Stock: 0, Price: 5000.0000, Value: 0  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 77, Stock: 50.0000, Price: 4000.0000, Value: 200000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 73, Stock: 46.0000, Price: 4000.0000, Value: 184000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 66, Stock: 263.0000, Price: 4000.0000, Value: 1052000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 53, Stock: 10.0000, Price: 4000.0000, Value: 40000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 52, Stock: 1200.0000, Price: 1000.0000, Value: 1200000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 51, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 50, Stock: 193.0000, Price: 4000.0000, Value: 772000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 49, Stock: 284.5000, Price: 800.0000, Value: 227600  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 48, Stock: 6.0000, Price: 250.0000, Value: 1500  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 47, Stock: 200.0000, Price: 4000.0000, Value: 800000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 46, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 43, Stock: 70.0000, Price: 2400.0000, Value: 168000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 42, Stock: 38.0000, Price: 1000.0000, Value: 38000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 41, Stock: 49.0000, Price: 100.0000, Value: 4900  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 40, Stock: 36.0000, Price: 900.0000, Value: 32400  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 39, Stock: 1187.0000, Price: 290.0000, Value: 344230  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 38, Stock: 67.0000, Price: 300.0000, Value: 20100  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 37, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 36, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 35, Stock: 0.0000, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 34, Stock: 0, Price: 4000.0000, Value: 0  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 33, Stock: 20.0000, Price: 20.0000, Value: 400  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 32, Stock: 200.0000, Price: 10.0000, Value: 2000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 31, Stock: 272.0000, Price: 4000.0000, Value: 1088000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 30, Stock: 100.0000, Price: 4000.0000, Value: 400000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 28, Stock: 65.0000, Price: 4000.0000, Value: 260000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 23, Stock: 0.0000, Price: 66.0000, Value: 0  
[2026-09-14 12:53:47] live.INFO: convertStockToUnit - Stock: 0.0000, Base: Pc, Target: 6k  
[2026-09-14 12:53:47] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 0  
[2026-09-14 12:53:47] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 0, Unit Price: 300.0000, Calculated Value: 0  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 20, Stock: 964.0000, Price: 200.0000, Value: 192800  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 19, Stock: 70.0000, Price: 4000.0000, Value: 280000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 18, Stock: 998.0000, Price: 4000.0000, Value: 3992000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 17, Stock: 88.0000, Price: 4000.0000, Value: 352000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 16, Stock: 9829.0000, Price: 15.0000, Value: 147435  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 15, Stock: 10099.0000, Price: 66.0000, Value: 666534  
[2026-09-14 12:53:47] live.INFO: convertStockToUnit - Stock: 10099.0000, Base: Pc, Target: 6k  
[2026-09-14 12:53:47] live.INFO: Direct conversion - Multiplier: 5.0000, Result: 2019.8  
[2026-09-14 12:53:47] live.INFO: Unit has own price - Unit: 6k, Stock in unit: 2019.8, Unit Price: 300.0000, Calculated Value: 605940  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 14, Stock: 79.0000, Price: 4000.0000, Value: 316000  
[2026-09-14 12:53:47] live.INFO: Stock value calculation - Product: 1, Stock: 945.0000, Price: 4000.0000, Value: 3780000  
[2026-09-14 12:53:47] live.INFO: Final formatted data count: 91  
[2026-09-14 12:53:47] live.INFO: DataTables response generated successfully  
[2026-09-14 12:54:23] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 12:54:49] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 12:58:16] live.INFO: filterProduct method called {"business_id":8,"search_term":"AM","location_id":"9","not_for_selling":null,"price_group_id":null,"product_types":[],"search_fields":["name","sku"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:58:16] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:58:16] live.DEBUG: Applying search filters {"search_term":"AM","search_type":"like","search_fields":["name","sku"]} 
[2026-09-14 12:58:16] live.DEBUG: LIKE search conditions applied {"fields":["name","sku"]} 
[2026-09-14 12:58:16] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:58:16] live.INFO: filterProduct completed successfully {"result_count":4,"business_id":8,"search_term":"AM"} 
[2026-09-14 12:58:16] live.INFO: filterProduct method called {"business_id":8,"search_term":"AMO","location_id":"9","not_for_selling":null,"price_group_id":null,"product_types":[],"search_fields":["name","sku"],"check_qty":false,"search_type":"like"} 
[2026-09-14 12:58:16] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 12:58:16] live.DEBUG: Applying search filters {"search_term":"AMO","search_type":"like","search_fields":["name","sku"]} 
[2026-09-14 12:58:16] live.DEBUG: LIKE search conditions applied {"fields":["name","sku"]} 
[2026-09-14 12:58:16] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 12:58:16] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"AMO"} 
[2026-09-14 12:58:17] live.INFO: StockAdjustment - getProductRow - Serial Number Received {"variation_id":"366","serial_number":null,"serial_number_id":null,"serial_number_quantity":0,"serial_number_available":0,"all_request_data":{"row_index":"0","variation_id":"366","location_id":"9"}} 
[2026-09-14 12:58:36] live.INFO: === About to call saveProductNewUnitRelationships === {"product_id":364,"request_units":[{"actual_name":"ff","unit_id":"291","short_name":"rr","relation_unit_id":null,"relation_qty":"1","price":"44"}],"page_batch_id":"20260914_125818_6251"} 
[2026-09-14 12:58:36] live.INFO: === saveProductNewUnitRelationships START === {"product_id":364,"product_name":"dsgdf"} 
[2026-09-14 12:58:36] live.INFO: Units data received {"units_data":[{"actual_name":"ff","unit_id":"291","short_name":"rr","relation_unit_id":null,"relation_qty":"1","price":"44"}],"count":1} 
[2026-09-14 12:58:36] live.INFO: Processing unit index: 0 {"unit_data":{"actual_name":"ff","unit_id":"291","short_name":"rr","relation_unit_id":null,"relation_qty":"1","price":"44"}} 
[2026-09-14 12:58:36] live.INFO: Unit found by ID {"unit_id":291,"actual_name":"ff"} 
[2026-09-14 12:58:36] live.INFO: Unit lookup result {"found":"yes","unit_id":291,"method":"by_id"} 
[2026-09-14 12:58:36] live.INFO: Updating existing unit {"unit_id":291} 
[2026-09-14 12:58:36] live.INFO: Updated unit_price {"new_price":44.0} 
[2026-09-14 12:58:36] live.INFO: Unit updated successfully  
[2026-09-14 12:58:36] live.INFO: Setting as BASE unit {"unit_id":291} 
[2026-09-14 12:58:36] live.INFO: Base unit saved {"base_unit_id":291} 
[2026-09-14 12:58:36] live.INFO: First pass complete {"created_units_count":1,"base_unit_id":291} 
[2026-09-14 12:58:36] live.INFO: === SECOND PASS: Setting relations first ===  
[2026-09-14 12:58:36] live.INFO: === SECOND PASS: Calculating cumulative multipliers ===  
[2026-09-14 12:58:36] live.INFO: === saveProductNewUnitRelationships END ===  
[2026-09-14 12:58:37] live.INFO: OpeningStockController::add - Location Data {"product_id":"364","business_id":8,"locations":{"Illuminate\\Support\\Collection":{"9":"BQT GENERAL BUSINESS (BL0001)","10":"BQT BRANCH 1 (BL0002)","12":"BQT BRANCH 2 (BL0003)","14":"BQT BRANCH 3 (BL0004)"}},"available_locations":[9]} 
[2026-09-14 12:58:37] live.INFO: OpeningStockController::add - Serial Numbers Check {"product_id":"364","business_id":8,"has_serial_numbers":{"9":false},"total_locations_with_serial":0} 
[2026-09-14 12:59:42] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":false,"is_valid_mpesa_sale":false,"payment_method_input":"cash","mpesa_transaction_id":null,"transaction_id":1869} 
[2026-09-14 13:00:05] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2025-12-31","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:00:05] live.INFO: Opening stock calculation - including all transactions {"date":"2025-12-31"} 
[2026-09-14 13:00:05] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2025-12-31')"} 
[2026-09-14 13:00:05] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2025-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2025-12-31'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 13:00:05] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"62490987.23600000","is_opening":true,"date":"2025-12-31"} 
[2026-09-14 13:00:05] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-12-31","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:00:05] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-12-31' (includes all types except purchase_order)"} 
[2026-09-14 13:00:05] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-12-31'","bindings":["purchase_order",8]} 
[2026-09-14 13:00:06] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"159650182.93480000","is_opening":false,"date":"2026-12-31"} 
[2026-09-14 13:00:08] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:00:08] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 13:00:08] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 13:00:08] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 13:00:08] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 13:00:08] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:00:08] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:00:08] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 13:00:08] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"159650182.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:00:09] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2025-12-31","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:00:09] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:00:09] live.INFO: Opening stock calculation - including all transactions {"date":"2025-12-31"} 
[2026-09-14 13:00:09] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2025-12-31')"} 
[2026-09-14 13:00:09] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2025-12-31') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2025-12-31'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 13:00:09] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"80672397.00000000","is_opening":true,"date":"2025-12-31"} 
[2026-09-14 13:00:09] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-12-31","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:00:09] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:00:09] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-12-31' (includes all types except purchase_order)"} 
[2026-09-14 13:00:09] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-12-31') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-12-31'","bindings":["purchase_order",8]} 
[2026-09-14 13:00:09] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"150802076.00000000","is_opening":false,"date":"2026-12-31"} 
[2026-09-14 13:00:10] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:00:10] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:00:10] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 13:00:10] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 13:00:10] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 13:00:10] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"150739616.00000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 13:00:10] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:00:10] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:00:10] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:00:10] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 13:00:10] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"150802076.00000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:01:09] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 13:03:38] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"category_id":null,"sub_category_id":null,"brand_id":null,"unit_id":null},"permitted_locations":"all"} 
[2026-09-14 13:03:38] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:03:38] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 13:03:38] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"159650182.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:03:38] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":true,"filters":{"category_id":null,"sub_category_id":null,"brand_id":null,"unit_id":null},"permitted_locations":"all"} 
[2026-09-14 13:03:38] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:03:38] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:03:38] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 13:03:38] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"150802076.00000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:04:15] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2025-12-31","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:04:15] live.INFO: Opening stock calculation - including all transactions {"date":"2025-12-31"} 
[2026-09-14 13:04:15] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2025-12-31')"} 
[2026-09-14 13:04:15] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2025-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2025-12-31'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:04:15] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"2932570.28400000","is_opening":true,"date":"2025-12-31"} 
[2026-09-14 13:04:15] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-12-31","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:04:15] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-12-31' (includes all types except purchase_order)"} 
[2026-09-14 13:04:15] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-12-31'","bindings":["purchase_order",43]} 
[2026-09-14 13:04:15] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-12-31"} 
[2026-09-14 13:04:16] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2025-12-31","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:04:16] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:04:16] live.INFO: Opening stock calculation - including all transactions {"date":"2025-12-31"} 
[2026-09-14 13:04:16] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2025-12-31')"} 
[2026-09-14 13:04:16] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2025-12-31') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2025-12-31'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:04:16] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"5040630.00000000","is_opening":true,"date":"2025-12-31"} 
[2026-09-14 13:04:16] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-12-31","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:04:16] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:04:16] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-12-31' (includes all types except purchase_order)"} 
[2026-09-14 13:04:16] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-12-31') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-12-31'","bindings":["purchase_order",43]} 
[2026-09-14 13:04:16] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7588682.50000000","is_opening":false,"date":"2026-12-31"} 
[2026-09-14 13:04:16] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:04:16] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 13:04:16] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 13:04:16] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:04:16] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163532.64000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 13:04:16] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:04:16] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:04:16] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 13:04:16] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:04:17] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:04:17] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:04:17] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 13:04:17] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 13:04:17] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:04:17] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7589182.50000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 13:04:17] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:04:17] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:04:17] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:04:17] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 13:04:17] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7588682.50000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:04:43] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-12","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:04:43] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-12"} 
[2026-09-14 13:04:43] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-12')"} 
[2026-09-14 13:04:43] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-12') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-12'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:04:43] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163532.64000000","is_opening":true,"date":"2026-09-12"} 
[2026-09-14 13:04:43] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:04:43] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-13' (includes all types except purchase_order)"} 
[2026-09-14 13:04:43] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-13'","bindings":["purchase_order",43]} 
[2026-09-14 13:04:43] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163532.64000000","is_opening":false,"date":"2026-09-13"} 
[2026-09-14 13:04:43] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-12","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:04:43] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:04:43] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-12"} 
[2026-09-14 13:04:43] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-12')"} 
[2026-09-14 13:04:43] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-12') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-12'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:04:43] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7589182.50000000","is_opening":true,"date":"2026-09-12"} 
[2026-09-14 13:04:43] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:04:43] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:04:43] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-13' (includes all types except purchase_order)"} 
[2026-09-14 13:04:43] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-13'","bindings":["purchase_order",43]} 
[2026-09-14 13:04:43] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7589182.50000000","is_opening":false,"date":"2026-09-13"} 
[2026-09-14 13:05:02] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-07","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:05:02] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-07"} 
[2026-09-14 13:05:02] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-07')"} 
[2026-09-14 13:05:02] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-07') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-07'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:05:02] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"6962532.64000000","is_opening":true,"date":"2026-09-07"} 
[2026-09-14 13:05:02] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:05:02] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:05:02] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 13:05:02] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:05:02] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-07","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:05:02] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:05:02] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-07"} 
[2026-09-14 13:05:02] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-07')"} 
[2026-09-14 13:05:02] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-07') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-07'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:05:02] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7358395.00000000","is_opening":true,"date":"2026-09-07"} 
[2026-09-14 13:05:02] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:05:02] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:05:02] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:05:02] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 13:05:02] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7588682.50000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:05:07] live.INFO: === BALANCE SHEET REQUEST ===  
[2026-09-14 13:05:07] live.INFO: Business ID: 8  
[2026-09-14 13:05:07] live.INFO: Fiscal Year: 2026  
[2026-09-14 13:05:07] live.INFO: As Of Date: 2026-12-31  
[2026-09-14 13:05:07] live.INFO: Location ID: All  
[2026-09-14 13:05:07] live.INFO: --- Starting getBalanceSheetData ---  
[2026-09-14 13:05:07] live.INFO: Permitted locations: all  
[2026-09-14 13:05:07] live.INFO: Fiscal Year: 2026  
[2026-09-14 13:05:07] live.INFO: Fiscal Year Start: 2026-01-01  
[2026-09-14 13:05:07] live.INFO: As Of Date: 2026-12-31  
[2026-09-14 13:05:07] live.INFO: --- Getting Non-Current Assets ---  
[2026-09-14 13:05:07] live.INFO: Querying assets table for business_id: 8 with purchase_date <= 2026-12-31  
[2026-09-14 13:05:07] live.INFO: Found 1 assets purchased on or before 2026-12-31  
[2026-09-14 13:05:07] live.INFO: Asset: Machine A - Purchase Date: 2026-07-01, Purchase Cost: 800000  
[2026-09-14 13:05:07] live.INFO: Added to non-current assets: Machine A - Value: 800000  
[2026-09-14 13:05:07] live.INFO: Non-Current Assets Count: 1  
[2026-09-14 13:05:07] live.INFO: Non-Current Assets Total: 800000  
[2026-09-14 13:05:07] live.INFO: --- Getting Current Assets ---  
[2026-09-14 13:05:07] live.INFO: --- Getting Method Balances ---  
[2026-09-14 13:05:07] live.INFO: Getting method balances up to date: 2026-12-31 (converted to: 2026-12-31)  
[2026-09-14 13:05:07] live.INFO: Found 368 payment records  
[2026-09-14 13:05:07] live.INFO: Method Balances:  {"Cash":-35944811.0,"Paybill Saf":194090.0,"Mpesa Till":24136.0,"Paybill Equity":256397.0,"Bank transfer":-19521553.0,"Card":5.0,"Jambo Pay":20334.0,"Pochi La Biashara":8052.0,"card":20061.0,"Mpesa Agent":53.0} 
[2026-09-14 13:05:07] live.INFO: Added Liability - Cash Overdraft: 35944811  
[2026-09-14 13:05:07] live.INFO: Added Current Asset - Method: Paybill Saf, Balance: 194090  
[2026-09-14 13:05:07] live.INFO: Added Current Asset - Method: Mpesa Till, Balance: 24136  
[2026-09-14 13:05:07] live.INFO: Added Current Asset - Method: Paybill Equity, Balance: 256397  
[2026-09-14 13:05:07] live.INFO: Added Liability - Bank transfer Overdraft: 19521553  
[2026-09-14 13:05:07] live.INFO: Added Current Asset - Method: Card, Balance: 5  
[2026-09-14 13:05:07] live.INFO: Added Current Asset - Method: Jambo Pay, Balance: 20334  
[2026-09-14 13:05:07] live.INFO: Added Current Asset - Method: Pochi La Biashara, Balance: 8052  
[2026-09-14 13:05:07] live.INFO: Added Current Asset - Method: card, Balance: 20061  
[2026-09-14 13:05:07] live.INFO: Added Current Asset - Method: Mpesa Agent, Balance: 53  
[2026-09-14 13:05:07] live.INFO: --- Getting Receivables ---  
[2026-09-14 13:05:07] live.INFO: Calculating receivables up to date: 2026-12-31  
[2026-09-14 13:05:07] live.INFO: Total Receivables: 5138417.0000  
[2026-09-14 13:05:07] live.INFO: Accounts Receivable: 5138417  
[2026-09-14 13:05:07] live.INFO: --- Getting Inventory Closing Stock Value as of 2026-12-31 ---  
[2026-09-14 13:05:07] live.INFO: Calculating closing stock value as of: 2026-12-31  
[2026-09-14 13:05:07] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-12-31","location_id":null,"is_opening":false,"by_sale_price":false,"filters":[],"permitted_locations":"all"} 
[2026-09-14 13:05:07] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-12-31' (includes all types except purchase_order)"} 
[2026-09-14 13:05:07] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-12-31'","bindings":["purchase_order",8]} 
[2026-09-14 13:05:08] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"159650182.93480000","is_opening":false,"date":"2026-12-31"} 
[2026-09-14 13:05:08] live.INFO: Closing Stock Value (by purchase price): 159650182.93480000  
[2026-09-14 13:05:08] live.INFO: Inventory Closing Stock Value: 159650182.9348  
[2026-09-14 13:05:08] live.INFO: --- Getting Opening Stock Equity as of 2026-01-01 ---  
[2026-09-14 13:05:08] live.INFO: Calculating opening stock value as of: 2026-01-01  
[2026-09-14 13:05:08] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2025-12-31","location_id":null,"is_opening":false,"by_sale_price":false,"filters":[],"permitted_locations":"all"} 
[2026-09-14 13:05:08] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2025-12-31' (includes all types except purchase_order)"} 
[2026-09-14 13:05:08] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2025-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2025-12-31'","bindings":["purchase_order",8]} 
[2026-09-14 13:05:08] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":0,"is_opening":false,"date":"2025-12-31"} 
[2026-09-14 13:05:08] live.INFO: Opening Stock Value (as of 2025-12-31): 0  
[2026-09-14 13:05:08] live.INFO: Opening Stock Equity: 0  
[2026-09-14 13:05:08] live.INFO: --- Getting Profit/Loss Details from TransactionUtil for Period ---  
[2026-09-14 13:05:08] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2025-12-31","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:05:08] live.INFO: Opening stock calculation - including all transactions {"date":"2025-12-31"} 
[2026-09-14 13:05:08] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2025-12-31')"} 
[2026-09-14 13:05:08] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2025-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2025-12-31'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 13:05:08] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"62490987.23600000","is_opening":true,"date":"2025-12-31"} 
[2026-09-14 13:05:08] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-12-31","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:05:08] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-12-31' (includes all types except purchase_order)"} 
[2026-09-14 13:05:08] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-12-31'","bindings":["purchase_order",8]} 
[2026-09-14 13:05:08] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"159650182.93480000","is_opening":false,"date":"2026-12-31"} 
[2026-09-14 13:05:08] live.INFO: Net Profit for Period 2026-01-01 to 2026-12-31: 3453448.1752  
[2026-09-14 13:05:08] live.INFO: Added to Equity - Retained Earnings: 3453448.1752  
[2026-09-14 13:05:08] live.INFO: --- Getting Payables ---  
[2026-09-14 13:05:08] live.INFO: Calculating payables up to date: 2026-12-31  
[2026-09-14 13:05:08] live.INFO: Total Payables: 2617835.7700  
[2026-09-14 13:05:08] live.INFO: Accounts Payable: 2617835.77  
[2026-09-14 13:05:08] live.INFO: === FINAL TOTALS ===  
[2026-09-14 13:05:08] live.INFO: Total Non-Current Assets: 800000  
[2026-09-14 13:05:08] live.INFO: Total Current Assets: 165311727.9348  
[2026-09-14 13:05:08] live.INFO: Total Assets: 166111727.9348  
[2026-09-14 13:05:08] live.INFO: Total Equity: 3453448.1752  
[2026-09-14 13:05:08] live.INFO: Total Liabilities: 58084199.77  
[2026-09-14 13:05:08] live.INFO: Total Equity + Liabilities: 61537647.9452  
[2026-09-14 13:05:08] live.INFO: Difference: 104574079.9896  
[2026-09-14 13:05:08] live.INFO: Is Balanced: No  
[2026-09-14 13:05:08] live.INFO: === BALANCE SHEET RESPONSE ===  
[2026-09-14 13:05:08] live.INFO: Total Assets: 166111727.9348  
[2026-09-14 13:05:08] live.INFO: Total Equity: 3453448.1752  
[2026-09-14 13:05:08] live.INFO: Total Liabilities: 58084199.77  
[2026-09-14 13:05:08] live.INFO: Is Balanced: No  
[2026-09-14 13:05:10] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:05:10] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 13:05:10] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 13:05:10] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:05:10] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163532.64000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 13:05:10] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:05:10] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:05:10] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 13:05:10] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:05:11] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:05:11] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:05:11] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 13:05:11] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 13:05:11] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:05:11] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7589182.50000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 13:05:11] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:05:11] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:05:11] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:05:11] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 13:05:11] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7588682.50000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:05:24] live.INFO: Calculating receivables listing from: 2026-09-14 to: 2026-09-14  
[2026-09-14 13:05:25] live.INFO: Calculating payables listing from: 2026-09-14 to: 2026-09-14  
[2026-09-14 13:08:07] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 13:08:07] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 13:08:07] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 13:08:07] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 13:08:07] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 13:08:07] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 13:08:07] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:08:07] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 13:08:07] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"159650182.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:08:47] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 13:09:58] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 13:11:09] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 13:21:21] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 13:31:20] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 13:41:20] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 13:46:43] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 13:46:43] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2025-12-31","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:46:43] live.INFO: Opening stock calculation - including all transactions {"date":"2025-12-31"} 
[2026-09-14 13:46:43] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2025-12-31')"} 
[2026-09-14 13:46:43] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2025-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2025-12-31'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:46:43] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"2932570.28400000","is_opening":true,"date":"2025-12-31"} 
[2026-09-14 13:46:43] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-12-31","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:46:43] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-12-31' (includes all types except purchase_order)"} 
[2026-09-14 13:46:43] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-12-31'","bindings":["purchase_order",43]} 
[2026-09-14 13:46:43] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-12-31"} 
[2026-09-14 13:46:45] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2025-12-31","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:46:45] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:46:45] live.INFO: Opening stock calculation - including all transactions {"date":"2025-12-31"} 
[2026-09-14 13:46:45] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2025-12-31')"} 
[2026-09-14 13:46:45] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2025-12-31') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2025-12-31'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:46:45] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"5040630.00000000","is_opening":true,"date":"2025-12-31"} 
[2026-09-14 13:46:45] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-12-31","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:46:45] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:46:45] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-12-31' (includes all types except purchase_order)"} 
[2026-09-14 13:46:45] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-12-31') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-12-31'","bindings":["purchase_order",43]} 
[2026-09-14 13:46:45] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7588682.50000000","is_opening":false,"date":"2026-12-31"} 
[2026-09-14 13:46:48] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:46:48] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 13:46:48] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 13:46:48] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:46:48] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163532.64000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 13:46:48] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:46:48] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:46:48] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 13:46:48] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:46:49] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:46:49] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:46:49] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 13:46:49] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 13:46:49] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:46:49] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7589182.50000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 13:46:49] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:46:49] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:46:49] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:46:49] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 13:46:49] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7588682.50000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:47:26] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2025-12-31","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:47:26] live.INFO: Opening stock calculation - including all transactions {"date":"2025-12-31"} 
[2026-09-14 13:47:26] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2025-12-31')"} 
[2026-09-14 13:47:26] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2025-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2025-12-31'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:47:26] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"2932570.28400000","is_opening":true,"date":"2025-12-31"} 
[2026-09-14 13:47:26] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-12-31","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:47:26] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-12-31' (includes all types except purchase_order)"} 
[2026-09-14 13:47:26] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-12-31'","bindings":["purchase_order",43]} 
[2026-09-14 13:47:26] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-12-31"} 
[2026-09-14 13:47:27] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2025-12-31","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:47:27] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:47:27] live.INFO: Opening stock calculation - including all transactions {"date":"2025-12-31"} 
[2026-09-14 13:47:27] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2025-12-31')"} 
[2026-09-14 13:47:27] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2025-12-31') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2025-12-31'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:47:27] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"5040630.00000000","is_opening":true,"date":"2025-12-31"} 
[2026-09-14 13:47:27] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-12-31","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:47:27] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:47:27] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-12-31' (includes all types except purchase_order)"} 
[2026-09-14 13:47:27] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-12-31') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-12-31'","bindings":["purchase_order",43]} 
[2026-09-14 13:47:27] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7588682.50000000","is_opening":false,"date":"2026-12-31"} 
[2026-09-14 13:47:31] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:47:31] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 13:47:31] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 13:47:31] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:47:31] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163532.64000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 13:47:31] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 13:47:31] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:47:31] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 13:47:31] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:47:32] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:47:32] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:47:32] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 13:47:32] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 13:47:32] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:47:32] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7589182.50000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 13:47:32] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 13:47:32] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 13:47:32] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:47:32] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 13:47:32] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"7588682.50000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:48:11] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 13:48:11] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 13:48:11] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 13:48:11] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",43,"opening_stock","opening_stock"]} 
[2026-09-14 13:48:11] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163532.64000000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 13:48:11] live.INFO: === getOpeningClosingStock START === {"business_id":43,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 13:48:11] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 13:48:11] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",43]} 
[2026-09-14 13:48:11] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"9163132.64000000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 13:55:11] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 13:55:49] live.INFO: filterProduct method called {"business_id":43,"search_term":"mar","location_id":"39","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku"],"check_qty":false,"search_type":"like"} 
[2026-09-14 13:55:49] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 13:55:49] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 13:55:49] live.DEBUG: Applying search filters {"search_term":"mar","search_type":"like","search_fields":["name","sku"]} 
[2026-09-14 13:55:49] live.DEBUG: LIKE search conditions applied {"fields":["name","sku"]} 
[2026-09-14 13:55:49] live.DEBUG: Applying location filter {"location_id":"39"} 
[2026-09-14 13:55:49] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":43,"search_term":"mar"} 
[2026-09-14 13:55:51] live.INFO: Product Row Debug - RELOADED {"product_id":359,"product_name":"mara moja today","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":10.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"283":{"unit_id":283,"unit_name":"tablets","unit_price":10.0,"multiplier":1,"has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 13:56:00] live.INFO: Fetching tax rate for product ID: 359  
[2026-09-14 13:56:00] live.INFO: Product ID 359 has no tax assigned.  
[2026-09-14 13:56:59] live.INFO: filterProduct method called {"business_id":43,"search_term":"ms","location_id":"39","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku"],"check_qty":false,"search_type":"like"} 
[2026-09-14 13:56:59] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 13:56:59] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 13:56:59] live.DEBUG: Applying search filters {"search_term":"ms","search_type":"like","search_fields":["name","sku"]} 
[2026-09-14 13:56:59] live.DEBUG: LIKE search conditions applied {"fields":["name","sku"]} 
[2026-09-14 13:56:59] live.DEBUG: Applying location filter {"location_id":"39"} 
[2026-09-14 13:56:59] live.INFO: filterProduct completed successfully {"result_count":2,"business_id":43,"search_term":"ms"} 
[2026-09-14 13:57:04] live.INFO: filterProduct method called {"business_id":43,"search_term":"mar","location_id":"39","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku"],"check_qty":false,"search_type":"like"} 
[2026-09-14 13:57:04] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 13:57:04] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 13:57:04] live.DEBUG: Applying search filters {"search_term":"mar","search_type":"like","search_fields":["name","sku"]} 
[2026-09-14 13:57:04] live.DEBUG: LIKE search conditions applied {"fields":["name","sku"]} 
[2026-09-14 13:57:04] live.DEBUG: Applying location filter {"location_id":"39"} 
[2026-09-14 13:57:04] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":43,"search_term":"mar"} 
[2026-09-14 13:57:04] live.INFO: Product Row Debug - RELOADED {"product_id":359,"product_name":"mara moja today","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":10.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"283":{"unit_id":283,"unit_name":"tablets","unit_price":10.0,"multiplier":1,"has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 13:58:19] live.INFO: filterProduct method called {"business_id":43,"search_term":"mar","location_id":"39","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku"],"check_qty":false,"search_type":"like"} 
[2026-09-14 13:58:19] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 13:58:19] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 13:58:19] live.DEBUG: Applying search filters {"search_term":"mar","search_type":"like","search_fields":["name","sku"]} 
[2026-09-14 13:58:19] live.DEBUG: LIKE search conditions applied {"fields":["name","sku"]} 
[2026-09-14 13:58:19] live.DEBUG: Applying location filter {"location_id":"39"} 
[2026-09-14 13:58:19] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":43,"search_term":"mar"} 
[2026-09-14 13:58:19] live.INFO: Product Row Debug - RELOADED {"product_id":359,"product_name":"mara moja today","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":10.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"283":{"unit_id":283,"unit_name":"tablets","unit_price":10.0,"multiplier":1,"has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 14:05:29] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 14:05:59] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:05:59] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 14:05:59] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 14:05:59] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 14:05:59] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 14:05:59] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:05:59] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 14:05:59] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 14:05:59] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"159650182.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 14:06:36] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:06:36] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 14:06:36] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 14:06:36] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 14:06:36] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 14:06:36] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:06:36] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 14:06:36] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 14:06:36] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"159650182.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 14:06:53] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-07","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:06:53] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-07"} 
[2026-09-14 14:06:53] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-07')"} 
[2026-09-14 14:06:53] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-07') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-07'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 14:06:53] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152124872.93480000","is_opening":true,"date":"2026-09-07"} 
[2026-09-14 14:06:53] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:06:53] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 14:06:53] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 14:06:53] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"159650182.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 14:06:56] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-07","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:06:56] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-07"} 
[2026-09-14 14:06:56] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-07')"} 
[2026-09-14 14:06:56] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-07') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-07'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 14:06:56] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152124872.93480000","is_opening":true,"date":"2026-09-07"} 
[2026-09-14 14:06:56] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:06:56] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 14:06:56] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 14:06:56] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"159650182.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 14:07:01] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-08-15","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:07:01] live.INFO: Opening stock calculation - including all transactions {"date":"2026-08-15"} 
[2026-09-14 14:07:01] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-08-15')"} 
[2026-09-14 14:07:01] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-08-15') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-08-15'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 14:07:01] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"150201522.52320000","is_opening":true,"date":"2026-08-15"} 
[2026-09-14 14:07:01] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:07:01] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 14:07:01] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 14:07:01] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"159650182.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 14:07:04] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-08-15","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:07:04] live.INFO: Opening stock calculation - including all transactions {"date":"2026-08-15"} 
[2026-09-14 14:07:04] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-08-15')"} 
[2026-09-14 14:07:04] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-08-15') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-08-15'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 14:07:04] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"150201522.52320000","is_opening":true,"date":"2026-08-15"} 
[2026-09-14 14:07:04] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:07:04] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 14:07:04] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 14:07:04] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"159650182.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 14:08:31] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 14:08:41] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 14:09:10] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:09:10] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 14:09:10] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 14:09:10] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 14:09:10] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 14:09:10] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:09:10] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 14:09:10] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 14:09:10] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"159650182.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 14:10:31] live.INFO: Digitax upload skipped: No tax number provided {"contact_id":879,"contact_name":"","contact_type":"supplier"} 
[2026-09-14 14:11:10] live.INFO: Digitax upload skipped: No tax number provided {"contact_id":880,"contact_name":"","contact_type":"customer"} 
[2026-09-14 14:13:37] live.INFO: Digitax upload skipped: No tax number provided {"contact_id":881,"contact_name":"","contact_type":"customer"} 
[2026-09-14 14:13:56] live.INFO: Digitax upload skipped: No tax number provided {"contact_id":882,"contact_name":"","contact_type":"customer"} 
[2026-09-14 14:15:09] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 14:16:16] live.INFO: === About to call saveProductNewUnitRelationships === {"product_id":365,"request_units":[{"actual_name":"Pkt","unit_id":"292","short_name":"Pkt","relation_unit_id":null,"relation_qty":"1","price":"245"},{"actual_name":"Bale","unit_id":"293","short_name":"Bl","relation_unit_id":"292","relation_qty":"12","price":"2300"}],"page_batch_id":"20260914_141445_8807"} 
[2026-09-14 14:16:16] live.INFO: === saveProductNewUnitRelationships START === {"product_id":365,"product_name":"Original Hostes Wheat Flour 2kg"} 
[2026-09-14 14:16:16] live.INFO: Units data received {"units_data":[{"actual_name":"Pkt","unit_id":"292","short_name":"Pkt","relation_unit_id":null,"relation_qty":"1","price":"245"},{"actual_name":"Bale","unit_id":"293","short_name":"Bl","relation_unit_id":"292","relation_qty":"12","price":"2300"}],"count":2} 
[2026-09-14 14:16:16] live.INFO: Processing unit index: 0 {"unit_data":{"actual_name":"Pkt","unit_id":"292","short_name":"Pkt","relation_unit_id":null,"relation_qty":"1","price":"245"}} 
[2026-09-14 14:16:16] live.INFO: Unit found by ID {"unit_id":292,"actual_name":"Pkt"} 
[2026-09-14 14:16:16] live.INFO: Unit lookup result {"found":"yes","unit_id":292,"method":"by_id"} 
[2026-09-14 14:16:16] live.INFO: Updating existing unit {"unit_id":292} 
[2026-09-14 14:16:16] live.INFO: Updated unit_price {"new_price":245.0} 
[2026-09-14 14:16:16] live.INFO: Unit updated successfully  
[2026-09-14 14:16:16] live.INFO: Setting as BASE unit {"unit_id":292} 
[2026-09-14 14:16:16] live.INFO: Base unit saved {"base_unit_id":292} 
[2026-09-14 14:16:16] live.INFO: Processing unit index: 1 {"unit_data":{"actual_name":"Bale","unit_id":"293","short_name":"Bl","relation_unit_id":"292","relation_qty":"12","price":"2300"}} 
[2026-09-14 14:16:16] live.INFO: Unit found by ID {"unit_id":293,"actual_name":"Bale"} 
[2026-09-14 14:16:16] live.INFO: Unit lookup result {"found":"yes","unit_id":293,"method":"by_id"} 
[2026-09-14 14:16:16] live.INFO: Updating existing unit {"unit_id":293} 
[2026-09-14 14:16:16] live.INFO: Updated unit_price {"new_price":2300.0} 
[2026-09-14 14:16:16] live.INFO: Unit updated successfully  
[2026-09-14 14:16:16] live.INFO: First pass complete {"created_units_count":2,"base_unit_id":292} 
[2026-09-14 14:16:16] live.INFO: === SECOND PASS: Setting relations first ===  
[2026-09-14 14:16:16] live.INFO: Setting relation for unit {"unit_id":293,"unit_name":"Bale","relation_unit_id":292,"relation_unit_name":"Pkt","relation_qty":12.0} 
[2026-09-14 14:16:16] live.INFO: Relation saved to database {"unit_id":293,"rel_unit_id":292,"rel_unit_qty":12.0,"base_unit_id":292} 
[2026-09-14 14:16:16] live.INFO: === SECOND PASS: Calculating cumulative multipliers ===  
[2026-09-14 14:16:16] live.INFO: Calculating cumulative multiplier for unit {"unit_id":293,"unit_name":"Bale"} 
[2026-09-14 14:16:16] live.INFO: === calculateCumulativeMultiplier START === {"unit_id":293,"business_id":8} 
[2026-09-14 14:16:16] live.INFO: Unit found {"unit_id":293,"unit_name":"Bale","rel_unit_id":292,"rel_unit_qty":"12.0000","base_unit_id":292} 
[2026-09-14 14:16:16] live.INFO: Starting cumulative multiplier {"initial_multiplier":12.0} 
[2026-09-14 14:16:16] live.INFO: Traversing up chain depth: 0 {"current_unit_id":292} 
[2026-09-14 14:16:16] live.INFO: Parent unit found {"parent_unit_id":292,"parent_unit_name":"Pkt","parent_rel_unit_id":null,"parent_rel_unit_qty":"1.0000"} 
[2026-09-14 14:16:16] live.INFO: Reached base unit (no rel_unit_id), stopping  
[2026-09-14 14:16:16] live.INFO: Chain traversal complete {"chain":"Bale (293) -> Pkt (292)","final_cumulative_multiplier":12.0,"depth_traversed":0} 
[2026-09-14 14:16:16] live.INFO: === calculateCumulativeMultiplier END === {"result":12.0} 
[2026-09-14 14:16:16] live.INFO: Cumulative multiplier calculated {"unit_id":293,"unit_name":"Bale","cumulative_multiplier":12.0} 
[2026-09-14 14:16:16] live.INFO: Unit saved with cumulative multiplier {"unit_id":293,"unit_name":"Bale","base_unit_multiplier":12.0} 
[2026-09-14 14:16:16] live.INFO: === saveProductNewUnitRelationships END ===  
[2026-09-14 14:16:17] live.INFO: OpeningStockController::add - Location Data {"product_id":"365","business_id":8,"locations":{"Illuminate\\Support\\Collection":{"9":"BQT GENERAL BUSINESS (BL0001)","10":"BQT BRANCH 1 (BL0002)","12":"BQT BRANCH 2 (BL0003)","14":"BQT BRANCH 3 (BL0004)"}},"available_locations":[9]} 
[2026-09-14 14:16:17] live.INFO: OpeningStockController::add - Serial Numbers Check {"product_id":"365","business_id":8,"has_serial_numbers":{"9":false},"total_locations_with_serial":0} 
[2026-09-14 14:17:23] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 14:17:50] live.INFO: Purchases array from request {"purchases":[{"product_id":"365","variation_id":"370","quantity":"100","product_unit_id":"292","sub_unit_id":"293","pp_without_discount":"2,280.00","discount_percent":"0.00","purchase_price":"2,280.00","purchase_line_tax_id":null,"item_tax":"0.00","purchase_price_inc_tax":"2,280.00","profit_percent":"28.95","default_sell_price":"2,940.00","lot_number":null,"mfg_date":null,"exp_date":"03/26/2027","imei_numbers":"[]","imei_count":"0"}],"purchases_json":"[{\"product_id\":\"365\",\"variation_id\":\"370\",\"quantity\":\"100\",\"product_unit_id\":\"292\",\"sub_unit_id\":\"293\",\"pp_without_discount\":\"2,280.00\",\"discount_percent\":\"0.00\",\"purchase_price\":\"2,280.00\",\"purchase_line_tax_id\":null,\"item_tax\":\"0.00\",\"purchase_price_inc_tax\":\"2,280.00\",\"profit_percent\":\"28.95\",\"default_sell_price\":\"2,940.00\",\"lot_number\":null,\"mfg_date\":null,\"exp_date\":\"03\\/26\\/2027\",\"imei_numbers\":\"[]\",\"imei_count\":\"0\"}]"} 
[2026-09-14 14:17:50] live.WARNING: Digitax stock update skipped: Missing item_id for product_id 365  
[2026-09-14 14:17:50] live.INFO: Purchase lines created {"transaction_id":1870,"purchase_lines_count":1,"purchase_lines":[{"id":1599,"transaction_id":1870,"product_id":365,"variation_id":370,"quantity":1200.0,"secondary_unit_quantity":"0.0000","pp_without_discount":"190.0000","discount_percent":"0.00","purchase_price":"190.0000","purchase_price_inc_tax":"190.0000","item_tax":"0.0000","tax_id":null,"purchase_requisition_line_id":null,"purchase_order_line_id":null,"quantity_sold":"0.0000","quantity_adjusted":"0.0000","quantity_returned":"0.0000","po_quantity_purchased":"0.0000","mfg_quantity_used":"0.0000","mfg_date":null,"exp_date":"2027-03-26","lot_number":null,"sub_unit_id":293,"created_at":"2026-09-14T11:17:50.000000Z","updated_at":"2026-09-14T11:17:50.000000Z"}]} 
[2026-09-14 14:17:50] live.INFO: Processing purchase row - 0 {"row_index":0,"product_id":"365","variation_id":"370","quantity":"100","has_imei":true,"imei_raw":"[]","purchase_data_keys":["product_id","variation_id","quantity","product_unit_id","sub_unit_id","pp_without_discount","discount_percent","purchase_price","purchase_line_tax_id","item_tax","purchase_price_inc_tax","profit_percent","default_sell_price","lot_number","mfg_date","exp_date","imei_numbers","imei_count"]} 
[2026-09-14 14:17:50] live.INFO: IMEI Data - Parsed for row 0 {"row_index":0,"imei_count":0,"imei_data":[],"imei_json":"[]"} 
[2026-09-14 14:17:50] live.INFO: IMEI data is empty or invalid for row 0 {"imeiData":[]} 
[2026-09-14 14:17:50] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":false,"is_valid_mpesa_sale":false,"payment_method_input":"cash","mpesa_transaction_id":null,"transaction_id":1870} 
[2026-09-14 14:17:50] live.INFO: Purchase created successfully with IMEI data {"transaction_id":1870,"ref_no":"PO2026/0194","final_total":228000.0} 
[2026-09-14 14:18:20] live.INFO: filterProduct method called {"business_id":8,"search_term":"host","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 14:18:20] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 14:18:20] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 14:18:20] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 14:18:20] live.DEBUG: Applying search filters {"search_term":"host","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 14:18:20] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 14:18:20] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 14:18:20] live.DEBUG: Added lot number fields to select  
[2026-09-14 14:18:20] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"host"} 
[2026-09-14 14:18:21] live.INFO: Product Row Debug - RELOADED {"product_id":365,"product_name":"Original Hostes Wheat Flour 2kg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":245.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"292":{"unit_id":292,"unit_name":"Pkt","unit_price":245.0,"multiplier":1,"has_price":true},"293":{"unit_id":293,"unit_name":"Bale","unit_price":2300.0,"multiplier":"12.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 14:18:24] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 14:19:00] live.INFO: Credit Limit Check Started {"contact_id":"880","status":"final","final_total":"2450.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 14:19:00] live.DEBUG: Payment Calculation {"final_total":2450.0,"curr_total_payment":2450.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 14:19:00] live.INFO: Credit Limit Check Skipped - Fully Paid {"final_total":2450.0,"curr_total_payment":2450.0} 
[2026-09-14 14:19:00] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 14:19:00] live.INFO: is_mpesa_sale value: true  
[2026-09-14 14:19:00] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":true,"is_valid_mpesa_sale":false,"payment_method_input":"cash","mpesa_transaction_id":null,"transaction_id":1871} 
[2026-09-14 14:19:00] live.INFO: Journal Entry Case: FULL CASH PAYMENT {"transaction_id":1871,"final_total":2450.0,"amount_paid":2450.0,"balance_due":0} 
[2026-09-14 14:19:00] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1871,"entries":[{"transaction_id":1871,"created_by_id":21,"transaction_number":"TRX-6aa7d824352a46.74037917","payment_detail_id":1333,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 14:19:00","updated_at":"2026-09-14 14:19:00","chart_of_account_id":23,"debit":null,"credit":2450.0},{"transaction_id":1871,"created_by_id":21,"transaction_number":"TRX-6aa7d824352a46.74037917","payment_detail_id":1333,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 14:19:00","updated_at":"2026-09-14 14:19:00","chart_of_account_id":27,"debit":2450.0,"credit":null}]} 
[2026-09-14 14:19:00] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1188,"purchase_line_id":1599,"quantity":10.0,"created_at":"2026-09-14 14:19:00","updated_at":"2026-09-14 14:19:00"}]} 
[2026-09-14 14:19:00] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 14:19:00] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":550.0} 
[2026-09-14 14:19:00] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1871,"contact_id":880,"customer_name":"PORTMAX","has_tin":false,"has_digitax_id":false} 
[2026-09-14 14:19:00] live.ERROR: ETIMS: Missing item_id for product {"product_id":365} 
[2026-09-14 14:19:00] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 14:19:00] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1871  
[2026-09-14 14:19:30] live.INFO: filterProduct method called {"business_id":8,"search_term":"hos","location_id":"9","not_for_selling":"0","price_group_id":"3","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 14:19:30] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 14:19:30] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 14:19:30] live.DEBUG: Joining variation_group_prices for price group {"price_group_id":"3"} 
[2026-09-14 14:19:30] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 14:19:30] live.DEBUG: Applying search filters {"search_term":"hos","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 14:19:30] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 14:19:30] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 14:19:30] live.DEBUG: Added price group calculation to select {"price_group_id":"3"} 
[2026-09-14 14:19:30] live.DEBUG: Added lot number fields to select  
[2026-09-14 14:19:30] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"hos"} 
[2026-09-14 14:19:31] live.INFO: Product Row Debug - RELOADED {"product_id":365,"product_name":"Original Hostes Wheat Flour 2kg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":"230.0000","discounts_json":"[]","multiplier":1,"unit_prices":{"292":{"unit_id":292,"unit_name":"Pkt","unit_price":245.0,"multiplier":1,"has_price":true},"293":{"unit_id":293,"unit_name":"Bale","unit_price":2300.0,"multiplier":"12.0000","has_price":true}},"has_price_group":true,"price_group_id":"3"} 
[2026-09-14 14:19:47] live.INFO: Credit Limit Check Started {"contact_id":"882","status":"final","final_total":"3450.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 14:19:47] live.DEBUG: Payment Calculation {"final_total":3450.0,"curr_total_payment":0.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 14:19:47] live.INFO: Credit Limit Check Skipped - No Credit Limit Set {"contact_id":"882","contact_name":""} 
[2026-09-14 14:19:47] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 14:19:47] live.INFO: is_mpesa_sale value: true  
[2026-09-14 14:19:48] live.INFO: Journal Entry Case: FULL CREDIT SALE {"transaction_id":1872,"final_total":3450.0,"amount_paid":0.0,"balance_due":3450.0} 
[2026-09-14 14:19:48] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1872,"entries":[{"transaction_id":1872,"created_by_id":21,"transaction_number":"TRX-6aa7d854003390.42102649","payment_detail_id":1334,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 14:19:48","updated_at":"2026-09-14 14:19:48","chart_of_account_id":23,"debit":null,"credit":3450.0},{"transaction_id":1872,"created_by_id":21,"transaction_number":"TRX-6aa7d854003390.42102649","payment_detail_id":1334,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 14:19:48","updated_at":"2026-09-14 14:19:48","chart_of_account_id":19,"debit":3450.0,"credit":null}]} 
[2026-09-14 14:19:48] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1189,"purchase_line_id":1599,"quantity":15.0,"created_at":"2026-09-14 14:19:48","updated_at":"2026-09-14 14:19:48"}]} 
[2026-09-14 14:19:48] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 14:19:48] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":600.0} 
[2026-09-14 14:19:48] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1872,"contact_id":882,"customer_name":"Peter LTD NEW","has_tin":false,"has_digitax_id":false} 
[2026-09-14 14:19:48] live.ERROR: ETIMS: Missing item_id for product {"product_id":365} 
[2026-09-14 14:19:48] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 14:19:48] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1872  
[2026-09-14 14:20:24] live.INFO: filterProduct method called {"business_id":8,"search_term":"host","location_id":"9","not_for_selling":"0","price_group_id":"35","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 14:20:24] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 14:20:24] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 14:20:24] live.DEBUG: Joining variation_group_prices for price group {"price_group_id":"35"} 
[2026-09-14 14:20:24] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 14:20:24] live.DEBUG: Applying search filters {"search_term":"host","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 14:20:24] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 14:20:24] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 14:20:24] live.DEBUG: Added price group calculation to select {"price_group_id":"35"} 
[2026-09-14 14:20:24] live.DEBUG: Added lot number fields to select  
[2026-09-14 14:20:24] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"host"} 
[2026-09-14 14:20:24] live.INFO: Product Row Debug - RELOADED {"product_id":365,"product_name":"Original Hostes Wheat Flour 2kg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":"225.0000","discounts_json":"[]","multiplier":1,"unit_prices":{"292":{"unit_id":292,"unit_name":"Pkt","unit_price":245.0,"multiplier":1,"has_price":true},"293":{"unit_id":293,"unit_name":"Bale","unit_price":2300.0,"multiplier":"12.0000","has_price":true}},"has_price_group":true,"price_group_id":"35"} 
[2026-09-14 14:21:02] live.INFO: Credit Limit Check Started {"contact_id":"881","status":"final","final_total":"7650.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 14:21:02] live.DEBUG: Payment Calculation {"final_total":7650.0,"curr_total_payment":7650.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 14:21:02] live.INFO: Credit Limit Check Skipped - Fully Paid {"final_total":7650.0,"curr_total_payment":7650.0} 
[2026-09-14 14:21:02] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 14:21:02] live.INFO: is_mpesa_sale value: true  
[2026-09-14 14:21:02] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":true,"is_valid_mpesa_sale":false,"payment_method_input":"cash","mpesa_transaction_id":null,"transaction_id":1873} 
[2026-09-14 14:21:02] live.INFO: Journal Entry Case: FULL CASH PAYMENT {"transaction_id":1873,"final_total":7650.0,"amount_paid":7650.0,"balance_due":0} 
[2026-09-14 14:21:02] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1873,"entries":[{"transaction_id":1873,"created_by_id":21,"transaction_number":"TRX-6aa7d89e5aa809.34459993","payment_detail_id":1335,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 14:21:02","updated_at":"2026-09-14 14:21:02","chart_of_account_id":23,"debit":null,"credit":7650.0},{"transaction_id":1873,"created_by_id":21,"transaction_number":"TRX-6aa7d89e5aa809.34459993","payment_detail_id":1335,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 14:21:02","updated_at":"2026-09-14 14:21:02","chart_of_account_id":27,"debit":7650.0,"credit":null}]} 
[2026-09-14 14:21:02] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1190,"purchase_line_id":1599,"quantity":34.0,"created_at":"2026-09-14 14:21:02","updated_at":"2026-09-14 14:21:02"}]} 
[2026-09-14 14:21:02] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 14:21:02] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":1190.0} 
[2026-09-14 14:21:02] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1873,"contact_id":881,"customer_name":"Kamau LTD NEW","has_tin":false,"has_digitax_id":false} 
[2026-09-14 14:21:02] live.ERROR: ETIMS: Missing item_id for product {"product_id":365} 
[2026-09-14 14:21:02] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 14:21:02] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1873  
[2026-09-14 14:22:50] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 14:22:52] live.INFO: filterProduct method called {"business_id":8,"search_term":"hos","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 14:22:52] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 14:22:52] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 14:22:52] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 14:22:52] live.DEBUG: Applying search filters {"search_term":"hos","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 14:22:52] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 14:22:52] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 14:22:52] live.DEBUG: Added lot number fields to select  
[2026-09-14 14:22:52] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"hos"} 
[2026-09-14 14:22:53] live.INFO: Product Row Debug - RELOADED {"product_id":365,"product_name":"Original Hostes Wheat Flour 2kg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":245.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"292":{"unit_id":292,"unit_name":"Pkt","unit_price":245.0,"multiplier":1,"has_price":true},"293":{"unit_id":293,"unit_name":"Bale","unit_price":2300.0,"multiplier":"12.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 14:22:58] live.INFO: Fetching tax rate for product ID: 365  
[2026-09-14 14:22:58] live.INFO: Product ID 365 has no tax assigned.  
[2026-09-14 14:22:58] live.INFO: Fetching tax rate for product ID: 365  
[2026-09-14 14:22:58] live.INFO: Product ID 365 has no tax assigned.  
[2026-09-14 14:22:59] live.INFO: Fetching tax rate for product ID: 365  
[2026-09-14 14:22:59] live.INFO: Product ID 365 has no tax assigned.  
[2026-09-14 14:22:59] live.INFO: Fetching tax rate for product ID: 365  
[2026-09-14 14:22:59] live.INFO: Product ID 365 has no tax assigned.  
[2026-09-14 14:23:00] live.INFO: Fetching tax rate for product ID: 365  
[2026-09-14 14:23:00] live.INFO: Product ID 365 has no tax assigned.  
[2026-09-14 14:23:04] live.INFO: Fetching tax rate for product ID: 365  
[2026-09-14 14:23:04] live.INFO: Product ID 365 has no tax assigned.  
[2026-09-14 14:23:05] live.INFO: Fetching tax rate for product ID: 365  
[2026-09-14 14:23:05] live.INFO: Product ID 365 has no tax assigned.  
[2026-09-14 14:23:06] live.INFO: Fetching tax rate for product ID: 365  
[2026-09-14 14:23:06] live.INFO: Product ID 365 has no tax assigned.  
[2026-09-14 14:23:06] live.INFO: Fetching tax rate for product ID: 365  
[2026-09-14 14:23:06] live.INFO: Product ID 365 has no tax assigned.  
[2026-09-14 14:24:21] live.INFO: Credit Limit Check Started {"contact_id":"94","status":"final","final_total":"78200.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 14:24:21] live.DEBUG: Payment Calculation {"final_total":78200.0,"curr_total_payment":78200.0,"is_credit_sale":false,"payment_count":2} 
[2026-09-14 14:24:21] live.INFO: Credit Limit Check Skipped - Fully Paid {"final_total":78200.0,"curr_total_payment":78200.0} 
[2026-09-14 14:24:21] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 14:24:21] live.INFO: is_mpesa_sale value: true  
[2026-09-14 14:24:21] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":true,"is_valid_mpesa_sale":false,"payment_method_input":"cash","mpesa_transaction_id":null,"transaction_id":1874} 
[2026-09-14 14:24:21] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":true,"is_valid_mpesa_sale":false,"payment_method_input":"custom_pay_4","mpesa_transaction_id":null,"transaction_id":1874} 
[2026-09-14 14:24:21] live.INFO: Journal Entry Case: PARTIAL PAYMENT {"transaction_id":1874,"final_total":78200.0,"amount_paid":30000.0,"balance_due":48200.0} 
[2026-09-14 14:24:21] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1874,"entries":[{"transaction_id":1874,"created_by_id":21,"transaction_number":"TRX-6aa7d965ab9b52.15395987","payment_detail_id":1336,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 14:24:21","updated_at":"2026-09-14 14:24:21","chart_of_account_id":23,"debit":null,"credit":78200.0},{"transaction_id":1874,"created_by_id":21,"transaction_number":"TRX-6aa7d965ab9b52.15395987","payment_detail_id":1336,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 14:24:21","updated_at":"2026-09-14 14:24:21","chart_of_account_id":27,"debit":30000.0,"credit":null},{"transaction_id":1874,"created_by_id":21,"transaction_number":"TRX-6aa7d965ab9b52.15395987","payment_detail_id":1336,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 14:24:21","updated_at":"2026-09-14 14:24:21","chart_of_account_id":19,"debit":48200.0,"credit":null}]} 
[2026-09-14 14:24:21] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1191,"purchase_line_id":1599,"quantity":408.0,"created_at":"2026-09-14 14:24:21","updated_at":"2026-09-14 14:24:21"}]} 
[2026-09-14 14:24:21] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 14:24:21] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":680.0} 
[2026-09-14 14:24:21] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1874,"contact_id":94,"customer_name":"Walk-In Customer","has_tin":false,"has_digitax_id":false} 
[2026-09-14 14:24:21] live.ERROR: ETIMS: Missing item_id for product {"product_id":365} 
[2026-09-14 14:24:21] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 14:24:21] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1874  
[2026-09-14 14:24:34] live.INFO: filterProduct method called {"business_id":8,"search_term":"host","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 14:24:34] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 14:24:34] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 14:24:34] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 14:24:34] live.DEBUG: Applying search filters {"search_term":"host","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 14:24:34] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 14:24:34] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 14:24:34] live.DEBUG: Added lot number fields to select  
[2026-09-14 14:24:34] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"host"} 
[2026-09-14 14:24:34] live.INFO: Product Row Debug - RELOADED {"product_id":365,"product_name":"Original Hostes Wheat Flour 2kg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":245.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"292":{"unit_id":292,"unit_name":"Pkt","unit_price":245.0,"multiplier":1,"has_price":true},"293":{"unit_id":293,"unit_name":"Bale","unit_price":2300.0,"multiplier":"12.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 14:24:42] live.INFO: filterProduct method called {"business_id":8,"search_term":"coc","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 14:24:42] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 14:24:42] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 14:24:42] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 14:24:42] live.DEBUG: Applying search filters {"search_term":"coc","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 14:24:42] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 14:24:42] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 14:24:42] live.DEBUG: Added lot number fields to select  
[2026-09-14 14:24:42] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"coc"} 
[2026-09-14 14:24:42] live.INFO: Product Row Debug - RELOADED {"product_id":41,"product_name":"Coca Cola 500ml","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":100.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"16":{"unit_id":16,"unit_name":"Bottle","unit_price":null,"multiplier":1,"has_price":false}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 14:24:48] live.INFO: Credit Limit Check Started {"contact_id":"94","status":"draft","final_total":"590.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 14:24:48] live.INFO: Credit Limit Check Skipped - Draft or Sales Order {"status":"draft","type":"not_set"} 
[2026-09-14 14:24:48] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 14:24:48] live.INFO: is_mpesa_sale value: true  
[2026-09-14 14:24:48] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1875  
[2026-09-14 14:25:10] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 14:26:15] live.INFO: filterProduct method called {"business_id":8,"search_term":"hos","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 14:26:15] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 14:26:15] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 14:26:15] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 14:26:15] live.DEBUG: Applying search filters {"search_term":"hos","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 14:26:15] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 14:26:15] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 14:26:15] live.DEBUG: Added lot number fields to select  
[2026-09-14 14:26:15] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"hos"} 
[2026-09-14 14:26:16] live.INFO: Product Row Debug - RELOADED {"product_id":365,"product_name":"Original Hostes Wheat Flour 2kg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":245.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"292":{"unit_id":292,"unit_name":"Pkt","unit_price":245.0,"multiplier":1,"has_price":true},"293":{"unit_id":293,"unit_name":"Bale","unit_price":2300.0,"multiplier":"12.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 14:26:44] live.INFO: Credit Limit Check Started {"contact_id":"94","status":"final","final_total":"245.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 14:26:44] live.DEBUG: Payment Calculation {"final_total":245.0,"curr_total_payment":0.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 14:26:44] live.DEBUG: Contact Credit Limit Retrieved {"contact_id":"94","contact_name":"Walk-In Customer","credit_limit":"0.0000"} 
[2026-09-14 14:26:44] live.INFO: Credit Limit Check - Current Transaction Only {"contact_id":"94","contact_name":"Walk-In Customer","credit_limit":"0.0000","final_total":245.0,"curr_total_payment":0.0,"current_due":245.0,"will_exceed_limit":true} 
[2026-09-14 14:26:44] live.WARNING: Credit Limit Exceeded for Current Transaction {"contact_id":"94","contact_name":"Walk-In Customer","current_due":245.0,"credit_limit":"0.0000","exceeded_by":245.0} 
[2026-09-14 14:26:51] live.INFO: Credit Limit Check Started {"contact_id":"94","status":"final","final_total":"245.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 14:26:51] live.DEBUG: Payment Calculation {"final_total":245.0,"curr_total_payment":0.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 14:26:51] live.DEBUG: Contact Credit Limit Retrieved {"contact_id":"94","contact_name":"Walk-In Customer","credit_limit":"0.0000"} 
[2026-09-14 14:26:51] live.INFO: Credit Limit Check - Current Transaction Only {"contact_id":"94","contact_name":"Walk-In Customer","credit_limit":"0.0000","final_total":245.0,"curr_total_payment":0.0,"current_due":245.0,"will_exceed_limit":true} 
[2026-09-14 14:26:51] live.WARNING: Credit Limit Exceeded for Current Transaction {"contact_id":"94","contact_name":"Walk-In Customer","current_due":245.0,"credit_limit":"0.0000","exceeded_by":245.0} 
[2026-09-14 14:27:00] live.INFO: Credit Limit Check Started {"contact_id":"94","status":"final","final_total":"245.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 14:27:00] live.DEBUG: Payment Calculation {"final_total":245.0,"curr_total_payment":0.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 14:27:00] live.DEBUG: Contact Credit Limit Retrieved {"contact_id":"94","contact_name":"Walk-In Customer","credit_limit":"0.0000"} 
[2026-09-14 14:27:00] live.INFO: Credit Limit Check - Current Transaction Only {"contact_id":"94","contact_name":"Walk-In Customer","credit_limit":"0.0000","final_total":245.0,"curr_total_payment":0.0,"current_due":245.0,"will_exceed_limit":true} 
[2026-09-14 14:27:00] live.WARNING: Credit Limit Exceeded for Current Transaction {"contact_id":"94","contact_name":"Walk-In Customer","current_due":245.0,"credit_limit":"0.0000","exceeded_by":245.0} 
[2026-09-14 14:29:16] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 14:30:41] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 14:30:44] live.INFO: filterProduct method called {"business_id":8,"search_term":"host","location_id":"9","not_for_selling":"0","price_group_id":"35","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 14:30:44] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 14:30:44] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 14:30:44] live.DEBUG: Joining variation_group_prices for price group {"price_group_id":"35"} 
[2026-09-14 14:30:44] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 14:30:44] live.DEBUG: Applying search filters {"search_term":"host","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 14:30:44] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 14:30:44] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 14:30:44] live.DEBUG: Added price group calculation to select {"price_group_id":"35"} 
[2026-09-14 14:30:44] live.DEBUG: Added lot number fields to select  
[2026-09-14 14:30:44] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"host"} 
[2026-09-14 14:30:44] live.INFO: Product Row Debug - RELOADED {"product_id":365,"product_name":"Original Hostes Wheat Flour 2kg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":"225.0000","discounts_json":"[]","multiplier":1,"unit_prices":{"292":{"unit_id":292,"unit_name":"Pkt","unit_price":245.0,"multiplier":1,"has_price":true},"293":{"unit_id":293,"unit_name":"Bale","unit_price":2300.0,"multiplier":"12.0000","has_price":true}},"has_price_group":true,"price_group_id":"35"} 
[2026-09-14 14:31:38] live.INFO: Fetching tax rate for product ID: 365  
[2026-09-14 14:31:38] live.INFO: Product ID 365 has no tax assigned.  
[2026-09-14 14:31:56] live.INFO: Fetching tax rate for product ID: 365  
[2026-09-14 14:31:56] live.INFO: Product ID 365 has no tax assigned.  
[2026-09-14 14:32:59] live.INFO: Credit Limit Check Started {"contact_id":"881","status":"final","final_total":"445.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 14:32:59] live.DEBUG: Payment Calculation {"final_total":445.0,"curr_total_payment":0.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 14:32:59] live.INFO: Credit Limit Check Skipped - No Credit Limit Set {"contact_id":"881","contact_name":""} 
[2026-09-14 14:32:59] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 14:32:59] live.INFO: is_mpesa_sale value: true  
[2026-09-14 14:32:59] live.INFO: Journal Entry Case: FULL CREDIT SALE {"transaction_id":1876,"final_total":445.0,"amount_paid":0.0,"balance_due":445.0} 
[2026-09-14 14:32:59] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1876,"entries":[{"transaction_id":1876,"created_by_id":21,"transaction_number":"TRX-6aa7db6b204a08.59458515","payment_detail_id":1337,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 14:32:59","updated_at":"2026-09-14 14:32:59","chart_of_account_id":23,"debit":null,"credit":445.0},{"transaction_id":1876,"created_by_id":21,"transaction_number":"TRX-6aa7db6b204a08.59458515","payment_detail_id":1337,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 14:32:59","updated_at":"2026-09-14 14:32:59","chart_of_account_id":19,"debit":445.0,"credit":null}]} 
[2026-09-14 14:32:59] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1194,"purchase_line_id":1599,"quantity":1.0,"created_at":"2026-09-14 14:32:59","updated_at":"2026-09-14 14:32:59"}]} 
[2026-09-14 14:32:59] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 14:32:59] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":255.0} 
[2026-09-14 14:32:59] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1876,"contact_id":881,"customer_name":"Kamau LTD NEW","has_tin":false,"has_digitax_id":false} 
[2026-09-14 14:32:59] live.ERROR: ETIMS: Missing item_id for product {"product_id":365} 
[2026-09-14 14:32:59] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 14:32:59] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1876  
[2026-09-14 14:35:09] live.INFO: Offline not allowed - triggering cleanup {"user_id":293,"business_id":43} 
[2026-09-14 14:42:35] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:42:35] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 14:42:35] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 14:42:35] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 14:42:35] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 14:42:35] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 14:42:35] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 14:42:35] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 14:42:35] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"160989262.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 14:43:19] live.INFO: filterProduct method called {"business_id":8,"search_term":"host","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 14:43:19] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 14:43:19] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 14:43:19] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 14:43:19] live.DEBUG: Applying search filters {"search_term":"host","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 14:43:19] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 14:43:19] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 14:43:19] live.DEBUG: Added lot number fields to select  
[2026-09-14 14:43:19] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"host"} 
[2026-09-14 14:43:19] live.INFO: Product Row Debug - RELOADED {"product_id":365,"product_name":"Original Hostes Wheat Flour 2kg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":245.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"292":{"unit_id":292,"unit_name":"Pkt","unit_price":245.0,"multiplier":1,"has_price":true},"293":{"unit_id":293,"unit_name":"Bale","unit_price":2300.0,"multiplier":"12.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 14:43:21] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 14:50:06] live.INFO: filterProduct method called {"business_id":8,"search_term":"ho","location_id":"9","not_for_selling":null,"price_group_id":null,"product_types":[],"search_fields":["name","sku","serial_number"],"check_qty":false,"search_type":"like"} 
[2026-09-14 14:50:06] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 14:50:06] live.DEBUG: Joining product_serial_numbers table for serial number search  
[2026-09-14 14:50:06] live.DEBUG: Serial numbers filtered by location {"location_id":"9"} 
[2026-09-14 14:50:06] live.DEBUG: Joining transaction_sell_lines and transactions to check if serial number is sold  
[2026-09-14 14:50:06] live.DEBUG: Added condition: keep products without serial numbers OR with available quantity > 0  
[2026-09-14 14:50:06] live.DEBUG: Applying search filters {"search_term":"ho","search_type":"like","search_fields":["name","sku","serial_number"]} 
[2026-09-14 14:50:06] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","serial_number"]} 
[2026-09-14 14:50:06] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 14:50:06] live.DEBUG: Added serial number, quantity, and transaction sell line fields with quantity details to select  
[2026-09-14 14:50:06] live.INFO: filterProduct completed successfully {"result_count":2,"business_id":8,"search_term":"ho"} 
[2026-09-14 14:50:06] live.DEBUG: Product result from filterProduct {"product_id":365,"variation_id":370,"name":"Original Hostes Wheat Flour 2kg","sub_sku":"0365","has_matched_serial":false,"matched_serial_number":null,"serial_number_id":null} 
[2026-09-14 14:50:06] live.DEBUG: Product result from filterProduct {"product_id":42,"variation_id":43,"name":"Drostdy Hof Wine 750ml","sub_sku":"0042","has_matched_serial":false,"matched_serial_number":null,"serial_number_id":null} 
[2026-09-14 14:50:06] live.INFO: getProducts returning formatted results {"search_term":"ho","result_count":2,"first_result":{"id":370,"name":"Original Hostes Wheat Flour 2kg","variation":"DUMMY","sub_sku":"0365","qty_available":"732.0000","enable_stock":1,"type":"single","variation_id":370,"product_id":365}} 
[2026-09-14 14:50:09] live.INFO: StockAdjustment - getProductRow - Serial Number Received {"variation_id":"370","serial_number":null,"serial_number_id":null,"serial_number_quantity":0,"serial_number_available":0,"all_request_data":{"row_index":"0","variation_id":"370","location_id":"9","type":"stock_adjustment"}} 
[2026-09-14 14:54:25] live.INFO: filterProduct method called {"business_id":8,"search_term":"hoste","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot","serial_number"],"check_qty":false,"search_type":"like"} 
[2026-09-14 14:54:25] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 14:54:25] live.DEBUG: Joining product_serial_numbers table for serial number search  
[2026-09-14 14:54:25] live.DEBUG: Serial numbers filtered by location {"location_id":"9"} 
[2026-09-14 14:54:25] live.DEBUG: Joining transaction_sell_lines and transactions to check if serial number is sold  
[2026-09-14 14:54:25] live.DEBUG: Added condition: keep products without serial numbers OR with available quantity > 0  
[2026-09-14 14:54:25] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 14:54:25] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 14:54:25] live.DEBUG: Applying search filters {"search_term":"hoste","search_type":"like","search_fields":["name","sku","lot","serial_number"]} 
[2026-09-14 14:54:25] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot","serial_number"]} 
[2026-09-14 14:54:25] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 14:54:25] live.DEBUG: Added serial number, quantity, and transaction sell line fields with quantity details to select  
[2026-09-14 14:54:25] live.DEBUG: Added lot number fields to select  
[2026-09-14 14:54:25] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"hoste"} 
[2026-09-14 14:54:26] live.INFO: Product Row Debug - RELOADED {"product_id":365,"product_name":"Original Hostes Wheat Flour 2kg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":245.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"292":{"unit_id":292,"unit_name":"Pkt","unit_price":245.0,"multiplier":1,"has_price":true},"293":{"unit_id":293,"unit_name":"Bale","unit_price":2300.0,"multiplier":"12.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 14:54:27] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 14:59:00] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":false,"is_valid_mpesa_sale":false,"payment_method_input":"cash","mpesa_transaction_id":null,"transaction_id":1877} 
[2026-09-14 16:33:15] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 16:33:15] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 16:33:15] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 16:33:15] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 16:33:15] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 16:33:15] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 16:33:15] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 16:33:15] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 16:33:15] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"160989262.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 16:41:07] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 16:41:07] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 16:41:07] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 16:41:07] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 16:41:07] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 16:41:07] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 16:41:07] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 16:41:07] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 16:41:07] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"160989262.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 16:44:16] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 16:44:16] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 16:44:16] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 16:44:16] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 16:44:16] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 16:44:16] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 16:44:16] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 16:44:16] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 16:44:16] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"160989262.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 16:44:21] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 16:44:21] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 16:44:21] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 16:44:21] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 16:44:21] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 16:44:21] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 16:44:21] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 16:44:21] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 16:44:21] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"160989262.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 16:46:24] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 16:46:55] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 16:46:55] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 16:46:55] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 16:46:55] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 16:46:55] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 16:46:55] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 16:46:55] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 16:46:55] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 16:46:55] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"160989262.93480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 16:49:16] live.INFO: Digitax upload skipped: No tax number provided {"contact_id":883,"contact_name":"","contact_type":"supplier"} 
[2026-09-14 16:53:58] live.INFO: Sending customer to Digitax {"contact_id":884,"url":"https://api.digitax.tech/ke/v2/customers","payload":{"email":"","phone":"071238765","customer_name":"Tamar M","customer_tin":"A0988"}} 
[2026-09-14 16:53:59] live.ERROR: Failed to upload customer to Digitax {"contact_id":884,"tax_number":"A0988","error":{"message":"taxpayer.tax_identification_number invalid taxpayer tax identification number","code":"400","metadata":{"argument":"taxpayer.tax_identification_number"}}} 
[2026-09-14 16:59:50] live.INFO: === About to call saveProductNewUnitRelationships === {"product_id":366,"request_units":[{"actual_name":"PKT","unit_id":"294","short_name":"PKT","relation_unit_id":null,"relation_qty":"1","price":"20000"}],"page_batch_id":"20260914_165551_2982"} 
[2026-09-14 16:59:50] live.INFO: === saveProductNewUnitRelationships START === {"product_id":366,"product_name":"ozempic 1mg"} 
[2026-09-14 16:59:50] live.INFO: Units data received {"units_data":[{"actual_name":"PKT","unit_id":"294","short_name":"PKT","relation_unit_id":null,"relation_qty":"1","price":"20000"}],"count":1} 
[2026-09-14 16:59:50] live.INFO: Processing unit index: 0 {"unit_data":{"actual_name":"PKT","unit_id":"294","short_name":"PKT","relation_unit_id":null,"relation_qty":"1","price":"20000"}} 
[2026-09-14 16:59:50] live.INFO: Unit found by ID {"unit_id":294,"actual_name":"PKT"} 
[2026-09-14 16:59:50] live.INFO: Unit lookup result {"found":"yes","unit_id":294,"method":"by_id"} 
[2026-09-14 16:59:50] live.INFO: Updating existing unit {"unit_id":294} 
[2026-09-14 16:59:50] live.INFO: Updated unit_price {"new_price":20000.0} 
[2026-09-14 16:59:50] live.INFO: Unit updated successfully  
[2026-09-14 16:59:50] live.INFO: Setting as BASE unit {"unit_id":294} 
[2026-09-14 16:59:50] live.INFO: Base unit saved {"base_unit_id":294} 
[2026-09-14 16:59:50] live.INFO: First pass complete {"created_units_count":1,"base_unit_id":294} 
[2026-09-14 16:59:50] live.INFO: === SECOND PASS: Setting relations first ===  
[2026-09-14 16:59:50] live.INFO: === SECOND PASS: Calculating cumulative multipliers ===  
[2026-09-14 16:59:50] live.INFO: === saveProductNewUnitRelationships END ===  
[2026-09-14 16:59:51] live.INFO: OpeningStockController::add - Location Data {"product_id":"366","business_id":8,"locations":{"Illuminate\\Support\\Collection":{"9":"BQT GENERAL BUSINESS (BL0001)","10":"BQT BRANCH 1 (BL0002)","12":"BQT BRANCH 2 (BL0003)","14":"BQT BRANCH 3 (BL0004)"}},"available_locations":[9,10]} 
[2026-09-14 16:59:51] live.INFO: OpeningStockController::add - Serial Numbers Check {"product_id":"366","business_id":8,"has_serial_numbers":{"9":false,"10":false},"total_locations_with_serial":0} 
[2026-09-14 17:00:41] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 17:03:28] live.INFO: Purchases array from request {"purchases":[{"product_id":"366","variation_id":"371","quantity":"26","product_unit_id":"294","sub_unit_id":"294","pp_without_discount":"12,931.03","discount_percent":"0.00","purchase_price":"12,931.03","purchase_line_tax_id":"1","item_tax":"2,068.96","purchase_price_inc_tax":"15,000.00","profit_percent":"33.33","default_sell_price":"20,000.00","lot_number":"BT785","mfg_date":null,"exp_date":"02/20/2027","imei_numbers":"[]","imei_count":"0"}],"purchases_json":"[{\"product_id\":\"366\",\"variation_id\":\"371\",\"quantity\":\"26\",\"product_unit_id\":\"294\",\"sub_unit_id\":\"294\",\"pp_without_discount\":\"12,931.03\",\"discount_percent\":\"0.00\",\"purchase_price\":\"12,931.03\",\"purchase_line_tax_id\":\"1\",\"item_tax\":\"2,068.96\",\"purchase_price_inc_tax\":\"15,000.00\",\"profit_percent\":\"33.33\",\"default_sell_price\":\"20,000.00\",\"lot_number\":\"BT785\",\"mfg_date\":null,\"exp_date\":\"02\\/20\\/2027\",\"imei_numbers\":\"[]\",\"imei_count\":\"0\"}]"} 
[2026-09-14 17:03:28] live.WARNING: Digitax stock update skipped: Missing item_id for product_id 366  
[2026-09-14 17:03:28] live.INFO: Purchase lines created {"transaction_id":1879,"purchase_lines_count":1,"purchase_lines":[{"id":1600,"transaction_id":1879,"product_id":366,"variation_id":371,"quantity":26.0,"secondary_unit_quantity":"0.0000","pp_without_discount":"12931.0300","discount_percent":"0.00","purchase_price":"12931.0300","purchase_price_inc_tax":"15000.0000","item_tax":"2068.9600","tax_id":1,"purchase_requisition_line_id":null,"purchase_order_line_id":null,"quantity_sold":"0.0000","quantity_adjusted":"0.0000","quantity_returned":"0.0000","po_quantity_purchased":"0.0000","mfg_quantity_used":"0.0000","mfg_date":null,"exp_date":"2027-02-20","lot_number":"BT785","sub_unit_id":null,"created_at":"2026-09-14T14:03:28.000000Z","updated_at":"2026-09-14T14:03:28.000000Z"}]} 
[2026-09-14 17:03:28] live.INFO: Processing purchase row - 0 {"row_index":0,"product_id":"366","variation_id":"371","quantity":"26","has_imei":true,"imei_raw":"[]","purchase_data_keys":["product_id","variation_id","quantity","product_unit_id","sub_unit_id","pp_without_discount","discount_percent","purchase_price","purchase_line_tax_id","item_tax","purchase_price_inc_tax","profit_percent","default_sell_price","lot_number","mfg_date","exp_date","imei_numbers","imei_count"]} 
[2026-09-14 17:03:28] live.INFO: IMEI Data - Parsed for row 0 {"row_index":0,"imei_count":0,"imei_data":[],"imei_json":"[]"} 
[2026-09-14 17:03:28] live.INFO: IMEI data is empty or invalid for row 0 {"imeiData":[]} 
[2026-09-14 17:03:28] live.INFO: Purchase created successfully with IMEI data {"transaction_id":1879,"ref_no":"PO2026/0195","final_total":410000.0} 
[2026-09-14 17:21:39] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 17:24:30] live.INFO: filterProduct method called {"business_id":8,"search_term":"OZE","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 17:24:30] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 17:24:30] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 17:24:30] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 17:24:30] live.DEBUG: Applying search filters {"search_term":"OZE","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 17:24:30] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 17:24:30] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 17:24:30] live.DEBUG: Added lot number fields to select  
[2026-09-14 17:24:30] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"OZE"} 
[2026-09-14 17:24:30] live.INFO: Product Row Debug - RELOADED {"product_id":366,"product_name":"ozempic 1mg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":20000.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"294":{"unit_id":294,"unit_name":"PKT","unit_price":20000.0,"multiplier":1,"has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 17:24:35] live.INFO: filterProduct method called {"business_id":8,"search_term":"OZE","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 17:24:35] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 17:24:35] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 17:24:35] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 17:24:35] live.DEBUG: Applying search filters {"search_term":"OZE","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 17:24:35] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 17:24:35] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 17:24:35] live.DEBUG: Added lot number fields to select  
[2026-09-14 17:24:35] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"OZE"} 
[2026-09-14 17:24:35] live.INFO: Product Row Debug - RELOADED {"product_id":366,"product_name":"ozempic 1mg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":20000.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"294":{"unit_id":294,"unit_name":"PKT","unit_price":20000.0,"multiplier":1,"has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 17:25:03] live.INFO: Credit Limit Check Started {"contact_id":"514","status":"draft","final_total":"100000.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 17:25:03] live.INFO: Credit Limit Check Skipped - Draft or Sales Order {"status":"draft","type":"not_set"} 
[2026-09-14 17:25:03] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 17:25:03] live.INFO: is_mpesa_sale value: true  
[2026-09-14 17:25:04] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1880  
[2026-09-14 17:26:03] live.INFO: Credit Limit Check Started {"contact_id":"94","status":"final","final_total":"0.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 17:26:03] live.DEBUG: Payment Calculation {"final_total":0.0,"curr_total_payment":0.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 17:26:03] live.INFO: Credit Limit Check Skipped - Fully Paid {"final_total":0.0,"curr_total_payment":0.0} 
[2026-09-14 17:26:09] live.INFO: filterProduct method called {"business_id":8,"search_term":"OZE","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 17:26:09] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 17:26:09] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 17:26:09] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 17:26:09] live.DEBUG: Applying search filters {"search_term":"OZE","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 17:26:09] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 17:26:09] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 17:26:09] live.DEBUG: Added lot number fields to select  
[2026-09-14 17:26:09] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"OZE"} 
[2026-09-14 17:26:10] live.INFO: Product Row Debug - RELOADED {"product_id":366,"product_name":"ozempic 1mg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":20000.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"294":{"unit_id":294,"unit_name":"PKT","unit_price":20000.0,"multiplier":1,"has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 17:26:18] live.INFO: Credit Limit Check Started {"contact_id":"514","status":"final","final_total":"20000.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 17:26:18] live.DEBUG: Payment Calculation {"final_total":20000.0,"curr_total_payment":0.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 17:26:18] live.INFO: Credit Limit Check Skipped - No Credit Limit Set {"contact_id":"514","contact_name":""} 
[2026-09-14 17:26:18] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 17:26:18] live.INFO: is_mpesa_sale value: true  
[2026-09-14 17:26:18] live.INFO: Journal Entry Case: FULL CREDIT SALE {"transaction_id":1881,"final_total":20000.0,"amount_paid":0.0,"balance_due":20000.0} 
[2026-09-14 17:26:18] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1881,"entries":[{"transaction_id":1881,"created_by_id":21,"transaction_number":"TRX-6aa8040a38c520.08738673","payment_detail_id":1340,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 17:26:18","updated_at":"2026-09-14 17:26:18","chart_of_account_id":23,"debit":null,"credit":20000.0},{"transaction_id":1881,"created_by_id":21,"transaction_number":"TRX-6aa8040a38c520.08738673","payment_detail_id":1340,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 17:26:18","updated_at":"2026-09-14 17:26:18","chart_of_account_id":19,"debit":20000.0,"credit":null}]} 
[2026-09-14 17:26:18] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1197,"purchase_line_id":1600,"quantity":1.0,"created_at":"2026-09-14 17:26:18","updated_at":"2026-09-14 17:26:18"}]} 
[2026-09-14 17:26:18] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 17:26:18] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":7068.969999999999345163814723491668701171875} 
[2026-09-14 17:26:25] live.INFO: Credit Limit Check Started {"contact_id":"514","status":"final","final_total":"20000.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 17:26:25] live.DEBUG: Payment Calculation {"final_total":20000.0,"curr_total_payment":0.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 17:26:25] live.INFO: Credit Limit Check Skipped - No Credit Limit Set {"contact_id":"514","contact_name":""} 
[2026-09-14 17:26:26] live.EMERGENCY: File:/home/risetclo/r.riset.cloud/vendor/symfony/mailer/Transport/Smtp/EsmtpTransport.phpLine:212Message:Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 17:26:26] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1881,"contact_id":514,"customer_name":"Nimua Chemist","has_tin":false,"has_digitax_id":false} 
[2026-09-14 17:26:26] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 17:26:26] live.INFO: is_mpesa_sale value: true  
[2026-09-14 17:26:26] live.ERROR: ETIMS: Missing item_id for product {"product_id":366} 
[2026-09-14 17:26:26] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 17:26:26] live.INFO: Journal Entry Case: FULL CREDIT SALE {"transaction_id":1882,"final_total":20000.0,"amount_paid":0.0,"balance_due":20000.0} 
[2026-09-14 17:26:26] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1882,"entries":[{"transaction_id":1882,"created_by_id":21,"transaction_number":"TRX-6aa80412650f29.79420154","payment_detail_id":1340,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 17:26:26","updated_at":"2026-09-14 17:26:26","chart_of_account_id":23,"debit":null,"credit":20000.0},{"transaction_id":1882,"created_by_id":21,"transaction_number":"TRX-6aa80412650f29.79420154","payment_detail_id":1340,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 17:26:26","updated_at":"2026-09-14 17:26:26","chart_of_account_id":19,"debit":20000.0,"credit":null}]} 
[2026-09-14 17:26:26] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1881  
[2026-09-14 17:26:26] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1198,"purchase_line_id":1600,"quantity":1.0,"created_at":"2026-09-14 17:26:26","updated_at":"2026-09-14 17:26:26"}]} 
[2026-09-14 17:26:26] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 17:26:26] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":7068.969999999999345163814723491668701171875} 
[2026-09-14 17:26:30] live.EMERGENCY: File:/home/risetclo/r.riset.cloud/vendor/symfony/mailer/Transport/Smtp/EsmtpTransport.phpLine:212Message:Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 17:26:30] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1882,"contact_id":514,"customer_name":"Nimua Chemist","has_tin":false,"has_digitax_id":false} 
[2026-09-14 17:26:30] live.ERROR: ETIMS: Missing item_id for product {"product_id":366} 
[2026-09-14 17:26:30] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 17:26:30] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1882  
[2026-09-14 17:27:59] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 17:29:45] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2025-12-31","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 17:29:45] live.INFO: Opening stock calculation - including all transactions {"date":"2025-12-31"} 
[2026-09-14 17:29:45] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2025-12-31')"} 
[2026-09-14 17:29:45] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2025-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2025-12-31'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 17:29:45] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"62490987.23600000","is_opening":true,"date":"2025-12-31"} 
[2026-09-14 17:29:45] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-12-31","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":"all"} 
[2026-09-14 17:29:45] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-12-31' (includes all types except purchase_order)"} 
[2026-09-14 17:29:45] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-12-31') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-12-31'","bindings":["purchase_order",8]} 
[2026-09-14 17:29:45] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"161349262.69480000","is_opening":false,"date":"2026-12-31"} 
[2026-09-14 17:29:46] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2025-12-31","location_id":null,"is_opening":true,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 17:29:46] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 17:29:46] live.INFO: Opening stock calculation - including all transactions {"date":"2025-12-31"} 
[2026-09-14 17:29:46] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2025-12-31')"} 
[2026-09-14 17:29:46] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2025-12-31') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2025-12-31'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 17:29:46] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"80672642.00000000","is_opening":true,"date":"2025-12-31"} 
[2026-09-14 17:29:46] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-12-31","location_id":null,"is_opening":false,"by_sale_price":true,"filters":"all","permitted_locations":null} 
[2026-09-14 17:29:46] live.DEBUG: Using sale price instead of purchase price {"price_query_part":"v.sell_price_inc_tax"} 
[2026-09-14 17:29:46] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-12-31' (includes all types except purchase_order)"} 
[2026-09-14 17:29:46] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-12-31') ) * v.sell_price_inc_tax
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-12-31'","bindings":["purchase_order",8]} 
[2026-09-14 17:29:46] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"151462151.00000000","is_opening":false,"date":"2026-12-31"} 
[2026-09-14 17:42:10] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 17:42:12] live.INFO: filterProduct method called {"business_id":8,"search_term":"OZE","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 17:42:12] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 17:42:12] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 17:42:12] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 17:42:12] live.DEBUG: Applying search filters {"search_term":"OZE","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 17:42:12] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 17:42:12] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 17:42:12] live.DEBUG: Added lot number fields to select  
[2026-09-14 17:42:12] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"OZE"} 
[2026-09-14 17:42:12] live.INFO: Product Row Debug - RELOADED {"product_id":366,"product_name":"ozempic 1mg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":20000.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"294":{"unit_id":294,"unit_name":"PKT","unit_price":20000.0,"multiplier":1,"has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 17:51:11] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 17:51:11] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 17:51:11] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 17:51:11] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 17:51:11] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 17:51:11] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 17:51:11] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 17:51:11] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 17:51:11] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"161349262.69480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 17:53:19] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 17:53:19] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 17:53:19] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 17:53:19] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 17:53:19] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 17:53:19] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 17:53:19] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 17:53:19] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 17:53:19] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"161349262.69480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 17:53:27] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 17:53:27] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 17:53:27] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 17:53:27] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 17:53:27] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 17:53:27] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 17:53:27] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 17:53:27] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 17:53:27] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"161349262.69480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 17:56:21] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 17:58:40] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 17:59:04] live.INFO: Digitax upload skipped: No tax number provided {"contact_id":885,"contact_name":"MUNI","contact_type":"customer"} 
[2026-09-14 17:59:36] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 17:59:48] live.INFO: filterProduct method called {"business_id":8,"search_term":"EZ","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 17:59:48] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 17:59:48] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 17:59:48] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 17:59:48] live.DEBUG: Applying search filters {"search_term":"EZ","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 17:59:48] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 17:59:48] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 17:59:48] live.DEBUG: Added lot number fields to select  
[2026-09-14 17:59:48] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"EZ"} 
[2026-09-14 17:59:53] live.INFO: filterProduct method called {"business_id":8,"search_term":"OZE","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 17:59:53] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 17:59:53] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 17:59:53] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 17:59:53] live.DEBUG: Applying search filters {"search_term":"OZE","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 17:59:53] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 17:59:53] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 17:59:53] live.DEBUG: Added lot number fields to select  
[2026-09-14 17:59:53] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"OZE"} 
[2026-09-14 17:59:55] live.INFO: Product Row Debug - RELOADED {"product_id":366,"product_name":"ozempic 1mg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":20000.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"294":{"unit_id":294,"unit_name":"PKT","unit_price":20000.0,"multiplier":1,"has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 17:59:58] live.INFO: filterProduct method called {"business_id":8,"search_term":"OZ","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 17:59:58] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 17:59:58] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 17:59:58] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 17:59:58] live.DEBUG: Applying search filters {"search_term":"OZ","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 17:59:58] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 17:59:58] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 17:59:58] live.DEBUG: Added lot number fields to select  
[2026-09-14 17:59:58] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"OZ"} 
[2026-09-14 17:59:59] live.INFO: Product Row Debug - RELOADED {"product_id":366,"product_name":"ozempic 1mg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":20000.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"294":{"unit_id":294,"unit_name":"PKT","unit_price":20000.0,"multiplier":1,"has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 18:00:47] live.INFO: Credit Limit Check Started {"contact_id":"885","status":"final","final_total":"20000.00","is_credit_sale":"0","exclude_transaction_id":null} 
[2026-09-14 18:00:47] live.DEBUG: Payment Calculation {"final_total":20000.0,"curr_total_payment":20000.0,"is_credit_sale":false,"payment_count":1} 
[2026-09-14 18:00:47] live.INFO: Credit Limit Check Skipped - Fully Paid {"final_total":20000.0,"curr_total_payment":20000.0} 
[2026-09-14 18:00:47] live.INFO: mpesa_transaction_id value: NULL  
[2026-09-14 18:00:47] live.INFO: is_mpesa_sale value: true  
[2026-09-14 18:00:47] live.INFO: M-Pesa sale evaluation {"is_mpesa_sale_raw":true,"is_valid_mpesa_sale":false,"payment_method_input":"advance","mpesa_transaction_id":null,"transaction_id":1883} 
[2026-09-14 18:00:47] live.INFO: Journal Entry Case: FULL CASH PAYMENT {"transaction_id":1883,"final_total":20000.0,"amount_paid":20000.0,"balance_due":0} 
[2026-09-14 18:00:47] live.INFO: Journal Entries Inserted Successfully {"transaction_id":1883,"entries":[{"transaction_id":1883,"created_by_id":21,"transaction_number":"TRX-6aa80c1fc75d42.70106538","payment_detail_id":1342,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 18:00:47","updated_at":"2026-09-14 18:00:47","chart_of_account_id":23,"debit":null,"credit":20000.0},{"transaction_id":1883,"created_by_id":21,"transaction_number":"TRX-6aa80c1fc75d42.70106538","payment_detail_id":1342,"location_id":"9","currency_id":133,"transaction_type":"sell","date":"2026-09-14","month":9,"year":2026,"active":1,"reversed":0,"reversible":1,"manual_entry":1,"created_at":"2026-09-14 18:00:47","updated_at":"2026-09-14 18:00:47","chart_of_account_id":27,"debit":20000.0,"credit":null}]} 
[2026-09-14 18:00:47] live.INFO: Inserted purchase sell mapping {"count":1,"data":[{"sell_line_id":1199,"purchase_line_id":1600,"quantity":1.0,"created_at":"2026-09-14 18:00:47","updated_at":"2026-09-14 18:00:47"}]} 
[2026-09-14 18:00:47] live.INFO: Inserted COGS → Inventory journal entries {"count":2} 
[2026-09-14 18:00:47] live.INFO: Inserted Retained Earnings (profit) entries {"count":1,"total_profit":7068.969999999999345163814723491668701171875} 
[2026-09-14 18:00:47] live.INFO: ETIMS: Customer details retrieved {"transaction_id":1883,"contact_id":885,"customer_name":"MUNI","has_tin":false,"has_digitax_id":false} 
[2026-09-14 18:00:47] live.ERROR: ETIMS: Missing item_id for product {"product_id":366} 
[2026-09-14 18:00:47] live.ERROR: ETIMS: No valid items to submit after filtering  
[2026-09-14 18:00:47] live.WARNING: ETIMS WAIT: Timed out after 2 attempts for transaction ID: 1883  
[2026-09-14 18:01:06] live.INFO: filterProduct method called {"business_id":8,"search_term":"OZE","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 18:01:06] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 18:01:06] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 18:01:06] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 18:01:06] live.DEBUG: Applying search filters {"search_term":"OZE","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 18:01:06] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 18:01:06] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 18:01:06] live.DEBUG: Added lot number fields to select  
[2026-09-14 18:01:06] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"OZE"} 
[2026-09-14 18:01:07] live.INFO: Product Row Debug - RELOADED {"product_id":366,"product_name":"ozempic 1mg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":20000.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"294":{"unit_id":294,"unit_name":"PKT","unit_price":20000.0,"multiplier":1,"has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 18:04:26] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 18:06:51] live.ERROR: Failed to send error alert email: Failed to authenticate on SMTP server with username "support@risetsystems.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".  
[2026-09-14 18:06:59] live.INFO: filterProduct method called {"business_id":8,"search_term":"HOTES","location_id":"9","not_for_selling":"0","price_group_id":"35","product_types":[],"search_fields":["name","sku","lot","serial_number"],"check_qty":false,"search_type":"like"} 
[2026-09-14 18:06:59] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 18:06:59] live.DEBUG: Joining product_serial_numbers table for serial number search  
[2026-09-14 18:06:59] live.DEBUG: Serial numbers filtered by location {"location_id":"9"} 
[2026-09-14 18:06:59] live.DEBUG: Joining transaction_sell_lines and transactions to check if serial number is sold  
[2026-09-14 18:06:59] live.DEBUG: Added condition: keep products without serial numbers OR with available quantity > 0  
[2026-09-14 18:06:59] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 18:06:59] live.DEBUG: Joining variation_group_prices for price group {"price_group_id":"35"} 
[2026-09-14 18:06:59] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 18:06:59] live.DEBUG: Applying search filters {"search_term":"HOTES","search_type":"like","search_fields":["name","sku","lot","serial_number"]} 
[2026-09-14 18:06:59] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot","serial_number"]} 
[2026-09-14 18:06:59] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 18:06:59] live.DEBUG: Added serial number, quantity, and transaction sell line fields with quantity details to select  
[2026-09-14 18:06:59] live.DEBUG: Added price group calculation to select {"price_group_id":"35"} 
[2026-09-14 18:06:59] live.DEBUG: Added lot number fields to select  
[2026-09-14 18:06:59] live.INFO: No products found {"search_term":"HOTES","business_id":8,"location_id":"9"} 
[2026-09-14 18:06:59] live.INFO: filterProduct completed successfully {"result_count":0,"business_id":8,"search_term":"HOTES"} 
[2026-09-14 18:07:03] live.INFO: filterProduct method called {"business_id":8,"search_term":"HOST","location_id":"9","not_for_selling":"0","price_group_id":"35","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 18:07:03] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 18:07:03] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 18:07:03] live.DEBUG: Joining variation_group_prices for price group {"price_group_id":"35"} 
[2026-09-14 18:07:03] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 18:07:03] live.DEBUG: Applying search filters {"search_term":"HOST","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 18:07:03] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 18:07:03] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 18:07:03] live.DEBUG: Added price group calculation to select {"price_group_id":"35"} 
[2026-09-14 18:07:03] live.DEBUG: Added lot number fields to select  
[2026-09-14 18:07:03] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"HOST"} 
[2026-09-14 18:07:03] live.INFO: Product Row Debug - RELOADED {"product_id":365,"product_name":"Original Hostes Wheat Flour 2kg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":"225.0000","discounts_json":"[]","multiplier":1,"unit_prices":{"292":{"unit_id":292,"unit_name":"Pkt","unit_price":245.0,"multiplier":1,"has_price":true},"293":{"unit_id":293,"unit_name":"Bale","unit_price":2300.0,"multiplier":"12.0000","has_price":true}},"has_price_group":true,"price_group_id":"35"} 
[2026-09-14 18:07:20] live.INFO: filterProduct method called {"business_id":8,"search_term":"HOSTE","location_id":"9","not_for_selling":"0","price_group_id":"3","product_types":[],"search_fields":["name","sku","lot","serial_number"],"check_qty":false,"search_type":"like"} 
[2026-09-14 18:07:20] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 18:07:20] live.DEBUG: Joining product_serial_numbers table for serial number search  
[2026-09-14 18:07:20] live.DEBUG: Serial numbers filtered by location {"location_id":"9"} 
[2026-09-14 18:07:20] live.DEBUG: Joining transaction_sell_lines and transactions to check if serial number is sold  
[2026-09-14 18:07:20] live.DEBUG: Added condition: keep products without serial numbers OR with available quantity > 0  
[2026-09-14 18:07:20] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 18:07:20] live.DEBUG: Joining variation_group_prices for price group {"price_group_id":"3"} 
[2026-09-14 18:07:20] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 18:07:20] live.DEBUG: Applying search filters {"search_term":"HOSTE","search_type":"like","search_fields":["name","sku","lot","serial_number"]} 
[2026-09-14 18:07:20] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot","serial_number"]} 
[2026-09-14 18:07:20] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 18:07:20] live.DEBUG: Added serial number, quantity, and transaction sell line fields with quantity details to select  
[2026-09-14 18:07:20] live.DEBUG: Added price group calculation to select {"price_group_id":"3"} 
[2026-09-14 18:07:20] live.DEBUG: Added lot number fields to select  
[2026-09-14 18:07:20] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"HOSTE"} 
[2026-09-14 18:07:21] live.INFO: Product Row Debug - RELOADED {"product_id":365,"product_name":"Original Hostes Wheat Flour 2kg","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":"230.0000","discounts_json":"[]","multiplier":1,"unit_prices":{"292":{"unit_id":292,"unit_name":"Pkt","unit_price":245.0,"multiplier":1,"has_price":true},"293":{"unit_id":293,"unit_name":"Bale","unit_price":2300.0,"multiplier":"12.0000","has_price":true}},"has_price_group":true,"price_group_id":"3"} 
[2026-09-14 19:31:13] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 19:31:13] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 19:31:13] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 19:31:13] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 19:31:13] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 19:31:13] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 19:31:13] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 19:31:13] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 19:31:13] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"161334262.70480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 21:06:12] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 21:06:12] live.ERROR: SQLSTATE[HY000] [1045] Access denied for user 'risetclo_r'@'localhost' (using password: YES) (SQL: select * from `system` where `key` = crm_version limit 1) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 1045): SQLSTATE[HY000] [1045] Access denied for user 'risetclo_r'@'localhost' (using password: YES) (SQL: select * from `system` where `key` = crm_version limit 1) at /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760)
[stacktrace]
#0 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\\Database\\Connection->runQueryCallback('select * from `...', Array, Object(Closure))
#1 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(405): Illuminate\\Database\\Connection->run('select * from `...', Array, Object(Closure))
#2 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2705): Illuminate\\Database\\Connection->select('select * from `...', Array, true)
#3 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2694): Illuminate\\Database\\Query\\Builder->runSelect()
#4 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3230): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}()
#5 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2693): Illuminate\\Database\\Query\\Builder->onceWithColumns(Array, Object(Closure))
#6 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(710): Illuminate\\Database\\Query\\Builder->get(Array)
#7 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(694): Illuminate\\Database\\Eloquent\\Builder->getModels(Array)
#8 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php(296): Illuminate\\Database\\Eloquent\\Builder->get(Array)
#9 /home/risetactiv/live.risetactiv.com/app/System.php(39): Illuminate\\Database\\Eloquent\\Builder->first()
#10 /home/risetactiv/live.risetactiv.com/app/Utils/ModuleUtil.php(28): App\\System::getProperty('crm_version')
#11 /home/risetactiv/live.risetactiv.com/Modules/Crm/Providers/CrmServiceProvider.php(172): App\\Utils\\ModuleUtil->isModuleInstalled('Crm')
#12 /home/risetactiv/live.risetactiv.com/Modules/Crm/Providers/CrmServiceProvider.php(39): Modules\\Crm\\Providers\\CrmServiceProvider->registerScheduleCommands()
#13 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Modules\\Crm\\Providers\\CrmServiceProvider->boot()
#14 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#15 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#16 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#17 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#18 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(929): Illuminate\\Container\\Container->call(Array)
#19 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(910): Illuminate\\Foundation\\Application->bootProvider(Object(Modules\\Crm\\Providers\\CrmServiceProvider))
#20 [internal function]: Illuminate\\Foundation\\Application->Illuminate\\Foundation\\{closure}(Object(Modules\\Crm\\Providers\\CrmServiceProvider), 59)
#21 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(909): array_walk(Array, Object(Closure))
#22 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\\Foundation\\Application->boot()
#23 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(242): Illuminate\\Foundation\\Bootstrap\\BootProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
#24 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#25 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(160): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#26 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#27 /home/risetactiv/live.risetactiv.com/public/index.php(51): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#28 {main}

[previous exception] [object] (PDOException(code: 1045): SQLSTATE[HY000] [1045] Access denied for user 'risetclo_r'@'localhost' (using password: YES) at /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70)
[stacktrace]
#0 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct('mysql:host=loca...', 'risetclo_r', Object(SensitiveParameterValue), Array)
#1 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(45): Illuminate\\Database\\Connectors\\Connector->createPdoConnection('mysql:host=loca...', 'risetclo_r', 'Riset2190$1000', Array)
#2 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection('mysql:host=loca...', Array, Array)
#3 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(184): Illuminate\\Database\\Connectors\\MySqlConnector->connect(Array)
#4 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()
#5 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1181): call_user_func(Object(Closure))
#6 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1217): Illuminate\\Database\\Connection->getPdo()
#7 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(486): Illuminate\\Database\\Connection->getReadPdo()
#8 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(414): Illuminate\\Database\\Connection->getPdoForSelect(true)
#9 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('select * from `...', Array)
#10 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\\Database\\Connection->runQueryCallback('select * from `...', Array, Object(Closure))
#11 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(405): Illuminate\\Database\\Connection->run('select * from `...', Array, Object(Closure))
#12 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2705): Illuminate\\Database\\Connection->select('select * from `...', Array, true)
#13 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2694): Illuminate\\Database\\Query\\Builder->runSelect()
#14 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3230): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}()
#15 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2693): Illuminate\\Database\\Query\\Builder->onceWithColumns(Array, Object(Closure))
#16 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(710): Illuminate\\Database\\Query\\Builder->get(Array)
#17 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(694): Illuminate\\Database\\Eloquent\\Builder->getModels(Array)
#18 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php(296): Illuminate\\Database\\Eloquent\\Builder->get(Array)
#19 /home/risetactiv/live.risetactiv.com/app/System.php(39): Illuminate\\Database\\Eloquent\\Builder->first()
#20 /home/risetactiv/live.risetactiv.com/app/Utils/ModuleUtil.php(28): App\\System::getProperty('crm_version')
#21 /home/risetactiv/live.risetactiv.com/Modules/Crm/Providers/CrmServiceProvider.php(172): App\\Utils\\ModuleUtil->isModuleInstalled('Crm')
#22 /home/risetactiv/live.risetactiv.com/Modules/Crm/Providers/CrmServiceProvider.php(39): Modules\\Crm\\Providers\\CrmServiceProvider->registerScheduleCommands()
#23 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Modules\\Crm\\Providers\\CrmServiceProvider->boot()
#24 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#25 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#26 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#27 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#28 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(929): Illuminate\\Container\\Container->call(Array)
#29 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(910): Illuminate\\Foundation\\Application->bootProvider(Object(Modules\\Crm\\Providers\\CrmServiceProvider))
#30 [internal function]: Illuminate\\Foundation\\Application->Illuminate\\Foundation\\{closure}(Object(Modules\\Crm\\Providers\\CrmServiceProvider), 59)
#31 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(909): array_walk(Array, Object(Closure))
#32 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\\Foundation\\Application->boot()
#33 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(242): Illuminate\\Foundation\\Bootstrap\\BootProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
#34 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#35 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(160): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#36 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#37 /home/risetactiv/live.risetactiv.com/public/index.php(51): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#38 {main}
"} 
[2026-09-14 21:07:10] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 21:07:10] live.ERROR: SQLSTATE[HY000] [1045] Access denied for user 'risetclo_r'@'localhost' (using password: YES) (SQL: select * from `system` where `key` = crm_version limit 1) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 1045): SQLSTATE[HY000] [1045] Access denied for user 'risetclo_r'@'localhost' (using password: YES) (SQL: select * from `system` where `key` = crm_version limit 1) at /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760)
[stacktrace]
#0 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\\Database\\Connection->runQueryCallback('select * from `...', Array, Object(Closure))
#1 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(405): Illuminate\\Database\\Connection->run('select * from `...', Array, Object(Closure))
#2 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2705): Illuminate\\Database\\Connection->select('select * from `...', Array, true)
#3 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2694): Illuminate\\Database\\Query\\Builder->runSelect()
#4 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3230): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}()
#5 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2693): Illuminate\\Database\\Query\\Builder->onceWithColumns(Array, Object(Closure))
#6 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(710): Illuminate\\Database\\Query\\Builder->get(Array)
#7 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(694): Illuminate\\Database\\Eloquent\\Builder->getModels(Array)
#8 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php(296): Illuminate\\Database\\Eloquent\\Builder->get(Array)
#9 /home/risetactiv/live.risetactiv.com/app/System.php(39): Illuminate\\Database\\Eloquent\\Builder->first()
#10 /home/risetactiv/live.risetactiv.com/app/Utils/ModuleUtil.php(28): App\\System::getProperty('crm_version')
#11 /home/risetactiv/live.risetactiv.com/Modules/Crm/Providers/CrmServiceProvider.php(172): App\\Utils\\ModuleUtil->isModuleInstalled('Crm')
#12 /home/risetactiv/live.risetactiv.com/Modules/Crm/Providers/CrmServiceProvider.php(39): Modules\\Crm\\Providers\\CrmServiceProvider->registerScheduleCommands()
#13 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Modules\\Crm\\Providers\\CrmServiceProvider->boot()
#14 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#15 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#16 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#17 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#18 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(929): Illuminate\\Container\\Container->call(Array)
#19 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(910): Illuminate\\Foundation\\Application->bootProvider(Object(Modules\\Crm\\Providers\\CrmServiceProvider))
#20 [internal function]: Illuminate\\Foundation\\Application->Illuminate\\Foundation\\{closure}(Object(Modules\\Crm\\Providers\\CrmServiceProvider), 59)
#21 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(909): array_walk(Array, Object(Closure))
#22 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\\Foundation\\Application->boot()
#23 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(242): Illuminate\\Foundation\\Bootstrap\\BootProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
#24 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#25 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(160): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#26 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#27 /home/risetactiv/live.risetactiv.com/public/index.php(51): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#28 {main}

[previous exception] [object] (PDOException(code: 1045): SQLSTATE[HY000] [1045] Access denied for user 'risetclo_r'@'localhost' (using password: YES) at /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70)
[stacktrace]
#0 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct('mysql:host=loca...', 'risetclo_r', Object(SensitiveParameterValue), Array)
#1 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(45): Illuminate\\Database\\Connectors\\Connector->createPdoConnection('mysql:host=loca...', 'risetclo_r', 'Riset2190$1000', Array)
#2 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection('mysql:host=loca...', Array, Array)
#3 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(184): Illuminate\\Database\\Connectors\\MySqlConnector->connect(Array)
#4 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()
#5 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1181): call_user_func(Object(Closure))
#6 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1217): Illuminate\\Database\\Connection->getPdo()
#7 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(486): Illuminate\\Database\\Connection->getReadPdo()
#8 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(414): Illuminate\\Database\\Connection->getPdoForSelect(true)
#9 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('select * from `...', Array)
#10 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\\Database\\Connection->runQueryCallback('select * from `...', Array, Object(Closure))
#11 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php(405): Illuminate\\Database\\Connection->run('select * from `...', Array, Object(Closure))
#12 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2705): Illuminate\\Database\\Connection->select('select * from `...', Array, true)
#13 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2694): Illuminate\\Database\\Query\\Builder->runSelect()
#14 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3230): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}()
#15 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2693): Illuminate\\Database\\Query\\Builder->onceWithColumns(Array, Object(Closure))
#16 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(710): Illuminate\\Database\\Query\\Builder->get(Array)
#17 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(694): Illuminate\\Database\\Eloquent\\Builder->getModels(Array)
#18 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php(296): Illuminate\\Database\\Eloquent\\Builder->get(Array)
#19 /home/risetactiv/live.risetactiv.com/app/System.php(39): Illuminate\\Database\\Eloquent\\Builder->first()
#20 /home/risetactiv/live.risetactiv.com/app/Utils/ModuleUtil.php(28): App\\System::getProperty('crm_version')
#21 /home/risetactiv/live.risetactiv.com/Modules/Crm/Providers/CrmServiceProvider.php(172): App\\Utils\\ModuleUtil->isModuleInstalled('Crm')
#22 /home/risetactiv/live.risetactiv.com/Modules/Crm/Providers/CrmServiceProvider.php(39): Modules\\Crm\\Providers\\CrmServiceProvider->registerScheduleCommands()
#23 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Modules\\Crm\\Providers\\CrmServiceProvider->boot()
#24 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#25 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#26 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#27 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#28 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(929): Illuminate\\Container\\Container->call(Array)
#29 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(910): Illuminate\\Foundation\\Application->bootProvider(Object(Modules\\Crm\\Providers\\CrmServiceProvider))
#30 [internal function]: Illuminate\\Foundation\\Application->Illuminate\\Foundation\\{closure}(Object(Modules\\Crm\\Providers\\CrmServiceProvider), 59)
#31 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(909): array_walk(Array, Object(Closure))
#32 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\\Foundation\\Application->boot()
#33 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(242): Illuminate\\Foundation\\Bootstrap\\BootProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
#34 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#35 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(160): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#36 /home/risetactiv/live.risetactiv.com/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#37 /home/risetactiv/live.risetactiv.com/public/index.php(51): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#38 {main}
"} 
[2026-09-14 21:18:15] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 21:18:15] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 21:18:15] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 21:18:15] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 21:18:15] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 21:18:15] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 21:18:15] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 21:18:15] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 21:18:15] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"161334262.70480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 21:18:17] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 21:18:17] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 21:18:17] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 21:18:17] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 21:18:17] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 21:18:17] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 21:18:17] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 21:18:17] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 21:18:17] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"161334262.70480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 21:18:21] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 21:18:21] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 21:18:21] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 21:18:21] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 21:18:21] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 21:18:21] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 21:18:21] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 21:18:21] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 21:18:21] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"161334262.70480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 21:18:37] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 21:18:42] live.INFO: filterProduct method called {"business_id":8,"search_term":"ho","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 21:18:42] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 21:18:42] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 21:18:42] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 21:18:42] live.DEBUG: Applying search filters {"search_term":"ho","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 21:18:42] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 21:18:42] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 21:18:42] live.DEBUG: Added lot number fields to select  
[2026-09-14 21:18:42] live.INFO: filterProduct completed successfully {"result_count":2,"business_id":8,"search_term":"ho"} 
[2026-09-14 21:18:45] live.INFO: filterProduct method called {"business_id":8,"search_term":"hp","location_id":"9","not_for_selling":"0","price_group_id":"0","product_types":[],"search_fields":["name","sku","lot"],"check_qty":false,"search_type":"like"} 
[2026-09-14 21:18:45] live.DEBUG: Initial query built with joins {"has_location":true} 
[2026-09-14 21:18:45] live.DEBUG: Filtering by not_for_selling {"not_for_selling":"0"} 
[2026-09-14 21:18:45] live.DEBUG: Joining purchase_lines for lot number search  
[2026-09-14 21:18:45] live.DEBUG: Applying search filters {"search_term":"hp","search_type":"like","search_fields":["name","sku","lot"]} 
[2026-09-14 21:18:45] live.DEBUG: LIKE search conditions applied {"fields":["name","sku","lot"]} 
[2026-09-14 21:18:45] live.DEBUG: Applying location filter {"location_id":"9"} 
[2026-09-14 21:18:45] live.DEBUG: Added lot number fields to select  
[2026-09-14 21:18:45] live.INFO: filterProduct completed successfully {"result_count":1,"business_id":8,"search_term":"hp"} 
[2026-09-14 21:18:45] live.INFO: Product Row Debug - RELOADED {"product_id":153,"product_name":"Hp Spectre New 8gb / 256gb ssd","discount_allowed":false,"has_global_discount":false,"global_discount_type":"fixed","global_discount_amount":0,"discounts_count":0,"discounts":[],"base_price":40000.0,"discounts_json":"[]","multiplier":1,"unit_prices":{"1":{"unit_id":1,"unit_name":"Pc","unit_price":4000.0,"multiplier":1,"has_price":true},"64":{"unit_id":64,"unit_name":"CTN","unit_price":11000.0,"multiplier":"4.0000","has_price":true}},"has_price_group":false,"price_group_id":null} 
[2026-09-14 21:18:46] live.INFO: Fetching tax rate for product ID: 153  
[2026-09-14 21:18:46] live.INFO: Product ID 153 has no tax assigned.  
[2026-09-14 21:18:52] live.INFO: Loaded Payment Settings: {"type":"till","short_code":"3582003","child_number":"3582003","till_no":5699724,"passkey":"8df9b4d855b77a20bd2257ee86f2b482b1816237e0e248e39ff8cbd3e73aabff","consumer_key":"W9AyBGwLeBRq0FAkn2FG3g9EJK9fF3nKwGTzG2pNtByd5tnQ","consumer_secret":"nziTooyd6JS0GC08ZG7456Ab531RVYOI1AyeZNXpDKha0xQ6mEvbFtOiAVAjlhyc","site_url":"https://now.riset.cloud/","payment_options":"[\"custom_pay_1\",\"custom_pay_2\"]"} 
[2026-09-14 21:18:52] live.INFO: STK Push Request Received. {"request_input":{"phone":"0748422765","amount":"4000.00"}} 
[2026-09-14 21:18:52] live.INFO: Phone number formatted. {"formatted_phone":"254748422765"} 
[2026-09-14 21:18:52] live.INFO: Phone and Amount after formatting. {"phone":"254748422765","amount":4000} 
[2026-09-14 21:18:52] live.INFO: Timestamp for STK Push: {"timestamp":"20260914210952"} 
[2026-09-14 21:18:52] live.INFO: Transaction type determined. {"transaction_type":"CustomerBuyGoodsOnline"} 
[2026-09-14 21:18:52] live.INFO: PartyB to be used in STK Push. {"type":"till","partyB":5699724,"short_code":"3582003","child_number":"3582003","till_no":5699724} 
[2026-09-14 21:18:52] live.INFO: Callback URLs set. {"callbackURL":"https://now.riset.cloud/api/payment/callback","validationURL":"https://now.riset.cloud/api/payment/validation"} 
[2026-09-14 21:18:52] live.INFO: Loaded Payment Settings: {"type":"till","short_code":"3582003","child_number":"3582003","till_no":5699724,"passkey":"8df9b4d855b77a20bd2257ee86f2b482b1816237e0e248e39ff8cbd3e73aabff","consumer_key":"W9AyBGwLeBRq0FAkn2FG3g9EJK9fF3nKwGTzG2pNtByd5tnQ","consumer_secret":"nziTooyd6JS0GC08ZG7456Ab531RVYOI1AyeZNXpDKha0xQ6mEvbFtOiAVAjlhyc","site_url":"https://now.riset.cloud/","payment_options":"[\"custom_pay_1\",\"custom_pay_2\"]"} 
[2026-09-14 21:18:52] live.INFO: Generated password for M-Pesa STK Push. {"password":"MzU4MjAwMzhkZjliNGQ4NTViNzdhMjBiZDIyNTdlZTg2ZjJiNDgyYjE4MTYyMzdlMGUyNDhlMzlmZjhjYmQzZTczYWFiZmYyMDI2MDkxNDIxMDk1Mg=="} 
[2026-09-14 21:18:52] live.INFO: Payload prepared for STK Push. {"payload":{"BusinessShortCode":"3582003","Password":"MzU4MjAwMzhkZjliNGQ4NTViNzdhMjBiZDIyNTdlZTg2ZjJiNDgyYjE4MTYyMzdlMGUyNDhlMzlmZjhjYmQzZTczYWFiZmYyMDI2MDkxNDIxMDk1Mg==","Timestamp":"20260914210952","TransactionType":"CustomerBuyGoodsOnline","Amount":4000,"PartyA":"254748422765","PartyB":5699724,"PhoneNumber":"254748422765","CallBackURL":"https://now.riset.cloud/api/payment/callback","AccountReference":12,"TransactionDesc":"Biz"}} 
[2026-09-14 21:18:52] live.INFO: Loaded Payment Settings: {"type":"till","short_code":"3582003","child_number":"3582003","till_no":5699724,"passkey":"8df9b4d855b77a20bd2257ee86f2b482b1816237e0e248e39ff8cbd3e73aabff","consumer_key":"W9AyBGwLeBRq0FAkn2FG3g9EJK9fF3nKwGTzG2pNtByd5tnQ","consumer_secret":"nziTooyd6JS0GC08ZG7456Ab531RVYOI1AyeZNXpDKha0xQ6mEvbFtOiAVAjlhyc","site_url":"https://now.riset.cloud/","payment_options":"[\"custom_pay_1\",\"custom_pay_2\"]"} 
[2026-09-14 21:18:53] live.INFO: Loaded Payment Settings: {"type":"till","short_code":"3582003","child_number":"3582003","till_no":5699724,"passkey":"8df9b4d855b77a20bd2257ee86f2b482b1816237e0e248e39ff8cbd3e73aabff","consumer_key":"W9AyBGwLeBRq0FAkn2FG3g9EJK9fF3nKwGTzG2pNtByd5tnQ","consumer_secret":"nziTooyd6JS0GC08ZG7456Ab531RVYOI1AyeZNXpDKha0xQ6mEvbFtOiAVAjlhyc","site_url":"https://now.riset.cloud/","payment_options":"[\"custom_pay_1\",\"custom_pay_2\"]"} 
[2026-09-14 21:18:53] live.INFO: Registering URLs. {"shortCode":"3582003","confirmationURL":"https://now.riset.cloud/api/payment/callback","validationURL":"https://now.riset.cloud/api/payment/validation"} 
[2026-09-14 21:18:59] live.INFO: URL registration response. {"response":"{
                    \"requestId\":\"cbc7-4eb6-8033-e874ef3eaa9643608129\",
                    \"errorCode\": \"500.003.1001\",
                    \"errorMessage\": \"URLs are already registered\"
                }
            "} 
[2026-09-14 21:19:00] live.INFO: STK Push response received. {"response":{"MerchantRequestID":"142a-48a9-8ceb-04e0cbd2b9de1855255","CheckoutRequestID":"ws_CO_14092026211859188748422765","ResponseCode":"0","ResponseDescription":"Success. Request accepted for processing","CustomerMessage":"Success. Request accepted for processing"}} 
[2026-09-14 21:31:03] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 21:31:03] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 21:31:03] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 21:31:03] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 21:31:03] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 21:31:03] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 21:31:03] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 21:31:03] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 21:31:03] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"161334262.70480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 21:53:11] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 21:53:30] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 21:53:30] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 21:53:30] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 21:53:30] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 21:53:30] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 21:53:30] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 21:53:30] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 21:53:30] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 21:53:30] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"161334262.70480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 21:53:32] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-13","location_id":null,"is_opening":true,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 21:53:32] live.INFO: Opening stock calculation - including all transactions {"date":"2026-09-13"} 
[2026-09-14 21:53:32] live.INFO: Applied opening stock condition {"condition":"purchase.type = 'opening_stock' OR (purchase.type != 'opening_stock' AND date(transaction_date) <= '2026-09-13')"} 
[2026-09-14 21:53:32] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-13') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and (`purchase`.`type` = ? or (`purchase`.`type` != ? and date(transaction_date) <= '2026-09-13'))","bindings":["purchase_order",8,"opening_stock","opening_stock"]} 
[2026-09-14 21:53:32] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"152121034.93480000","is_opening":true,"date":"2026-09-13"} 
[2026-09-14 21:53:32] live.INFO: === getOpeningClosingStock START === {"business_id":8,"date":"2026-09-14","location_id":null,"is_opening":false,"by_sale_price":false,"filters":{"user_id":null},"permitted_locations":null} 
[2026-09-14 21:53:32] live.INFO: Applied closing stock condition {"condition":"date(transaction_date) <= '2026-09-14' (includes all types except purchase_order)"} 
[2026-09-14 21:53:32] live.DEBUG: Final SQL Query {"sql":"select SUM((purchase_lines.quantity - purchase_lines.quantity_returned - purchase_lines.quantity_adjusted -
                        (SELECT COALESCE(SUM(tspl.quantity - tspl.qty_returned), 0) FROM 
                        transaction_sell_lines_purchase_lines AS tspl
                        JOIN transaction_sell_lines as tsl ON 
                        tspl.sell_line_id=tsl.id 
                        JOIN transactions as sale ON 
                        tsl.transaction_id=sale.id 
                        WHERE tspl.purchase_line_id = purchase_lines.id AND 
                        date(sale.transaction_date) <= '2026-09-14') ) * (purchase_lines.purchase_price + 
                        COALESCE(purchase_lines.item_tax, 0))
                    ) as stock from `purchase_lines` inner join `transactions` as `purchase` on `purchase_lines`.`transaction_id` = `purchase`.`id` left join `variations` as `v` on `v`.`id` = `purchase_lines`.`variation_id` left join `products` as `p` on `p`.`id` = `purchase_lines`.`product_id` where `purchase`.`type` != ? and `purchase`.`business_id` = ? and date(transaction_date) <= '2026-09-14'","bindings":["purchase_order",8]} 
[2026-09-14 21:53:32] live.INFO: === getOpeningClosingStock RESULT === {"calculated_stock":"161334262.70480000","is_opening":false,"date":"2026-09-14"} 
[2026-09-14 21:57:02] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 21:57:02] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 21:57:03] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 21:57:05] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 21:57:05] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 21:57:06] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 21:57:07] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 21:59:35] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:00:20] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:00:20] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:00:21] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:00:21] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:00:22] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:00:22] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:00:27] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:03:18] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:03:18] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:04:44] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:21:46] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:29:53] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:48:33] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:49:08] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:49:12] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:55:35] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:55:40] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:55:45] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:55:49] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:55:50] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:55:53] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:55:58] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:56:04] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:56:08] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:56:13] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:56:18] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:56:21] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:56:23] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:56:28] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:56:31] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:56:37] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:56:42] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:56:47] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:56:50] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:56:52] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:56:57] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:57:07] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:57:12] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:57:17] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:57:22] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:57:27] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:57:37] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:57:42] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:57:47] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:57:51] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:57:55] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:58:16] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:58:32] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:59:02] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:59:02] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:59:05] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:59:05] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:59:16] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:59:18] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:59:23] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:59:28] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:59:33] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:59:38] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 22:59:43] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:00:19] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:00:25] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:00:33] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:00:39] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:00:53] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:00:53] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:01:38] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:01:45] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:02:40] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:02:51] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:02:52] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:02:53] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:02:59] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:36:04] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:36:28] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:36:39] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:37:51] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:42:02] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:42:02] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:42:03] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:42:03] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:42:04] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:42:10] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:42:15] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:42:19] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:42:56] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:42:58] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:43:13] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:43:14] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:43:28] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:44:05] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:44:07] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:44:08] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:44:09] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:44:10] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:44:11] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:44:50] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:44:50] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:44:51] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:45:05] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:45:28] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:45:28] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:45:29] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:47:59] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:47:59] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:48:00] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:48:00] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:48:01] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:48:03] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:48:31] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:52:14] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:52:41] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:53:50] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:53:51] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:55:46] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:56:11] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:56:49] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:56:50] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:58:17] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
[2026-09-14 23:59:12] live.ERROR: Failed to send error alert email: Connection could not be established with host "ssl://mail.risetsystems.com:465": stream_socket_client(): Peer certificate CN=`mountainous-part.metalseed.net' did not match expected CN=`mail.risetsystems.com'  
