diff --git a/application/controllers/quality.php b/application/controllers/quality.php index 0e8eb4b8..8517b088 100644 --- a/application/controllers/quality.php +++ b/application/controllers/quality.php @@ -544,14 +544,9 @@ class quality extends BaseController log_message('error'," ***Syncing with zoho books...***"); if (isset($_POST['sync'])) { - 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(); @@ -845,7 +840,7 @@ class quality extends BaseController } - echo json_encode(array('new_invoices' => $insert_count,'cancel_status_updated' => $update_count,'from_date' => $date_yesterday,'to_date'=> $date_today)); + echo 'new invoice inserted count- '. $insert_count . '/'.'cancelled status updated count - ' . $update_count; } diff --git a/application/views/reportmasterlist.php b/application/views/reportmasterlist.php index 86f0785e..1e3350d6 100644 --- a/application/views/reportmasterlist.php +++ b/application/views/reportmasterlist.php @@ -155,16 +155,12 @@ function synczohobooks(){ 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); }, - failure:function(data){alert("Failed \n "+data);}, + complete: function(){ $('#loader_wrapper').css("display", "none"); }