2025-11-24 08:47:37,274 - INFO - ================================================================================
2025-11-24 08:47:37,274 - INFO - SCRIPT 8: FIX INCORRECT BUY PRICES
2025-11-24 08:47:37,274 - INFO - LIVE MODE
2025-11-24 08:47:37,274 - INFO - ================================================================================
2025-11-24 08:47:37,274 - INFO - Log file: /home/centralgoparts/public_html/profitability/logs/fix_buy_prices_20251124_084737.log
2025-11-24 08:47:37,274 - INFO - Started at: 2025-11-24 08:47:37.274416
2025-11-24 08:47:37,283 - INFO - 
================================================================================
2025-11-24 08:47:37,283 - INFO - CHECKING BUY PRICE FORMULA ACCURACY
2025-11-24 08:47:37,283 - INFO - Formula: our_buy_price = supplier_price + supplier_shipping + handling
2025-11-24 08:47:37,283 - INFO - ================================================================================
2025-11-24 08:47:37,383 - INFO - Checking 17071 orders...
2025-11-24 08:47:37,391 - INFO - Found 42 orders with incorrect buy prices
2025-11-24 08:47:37,392 - INFO - 
Top 10 worst cases:
2025-11-24 08:47:37,392 - INFO -   1. Order 112-6957509-5203444: current=$296.12, should be=$309.14, diff=$13.02, source=Manual Entry
2025-11-24 08:47:37,392 - INFO -   2. Order 114-2813038-9021869: current=$297.89, should be=$309.81, diff=$11.92, source=Manual Entry
2025-11-24 08:47:37,392 - INFO -   3. Order 229625146: current=$238.49, should be=$246.93, diff=$8.44, source=Manual Entry
2025-11-24 08:47:37,392 - INFO -   4. Order 229628230: current=$180.60, should be=$188.13, diff=$7.53, source=Manual Entry
2025-11-24 08:47:37,392 - INFO -   5. Order 229627076: current=$198.27, should be=$205.33, diff=$7.06, source=Manual Entry
2025-11-24 08:47:37,392 - INFO -   6. Order 04253-0049: current=$131.54, should be=$137.17, diff=$5.63, source=Manual Entry
2025-11-24 08:47:37,392 - INFO -   7. Order 229625226: current=$145.82, should be=$151.35, diff=$5.53, source=Manual Entry
2025-11-24 08:47:37,392 - INFO -   8. Order 229625307: current=$113.55, should be=$118.52, diff=$4.97, source=Manual Entry
2025-11-24 08:47:37,392 - INFO -   9. Order 229624750: current=$113.07, should be=$116.95, diff=$3.88, source=Manual Entry
2025-11-24 08:47:37,392 - INFO -   10. Order 229626460: current=$148.73, should be=$152.35, diff=$3.62, source=Manual Entry
2025-11-24 08:47:37,399 - INFO - 
Fixed 42 orders
2025-11-24 08:47:37,411 - INFO - 
================================================================================
2025-11-24 08:47:37,411 - INFO - RECALCULATING COGS FOR FIXED ORDERS
2025-11-24 08:47:37,411 - INFO - ================================================================================
2025-11-24 08:47:37,412 - INFO - Recalculating COGS for 42 fixed orders
2025-11-24 08:47:37,419 - INFO - Recalculated COGS for 42 orders
2025-11-24 08:47:37,426 - INFO - 
================================================================================
2025-11-24 08:47:37,426 - INFO - CHECKING GROSS PROFIT AND MARGIN ACCURACY FOR ALL ORDERS
2025-11-24 08:47:37,426 - INFO - ================================================================================
2025-11-24 08:47:37,596 - INFO - Checking 22250 orders for correct gross profit and margin...
2025-11-24 08:47:37,623 - INFO - ✓ All orders have correct COGS, gross profit, and gross margin
2025-11-24 08:47:37,634 - INFO - 
================================================================================
2025-11-24 08:47:37,634 - INFO - SUMMARY
2025-11-24 08:47:37,634 - INFO - ================================================================================
2025-11-24 08:47:37,634 - INFO - Orders with incorrect buy prices: 42
2025-11-24 08:47:37,634 - INFO - COGS recalculated for buy price fixes: 42
2025-11-24 08:47:37,634 - INFO - Orders with incorrect COGS/profit/margin: 0
2025-11-24 08:47:37,634 - INFO - ================================================================================
2025-11-24 08:47:37,634 - INFO - 
Completed at: 2025-11-24 08:47:37.634291
2025-11-24 08:47:37,634 - INFO - Total duration: 0.36 seconds
