Current File : /home/inlingua/public_html/dwarka/icentex/syncapi/invoice_main_api.php |
<?php
//echo file_get_contents("php://input");
$data = json_decode(file_get_contents("php://input"));
//echo isset($data->brn)?$data->brn:"";
//echo json_encode($data);
$recno = isset($data->RecNo)?$data->RecNo:"";
$invoiceno = isset($data->InvoiceNo)?$data->InvoiceNo:"";
$centre= isset($data->Centre)?$data->Centre:"";
$studentid= isset($data->StudentId)?$data->StudentId:"";
$studentname = isset($data->StudentName)?$data->StudentName:"";
$studentaddress = isset($data->StudentAddress)?$data->StudentAddress:"";
$receivedby= isset($data->ReceivedBy)?$data->ReceivedBy:"";
$paymentdetails= isset($data->PaymentDetails)?$data->PaymentDetails:"";
$amount= isset($data->Amount)?$data->Amount:"";
$taxper=isset($data->TaxPer)?$data->TaxPer:0;
$taxvalue=isset($data->TaxValue)?$data->TaxValue:0;
$discountper=isset($data->DiscountPer)?$data->DiscountPer:0;
$discountvalue=isset($data->DiscountValue)?$data->DiscountValue:0;
$finalamount=isset($data->FinalAmount)?$data->FinalAmount:0;
$createdby=isset($data->CreatedBy)?$data->CreatedBy:0;
$createdate=isset($data->CreateDate)?$data->CreateDate:0;
$modifydate=isset($data->ModifyDate)?$data->ModifyDate:0;
$statusdelete=isset($data->StatusDelete)?$data->StatusDelete:0;
$refundamount=isset($data->RefundedAmount)?$data->RefundedAmount:0;
$refunddetails=isset($data->RefundedDetails)?$data->RefundedDetails:0;
$refundedby=isset($data->RefundedBy)?$data->RefundedBy:0;
$refundeddate=isset($data->RefundedDate)?$data->RefundedDate:0;
$data=isset($data->Type)?$data->Type:0;
//new columns adding for sync on 2nd march 2016
//$recno=isset($data->RecNo)?$data->RecNo:"";
//move_uploaded_file($_FILES['f']['tmp_name'],"move/".$_FILES['f']['name']);
//$con = mysqli_connect("localhost","admin_inlingua","K9yhs4@9","delhi_inling");
//March 26 2019
$con = mysqli_connect("localhost","admin_inlingua","igqd!0s6fNw8SUwm","delhi_inling");
//$con = mysqli_connect("localhost","inling_forlocal","Vk4M2}%)h}~r","inling_forsync") ;
if(trim($refno)!=='')
{
$qry="INSERT INTO ingl_invoice_main(recNo,invoice_no,centre,student_id,student_name,student_address,received_by,payment_details,amount,tax_per,
tax_value,discount_per,discount_value,final_amount,createdBy,createDate,modifyDate,status_delete,refunded_amount,refunded_details,refunded_by,refunded_date,type, isSynced) values ('$recno','$invoiceno','$centre','$studentid','$studentname','$studentaddress','$receivedby','$paymentdetails','$amount','$taxper','$taxvalue','$discountper','$discountvalue','$finalamount','$createdby','$createdate','$modifydate','$statusdelete','$refundamount','$refunddetails','$refundedby','$refundeddate','$date',0)";
//echo $qry;
$result = mysqli_query($con,$qry);
}
echo $result;
//echo "Your Record Added Sucessfully".$result;
?>