<?php
header ("Content-Type:text/xml");
include "start.php";
echo "<psync>";
//---------------------------------------------------------------------------------------------------------
  
//===========================Product================================================  
  
  
  
    $query_sync="INSERT INTO
                    t_".$key_table_prefix."_invoice_item_addon
                    (
					
					
			 		ivd_ivd_id,
					ivd_ivi_id,
					ivd_header_id,
					device_id, 
					
			 		ivd_doc_no ,
			 		ivd_addon_code, 
			 		
			 		ivd_addon_name,
			 		ivd_price,  
			 		ivd_cost, 
			 		ivd_quantity,
			 		ivd_uom,
					ivd_total_amount,  
			 		
					created_date ,					
					modified_date ,
					client_id 
                    )
                    VALUES
                    (
	                    
					'".$_REQUEST["ivd_id"]."',
					'".$_REQUEST["ivd_ivi_id"]."',
					'".$_REQUEST["ivd_header_id"]."',
					'".$_REQUEST["device_id"]."', 
					
			 		'".$_REQUEST["ivd_doc_no"]."' ,
			 		'".$_REQUEST["ivd_addon_code"]."', 
			 		'".$_REQUEST["ivd_addon_name"]."',
			 		
					'".$_REQUEST["ivd_price"]."',  
			 		'".$_REQUEST["ivd_cost"]."', 
			 		'".$_REQUEST["ivd_quantity"]."',
			 		'".$_REQUEST["ivd_uom"]."',
					
			 		
					
					
			 		'".$_REQUEST["ivd_total_amount"]."',  
			 		
					'".$_REQUEST["created_date"]."' ,					
					'".$_REQUEST["modified_date"]."' ,
					'".$client_id."' 
					
                    )
                    ON DUPLICATE KEY UPDATE
				
					ivd_ivi_id ='".$_REQUEST["ivd_ivi_id"]."',
					ivd_header_id ='".$_REQUEST["ivd_header_id"]."',
					ivd_doc_no ='".$_REQUEST["ivd_doc_no"]."',
					ivd_addon_code='".$_REQUEST["ivd_addon_code"]."', 
					
					ivd_addon_name='".$_REQUEST["ivd_addon_name"]."',

					ivd_price='".$_REQUEST["ivd_price"]."',  
					ivd_cost='".$_REQUEST["ivd_cost"]."', 
					ivd_quantity='".$_REQUEST["ivd_quantity"]."',
					ivd_uom='".$_REQUEST["ivd_uom"]."',
					
					
					ivd_total_amount='".$_REQUEST["ivd_total_amount"]."',  
					created_date ='".$_REQUEST["created_date"]."',					
					modified_date ='".$_REQUEST["modified_date"]."',
					client_id = '".$client_id."' 
					
                    ;
                    ";
    $result_sync = mysqli_query($dbconn,$query_sync) or die("Error ".mysqli_error($dbconn));
    
               
			
			
			
			
			                     
echo "<upload>
";
echo "<status>SUCCESS</status>
";
echo "<message>".str_replace("&","&amp;","Upload Successful")."</message>
";
echo "</upload>
";

         


//---------------------------------------------------------------------------------------------------------
echo "</psync>";
?>