Search
Coupon Code:
From Date:
To Date:
Source:
Select Source
query("SELECT id,name FROM coupon_source "); while($lineSrc=$obj->fetchNextObject($chkSrcSql)){ ?>
coupon_source==$lineSrc->id or $_POST['source_id']==$lineSrc->id){ ?> selected >name; ?>
View All
Admin: View Coupon Revenue Report
='".$_REQUEST['search_from_date']."' and date(o.order_date) <='".$_REQUEST['search_to_date']."' "; } $start=0; if(isset($_GET['start'])) $start=$_GET['start']; $pagesize=50; if(isset($_GET['pagesize'])) $pagesize=$_GET['pagesize']; $order_by='id'; if(isset($_GET['order_by'])) $order_by=$_GET['order_by']; $order_by2='desc'; if(isset($_GET['order_by2'])) $order_by2=$_GET['order_by2']; $cpReportSql = $obj->Query("SELECT o.id,o.order_via,o.amount,o.total_amount as orderAmount,o.discount,o.discount_via,o.coupon_code,o.order_date,o.order_status,o.payment_status,cp_source FROM `tbl_order` o WHERE o.payment_status=1 and (o.discount_via !='') and o.coupon_code !='' $where order by $order_by $order_by2 limit $start, $pagesize "); $cpReportSqlNo = $obj->Query("SELECT o.id,o.order_via,o.amount,o.total_amount as orderAmount,o.discount,o.discount_via,o.coupon_code,o.order_date,o.order_status,o.payment_status FROM `tbl_order` o WHERE o.payment_status=1 and (o.discount_via !='') and o.coupon_code !='' $where order by $order_by $order_by2 "); /*$cpReportSql = $obj->Query("SELECT o.id,o.order_via,o.amount,o.total_amount as orderAmount,o.discount,o.discount_via,o.coupon_code,o.order_date,o.order_status,o.payment_status, o.cp_source,cs.name FROM `tbl_order` o join coupon_source as cs on cs.id=o.cp_source WHERE o.payment_status=1 and (o.discount_via !='') and o.coupon_code !='' $where order by $order_by $order_by2 limit $start, $pagesize "); $cpReportSqlNo = $obj->Query("SELECT o.id,o.order_via,o.amount,o.total_amount as orderAmount,o.discount,o.discount_via,o.coupon_code,o.order_date,o.order_status,o.payment_status, o.cp_source,cs.name FROM `tbl_order` o join coupon_source as cs on cs.id=o.cp_source WHERE o.payment_status=1 and (o.discount_via !='') and o.coupon_code !='' $where order by $order_by $order_by2 ");*/ $reccnt=$obj->numRows($cpReportSqlNo); if($reccnt==0) { ?>
No Record
Records Found.
S No.
Order ID
Order Amount
Order Date
Coupon Code
Source
fetchNextObject($cpReportSql)) { $i++; if($i%2==0) { $bgcolor = "#f3f4f6"; } else { $bgcolor = ""; } ?>
.
id); ?>
orderAmount); ?>
order_date); ?>
coupon_code); ?>
cp_source); ?>