File "verifyOrder.php"
Full Path: /home/krishnamexports/public_html/panel/vendors/iconfonts/mdi/fonts/verifyOrder.php
File size: 1.13 KB
MIME-type: text/x-php; charset=us-ascii
Charset: utf-8
<?php
session_start();
include('../../config/database.php');
$orderId = $_POST['orderId'];
$receiptId = $_POST['receiptId'];
$distributorid = $_POST['distributorid'];
$receive_amount = $_POST['receive_amount'];
$receive_date = date('y-m-d',strtotime($_POST['receive_date']));
$orderRemark = mysqli_real_escape_string($cn,$_POST['orderRemark']);
if(!empty($orderId) || !empty($receiptId))
{
if($orderId>0)
{
mysqli_query($cn,"update `tbl_order` SET `verify_status`=1, `verify_remark`='$orderRemark' where `order_id`='$orderId'");
}
else
{
mysqli_query($cn,"update `tbl_order` SET `verify_status`=1, `verify_remark`='$orderRemark' where `receipt_id`='$receiptId'");
}
if($receive_amount>0)
{
mysqli_query($cn,"insert into `tbl_payment` SET `distributor_id`='".$distributorid."', `order_id`='".$orderId."',`amount`='".$receive_amount."', `receive_date`='".$receive_date."', `remark`='".$orderRemark."', `added_by`='".$_SESSION['harsh_id']."', `date`=Now();");
}
}
$arr = array("status"=>1, 'SuccessMsg'=>"Order Verify SuccessFully");
echo json_encode($arr);
?>