Yeh page ai.html ke product data se connect hai. Order data milne par date-wise realized profit dikhayega, warna AI product margins ke basis par daily snapshot fallback show karega.
Realized profit = order items × (selling price - total cost).
Snapshot profit fallback = ai.html me saved products ke margin records by updated date.
Page ai.html ke keys aur IndexedDB dono se product data read karne ki koshish karta hai.