<?php include "../../includes/start_ajax.php";?>
<?php



$cell_width="100";




echo "<section class='view_toolbar'>";
    echo "<div class='view_toolbar_left' style='width:50%;'>";
		echo "<font size=5 ><span class='fa fa-bar-chart fa-1x'></span> <b>Monthly Collection Summary</b></font>";

		echo "<br>";
	    
    echo "</div>";
    echo "<div class='view_toolbar_right'>";
    
		  
		  
		  		
		  		echo " <input type=button class='button button-blue' value='Refresh' onclick=\"mon_send_get('mod/collection_summary_month/index.php','','div_main')\">";

   
    echo "</div>";
echo "</section>";


    echo "<section class='view_header'>";

    //echo $_SESSION["data_site"];
    echo "</section>";


    echo "<section class='view_content'>";



$month_text[1]="JAN";
$month_text[2]="FEB";
$month_text[3]="MAR";
$month_text[4]="APR";
$month_text[5]="MAY";
$month_text[6]="JUN";
$month_text[7]="JUL";
$month_text[8]="AUG";
$month_text[9]="SEP";
$month_text[10]="OCT";
$month_text[11]="NOV";
$month_text[12]="DEC";



$month_text2[1]="January";
$month_text2[2]="February";
$month_text2[3]="March";
$month_text2[4]="April";
$month_text2[5]="May";
$month_text2[6]="June";
$month_text2[7]="July";
$month_text2[8]="August";
$month_text2[9]="September";
$month_text2[10]="October";
$month_text2[11]="November";
$month_text2[12]="December";


//======================================================================================


//payment mode library:
$query_payment="select * from t_".$key_table_prefix."_payment_mode ";
$result_payment = mysqli_query($dbconn,$query_payment);
while($line_payment = mysqli_fetch_array($result_payment,MYSQLI_ASSOC))
{
	
	$payment_mode_text[$line_payment["pym_code"]]=$line_payment["pym_name"];
}
$payment_mode_text["CASH"]="Cash";



//device library:
$query_device="select * from t_".$key_table_prefix."_device ";
$result_device = mysqli_query($dbconn,$query_device);
while($line_device = mysqli_fetch_array($result_device,MYSQLI_ASSOC))
{
	
	$device_data[$line_device["dev_android_id"]]=$line_device["dev_name"];
}



//device library:
$query_staff="select * from t_".$key_table_prefix."_staff ";
$result_staff = mysqli_query($dbconn,$query_staff);
while($line_staff = mysqli_fetch_array($result_staff,MYSQLI_ASSOC))
{
	
	$staff_data[$line_staff["stf_code"]]=$line_staff["stf_name"];
}






if($_REQUEST["y"]!="")
{
	$_SESSION["calendar_y"]=$_REQUEST["y"];
}

if($_REQUEST["m"]!="")
{
	$_SESSION["calendar_m"]=$_REQUEST["m"];
}







//======================================================================================

if($_SESSION["calendar_y"]=="")
{
	$_SESSION["calendar_y"]=date("Y");
}

if($_SESSION["calendar_m"]=="")
{
	$_SESSION["calendar_m"]=date("m");
}




echo "<div class='cal_menu_panel'>";
    echo "<div class='cal_menu_box'>";
    for($y=2010;$y<=2030;$y++)
    {
        if($_SESSION["calendar_y"]==$y)
        {
            echo "<div class='cal_menu_active' ";
        }
        else
        {
            echo "<div class='cal_menu_inactive' ";
        }
        echo " onclick=\"mon_send_get('mod/collection_summary_month/index.php','?".$tab_key_id."=".$_REQUEST[$tab_key_id]."&y=".$y."".$tab_extra_url."','div_main')\">".$y."</div>";
    }
    echo "</div>";

    echo "<div class='cal_menu_box'>";
    for($m=1;$m<=12;$m++)
    {
        if($_SESSION["calendar_m"]==$m)
        {
            echo "<div class='cal_menu_active' ";
        }
        else
        {
            echo "<div class='cal_menu_inactive' ";
        }
        echo " onclick=\"mon_send_get('mod/collection_summary_month/index.php','?".$tab_key_id."=".$_REQUEST[$tab_key_id]."&m=".substr($m+100,1,2)."".$tab_extra_url."','div_main')\" >".$month_text[$m]."</div>";
    }
    echo "</div>";




echo "</div>";



$total_of_days = date("t",mktime(0,0,0,$_SESSION["calendar_m"],1,$_SESSION["calendar_y"]));

$selected_date_start=$_SESSION["calendar_y"]."-".$_SESSION["calendar_m"]."-01 00:00:00";
$selected_date_end=$_SESSION["calendar_y"]."-".$_SESSION["calendar_m"]."-".$total_of_days." 23:59:59";


$selected_date_start_simple=$_SESSION["calendar_y"]."-".$_SESSION["calendar_m"]."-01";
$selected_date_end_simple=$_SESSION["calendar_y"]."-".$_SESSION["calendar_m"]."-".$total_of_days."";



$selected_date = $_SESSION["calendar_y"]."-".$_SESSION["calendar_m"]."";




echo "<font size=1 color=#34495E style='float:left;width:100%;' >Showing data of period ".$selected_date_start." - ".$selected_date_end."</font><br><br><br>";


echo "<br>&nbsp;";




//====================================================Sales ==============================================================
echo "<br>&nbsp;<br>&nbsp;";

echo "<div class='data_display_content'>";	


echo "<font size=3 style='float:left;padding:15px;color:#000;'><b><span class='fa fa-dollar fa-lg'></span> Sales Checkout Summary by Device/Payment Mode</b></font>";

echo "<br>";

echo " <input  style='float:right;margin-right:5%;' type=button class='button button-blue' value='Print All' onclick=\"print_page('print/sales_report/?start=".$selected_date_start_simple."&end=".$selected_date_end_simple."')\"> ";

//echo "<input style='float:left;' type=button class='button button-blue' value='Print' onclick=\"print_page('print/sales_report/?start=".$selected_date_start_simple."&end=".$selected_date_end_simple."&part=SUM_DEV')\">";


	
	

	
	
	echo "<div class='view_list_title_row' style='margin-top:20px;'>";
		echo "<div class='view_list_title_content'>";
			
			echo "<div style='width:200px;' class='view_list_title_content_object'  >";
				echo "<font color=#000 ><b>Device</b>";
			echo "</div>";
			
			echo "<div style='width:200px;' class='view_list_title_content_object'  >";
				echo "<b>Payment Mode</b>";
			echo "</div>";
			
			echo "<div style='width:250px;' class='view_list_title_content_object'  >";
				echo "<b>Payment Amount</b>";
			echo "</div>";
			
			
		echo "</div>";
	echo "</div>";
			
			
	$query="select 
			
			sum(ivp_amount-ivp_change) as payment_amount,
			
			ivp_payment_code,
			h.device_id  as device_id
			
			
			from t_".$key_table_prefix."_invoice_header h, t_".$key_table_prefix."_invoice_payment p 
			where ivh_status = 'POSTED'
			and ivh_doc_no = ivp_doc_no
			and h.device_id = p.device_id
			
			and ivh_date >= '".$selected_date_start_simple."'
			and ivh_date <= '".$selected_date_end_simple."'
			
			group by h.device_id, ivp_payment_code
			
			";		
	$result = mysqli_query($dbconn,$query);
	while($line = mysqli_fetch_array($result,MYSQLI_ASSOC))
	{
		
		$report_data_payment[$line["device_id"]][$line["ivp_payment_code"]] = $line;		
		
	}
	
			

	
			
	$sum_payment_amount=0;
			
			
	$counter=1;
	foreach($report_data_payment as $device_key => $report_data_payment2)
	{
		
		echo "<div class='view_row'>";
			echo "<div style='width:200px;text-align:left;' class='view_row_content_object'  >";
				echo "<font class='view_row_content_label'></font>";
				echo "<font class='view_row_content_text'>";
					echo "<font color=#000>".$device_data[$device_key]."</font>";
				echo "</font><br>";			
			echo "</div>";
		
			echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";	
			echo "</div>";
			
		echo "</div>";
		
		
		
		$sub_payment_amount=0;
		
		
		
		foreach($report_data_payment[$device_key] as $payment_code => $report_data_payment3)
		{
	
			echo "<div class='view_row'>";
				echo "<div style='width:200px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>".$counter."</font>";
					echo "<font class='view_row_content_text'>";
						echo "".$payment_code."";
					echo "</font><br>";			
				echo "</div>";
			
				echo "<div style='width:200px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Product Name</font>";
					echo "<font class='view_row_content_text'>";
						echo $payment_mode_text[$report_data_payment3["ivp_payment_code"]];
						
					echo "</font><br>";			
				echo "</div>";
				
				
				echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Total Amount</font>";
					echo "<font class='view_row_content_text'>";
						echo $report_data_payment3["payment_amount"];
						$sum_payment_amount = $sum_payment_amount+ $report_data_payment3["payment_amount"];
						$sub_payment_amount = $sub_payment_amount+ $report_data_payment3["payment_amount"];
					echo "</font><br>";			
				echo "</div>";
				
					
				echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";	
				echo "</div>";
				
			echo "</div>";
			$counter++;
			
		}
		
		
		
			//sub_total
			echo "<div class='view_row'>";
				echo "<div style='width:200px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>".$counter."</font>";
					echo "<font class='view_row_content_text'>";
					
					echo "</font><br>";			
				echo "</div>";
			
				echo "<div style='width:200px;text-align:right;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000><b>Sub Total</b></font>";
					echo "</font><br>";			
				echo "</div>";
			
					
				echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Total Amount</font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000 ><b>".number_format($sub_payment_amount,2,".",",")."</b>";
					echo "</font><br>";			
				echo "</div>";
				
				echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";	
				echo "</div>";
				
			echo "</div>";
			
			
			
			
			
	}


	//total
	echo "<div class='view_row'>";
		echo "<div style='width:200px;text-align:left;' class='view_row_content_object'  >";
			echo "<font class='view_row_content_label'>".$counter."</font>";
			echo "<font class='view_row_content_text'>";
				echo "<font color=#16A085 size=3><b>Total Checkout</b></font>";
			echo "</font><br>";			
		echo "</div>";
	
		echo "<div style='width:200px;text-align:right;' class='view_row_content_object'  >";
			echo "<font class='view_row_content_label'></font>";
			echo "<font class='view_row_content_text'>";
			echo "</font><br>";			
		echo "</div>";
	
		echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
			echo "<font class='view_row_content_label'>Total Amount</font>";
			echo "<font class='view_row_content_text'>";
				echo "<font color=#16A085 size=3><b>".number_format($sum_payment_amount,2,".",",")."</b>";
			echo "</font><br>";			
		echo "</div>";
		
		echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";	
		echo "</div>";
		
	echo "</div>";
	
echo "</div>";



echo "<br>&nbsp;<br>&nbsp;";
echo "<br>&nbsp;<br>&nbsp;";




//====================================================Sales Return==============================================================
echo "<br>&nbsp;<br>&nbsp;";

echo "<div class='data_display_content'>";	


echo "<font size=3 style='float:left;padding:15px;color:#000;'><b><span class='fa fa-reply fa-lg'></span> Sales Return Summary by Device/Mode</b></font>";

echo "<br>";

echo " <input  style='float:right;margin-right:5%;' type=button class='button button-blue' value='Print All' onclick=\"print_page('print/sales_report/?start=".$selected_date_start_simple."&end=".$selected_date_end_simple."')\"> ";

//echo "<input style='float:left;' type=button class='button button-blue' value='Print' onclick=\"print_page('print/sales_report/?start=".$selected_date_start_simple."&end=".$selected_date_end_simple."&part=SUM_DEV')\">";


	
	
	echo "<div class='view_list_title_row' style='margin-top:20px;'>";
		echo "<div class='view_list_title_content'>";
			
			echo "<div style='width:200px;' class='view_list_title_content_object'  >";
				echo "<font color=#000 ><b>Device</b>";
			echo "</div>";
			
			echo "<div style='width:200px;' class='view_list_title_content_object'  >";
				echo "<b>Refund Mode</b>";
			echo "</div>";
			
			echo "<div style='width:250px;' class='view_list_title_content_object'  >";
				echo "<b>Refund Amount</b>";
			echo "</div>";
			
			
		echo "</div>";
	echo "</div>";
			
		
	unset($report_data_payment);
			
	$query="select 
			
			sum(rth_total_amount_rounded) as payment_amount,
			
			'CASH' as payment_code,
			device_id  as device_id
			
			
			from t_".$key_table_prefix."_return_header
			where rth_status = 'POSTED'
			
			
			and rth_date >= '".$selected_date_start_simple."'
			and rth_date <= '".$selected_date_end_simple."'
			
			group by device_id, payment_code
			
			";		
	$result = mysqli_query($dbconn,$query);
	
	while($line = mysqli_fetch_array($result,MYSQLI_ASSOC))
	{
		
		$report_data_payment[$line["device_id"]][$line["payment_code"]] = $line;		
		
	}
	
			

	
			
	$sum_payment_amount=0;
			
			
	$counter=1;
	foreach($report_data_payment as $device_key => $report_data_payment2)
	{
		
		echo "<div class='view_row'>";
			echo "<div style='width:200px;text-align:left;' class='view_row_content_object'  >";
				echo "<font class='view_row_content_label'></font>";
				echo "<font class='view_row_content_text'>";
					echo "<font color=#000>".$device_data[$device_key]."</font>";
				echo "</font><br>";			
			echo "</div>";
		
			echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";	
			echo "</div>";
			
		echo "</div>";
		
		
		
		$sub_payment_amount=0;
		
		
		
		foreach($report_data_payment[$device_key] as $payment_code => $report_data_payment3)
		{
	
			echo "<div class='view_row'>";
				echo "<div style='width:200px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>".$counter."</font>";
					echo "<font class='view_row_content_text'>";
						echo "".$payment_code."";
					echo "</font><br>";			
				echo "</div>";
			
				echo "<div style='width:200px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Product Name</font>";
					echo "<font class='view_row_content_text'>";
						echo $payment_mode_text[$report_data_payment3["payment_code"]];
						
					echo "</font><br>";			
				echo "</div>";
				
				
				echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Total Amount</font>";
					echo "<font class='view_row_content_text'>";
						echo $report_data_payment3["payment_amount"];
						$sum_payment_amount = $sum_payment_amount+ $report_data_payment3["payment_amount"];
						$sub_payment_amount = $sub_payment_amount+ $report_data_payment3["payment_amount"];
					echo "</font><br>";			
				echo "</div>";
				
					
				echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";	
				echo "</div>";
				
			echo "</div>";
			$counter++;
			
		}
		
		
		
			//sub_total
			echo "<div class='view_row'>";
				echo "<div style='width:100px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>".$counter."</font>";
					echo "<font class='view_row_content_text'>";
					
					echo "</font><br>";			
				echo "</div>";
			
				echo "<div style='width:200px;text-align:right;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000><b>Sub Total</b></font>";
					echo "</font><br>";			
				echo "</div>";
			
					
				echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Total Amount</font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000 ><b>".number_format($sub_payment_amount,2,".",",")."</b>";
					echo "</font><br>";			
				echo "</div>";
				
				echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";	
				echo "</div>";
				
			echo "</div>";
			
			
			
			
			
	}


	//total
	echo "<div class='view_row'>";
		echo "<div style='width:200px;text-align:left;' class='view_row_content_object'  >";
			echo "<font class='view_row_content_label'>".$counter."</font>";
			echo "<font class='view_row_content_text'>";
				echo "<font color=#CF000F size=3><b>Total Refund</b></font>";
			echo "</font><br>";			
		echo "</div>";
	
		echo "<div style='width:200px;text-align:right;' class='view_row_content_object'  >";
			echo "<font class='view_row_content_label'></font>";
			echo "<font class='view_row_content_text'>";
			echo "</font><br>";			
		echo "</div>";
	
		echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
			echo "<font class='view_row_content_label'>Total Amount</font>";
			echo "<font class='view_row_content_text'>";
				echo "<font color=#CF000F size=3 ><b>".number_format($sum_payment_amount,2,".",",")."</b>";
			echo "</font><br>";			
		echo "</div>";
		
		echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";	
		echo "</div>";
		
	echo "</div>";
	
echo "</div>";



echo "<br>&nbsp;<br>&nbsp;";
echo "<br>&nbsp;<br>&nbsp;";






//====================================================Official Receipt by Device==============================================================


echo "<br>&nbsp;<br>&nbsp;";

echo "<div class='data_display_content'>";	


echo "<font size=3 style='float:left;padding:15px;color:#000;'><b><span class='fa fa-money fa-lg'></span> Money Collection Summary by Device/Mode</b></font>";

echo "<br>";

//echo " <input  style='float:right;margin-right:5%;' type=button class='button button-blue' value='Print All' onclick=\"print_page('print/sales_report/?start=".$selected_date_start_simple."&end=".$selected_date_end_simple."')\"> ";

//echo "<input style='float:left;' type=button class='button button-blue' value='Print' onclick=\"print_page('print/sales_report/?start=".$selected_date_start_simple."&end=".$selected_date_end_simple."&part=SUM_DEV')\">";


	
	
	echo "<div class='view_list_title_row' style='margin-top:20px;'>";
		echo "<div class='view_list_title_content'>";
			
			echo "<div style='width:200px;' class='view_list_title_content_object'  >";
				echo "<font color=#000 ><b>Device</b>";
			echo "</div>";
			
			echo "<div style='width:200px;' class='view_list_title_content_object'  >";
				echo "<b>Collection Mode</b>";
			echo "</div>";
			
			echo "<div style='width:250px;' class='view_list_title_content_object'  >";
				echo "<b>Collection Amount</b>";
			echo "</div>";
			
			
		echo "</div>";
	echo "</div>";
			
		
	unset($report_data_payment);
			
	$query="select 
			
			sum(coh_total_amount_rounded) as collection_amount,
			
			coh_payment_mode as collection_mode,
			device_id  as device_id
			
			
			from t_".$key_table_prefix."_collection_header
			where coh_status = 'POSTED'
			
			
			and coh_date >= '".$selected_date_start_simple."'
			and coh_date <= '".$selected_date_end_simple."'
			
			group by device_id, collection_mode
			
			";		
	$result = mysqli_query($dbconn,$query);
	
	while($line = mysqli_fetch_array($result,MYSQLI_ASSOC))
	{
		
		$report_data_payment[$line["device_id"]][$line["collection_mode"]] = $line;		
		
	}
	
			

	
			
	$sum_payment_amount=0;
			
			
	$counter=1;
	foreach($report_data_payment as $device_key => $report_data_payment2)
	{
		
		echo "<div class='view_row'>";
			echo "<div style='width:200px;text-align:left;' class='view_row_content_object'  >";
				echo "<font class='view_row_content_label'></font>";
				echo "<font class='view_row_content_text'>";
					echo "<font color=#000>".$device_data[$device_key]."</font>";
				echo "</font><br>";			
			echo "</div>";
		
			echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";	
			echo "</div>";
			
		echo "</div>";
		
		
		
		$sub_payment_amount=0;
		
		
		
		foreach($report_data_payment[$device_key] as $payment_code => $report_data_payment3)
		{
	
			echo "<div class='view_row'>";
				echo "<div style='width:200px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>".$counter."</font>";
					echo "<font class='view_row_content_text'>";
						echo "".$payment_code."";
					echo "</font><br>";			
				echo "</div>";
			
				echo "<div style='width:200px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Product Name</font>";
					echo "<font class='view_row_content_text'>";
						
						echo $payment_mode_text[$report_data_payment3["collection_mode"]];
						
					echo "</font><br>";			
				echo "</div>";
				
				
				echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Total Amount</font>";
					echo "<font class='view_row_content_text'>";
						echo $report_data_payment3["collection_amount"];
						$sum_payment_amount = $sum_payment_amount+ $report_data_payment3["collection_amount"];
						$sub_payment_amount = $sub_payment_amount+ $report_data_payment3["collection_amount"];
					echo "</font><br>";			
				echo "</div>";
				
					
				echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";	
				echo "</div>";
				
			echo "</div>";
			$counter++;
			
		}
		
		
		
			//sub_total
			echo "<div class='view_row'>";
				echo "<div style='width:200px;text-align:left;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>".$counter."</font>";
					echo "<font class='view_row_content_text'>";
					
					echo "</font><br>";			
				echo "</div>";
			
				echo "<div style='width:200px;text-align:right;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'></font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000><b>Sub Total</b></font>";
					echo "</font><br>";			
				echo "</div>";
			
					
				echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
					echo "<font class='view_row_content_label'>Total Amount</font>";
					echo "<font class='view_row_content_text'>";
						echo "<font color=#000 ><b>".number_format($sub_payment_amount,2,".",",")."</b>";
					echo "</font><br>";			
				echo "</div>";
				
				echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";	
				echo "</div>";
				
			echo "</div>";
			
			
			
			
			
	}


	//total
	echo "<div class='view_row'>";
		echo "<div style='width:200px;text-align:left;' class='view_row_content_object'  >";
			echo "<font class='view_row_content_label'>".$counter."</font>";
			echo "<font class='view_row_content_text'>";
				echo "<font color=#3498DB size=3><b>Total Collection</b></font>";
			echo "</font><br>";			
		echo "</div>";
	
		echo "<div style='width:200px;text-align:right;' class='view_row_content_object'  >";
			echo "<font class='view_row_content_label'></font>";
			echo "<font class='view_row_content_text'>";
			echo "</font><br>";			
		echo "</div>";
	
		echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
			echo "<font class='view_row_content_label'>Total Amount</font>";
			echo "<font class='view_row_content_text'>";
				echo "<font color=#3498DB size=3 ><b>".number_format($sum_payment_amount,2,".",",")."</b>";
			echo "</font><br>";			
		echo "</div>";
		
		echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";	
		echo "</div>";
		
	echo "</div>";
	
echo "</div>";



echo "<br>&nbsp;<br>&nbsp;";
echo "<br>&nbsp;<br>&nbsp;";







echo "<br>&nbsp;<br>&nbsp;";
echo "<br>&nbsp;<br>&nbsp;";



echo "<br>&nbsp;<br>&nbsp;";
echo "<br>&nbsp;<br>&nbsp;";
echo "<br>&nbsp;<br>&nbsp;";

    echo "</section>";





?>
<?php include "../../includes/end_ajax.php";?>
