Zoho Sync Alert message implemnt : ps
This commit is contained in:
parent
e553266dd3
commit
47d87e7911
@ -541,10 +541,17 @@ class quality extends BaseController
|
|||||||
function zohobooks_api_fetch_all(){
|
function zohobooks_api_fetch_all(){
|
||||||
|
|
||||||
//echo 'scuess';die();
|
//echo 'scuess';die();
|
||||||
log_message('error'," ***ZOHO***");
|
log_message('error'," ***Syncing with zoho books...***");
|
||||||
if (isset($_POST['sync']))
|
if (isset($_POST['sync']))
|
||||||
{
|
{
|
||||||
$con = new mysqli($this->db->hostname,$this->db->username,$this->db->password,$this->db->database);
|
try
|
||||||
|
{
|
||||||
|
$con = new mysqli($this->db->hostname,$this->db->username,$this->db->password,$this->db->database);
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
echo 'Message: ' .$e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
$ch=curl_init();
|
$ch=curl_init();
|
||||||
|
|
||||||
@ -838,8 +845,7 @@ class quality extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
echo 'new invoice inserted count- '. $insert_count . '/'.'cancelled status updated count - ' . $update_count;
|
echo json_encode(array('new_invoices' => $insert_count,'cancel_status_updated' => $update_count,'from_date' => $date_yesterday,'to_date'=> $date_today));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -156,16 +156,15 @@ function synczohobooks(){
|
|||||||
success:function(data){
|
success:function(data){
|
||||||
|
|
||||||
|
|
||||||
|
var msg = "From date :"+ data.from_date+"\n"+"To Date : "+data.to_date+"\n"+"New Invoices : "+data.new_invoices+"\n"+"Cancelled status Updated Invoice :"+data.cancel_status_updated;
|
||||||
|
alert(msg);
|
||||||
|
|
||||||
|
// alert("Sync Completed");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
alert("Sync Completed");
|
|
||||||
// alert(data.invoice);
|
// alert(data.invoice);
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
failure:function(data){alert("Failed \n "+data);},
|
||||||
complete: function(){
|
complete: function(){
|
||||||
$('#loader_wrapper').css("display", "none");
|
$('#loader_wrapper').css("display", "none");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user