elseif($_REQUEST['report']==113) {echo $str; ?> 0;$i--) { ?> dealer_code; for($i=12;$i>0;$i--) { $m = ($i-1); $sqql = "select sum(c.total_amt) from sale_do_chalan c,dealer_info d where c.chalan_date between '".${'f_mons'.$i}."' and '".${'f_mone'.$i}."' and c.dealer_code=d.dealer_code and d.dealer_type='Distributor' and d.dealer_code='".$dealer_code."'".$con; ${'sqlmon'.$i} = mysqli_fetch_row(db_query($sqql)); ${'totalc'.$i} = ${'totalc'.$i} + ${'sqlmon'.$i}[0]; ${'totalr'.$dealer_code} = ${'totalr'.$dealer_code} + ${'sqlmon'.$i}[0]; } ?> 0;$i--) { ?> 0;$i--) { $m = ($i-1); $sqql = "select sum(c.total_amt) from sale_do_chalan c,dealer_info d where c.chalan_date between '".${'f_mons'.$i}."' and '".${'f_mone'.$i}."' and c.dealer_code=d.dealer_code and d.dealer_type='Corporate'".$con; ${'sqlmonc'.$i} = mysqli_fetch_row(db_query($sqql)); ${'totalco'.$i} = ${'totalco'.$i} + ${'sqlmonc'.$i}[0]; ${'totalrc1'} = ${'totalrc1'} + ${'sqlmonc'.$i}[0]; } ?> 0;$i--) { ${'totald'} = ${'totald'} + ${'totalc'.$i}; ?> 0;$i--) { $m = ($i-1); $sqql = "select sum(c.total_amt) from sale_do_chalan c,dealer_info d where c.chalan_date between '".${'f_mons'.$i}."' and '".${'f_mone'.$i}."' and c.dealer_code=d.dealer_code and d.dealer_type='SuperShop'".$con; ${'sqlmons'.$i} = mysqli_fetch_row(db_query($sqql)); ${'totals'.$i} = ${'totals'.$i} + ${'sqlmons'.$i}[0]; ${'totalrc'} = ${'totalrc'} + ${'sqlmons'.$i}[0]; } ?>
S/L DEALER NAME
Total
dealer_name?>
  D Total
0;$i--) { ?> dealer_code; for($i=12;$i>0;$i--) { $m = ($i-1); $sqql = "select sum(c.pkt_unit) from sale_do_chalan c,dealer_info d where c.chalan_date between '".${'f_mons'.$i}."' and '".${'f_mone'.$i}."' and c.dealer_code=d.dealer_code and d.dealer_type='Distributor' and d.dealer_code='".$dealer_code."'".$con; ${'sqlmon'.$i} = mysqli_fetch_row(db_query($sqql)); ${'totalc'.$i} = ${'totalc'.$i} + ${'sqlmon'.$i}[0]; ${'totalr'.$dealer_code} = ${'totalr'.$dealer_code} + ${'sqlmon'.$i}[0]; } ?> 0;$i--) { ?> 0;$i--) { $m = ($i-1); $sqql = "select sum(c.pkt_unit) from sale_do_chalan c,dealer_info d where c.chalan_date between '".${'f_mons'.$i}."' and '".${'f_mone'.$i}."' and c.dealer_code=d.dealer_code and d.dealer_type='Corporate'".$con; ${'sqlmonc'.$i} = mysqli_fetch_row(db_query($sqql)); ${'totalco'.$i} = ${'totalco'.$i} + ${'sqlmonc'.$i}[0]; ${'totalrc1'} = ${'totalrc1'} + ${'sqlmonc'.$i}[0]; } ?> 0;$i--) { ${'totald'} = ${'totald'} + ${'totalc'.$i}; ?> 0;$i--) { $m = ($i-1); $sqql = "select sum(c.pkt_unit) from sale_do_chalan c,dealer_info d where c.chalan_date between '".${'f_mons'.$i}."' and '".${'f_mone'.$i}."' and c.dealer_code=d.dealer_code and d.dealer_type='SuperShop'".$con;; ${'sqlmons'.$i} = mysqli_fetch_row(db_query($sqql)); ${'totals'.$i} = ${'totals'.$i} + ${'sqlmons'.$i}[0]; ${'totalrc'} = ${'totalrc'} + ${'sqlmons'.$i}[0]; } ?>
S/L DEALER NAME
Total
dealer_name?>
  D Total
0;$i--) { ?> dealer_code; for($i=12;$i>0;$i--) { $m = ($i-1); $sqql = "select sum(c.total_amt) from sale_do_chalan c,dealer_info d where c.chalan_date between '".${'f_mons'.$i}."' and '".${'f_mone'.$i}."' and c.dealer_code=d.dealer_code and d.dealer_type='Distributor' and d.dealer_code='".$dealer_code."'".$con; ${'sqlmon'.$i} = mysqli_fetch_row(db_query($sqql)); ${'totalc'.$i} = ${'totalc'.$i} + ${'sqlmon'.$i}[0]; ${'totalr'.$dealer_code} = ${'totalr'.$dealer_code} + ${'sqlmon'.$i}[0]; } ?> 0;$i--) { ?> 0;$i--) { $m = ($i-1); $sqql = "select sum(c.total_amt) from sale_do_chalan c,dealer_info d where c.chalan_date between '".${'f_mons'.$i}."' and '".${'f_mone'.$i}."' and c.dealer_code=d.dealer_code and d.dealer_type='Corporate'".$con; ${'sqlmonc'.$i} = mysqli_fetch_row(db_query($sqql)); ${'totalco'.$i} = ${'totalco'.$i} + ${'sqlmonc'.$i}[0]; ${'totalrc1'} = ${'totalrc1'} + ${'sqlmonc'.$i}[0]; } ?> 0;$i--) { ${'totald'} = ${'totald'} + ${'totalc'.$i}; ?> 0;$i--) { $m = ($i-1); $sqql = "select sum(c.total_amt) from sale_do_chalan c,dealer_info d where c.chalan_date between '".${'f_mons'.$i}."' and '".${'f_mone'.$i}."' and c.dealer_code=d.dealer_code and d.dealer_type='SuperShop'".$con; ${'sqlmons'.$i} = mysqli_fetch_row(db_query($sqql)); ${'totals'.$i} = ${'totals'.$i} + ${'sqlmons'.$i}[0]; ${'totalrc'} = ${'totalrc'} + ${'sqlmons'.$i}[0]; } ?>
S/L DEALER NAME
Total
dealer_name?>
  D Total