No Stock Products

0){ while ($set_p= mysqli_fetch_assoc($get_p)){ echo ''.($i=$i+1).') '.$set_p['name'].' '.$set_p['product_url'].''.'
'; } }else{ echo '
NIL
'.'
'; } ?>

Marked as No Stock

DATE_SUB(now(), INTERVAL 3 DAY) order by id asc"; $get_p = mysqli_query($conn, $Query); $get_rows = mysqli_num_rows($get_p); if($get_rows > 0){ while ($set_p= mysqli_fetch_assoc($get_p)){ $i=0; $ref_no='DE'.str_pad($set_p['order_id'], 4, "0", STR_PAD_LEFT); echo ''.$ref_no.' - Date '.date('d-m-Y', strtotime($set_p['ord_date'])).''.'
'; $get_pro = mysqli_query($conn, "SELECT sp.name, sp.product_url FROM tbl_dealer_ef_sub sm inner join shop_product sp on sm.prod_id=sp.product_id WHERE sm.order_id='".$set_p['order_id']."' and sm.stock_status='no stock'"); while($set_pro = mysqli_fetch_assoc($get_pro)){ echo ''.($i=$i+1).') '.$set_pro['name'].' '.$set_pro['product_url'].''.'
'; } echo '
'; } }else{ echo '
NIL
'.'
'; } ?>

Pending Orders

'2024-12-31';"); while($set_ord = mysqli_fetch_assoc($get_ord)){ echo ''.($i=$i+1).') '.$set_ord['refid'].'- Date '.date('d-m-Y',strtotime($set_ord['order_date_time'])).''.'
'; } echo '
'; $get_main = mysqli_query($conn, "SELECT * from tbl_dealer_ef_main WHERE DATE(order_date_time) < DATE_SUB(CURDATE(), INTERVAL 3 DAY) and DATE(order_date_time) > '2024-12-31' order by id asc"); while($set_main = mysqli_fetch_assoc($get_main)){ $get_sub = mysqli_query($conn, "SELECT * FROM tbl_dealer_ef_sub WHERE order_id='".$set_main['id']."' AND ref_order_id IS NULL and stock_status in ('ordered', 'added by admin')"); $check_sub = mysqli_num_rows($get_sub); if($check_sub > 0){ $ref_no='DE'.str_pad($set_main['id'], 4, "0", STR_PAD_LEFT); echo ''.($i=$i+1).') '.$ref_no.'- Date '.date('d-m-Y',strtotime($set_main['order_date_time'])).''.'
'; } } if($i==0){ echo '
NIL
'.'
'; } ?>