<?php
header ("Content-Type:text/xml");
include "start.php";
echo "<psync>";
//---------------------------------------------------------------------------------------------------------
  
//===========================customer================================================  
           
                               
  
    $query_sync="INSERT INTO
                    t_".$key_table_prefix."_customer
                    (
                    cus_code,
                    cus_name,
                    
                    cus_gst_no,
                    cus_discount_percentage,
                    
                    cus_address_billing,
                    cus_address_delivery,
                    
                    cus_status,
                    
                    created_date,
                    modified_date,
                    
                    client_id
                    )
                    VALUES
                    (
                    '".$_REQUEST["code"]."',
                    '".$_REQUEST["name"]."',
                    
                    '".$_REQUEST["gst_no"]."',
                    '".$_REQUEST["discount_percentage"]."',
                    
                    '".$_REQUEST["address_billing"]."',
                    '".$_REQUEST["address_delivery"]."',
                    
                    '".$_REQUEST["status"]."',
                    
                    '".$_REQUEST["created_date"]."',
                    '".$_REQUEST["modified_date"]."',
                    
                    '".$client_id."'
                    )
                    ON DUPLICATE KEY UPDATE
                    cus_name = '".$_REQUEST["name"]."',
                    
                    cus_gst_no = '".$_REQUEST["gst_no"]."',
                    cus_discount_percentage = '".$_REQUEST["discount_percentage"]."',
                    
                    cus_address_billing = '".$_REQUEST["address_billing"]."',
                    cus_address_delivery = '".$_REQUEST["address_delivery"]."',
                    
                    cus_status = '".$_REQUEST["status"]."',

                    created_date = '".$_REQUEST["created_date"]."',
                    modified_date = '".$_REQUEST["modified_date"]."'
                    
                    ;
                    ";
    $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>";
?>