<?php


$array_cols2=array(id_col,domain,invoice_type,package_type,domain_type,customer_id,ref_no,amount,amount_pending,note,'col4');

$tdsettings2=array(
	'table'=>master,
	'id_col'=>id_col,
	'ref_value'=>routine_web_invoice_alias,
	'where_col'=>id_col,
	'fields_array'=>$array_cols2,
	'where_value'=>$id,
	'echo'=>'0',
	'status_vaue'=>'Active',
	'order'=>'DESC',
	'type'=>'wherecol_ref_status');

$tdload2=db_fetch($tdsettings2);

foreach($tdload2 as $td_item2){

$domain_name=$td_item2[domain];
$invoice_type=$td_item2[service_type];
$customer_id=$td_item2[customer_id];
$ref_no=$td_item2[ref_no];
$amount=$td_item2[amount];
$amount_pending=$td_item2[amount_pending];
$discount_rate1=$td_item2['col4'];
$note=$td_item2[note];

}


$invoice_title=db_ref(sub_table,id_col,$invoice_type,sub_table_title);
$phase_title=db_ref(sub_table,id_col,$phase_type,sub_table_title);

$array_cols=array(id_col,company,person,address,city,country);

$tdsettings=array(
	'table'=>master,
	'id_col'=>id_col,
	'ref_value'=>routine_customer_alias,
	'where_col'=>id_col,
	'fields_array'=>$array_cols,
	'where_value'=>$customer_id,
	'echo'=>'0',
	'status_vaue'=>'Active',
	'order'=>'DESC',
	'type'=>'wherecol_ref_status');

$tdload=db_fetch($tdsettings);

foreach($tdload as $td_item){
	
$person_name=strtoupper($td_item[person]);	
$company_name=strtoupper($td_item[company]);	
$address=strtoupper($td_item[address]);	
$city_name=$td_item[city];
$country=$td_item[country];
	
}

$city_name=strtoupper($city_name);
$country=strtoupper($country);

$dated1=date("l F j, Y");
$dte = strtotime("+7 day");
$dated2= date("l F j, Y", $dte);



//$tax_note="*5 % General Sales Tax apllies to all purchases.";
$discount_rate=$discount_rate1/100;

?>