| Server IP : 104.21.37.246 / Your IP : 172.71.28.145 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home2/cp648411/public_html/ilawasia.onnud20.com/Invoice/ |
Upload File : |
<?php
$ck='not';
include("../include/checkLogin.php");
include("../include/class.php");
include("../include/table_name.php");
$date_year = date("Y");
$date_month = date("m");
require_once("../class/coreClass.php");
$core_db = new coreClass;
$dateC = $util_class->date_chang_1($_POST["CreateDateTime"]);
//echo $dateC;
/*
echo "<pre>";
print_r($_POST);
echo "</pre>";
exit();
echo "<pre>";
print_r($_SESSION);
echo "</pre>";
echo "<pre>";
print_r($_FILES['File']);
echo "</pre>";
*/
if(@$_POST['IsExcludeVat']!=1){
$GenDoc = 3;
}else{
$GenDoc = $_POST['IsExcludeVat'];
}
$GenInvoiceFormatNumber = $core_db->GenInvoiceFormatNumber($GenDoc,$isUpdate = "true");
$GenInvoiceFormatNumber = $GenInvoiceFormatNumber['gdn'];
if(@$_POST['IsCo']==1){
$GenInvoiceFormatNumber = $GenInvoiceFormatNumber ."CO";
}
$sql_1 = array('table'=>$name_table12,'where'=>"InvoiceId = '".@$_POST["Id"]."'");
$view_sql_1 = $view_db->view($sql_1);
$row_1 = $view_db->q($view_sql_1);
$InvoiceId = @$_POST["Id"];
$oldQuotationId =$row_1['QuotationId'];
$BillDetail = trim(@$_POST['BillDetail']);
$Lbilling = @$_POST['Lbilling'];
$list = array(
'table'=>$name_table12,
'InvoiceId'=>@$_POST["Id"],
'InvoiceNo'=>@$_POST["InvoiceNo"],
'QuotationId'=>@$_POST["QuotationId"],
'CustomerId'=>@$_POST["CustomerId"],
'Vat'=>@$_POST["Vat"],
'Tax'=>@$_POST["Tax"],
'BillDetail'=>@$BillDetail,
'Lbilling'=>@$Lbilling,
'Status'=>@$_POST["Status"],
'IsWitholdingTax'=>@$_POST["IsWitholdingTax"],
'UpdateDateTime'=>@$dateC,
'UpdateBy'=>@$_SESSION["UserInfo"][0]['UserId'],
'ResponseId'=>@$_POST['ResponseId'],
);
$add = $actiondata_db->edit_db($list);
if(@$add['suc']==1){
$_SESSION["Success"] = "Update Invoice Successful.";
echo "<script>window.location.href='Edit.php?Id=".$InvoiceId."&Type=Edit'</script>";
}else{
$_SESSION["Error"] = "false";
echo "<script>window.location.href='index.php'</script>";
}
?>