whoami7 - Manager
:
/
home
/
papecmvm
/
public_html
/
documents
/
6204_Rajpara
/
2020
/
k_november
/
receipt
/
Upload File:
files >> /home/papecmvm/public_html/documents/6204_Rajpara/2020/k_november/receipt/controllers.tar
admin/Mediamanagement.php 0000644 00000013204 14642254377 0011437 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ob_start(); error_reporting(0); class Mediamanagement extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('alldata','model'); } public function index() { $data['view']=$this->model->getDatamodel('tblmedia'); $this->load->view("media/media_view",$data); } public function add() { $config['upload_path'] = './uploads/'; $config['allowed_types'] = '*'; $this->upload->initialize($config); $count = count($_FILES['mediafile']['size']); //echo $count; die; //foreach ($_FILES as $key => $value) { for ($s = 0; $s <= $count - 1; $s++) { $path_parts = pathinfo($_FILES['mediafile']['name'][$s]); $extension = $path_parts['extension']; //echo $extension; die; if ($extension != 'jpg' && $extension != 'png' && $extension != 'jpeg' && $extension != 'JPG' && $extension != 'pdf' && $extension != 'gif' && $extension != 'doc' && $extension != 'xlsx' && $extension != 'ppt') { //error $this->session->set_flashdata('msg', '<div class="alert alert-dismissible" role="alert" style="color: #a94442;background-color: #f2dede;border-color: #ebccd1;"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button><strong>Error : </strong> Something went wrong...!</div>'); redirect('admin/mediamanagement', 'refresh'); } else { $_FILES['userfile']['name'] = $_FILES['mediafile']['name'][$s]; $_FILES['userfile']['type'] = $_FILES['mediafile']['type'][$s]; $_FILES['userfile']['tmp_name'] = $_FILES['mediafile']['tmp_name'][$s]; $_FILES['userfile']['error'] = $_FILES['mediafile']['error'][$s]; $_FILES['userfile']['size'] = $_FILES['mediafile']['size'][$s]; $this->load->library('upload', $config); $this->upload->do_upload(); $data = $this->upload->data(); $filename = 'uploads/' . $data['file_name']; $insertdata = array('file_name' => $data['file_name'], 'file_path' => $filename, 'filetype' => strtolower($data['file_ext'])); $this->model->insertData('tblmedia', $insertdata); } } redirect('admin/mediamanagement', 'refresh'); //} } public function add_old() { echo "<pre>"; $config['upload_path'] = './uploads/'; $config['allowed_types'] = '*'; $this->upload->initialize($config); $count = count($_FILES['mediafile']['size']); foreach($_FILES as $key=>$value) for($s=0; $s<=$count-1; $s++) { $path_parts = pathinfo($value['name'][$s]); $extension = $path_parts['extension']; //echo $extension; die; if($extension != 'jpg' && $extension != 'png' && $extension != 'jpeg' && $extension != 'pdf' && $extension != 'gif' && $extension != 'doc' && $extension != 'xlsx' && $extension != 'ppt'){ //error $this->session->set_flashdata('msg', '<div class="alert alert-dismissible" role="alert" style="color: #a94442;background-color: #f2dede;border-color: #ebccd1;"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button><strong>Error : </strong> Something went wrong...!</div>'); redirect('admin/mediamanagement','refresh'); }else{ $_FILES['userfile']['name']=$value['name'][$s]; $_FILES['userfile']['type'] = $value['type'][$s]; $_FILES['userfile']['tmp_name'] = $value['tmp_name'][$s]; $_FILES['userfile']['error'] = $value['error'][$s]; $_FILES['userfile']['size'] = $value['size'][$s]; $this->load->library('upload', $config); $this->upload->do_upload(); $data = $this->upload->data(); $filename ='uploads/'.$data['file_name']; $insertdata=array('file_name' =>$data['file_name'] , 'file_path'=>$filename,'filetype'=>strtolower($data['file_ext'])); $this->model->insertData('tblmedia',$insertdata); } redirect('admin/mediamanagement','refresh'); } } public function deleteimageselected() { $ids=explode('&',$this->input->post('ck')); for ($i=0; $i < count($ids); $i++) { $id=explode('=',$ids[$i]); $where=array('tblmedia_id'=>$id[1]); $getbanner=$this->model->DetailData('tblmedia',$where); unlink($getbanner[0]['file_path']); $this->model->DeleteData('tblmedia',$where); } /* $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> File Data successfully Delete. </div>'); */ redirect('admin/mediamanagement'); } public function openmodel($id) { $where=array('tblmedia_id'=>$id); $data['view']=$this->model->DetailData('tblmedia',$where); $this->load->view("media/model_view",$data); } public function update(){ $where= array('tblmedia_id' => $this->input->post('id')); $insertdata=array('main_text' =>$this->input->post('main'), 'sub_text'=>$this->input->post('sub')); $this->model->UpdateData('tblmedia',$insertdata,$where); redirect('admin/mediamanagement'); } } admin/Portfoliocategory.php 0000644 00000012171 14642254377 0012100 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); error_reporting(0); class Portfoliocategory extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('alldata', "model"); $session_data=$this->session->all_userdata(); if(count($session_data)==5) { redirect('admin/starlogin'); } } public function index() { $data['view']=$this->model->getDatamodel('tbl_portfolio_category'); $this->load->view("portfolio/portfolio_cat",$data); } //------ START: INSERT FUNCTION ------------------------------ public function add_portfoliocategory(){ if($this->input->post('save')=='save'){ $rand=rand(1000,9999); $title=$this->input->post('portfolio_cat_name'); $pagecode =str_replace(' ', '-', $title).rand(999,9999); $insertdata= array( 'portfolio_cat_name'=>$this->input->post('portfolio_cat_name'), 'portfolio_code'=>$pagecode, ); $this->form_validation->set_rules('portfolio_cat_name', 'portfolio_cat_name', 'required|xss_clean|regex_match[/^[^\`\~\@\#\$\%\^\*\[\]\{\}\;:<>=+"]+$/]'); if ($this->form_validation->run() == TRUE) { $this->model->insertData('tbl_portfolio_category',$insertdata); } /* $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Insert data successfully . </div>'); */ redirect('admin/portfoliocategory'); }else{ $this->load->view("portfolio/portfolio_cat_add"); } } //------ END: INSERT FUNCTION ------------------------------ //------ START: EDIT FUNCTION ------------------------------ public function edit_portfoliocategory($encrypted_string){ $id = $this->model->decryptdata($encrypted_string); $where=array('portfolio_cat_id'=>$id); if($this->input->post('save')=='save'){ $rand=rand(1000,9999); $title=$this->input->post('portfolio_cat_name'); $pagecode =str_replace(' ', '-', $title).rand(999,9999); $Updatedata=array( 'portfolio_cat_name'=>$this->input->post('portfolio_cat_name'), 'portfolio_code'=>$pagecode, ); $this->form_validation->set_rules('portfolio_cat_name', 'portfolio_cat_name', 'required|xss_clean|regex_match[/^[^\`\~\@\#\$\%\^\*\[\]\{\}\;:<>=+"]+$/]'); if ($this->form_validation->run() == TRUE) { $this->model->UpdateData('tbl_portfolio_category',$Updatedata,$where); } /* $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Update data successfully . </div>'); */ redirect('admin/portfoliocategory'); }else{ $data['view']=$this->model->DetailData('tbl_portfolio_category',$where); $this->load->view("portfolio/portfolio_cat_add",$data); } } //------ END: EDIT FUNCTION ------------------------------ //------ START: DELETE FUNCTION ------------------------------ public function delete_portfoliocategory(){ $ids = explode('&',$this->input->post('ck')); $n=count($ids); for($i=0;$i<$n;$i++) { $id=explode('=',$ids[$i]); $where=array('portfolio_cat_id'=>$id[1]); $getimages=$this->model->DetailData('tbl_portfolio',$where); for($j=0;$j<count($getimages);$j++) { //echo $getimages[$j]['portfolio_image_path']."<br/>"; unlink("portfolio_images/".$getimages[$j]['portfolio_image_path']); } $this->model->DeleteData('tbl_portfolio_category',$where); } /* $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Delete data successfully . </div>'); */ redirect('admin/portfoliocategory'); } //------ END: DELETE FUNCTION ------------------------------- } /* End of file services.php */ admin/Portfolio.php 0000644 00000022316 14642254400 0010327 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ob_start(); error_reporting(0); class Portfolio extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('alldata', "model"); $session_data=$this->session->all_userdata(); if(count($session_data)==5) { redirect('admin/starlogin'); } } public function index() { $data['view']=$this->model->portfolio_model(); $this->load->view("portfolio/portfolio",$data); } //------ START: INSERT FUNCTION ------------------------------ public function add_portfolio(){ $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; if($this->input->post('save')=='save'){ //echo $this->input->post('port_sub_cat'); die; $path_parts = pathinfo($_FILES["image_name"]["name"]); //echo $extension; die; /*if($extension != 'jpg' && $extension != 'png' && $extension != 'jpeg' && $extension != 'gif'){ //error $this->session->set_flashdata('msg', '<div class="alert alert-dismissible" role="alert" style="color: #a94442;background-color: #f2dede;border-color: #ebccd1;"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button><strong>Error : </strong> Something went wrong...!</div>'); redirect('admin/portfolio'); }else{ */ //---------------- STRAT: UPLOAD IMAGE ------------------- $filenm=$_FILES["image_name"]["name"]; if($filenm!=""){ $config['upload_path'] ='./portfolio_images/'; // folder name where you wnat to upload the image // $config['allowed_types'] = 'gif|jpg|png|jpeg'; $this->upload->initialize($config); if (!$this->upload->do_upload('image_name')){ $error = array('error' => $this->upload->display_errors()); } else { $data = array('upload_data' => $this->upload->data()); $image_name=$data['upload_data']['file_name']; } } else{ $image_name=""; } //---------------- END : UPLOAD IMAGE -------------------- //echo $this->input->post('portfolio_name'); die; $insertdata= array( 'portfolio_name'=>$this->input->post('portfolio_name'), 'prot_desc'=>$this->input->post('portfolio_Desc'), 'portfolio_cat_id'=>$this->input->post('portfolio_cat_id'), 'port_sub_cat'=>$this->input->post('port_sub_cat'), 'portfolio_image_path'=>$image_name, 'banner_id'=>$this->input->post('banner_id'), 'portfolio_video_path'=>$this->input->post('portfolio_video_path'), 'portfolio_link'=>$this->input->post('portfolio_link') ); $this->form_validation->set_rules('portfolio_name', 'portfolio_name', 'required|xss_clean|regex_match[/^[^\`\~\@\#\$\%\^\*\[\]\{\}\;:<>=+"]+$/]'); if ($this->form_validation->run() == TRUE) { $this->model->insertData($lang.'tbl_portfolio',$insertdata); } else{ echo 'error'; die; } /* $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Insert data successfully . </div>'); */ redirect('admin/portfolio'); //} }else{ $data['bannergrid']=$this->model->getDatamodel('tblbanners'); $data['portfolio_category']=$this->model->getDatamodel('tbl_portfolio_category'); $this->load->view("portfolio/portfolio_add",$data); } } //------ END: INSERT FUNCTION ------------------------------ //------ START: EDIT FUNCTION ------------------------------ public function edit_portfolio($encrypted_string){ $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; $id = $this->model->decryptdata($encrypted_string); $where=array('portfolio_id'=>$id); if($this->input->post('save')=='save'){ //$where=array('portfolio_id'=>$id); //---------------- STRAT: UPLOAD IMAGE ------------------- $hidden_photo= $this->input->post("hidden_photo"); $newfile=$_FILES["image_name"]["name"]; if($newfile!=""){ //---- Unlink image ------ if (file_exists("./portfolio_images/".$hidden_photo)){ // file_exists : chk if file is exist or not unlink("portfolio_images/".$hidden_photo); // unlink image } $config['upload_path'] ='./portfolio_images/'; // folder name where you wnat to upload the image // $config['allowed_types'] = 'gif|jpg|png|jpeg'; $this->upload->initialize($config); if (!$this->upload->do_upload('image_name')){ $error = array('error' => $this->upload->display_errors()); } else { $data = array('upload_data' => $this->upload->data()); $image_name=$data['upload_data']['file_name']; } }else{ $image_name=$hidden_photo; } //---------------- END : UPLOAD IMAGE -------------------- $Updatedata=array( 'portfolio_name'=>$this->input->post('portfolio_name'), 'prot_desc'=>$this->input->post('portfolio_Desc'), 'portfolio_cat_id'=>$this->input->post('portfolio_cat_id'), 'port_sub_cat'=>$this->input->post('port_sub_cat'), 'portfolio_image_path'=>$image_name, 'portfolio_video_path'=>$this->input->post('portfolio_video_path'), 'portfolio_link'=>$this->input->post('portfolio_link') ); // echo "<pre>"; //print_r($Updatedata); //die; $this->model->UpdateData($lang.'tbl_portfolio',$Updatedata,$where); /* $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Update data successfully . </div>'); */ redirect('admin/portfolio'); }else{ $data['bannergrid']=$this->model->getDatamodel('tblbanners'); $data['portfolio_category']=$this->model->getDatamodel('tbl_portfolio_category'); $data['sub_cat']=$this->model->getDatamodel('tbl_port_sub_cat'); $data['view']=$this->model->DetailData($lang.'tbl_portfolio',$where); $this->load->view("portfolio/portfolio_add",$data); } } public function subfun($id){ $inv=$this->input->post('inv'); $where=array('pid'=>$id); $sub=$this->model->DetailData('tbl_port_sub_cat',$where); echo ' <option value=""> --SELECT-- </option>'; foreach($sub as $key){ if($inv!="" && $inv==$key['ven_inv_num']){ echo '<option value="'.$key['psid'].'" selected>'.$key['ps_name'].'</option>'; }else{ echo '<option value="'.$key['psid'].'">'.$key['ps_name'].'</option>'; } } } //------ END: EDIT FUNCTION ------------------------------ //------ START: DELETE FUNCTION ------------------------------ public function delete_portfolio(){ $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; $ids=explode('&',$this->input->post('ck')); $n=count($ids); for($i=0;$i<$n;$i++) { $id=explode('=',$ids[$i]); $where=array('portfolio_id'=>$id[1]); //---------- UNLINK IMAGE ----------------------- $getimages=$this->model->DetailData('tbl_portfolio',$where); unlink("portfolio_images/".$getimages[$i]['portfolio_image_path']); //---------- UNLINK IMAGE ----------------------- $this->model->DeleteData($lang.'tbl_portfolio',$where); } /* $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Delete data successfully . </div>'); */ redirect('admin/portfolio'); } //------ END: DELETE FUNCTION ------------------------------- } /* End of file services.php */ admin/Starlogin.php 0000644 00000004774 14642254400 0010324 0 ustar 00 <?php error_reporting(0); class Starlogin extends CI_Controller{ function __construct() { parent:: __construct(); $this->load->model('login_model'); } public function index(){ $this->load->view("login_view"); } /*public function checkLogin(){ $code = $this->input->post('code'); $rcode = $this->input->post('rcode'); if($code != $rcode){ $this->load->view("login_view"); }else{ $pass=md5($this->input->post("password")); $this->db ->where("username", $this->input->post("username")); $this->db->where("password",$pass); $this->db->where("status", 'active'); $query=$this->db->get("tblusers"); $logindata=$query->result_array(); if($query->num_rows() == 1){ $this->session->set_userdata('userinfo', $logindata); $this->session->set_userdata('lang', ''); $this->session->set_userdata('themecolor', 'skin-green'); $session_data=$this->session->all_userdata(); //echo '<pre>'; print_r($session_data); die; redirect("admin/welcome"); }else{ $this->load->view("login_view"); } } }*/ public function checkLogin(){ $this->form_validation->set_rules("username", "Username", "trim|required"); $this->form_validation->set_rules("password", "Password", "trim|required|callback_checkForPassword"); $this->form_validation->set_rules("captcha", "Code", "trim|required|callback_checkForcaptch"); if ($this->form_validation->run() == FALSE) { $this->load->view("login_view"); }else{ redirect("admin/welcome"); } } public function checkForPassword(){ // custome call back function $password=$this->login_model->chkLogin(); if($password){ return TRUE; }else{ $this->form_validation->set_message("checkForPassword", "Invalid Username OR Password"); return FALSE; } } public function checkForcaptch(){ // custome call back function $captcha=md5($this->input->post('captcha')); $sessioncaptcha=$_SESSION['ramdom']; if($captcha==$sessioncaptcha){ return TRUE; }else{ $this->form_validation->set_message("checkForcaptch", "Please enter valid code."); return FALSE; } } function captchaImg() { $this->load->model('alldata','captcha'); $captcha = $this->captcha->Captchaimage(); return $captchaImg; } } admin/Bannersmanagement.php 0000644 00000013233 14642254400 0011775 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ob_start(); error_reporting(0); class Bannersmanagement extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('alldata','model'); } public function index() { // $data['view']=$this->model->getDatamodel('tblbanners'); $this->db->select('*'); $this->db->from('tblbanners'); $this->db->join('tblusers', 'tblbanners.b_user_id = tblusers.uid','left'); $data['view'] = $this->db->get()->result_array(); $this->load->view("banners/banner_view",$data); } public function addbanner() { if($this->input->post('save')=='save') { $names= implode('|', $this->input->post('imageview')); $session_data=$this->session->all_userdata(); $insertdata=array('banner_title'=>$this->input->post('banner'), 'banner_images'=>$names, 'b_user_id'=>$session_data['userinfo'][0]['uid'] ); $this->form_validation->set_rules('banner', 'banner', 'required|xss_clean|regex_match[/[^\`\~\@\#\$\%\^\*\[\]\{\}\;:<>=+"]+$/]'); if ($this->form_validation->run() == TRUE) { $this->model->insertData('tblbanners',$insertdata); } /* $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Banner Data successfully Insert. </div>'); */ redirect('admin/bannersmanagement'); } else { $names = array('.png', '.jpg', '.gif','.jpeg'); $this->db->where_in('filetype', $names); $data['image']=$this->db->get('tblmedia')->result_array(); $this->load->view("banners/banner_add",$data); } } public function editBannerData($encrypted_string) { $id = $this->model->decryptdata($encrypted_string); $where=array('banner_id'=>$id); if($this->input->post('save')=='save') { $names= implode('|', $this->input->post('imageview')); $session_data=$this->session->all_userdata(); $updatedata=array('banner_title'=>$this->input->post('banner'), 'banner_images'=>$names, 'b_user_id'=>$session_data['userinfo'][0]['uid'], 'modified_time'=>date('Y-m-d h:m:s') ); $this->form_validation->set_rules('banner', 'banner', 'required|xss_clean|regex_match[/[^\`\~\@\#\$\%\^\*\[\]\{\}\;:<>=+"]+$/]'); if ($this->form_validation->run() == TRUE) { $this->model->UpdateData('tblbanners',$updatedata,$where); } redirect('admin/bannersmanagement'); } else { $names = array('.png', '.jpg', '.gif','.jpeg'); $this->db->where_in('filetype', $names); $data['image']=$this->db->get('tblmedia')->result_array(); $data['view']=$this->model->DetailData('tblbanners',$where); $this->load->view("banners/banner_edit",$data); } } public function deleteBannerData($ids,$banner,$imagename) { $id = $this->model->decryptdata($ids); $where=array('banner_id'=>$id); $getbanner=$this->model->DetailData('tblbanners',$where); $imagedel=$banner.'/'.$imagename; $images=explode('|',$getbanner[0]['banner_images']); $updateimages=array(); for($i=0;$i<count($images);$i++) { if($images[$i]!=$imagedel) { $updateimages[$i]=$images[$i]; } else { unlink($images[$i]); } } $names= implode('|', $updateimages); $updatedata=array('banner_images'=>$names); $this->model->UpdateData('tblbanners',$updatedata,$where); $this->editBannerData($ids); } public function deletesliderselected() { $ids=explode('&',$this->input->post('ck')); for ($i=0; $i < count($ids); $i++) { $id=explode('=',$ids[$i]); $where=array('banner_id'=>$id[1]); $getbanner=$this->model->DetailData('tblbanners',$where); $images=explode('|',$getbanner[0]['banner_images']); for($k=0;$k<count($images);$k++) { unlink($images[$k]); } $this->model->deleteData('tblbanners',$where); } /* $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Slider Data successfully Delete. </div>'); */ redirect('admin/bannersmanagement'); } } admin/Setting.php 0000644 00000016334 14642254401 0007773 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ob_start(); class Setting extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('alldata', "model"); $session_data=$this->session->all_userdata(); if(count($session_data)==5) { redirect('admin/starlogin'); } } public function index() { $data['view']=$this->model->setting_model(); $this->load->view("setting/setting",$data); } //------ START: INSERT FUNCTION ------------------------------ public function add_setting(){ if($this->input->post('save')=='save'){ //---------------- STRAT: UPLOAD IMAGE ------------------- $filenm=$_FILES["image_name"]["name"]; if($filenm!=""){ $config['upload_path'] ='./bootstrap/images/'; // folder name where you wnat to upload the image // $config['allowed_types'] = 'gif|jpg|png|jpeg'; $this->upload->initialize($config); if (!$this->upload->do_upload('image_name')){ $error = array('error' => $this->upload->display_errors()); } else { $data = array('upload_data' => $this->upload->data()); $image_name=$data['upload_data']['file_name']; } }else{ $image_name=""; } //---------------- END : UPLOAD IMAGE -------------------- $insertdata= array( 'other_cat'=>$this->input->post('other_cat'), 'other_title'=>$this->input->post('other_title'), 'other_text'=>$this->input->post('other_text'), 'other_link'=>$this->input->post('other_link'), 'other_icon'=>$this->input->post('other_icon'), 'social_link'=>$this->input->post('social_link'), 'other_image'=>$image_name, 'other_position'=>$this->input->post('other_position') //'other_bgclr'=>$this->input->post('other_bgclr'), //'other_clr'=>$this->input->post('other_clr') ); $this->model->insertData('tbl_other_detail',$insertdata); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Insert data successfully . </div>'); redirect('admin/setting'); }else{ $data['pageData']=$this->model->DetailData('tblcontent',array('publish'=>'on')); $this->load->view("setting/setting_add",$data); } } //------ END: INSERT FUNCTION ------------------------------ //------ START: EDIT FUNCTION ------------------------------ public function edit_setting($encrypted_string){ $id = $this->model->decryptdata($encrypted_string); $where=array('other_id'=>$id); if($this->input->post('save')=='save'){ //---------------- STRAT: UPLOAD IMAGE ------------------- $hidden_photo= $this->input->post("hidden_photo"); $newfile=$_FILES["image_name"]["name"]; if($newfile!=""){ //---- Unlink image ------ if (file_exists("./bootstrap/images/".$hidden_photo)){ // file_exists : chk if file is exist or not unlink("bootstrap/images/".$hidden_photo); // unlink image } $config['upload_path'] ='./bootstrap/images/'; // folder name where you wnat to upload the image // $config['allowed_types'] = 'gif|jpg|png|jpeg'; $this->upload->initialize($config); if (!$this->upload->do_upload('image_name')){ $error = array('error' => $this->upload->display_errors()); } else { $data = array('upload_data' => $this->upload->data()); $image_name=$data['upload_data']['file_name']; } }else{ $image_name=$hidden_photo; } //---------------- END : UPLOAD IMAGE -------------------- $Updatedata=array( 'other_cat'=>$this->input->post('other_cat'), 'other_title'=>$this->input->post('other_title'), 'other_text'=>$this->input->post('other_text'), 'other_link'=>$this->input->post('other_link'), 'other_icon'=>$this->input->post('other_icon'), 'social_link'=>$this->input->post('social_link'), 'other_image'=>$image_name, 'other_position'=>$this->input->post('other_position') //'other_bgclr'=>$this->input->post('other_bgclr'), //'other_clr'=>$this->input->post('other_clr') ); // echo "<pre>"; //print_r($Updatedata); //die; $this->model->UpdateData('tbl_other_detail',$Updatedata,$where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Update data successfully . </div>'); redirect('admin/setting'); }else{ $data['view']=$this->model->DetailData('tbl_other_detail',$where); $data['pageData']=$this->model->DetailData('tblcontent',array('publish'=>'on')); $this->load->view("setting/setting_add",$data); } } //------ END: EDIT FUNCTION ------------------------------ //------ START: DELETE FUNCTION ------------------------------ public function delete_setting(){ $chk = $this->input->post('ck'); $n=count($chk); for($i=0;$i<$n;$i++) { $ency_id=$chk[$i]; $id = $this->model->decryptdata($ency_id); $where=array('other_id'=>$id); //---------- UNLINK IMAGE ----------------------- $getimages=$this->model->DetailData('tbl_other_detail',$where); unlink("bootstrap/images/".$getimages[$i]['other_image']); //---------- UNLINK IMAGE ----------------------- $this->model->DeleteData('tbl_other_detail',$where); } $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Delete data successfully . </div>'); redirect('admin/setting'); } //------ END: DELETE FUNCTION ------------------------------- } /* End of file services.php */ admin/Usermanagement.php 0000644 00000012215 14642254401 0011323 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); error_reporting(0); class Usermanagement extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('alldata','model'); } public function index() { $userdata['data']=$this->model->getDatamodel('tblusers'); $this->load->view("users/view_user",$userdata); } public function adduser() { if($this->input->post('save')=='save') { $pass = $this->model->generate_password(); $msg="Username ".$this->input->post('username')."\n Password ".$pass; $this->email->from('kuldeep.parmar@staroneweb.co.in', 'Kuldeep'); $this->email->to($this->input->post('email')); $this->email->subject('Email Test'); $this->email->message($msg); $this->email->send(); $insertdata=array('username'=>$this->input->post('username'), 'email'=>$this->input->post('email'), 'password'=>md5($pass), 'type'=>$this->input->post('type'), 'created_date'=>date('Y-m-d h:m:s'), 'status'=>'active' ); $this->form_validation->set_rules('username', 'username', 'required|xss_clean|regex_match[/^[a-zA-Z_ ]+$/]'); if ($this->form_validation->run() == TRUE) { $this->model->insertData('tblusers',$insertdata); } $this->index(); } else { $this->load->view("users/user_add"); } } public function editUserData($encrypted_string) { $id = $this->model->decryptdata($encrypted_string); $where=array('uid'=>$id); if($this->input->post('save')=='save') { $insertdata=array('username'=>$this->input->post('username'), 'email'=>$this->input->post('email'), 'type'=>$this->input->post('type'), ); $this->form_validation->set_rules('username', 'username', 'required|xss_clean|regex_match[/^[a-zA-Z_ ]+$/]'); if ($this->form_validation->run() == TRUE) { $this->model->UpdateData('tblusers',$insertdata,$where); } $userdata['error']=array('errormsg'=>'<div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> User Data successfully Edit. </div>'); $userdata['data']=$this->model->getDatamodel('tblusers'); $this->load->view("users/view_user",$userdata); } else { $data['view']=$this->model->DetailData('tblusers',$where); $this->load->view("users/user_add",$data); } } public function deactiveUserData($id) { //$this->usermodel->deletUser($id); $data=array('status'=>'deactive'); $id=array('uid'=>$id); $this->model->updatedata('tblusers',$data,$id); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> successfully change your Password. </div>'); $userdata['data']=$this->model->getDatamodel('tblusers'); $this->load->view("users/view_user",$userdata); } public function activeUserData($id) { //$this->usermodel->deletUser($id); $data=array('status'=>'active'); $id=array('uid'=>$id); $this->model->updatedata('tblusers',$data,$id); $userdata['error']=array('errormsg'=>'<div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> You successfully Active User. </div>'); $userdata['data']=$this->model->getDatamodel('tblusers'); $this->load->view("header"); $this->load->view("users/view_user",$userdata); $this->load->view("menu"); } public function editUserpass($id) { $data=array('password'=>md5($this->input->post('password'))); $ids=array('uid'=>$id); $conform=array('uid'=>$id,'password'=>md5($this->input->post('old'))); $getuser=$this->db->get_where('tblusers',$conform)->num_rows(); if($getuser==0){ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error! </strong> your old password is invalid. </div>'); } else{ $this->model->updatedata('tblusers',$data,$ids); $userdata['data']=$this->model->getDatamodel('tblusers'); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> successfully change Password. </div>'); } redirect('admin/welcome/changepassword'); } } admin/Welcome.php 0000644 00000005452 14642254401 0007750 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); error_reporting(0); class Welcome extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('alldata', "usermodel"); } public function index() { $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; $data['message']=$this->usermodel->getDatamodel($lang.'tblmsg'); $data['election_mode']=$this->usermodel->getDatamodel($lang.'tblposts '); //$data['job_package']=$this->usermodel->DetailData('tbl_job_package'); $this->load->view("admin_dashboard_view", $data); } public function logout() { $this->session->unset_userdata('userinfo'); redirect('admin/starlogin'); } public function changepassword() { $session_data=$this->session->all_userdata(); $where=array('uid'=>$session_data['userinfo'][0]['uid']); $data['data']=$this->usermodel->DetailData('tblusers',$where); $this->load->view("header",$data); $this->load->view("changepass"); $this->load->view("menu"); } public function changelang($pass='') { $this->session->set_userdata('lang', $pass); redirect('admin/welcome'); } public function getmessage($id) { $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; $this->form_validation->set_rules('msg', 'msg', 'required|xss_clean|regex_match[/^[^\`\~\@\#\$\%\^\*\[\]\{\}\;:<>=+"]+$/]'); if ($this->form_validation->run() == TRUE) { $where=array('tblmsg_id'=>$id); $insertdata=array('message'=>$this->input->post('msg')); $this->usermodel->UpdateData($lang.'tblmsg',$insertdata,$where); } redirect('admin/welcome'); } public function changecolor($color) { $this->session->set_userdata('themecolor', $color); redirect('admin/welcome'); } public function election_mode($id){ $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; if($id==0){$em=1;}else{$em=0;} $insertdata=array('election_mode'=>$id); $where=array('election_mode'=>$em); //$insertdata_off=array('election_mode'=>$electionmode_on); $this->usermodel->UpdateData($lang.'tblposts',$insertdata,$where); //redirect('admin/welcome'); } public function errorpage(){ show_error(); } public function document(){ $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; $this->load->view("document_view"); } } /* End of file welcome.php */ /* Location: ./application/controllers/welcome.php */ admin/Menumanagement.php 0000644 00000024225 14642254401 0011315 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ob_start(); error_reporting(0); class Menumanagement extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('alldata','model'); } public function index() { $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; $data['page']=$this->model->getDatamodel($lang.'tblcontent'); $data['menugroup']=$this->model->getDatamodel('tblmenugroup'); $this->db->order_by("menu_position", "asc"); $this->db->select('*'); $where= array('menugroup' => $data['menugroup'][0]['menugroup_id']); $this->db->where($where); $this->db->from($lang.'tblmenu'); $data['menu'] = $this->db->get()->result_array(); $this->load->view("menu/menu_view",$data); } public function menuviewload($id) { $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; $this->db->order_by("menu_position", "asc"); $this->db->select('*'); $where= array('menugroup' =>$id); $this->db->where($where); $this->db->from($lang.'tblmenu'); $data['menu'] = $this->db->get()->result_array(); $where=array('menugroup_id'=>$id); $data['menugroup']=$this->model->DetailData('tblmenugroup',$where); $this->load->view("menu/menulist",$data); } public function addgroup() { $shortcode='['.str_replace(" ",'-',$this->input->post('menugroupname')).']'; $insertdata=array('menugroupname'=>$this->input->post('menugroupname'), 'menushortcode'=>$shortcode); $this->form_validation->set_rules('menugroupname', 'menugroupname', 'required|xss_clean|regex_match[/^[a-zA-Z ]+$/]'); if ($this->form_validation->run() == TRUE) { $this->model->insertdata('tblmenugroup',$insertdata); } redirect('admin/menumanagement'); } public function deletegroup($id) { $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; $where=array('menugroup_id'=>$id); $this->model->DeleteData('tblmenugroup',$where); $where=array('menugroup'=>$id); $this->model->DeleteData($lang.'tblmenu',$where); } public function addmenu() { $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; $menugroupid=$this->input->post('menugroup'); $lable=explode(",",$this->input->post('lable')); $menu=explode(",",$this->input->post('menu')); $url=explode(",",$this->input->post('url')); $count=1; $obj = json_decode($this->input->post('postions'),true); $where = array('menugroup'=>$menugroupid); $this->model->deleteData($lang.'tblmenu',$where); for ($a=0; $a <count($obj) ; $a++)//Level One { $Insertmenu=array('menu_name'=>$menu[$count], 'menu_displayname'=>$lable[$count], 'menu_content'=>$obj[$a]['id'], 'menu_position'=>$count, 'menugroup'=>$menugroupid, 'menu_url'=>$url[$count] ); $count++; $this->model->insertData($lang.'tblmenu',$Insertmenu); if (isset($obj[$a]['children'])) { for ($b=0; $b <count($obj[$a]['children']) ; $b++) //Level Two { $Insertmenu=array('menu_name'=>$menu[$count], 'menu_displayname'=>$lable[$count], 'menu_content'=>$obj[$a]['children'][$b]['id'], 'menu_position'=>$count, 'menugroup'=>$menugroupid, 'submenu'=>$obj[$a]['id'], 'menu_url'=>$url[$count] ); $count++; $this->model->insertData($lang.'tblmenu',$Insertmenu); if (isset($obj[$a]['children'][$b]['children'])) { for ($c=0; $c <count($obj[$a]['children'][$b]['children']) ; $c++)//Level Three { $Insertmenu=array('menu_name'=>$menu[$count], 'menu_displayname'=>$lable[$count], 'menu_content'=>$obj[$a]['children'][$b]['children'][$c]['id'], 'menu_position'=>$count, 'menugroup'=>$menugroupid, 'submenu'=>$obj[$a]['children'][$b]['id'], 'menu_url'=>$url[$count] ); $count++; $this->model->insertData($lang.'tblmenu',$Insertmenu); if (isset($obj[$a]['children'][$b]['children'][$c]['children'])) { for ($d=0; $d <count($obj[$a]['children'][$b]['children'][$c]['children']) ; $d++) //Level Four { $Insertmenu=array('menu_name'=>$menu[$count], 'menu_displayname'=>$lable[$count], 'menu_content'=>$obj[$a]['children'][$b]['children'][$c]['children'][$d]['id'], 'menu_position'=>$count, 'menugroup'=>$menugroupid, 'submenu'=>$obj[$a]['children'][$b]['children'][$c]['id'], 'menu_url'=>$url[$count] ); $count++; $this->model->insertData($lang.'tblmenu',$Insertmenu); if (isset($obj[$a]['children'][$b]['children'][$c]['children'][$d]['children'])) { for ($e=0; $e <count($obj[$a]['children'][$b]['children'][$c]['children'][$d]['children']) ; $e++) //Level Five { $Insertmenu=array('menu_name'=>$menu[$count], 'menu_displayname'=>$lable[$count], 'menu_content'=>$obj[$a]['children'][$b]['children'][$c]['children'][$d]['children'][$e]['id'], 'menu_position'=>$count, 'menugroup'=>$menugroupid, 'submenu'=>$obj[$a]['children'][$b]['children'][$c]['children'][$d]['id'], 'menu_url'=>$url[$count] ); $count++; $this->model->insertData($lang.'tblmenu',$Insertmenu); }//End Level Five } }//End Level Four } } //End Level Three } } //End Level Two } }//End Level One echo ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Navigation Data successfully save. </div>'; } public function Menustu() { $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; $content['view']=array(); $data=$this->input->post('pageid'); $malestr = str_replace("pageid=", "", $data); $page=explode("&",$malestr); for ($i=0; $i <count($page) ; $i++) { $where = array('content_id' => $page[$i]); $get=$this->model->DetailData($lang.'tblcontent',$where); array_push($content['view'],$get); } $this->load->view('menu/menustucture',$content); } public function deleteMenuData($encrypted_string,$menugroup) { $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; $id =$encrypted_string; $where=array('menu_content'=>$id,'menugroup'=>$menugroup); $this->model->DeleteData($lang.'tblmenu',$where); $where=array('submenu'=>$id,'menugroup'=>$menugroup); $this->model->DeleteData($lang.'tblmenu',$where); echo ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Navigation Data successfully Deleted. </div>'; } } admin/Registration.php 0000644 00000001220 14642254402 0011015 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Registration extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('alldata','model'); } public function index() { $userdata['data']=$this->model->getDatamodel('tbl_registration'); $this->load->view("registration",$userdata); } public function view($encrypted_id) { $id = $this->model->decryptdata($encrypted_id); $where=array('rid' => $id); $userdata['data'] = $this->model->DetailData('tbl_registration', $where); $this->load->view("view_registration",$userdata); } } admin/RegisteredStudents.php 0000644 00000002316 14642254402 0012201 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class RegisteredStudents extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('alldata','model'); } public function index(){ $key['view']=$this->model->getDatamodel('tbl_students_registration'); $this->load->view("students",$key); } public function trash(){ $ids=$this->input->post('ck'); $n=count($ids); for($i=0;$i<$n;$i++) { $id=$ids[$i]; $where=array('rid'=>$id); $this->model->DeleteData('tbl_students_registration',$where); } $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been deleted. </div>'); redirect('admin/registeredStudents'); } public function view($encrypted_string){ $id = $this->model->decryptdata($encrypted_string); $where=array('rid'=>$id); $key['view']=$this->model->DetailData('tbl_students_registration',$where); $this->load->view("view_students",$key); } } admin/Portfolio_subcat.php 0000644 00000012264 14642254402 0011673 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); error_reporting(0); class Portfolio_subcat extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('alldata', "model"); $session_data=$this->session->all_userdata(); if(count($session_data)==5) { redirect('admin/starlogin'); } } public function index() { $data['view']=$this->model->getDatamodel('tbl_port_sub_cat'); $this->load->view("portfolio/portfolio_sub",$data); } //------ START: INSERT FUNCTION ------------------------------ public function add_portfoliocategory(){ if($this->input->post('save')=='save'){ $insertdata= array( 'pid'=>$this->input->post('pid'), 'ps_name'=>$this->input->post('ps_name'), ); $this->form_validation->set_rules('ps_name', 'ps_name', 'required|xss_clean|regex_match[/^[^\`\~\@\#\$\%\^\*\[\]\{\}\;:<>=+"]+$/]'); if ($this->form_validation->run() == TRUE) { $this->model->insertData('tbl_port_sub_cat',$insertdata); } /* $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Insert data successfully . </div>'); */ redirect('admin/portfolio_subcat'); }else{ $data['port']=$this->model->getDatamodel('tbl_portfolio_category'); $this->load->view("portfolio/portfolio_sub_add", $data); } } //------ END: INSERT FUNCTION ------------------------------ //------ START: EDIT FUNCTION ------------------------------ public function edit_portfoliocategory($encrypted_string){ $id = $this->model->decryptdata($encrypted_string); $where=array('psid'=>$id); if($this->input->post('save')=='save'){ $Updatedata= array( 'pid'=>$this->input->post('pid'), 'ps_name'=>$this->input->post('ps_name'), ); $this->form_validation->set_rules('ps_name', 'ps_name', 'required|xss_clean|regex_match[/^[^\`\~\@\#\$\%\^\*\[\]\{\}\;:<>=+"]+$/]'); if ($this->form_validation->run() == TRUE) { $this->model->UpdateData('tbl_port_sub_cat',$Updatedata,$where); } /* $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Update data successfully . </div>'); */ redirect('admin/Portfolio_subcat'); }else{ $data['port']=$this->model->getDatamodel('tbl_portfolio_category'); $data['view']=$this->model->DetailData('tbl_port_sub_cat',$where); $this->load->view("portfolio/portfolio_sub_add",$data); } } //------ END: EDIT FUNCTION ------------------------------ //------ START: DELETE FUNCTION ------------------------------ public function delete_portfoliocategory(){ $ids = explode('&',$this->input->post('ck')); $n=count($ids); for($i=0;$i<$n;$i++) { $id=explode('=',$ids[$i]); $where=array('psid'=>$id[1]); $getimages=$this->model->DetailData('tbl_port_sub_cat',$where); for($j=0;$j<count($getimages);$j++) { //echo $getimages[$j]['portfolio_image_path']."<br/>"; unlink("portfolio_images/".$getimages[$j]['portfolio_image_path']); } $this->model->DeleteData('tbl_port_sub_cat',$where); } /* $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Delete data successfully . </div>'); */ redirect('admin/portfolio_subcat'); } //------ END: DELETE FUNCTION ------------------------------- } /* End of file services.php */ admin/Postmanagement.php 0000644 00000022255 14642254403 0011341 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ob_start(); class Postmanagement extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('alldata','model'); } public function index() { $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; $this->db->order_by("tblpost_id", "desc"); $this->db->select('*'); $this->db->from($lang.'tblposts'); $this->db->join('tblusers', $lang.'tblposts.user_id = tblusers.uid','left'); $content['view'] = $this->db->get()->result_array(); $this->load->view("posts/posts_view",$content); } public function addpost() { $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; if($this->input->post('save')=='save') { $path_parts = pathinfo($_FILES["photo"]["name"]); $extension = $path_parts['extension']; //echo $extension; $contenthead = $this->input->post('contenthead'); //print_r($contenthead); die; $chead=implode('|-|',$contenthead); $pagecontent = $this->input->post('myeditor'); //print_r($pagecontent); die; $content=implode('|-|',$pagecontent); //echo($content); die; $config['upload_path'] = './banners/'; $config['allowed_types']= 'gif|jpg|png'; $this->upload->initialize($config); $this->load->library('upload', $config); $this->upload->do_upload('photo'); $data = $this->upload->data(); $name_array='banners/'.$data['file_name']; /* $this->load->library('image_lib'); $config['image_library'] = 'gd2'; $config['source_image'] = $name_array; $config['create_thumb'] = FALSE; $config['maintain_ratio'] = TRUE; $config['width'] = 400; $this->image_lib->clear(); $this->image_lib->initialize($config); $this->image_lib->resize();*/ $title=$this->input->post('titlepost'); $data['tblposts']=$this->model->getDatamodel($lang.'tblposts'); $slug=str_replace(' ', '-', $title); $checkslg=0; foreach ($data['tblposts'] as $key) { if ($key['post_slug']==$slug) { $slug=str_replace(' ', '-', $title).'-'.$checkslg++; } } $newDate = date("Y-m-d", strtotime($this->input->post('post_date'))); $insetcontent=array('titlepost'=>$this->input->post('titlepost'), 'content_head'=>$chead, 'contentpost'=>$content, 'post_cat'=>$this->input->post('post_cat'), 'user_id'=>$session_data['userinfo'][0]['uid'], 'modified_time'=>date('Y-m-d h:m:s'), 'imagepath'=>$name_array, 'post_slug'=>$slug, 'post_date'=>$newDate ); $this->form_validation->set_rules('titlepost', 'titlepost', 'required|xss_clean|regex_match[/^[^\`\~\@\#\$\%\^\*\[\]\{\}\;:<>=+"]+$/]'); if ($this->form_validation->run() == TRUE) { $this->model->insertData($lang.'tblposts',$insetcontent); } /* $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Post Data successfully Insert. </div>'); */ redirect('admin/postmanagement'); } else { $this->load->view("posts/post_add"); } } public function editpostData($encrypted_string) { $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; $id = $this->model->decryptdata($encrypted_string); $where=array('tblpost_id'=>$id); if($this->input->post('save')=='save') { $contenthead = $this->input->post('contenthead'); $chead=implode('|-|',$contenthead); $pagecontent = $this->input->post('myeditor'); $content=implode('|-|',$pagecontent); //print_r($content); die; $config['upload_path'] = './banners/'; $config['allowed_types']= 'gif|jpg|png'; $this->upload->initialize($config); $this->load->library('upload', $config); $this->upload->do_upload('photo'); $data = $this->upload->data(); $session_data=$this->session->all_userdata(); $name_array='banners/'.$data['file_name']; $title=$this->input->post('titlepost'); $data['tblposts']=$this->model->getDatamodel($lang.'tblposts'); $slug=str_replace(' ', '-', $title); $checkslg=0; foreach ($data['tblposts'] as $key) { if ($key['post_slug']==$slug) { $slug=str_replace(' ', '-', $title).'-'.$checkslg++; } } $newDate = date("Y-m-d", strtotime($this->input->post('post_date'))); if ($data['file_name']=='') { $insetcontent=array('titlepost'=>$this->input->post('titlepost'), 'content_head'=>$chead, 'contentpost'=>$content, 'post_cat'=>$this->input->post('post_cat'), 'user_id'=>$session_data['userinfo'][0]['uid'], 'modified_time'=>date('Y-m-d h:m:s'), 'post_date'=>$newDate, //'post_slug'=>$slug, ); } else { $insetcontent=array('titlepost'=>$this->input->post('titlepost'), 'content_head'=>$chead, 'contentpost'=>$content, 'post_cat'=>$this->input->post('post_cat'), 'user_id'=>$session_data['userinfo'][0]['uid'], 'modified_time'=>date('Y-m-d h:m:s'), 'post_date'=>$newDate, 'post_slug'=>$slug, 'imagepath'=>$name_array ); } $this->form_validation->set_rules('titlepost', 'titlepost', 'required|xss_clean|regex_match[/[^\`\~\@\#\$\%\^\*\[\]\{\}\;:<>=+"]+$/]'); if ($this->form_validation->run() == TRUE) { $this->model->UpdateData($lang.'tblposts',$insetcontent,$where); } /* $this->session->set_flashdata('msg',' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Post Data successfully Edit. </div>'); */ redirect('admin/postmanagement'); } else { $this->db->select('*'); $this->db->from($lang.'tblposts'); $this->db->where($where); $data['view']= $this->db->get()->result_array(); $this->load->view("posts/post_add",$data); } } public function deletepostselected() { $ids=explode('&',$this->input->post('ck')); $session_data=$this->session->all_userdata(); $lang=$session_data['lang']; $where = array(); for ($i=0; $i < count($ids); $i++) { $id=explode('=',$ids[$i]); $where = array('tblpost_id'=>$id[1]); $getbanner=$this->model->DetailData($lang.'tblposts',$where); unlink($getbanner[0]['imagepath']); $this->model->deleteData($lang.'tblposts',$where); } /* $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Post Data successfully Delete. </div>'); */ redirect('admin/postmanagement'); } } admin/Apicalls.php 0000644 00000005363 14642254403 0010110 0 ustar 00 <?php ob_start(); defined('BASEPATH') OR exit('No direct script access allowed'); class Apicalls extends CI_Controller { function __construct() { parent::__construct(); //$session_data=$this->session->all_userdata(); /*if(!isset($session_data['flang']) && !isset($session_data['color'])) { $this->session->set_userdata('flang', ''); $this->session->set_userdata('color', 'style'); } $this->load->dbutil(); $dbs_smarttips = $this->dbutil->list_databases(); if (!$this->dbutil->database_exists('starppld_aangadia')) { show_error("Issue with the database", 500 ); exit; }*/ $this->load->model('alldata', "model"); } public function getPincodeCity(){ echo "in function"; $BoyID=$_GET['BoyID']; $syncDateTime=$_GET['syncDateTime'];//die; $xappKey = '3UTihIfpv0RXQcGVmwCuwn23uVZR9tL7OLnaLckFw1FHsNf1zvlhrvsa5lcslL9H'; //$url='http://14.192.16.215/apibooking/api/v3/GetPincodeMaster?BoyID='+$BoyID+'&SyncDateTime='+$syncDateTime; //$url='http://c2p.gojavas.net/apibooking/api/v3/GetPincodeMaster?BoyID='+$BoyID+'&SyncDateTime='+$syncDateTime; if (!isset($url)) { // This is not cross-domain request exit; } $wildcard = FALSE; // Set $wildcard to TRUE if you do not plan to check or limit the domains $credentials = FALSE; // Set $credentials to TRUE if expects credential requests (Cookies, Authentication, SSL certificates) $allowedOrigins = array('http://14.192.16.215/apibooking/api/v3/GetPincodeMaster?BoyID='+$BoyID+'&SyncDateTime='+$syncDateTime); print $url; $allowedOrigins = array($url); //echo "------".$allowedOrigins;//die; echo "<pre>";print_r($allowedOrigins); if (!in_array($url, $allowedOrigins) && !$wildcard) { // Origin is not allowed exit; } $origin = $wildcard && !$credentials ? '*' : $url; header("Access-Control-Allow-Origin: " . $origin); if ($credentials) { header("Access-Control-Allow-Credentials: true"); } header("Access-Control-Allow-Methods: POST, GET, OPTIONS"); header("Access-Control-Allow-Headers: Origin"); header('P3P: CP="CAO PSA OUR"'); // Makes IE to support cookies // Handling the Preflight if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { exit; } // Response header("Content-Type: application/json; charset=utf-8"); echo json_encode(array('status' => 'OK')); } } admin/Clientmanagement.php 0000644 00000001556 14642254403 0011633 0 ustar 00 <?php ob_start(); defined('BASEPATH') OR exit('No direct script access allowed'); class Clientmanagement extends CI_Controller { function __construct() { parent::__construct(); $session_data=$this->session->all_userdata(); if(!isset($session_data['flang']) && !isset($session_data['color'])) { $this->session->set_userdata('flang', ''); $this->session->set_userdata('color', 'style'); } $this->load->model('alldata', "model"); } public function index(){ $this->load->model('alldata', "model"); $where=array('page_category'=>'index','publish'=>'on'); $data['viewdata']=$this->model->containdetail($where); $this->load->view("Web/header",$data); $this->load->view("client/welcome",$data); //$this->load->view("Web/footer"); $this->load->view("Web/footer2"); } } admin/Contentmanagement.php 0000644 00000020312 14642254404 0012017 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ob_start(); error_reporting(0); //error_reporting(E_ALL); class Contentmanagement extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('alldata','model'); } public function index() { $session_data=$this->session->all_userdata(); $table=$session_data['lang'].'tblcontent'; $this->db->order_by("content_id", "desc"); $this->db->select('*'); $this->db->from($table); $this->db->join('tblusers', $table.'.user_id = tblusers.uid','left'); $content['view'] = $this->db->get()->result_array(); $this->load->view("contant/contant_view",$content); } public function addcontent() { if($this->input->post('save')=='save') { // echo "<pre>"; print_r($_POST); die; $contenthead = $this->input->post('contenthead'); $chead=implode('|-|',$contenthead); //print_r($chead); $pagecontent = $this->input->post('myeditor'); $content=implode('|-|',$pagecontent); //print_r($chead.$content); die; $session_data=$this->session->all_userdata(); $table=$session_data['lang'].'tblcontent'; $rand=rand(1000,9999); $title=$this->input->post('Content'); $pagecode =str_replace(' ', '-', $title).rand(999,9999); $data['tblcontent']=$this->model->getDatamodel($table); $slug=str_replace(array('_','-',"'", '.', '|', '(',')',',','/','!','?','|'), '', $title); $slug=str_replace(' ', '-', $slug); $checkslg=0; foreach ($data['tblcontent'] as $key) { if ($key['slug']==$slug) { $slug=str_replace(' ', '-', $title).'-'.$checkslg++; } } $slug=strtolower($slug); $insetcontent=array( 'page_category'=>$this->input->post('page_category'), 'content_title'=>$title, 'content_head'=>$chead, 'content_text'=>$content, 'footer_text'=>$this->input->post('footer_text'), 'banner_id'=>$this->input->post('banner_id'), 'publish'=>$this->input->post('publish'), //'content_text'=>$this->input->post('myeditor'), //'map11'=>$this->input->post('map'), 'user_id'=>$session_data['userinfo'][0]['uid'], 'page_code'=>$pagecode, 'slug'=>$slug, 'meta_tital'=>$this->input->post('meta_tital'), 'meta_keyword'=>$this->input->post('meta_keyword'), 'meta_description'=>$this->input->post('meta_description') ); $this->form_validation->set_rules('Content', 'Content', 'required|xss_clean|regex_match[/^[^\`\~\@\#\$\%\^\*\[\]\{\}\;:<>=+"]+$/]'); if ($this->form_validation->run() == TRUE) { //$this->model->insertData($table,$insetcontent); $query=$this->model->insertData($table,$insetcontent); /*print_r($query); //echo $errNo = $this->db->_error_number(); // echo $errMess = $this->db->_error_message(); if(!$query) { echo "yes"; }else{ echo "no"; } die;*/ /*if($query='error') { echo "yes"; }else{ echo "no"; } /* if(!$query) { redirect('admin/webcontroller/errorpage'); }else{ redirect('admin/contentmanagement'); } */ } redirect('admin/contentmanagement'); } else { $data['bannergrid']=$this->model->getDatamodel('tblbanners'); $this->load->view("contant/contant_add",$data); } } public function editContentData($encrypted_string) { $session_data=$this->session->all_userdata(); $table=$session_data['lang'].'tblcontent'; $lang=$session_data['lang']; $id = $this->model->decryptdata($encrypted_string); $where=array('content_id'=>$id); if($this->input->post('save')=='save') { $contenthead = $this->input->post('contenthead'); $chead=implode('|-|',$contenthead); //print_r($chead); $pagecontent = $this->input->post('myeditor'); $content=implode('|-|',$pagecontent); //print_r($chead.$content); die; $title=$this->input->post('Content'); $data['tblcontent']=$this->model->getDatamodel($table); $slug=str_replace(array('_','-',"'", '.', '|', '(',')',',','/','!','?','|'), '', $title); $slug=str_replace(' ', '-', $slug); $checkslg=0; $slug=strtolower($slug); foreach ($data['tblcontent'] as $key) { if ($key['slug']==$slug) { if($key['content_id']!=$id) { $slug=str_replace(' ', '-', $slug).'-'.$checkslg++; } } } //print_r($this->input->post()); //die(); $insetcontent=array ( 'page_category'=>$this->input->post('page_category'), 'content_title'=>$this->input->post('Content'), 'content_head'=>$chead, 'content_text'=>$content, 'banner_id'=>$this->input->post('banner_id'), 'footer_text'=>$this->input->post('footer_text'), 'publish'=>$this->input->post('publish'), //'content_text'=>$this->input->post('myeditor'), //'map'=>$this->input->post('map'), 'user_id'=>$session_data['userinfo'][0]['uid'], 'modified_time'=>date('Y-m-d H:i:s'), 'meta_tital'=>$this->input->post('meta_tital'), 'meta_keyword'=>$this->input->post('meta_keyword'), 'meta_description'=>$this->input->post('meta_description'), 'slug'=>$slug, ); $this->form_validation->set_rules('Content', 'Content', 'required|xss_clean|regex_match[/^[^\`\~\@\#\$\%\^\*\[\]\{\}\;:<>=+"]+$/]'); if ($this->form_validation->run() == TRUE) { $this->model->UpdateData($table,$insetcontent,$where); $where=array('menu_content'=>$id); $Insertmenu=array('menu_name'=>$this->input->post('Content'), 'menu_displayname'=>$this->input->post('Content')); $this->model->UpdateData($lang.'tblmenu',$Insertmenu,$where); } redirect('admin/contentmanagement'); } else { $this->db->select('*'); $this->db->from($table); $this->db->where($where); $data['view']= $this->db->get()->result_array(); $where=array('submenu'=>0); $data['menugrid']=$this->model->DetailData($lang.'tblmenu',$where); $data['bannergrid']=$this->model->getDatamodel('tblbanners'); $this->load->view("contant/contant_add",$data); } } public function deletecontentselected() { $ids=explode('&',$this->input->post('ck')); $session_data=$this->session->all_userdata(); $table=$session_data['lang'].'tblcontent'; for ($i=0; $i < count($ids); $i++) { $id=explode('=',$ids[$i]); $where = array('content_id'=>$id[1]); $this->model->deleteData($table,$where); } redirect('admin/contentmanagement'); } } Webcontroller.php 0000644 00000126050 14642254404 0010107 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ob_start(); //error_reporting(0); class Webcontroller extends CI_Controller { function __construct() { parent::__construct(); $session_data=$this->session->all_userdata(); if(!isset($session_data['flang']) && !isset($session_data['color'])) { $this->session->set_userdata('flang', ''); $this->session->set_userdata('color', 'style'); } $this->load->model('app', "app"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); $this->load->model('alldata', "model"); } public function index() { $session_data=$this->session->all_userdata(); $flang=$session_data['flang']; $this->load->model('alldata', "model"); $where=array('page_category'=>'index','publish'=>'on'); $data['viewdata']=$this->model->containdetail($where); $data['pagecount']=count($data['viewdata']); $data['get_address']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'address'),'other_cat','ASC'); $data['get_email']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'email'),'other_cat','ASC'); $data['get_conno']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'contact-no'),'other_cat','ASC'); $data['social']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'social-icon'),'other_cat','ASC'); $data['logo']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'logo'),'other_cat','ASC'); $where_homebox=array('post_cat'=>'service'); $this->db->limit("3"); $data['home_ser']=$this->model->DetailData('tblposts',$where_homebox); $data['event']=$this->model->portfolio_model(array('portfolio_cat_name'=>'event')); $where_ser=array('page_category'=>'service','publish'=>'on'); $this->db->limit("4"); $data['service_home']=$this->model->containdetail($where_ser); $where_rsn=array('post_cat'=>'reason'); $data['reason']=$this->model->DetailData('tblposts',$where_rsn); $where_plan=array('post_cat'=>'plans_pricing'); $data['plans']=$this->model->DetailData('tblposts',$where_plan); $where_about=array('page_code'=>'about5048'); $data['about']=$this->model->containdetail($where_about); /*echo "<pre>"; print_r($data['event']); die;*/ $this->load->view("Web/header",$data); $this->load->view("Web/Template/index",$data); //$this->load->view("Web/footer"); $this->load->view("Web/footer2"); } public function page($id='epd',$id2='null') { $this->model->pagesesstion(); //set a 404 page $id= urldecode($id); if($id=='epd') { $this->errorpage(); }else if($id=='home'){ redirect(base_url()); } else{ $session_data=$this->session->all_userdata(); $flang=$session_data['flang']; $this->load->model('alldata', "model"); $where=array('slug'=>$id,'publish'=>'on'); $data['viewdata']=$this->model->containdetail($where); if(count($data['viewdata'])==0) { redirect('webcontroller/errorpage'); } $subid=''; $data['brad']=array(); foreach($data['viewdata'] as $key){ if($key['submenu']!=Null) { $subid=$key['submenu']; } } if($subid!=''){ $where=array('submenu'=>$subid); $data['sub']=$this->model->containdetail($where); //level 1 breadcrumbs $lev1=''; foreach($data['sub'] as $key){ if($key['submenu']!=Null) { $lev1=$key['submenu']; } } if($lev1!=''){ $where=array('menu_content'=>$lev1); $data['sub1']=$this->model->containdetail($where); array_push($data['brad'],$data['sub1'][0]); //level 2 breadcrumbs $lev2=''; foreach($data['sub1'] as $key){ if($key['submenu']!=Null) { $lev2=$key['submenu']; } } if($lev2!=''){ $where=array('menu_content'=>$lev2); $data['sub2']=$this->model->containdetail($where); array_push($data['brad'],$data['sub2'][0]);; } } } $data['get_address']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'address'),'other_cat','ASC'); $data['get_email']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'email'),'other_cat','ASC'); $data['get_conno']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'contact-no'),'other_cat','ASC'); $data['social']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'social-icon'),'other_cat','ASC'); $data['logo']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'logo'),'other_cat','ASC'); $where8=array("portfolio_cat_name" => 'event'); $data['postall'] = $this->model->portfolio_model($where8); $where_blog=array('post_cat'=>'plan'); $this->db->order_by("tblpost_id", "desc"); $data['plan']=$this->model->DetailData('tblposts',$where_blog); $where_about=array('page_code'=>'about5048'); $data['about']=$this->model->containdetail($where_about); $Template='Web/Template/'.$data['viewdata'][0]['page_category']; $this->load->view("Web/header",$data); $this->load->view($Template); $this->load->view("Web/footer2"); } } public function viewpage($slug){ $slug= urldecode($slug); $session_data=$this->session->all_userdata(); //print_r($session_data); $flang=$session_data['flang']; $this->model->pagesesstion(); $this->db->select('*'); $this->db->where("post_cat", "Headlines"); $this->db->order_by("tblpost_id", "desc"); $data['post']=$this->db->get($flang.'tblposts')->result_array(); $slug= urldecode($slug); $data['brad']=array(); $this->load->model('alldata', "model"); $where=array('slug'=>'box','publish'=>'on'); $data['viewdata']=$this->model->pagedetail($where); $Template='Web/Template/'.$data['viewdata'][0]['page_category']; $where_about=array('page_code'=>'about5048'); $data['about']=$this->model->containdetail($where_about); $this->load->view("Web/header",$data); $this->load->view($Template); $this->load->view("Web/footer"); $this->load->view("Web/footer2"); } public function errorpage(){ $where_about=array('page_code'=>'about5048'); $data['about']=$this->model->containdetail($where_about); $data['get_address']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'address'),'other_cat','ASC'); $data['get_email']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'email'),'other_cat','ASC'); $data['get_conno']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'contact-no'),'other_cat','ASC'); $data['social']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'social-icon'),'other_cat','ASC'); $data['logo']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'logo'),'other_cat','ASC'); $this->load->view("Web/header", $data); $this->load->view('Web/error'); // $this->load->view("Web/footer"); $this->load->view("Web/footer2"); } public function menucreate($id) { $session_data=$this->session->all_userdata(); $flang=$session_data['flang']; $where=array('menushortcode'=>$id); $data['view']=$this->model->DetailData('tblmenugroup',$where); $this->db->order_by("menu_position", "asc"); $this->db->select('*'); $this->db->from($flang.'tblmenu'); $where= array('menugroup' => $data['view'][0]['menugroup_id']); $this->db->where($where); $this->db->join( $flang.'tblcontent', $flang.'tblcontent.content_id = '.$flang.'tblmenu.menu_content','left'); $data['menu'] = $this->db->get()->result_array(); $where=array('menugroup_id'=>$id); $data['menugroup']=$this->model->DetailData('tblmenugroup',$where); $this->load->view("Web/menuview",$data); } public function sitemapcreate($id) { $session_data=$this->session->all_userdata(); $flang=$session_data['flang']; $where=array('menushortcode'=>$id); $data['view']=$this->model->DetailData('tblmenugroup',$where); $this->db->order_by("menu_position", "asc"); $this->db->select('*'); $this->db->from($flang.'tblmenu'); $where= array('menugroup' => $data['view'][0]['menugroup_id']); $this->db->where($where); $this->db->join( $flang.'tblcontent', $flang.'tblcontent.content_id = '.$flang.'tblmenu.menu_content','left'); $data['menu'] = $this->db->get()->result_array(); $where=array('menugroup_id'=>$id); $data['menugroup']=$this->model->DetailData('tblmenugroup',$where); $this->db->select('*'); $data["searchmenu"]=$this->db->get($flang.'tblcontent')->result_array(); $this->load->view("Web/sitemapview",$data); } public function footerlink($id) { $session_data=$this->session->all_userdata(); $flang=$session_data['flang']; $where=array('menushortcode'=>$id); $data['view']=$this->model->DetailData('tblmenugroup',$where); $this->db->order_by("menu_position", "asc"); $this->db->select('*'); $this->db->from($flang.'tblmenu'); $where= array('menugroup' => $data['view'][0]['menugroup_id']); $this->db->where($where); $this->db->join( $flang.'tblcontent', $flang.'tblcontent.content_id = '.$flang.'tblmenu.menu_content','left'); $data['menu'] = $this->db->get()->result_array(); $where=array('menugroup_id'=>$id); $data['menugroup']=$this->model->DetailData('tblmenugroup',$where); $this->load->view("Web/footerlinkview",$data); } public function homebox($id) { $session_data=$this->session->all_userdata(); $flang=$session_data['flang']; $where=array('menushortcode'=>$id); $data['view']=$this->model->DetailData('tblmenugroup',$where); $this->db->order_by("menu_position", "asc"); $this->db->select('*'); $this->db->from($flang.'tblmenu'); $where= array('menugroup' => $data['view'][0]['menugroup_id']); $this->db->where($where); $this->db->join( $flang.'tblcontent', $flang.'tblcontent.content_id = '.$flang.'tblmenu.menu_content','left'); $data['menu'] = $this->db->get()->result_array(); $where=array('menugroup_id'=>$id); $data['menugroup']=$this->model->DetailData('tblmenugroup',$where); $this->load->view("Web/home_box",$data); } public function pageview($id) { $session_data=$this->session->all_userdata(); $flang=$session_data['flang']; $where=array('page_code'=>$id); $data['view']=$this->model->DetailData($flang.'tblcontent',$where); if(count($data['view'])==0) { redirect('webcontroller/errorpage'); } echo $data['view'][0]['content_text']; } public function changelang($language='') { $this->session->set_userdata('flang', $language); if ($language != "") { $this->lang->load('translate',$language); } else { $this->lang->load('translate','english'); } redirect('webcontroller'); } public function changecolor($color) { $this->session->set_userdata('color', $color); redirect('webcontroller'); } public function lastmodification() { $this->db->select('lasttime'); $this->db->from('lastmodifytime'); $query = $this->db->get()->result_array(); $date1=date_create(date("Y-m-d")); $date2=date_create(date("Y-m-d", strtotime($query[0]['lasttime']))); $diff=date_diff($date1,$date2); $count=$diff->format("%a"); if($count>=7) { $dates=array('lasttime'=> date("Y-m-d H:i:s",strtotime(' -1 day'))); $this->db->update('lastmodifytime',$dates); } $mydate = date("d-m-Y", strtotime($query[0]['lasttime'])); $mytime= date("g:i A", strtotime($query[0]['lasttime'])); if($mytime >= "12.00 PM" && $mytime <= "5.00 PM"){ //echo $mydate." ".$mytime; echo $mydate; } else{ //echo date("d-m-Y", strtotime($mydate))." 4:00 PM"; echo $mydate; } } public function serach() { $key=$this->input->post('srch-term'); $session_data=$this->session->all_userdata(); $lang=$session_data['flang']; $this->db->select('*'); $this->db->group_by('content_title'); $this->db->or_like($lang.'tblcontent.content_text',$key); $this->db->or_like($lang.'tblcontent.content_title',$key); //$this->db->group_by('content_title'); $this->db->from($lang.'tblmenu'); $this->db->join($lang.'tblcontent', $lang.'tblmenu.menu_content = '.$lang.'tblcontent.content_id','left'); $data['search']=$this->db->get()->result_array(); //echo "<pre>"; print_r($data['search']); echo "</pre>"; $this->db->select('*'); $data["searchmenu"]=$this->db->get($lang.'tblcontent')->result_array(); $this->load->view("Web/header",$data); $this->load->view("Web/search",$data); $this->load->view("Web/footer"); $this->load->view("Web/footer2"); } public function advserach(){ $advs=$this->input->post('adv-search'); $advt=$this->input->post('adv-topic'); $session_data=$this->session->all_userdata(); $lang=$session_data['flang']; $where=array('content_id'=>$advt); $this->db->or_like($lang.'tblcontent.content_text',$advs); $this->db->from($lang.'tblcontent'); $this->db->where($where); $data['search']=$this->db->get()->result_array(); //echo "<pre>"; print_r($data['advsearch']); echo "</pre>"; die; $this->db->select('*'); $data["searchmenu"]=$this->db->get($lang.'tblcontent')->result_array(); $this->load->view("Web/header",$data); $this->load->view("Web/search",$data); $this->load->view("Web/footer"); $this->load->view("Web/footer2"); } public function service($id){ $where=array("post_slug" => $id); $this->db->order_by("tblpost_id", "desc"); $data['service'] = $this->model->DetailData('tblposts', $where); $data['get_address']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'address'),'other_cat','ASC'); $data['get_email']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'email'),'other_cat','ASC'); $data['get_conno']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'contact-no'),'other_cat','ASC'); $data['social']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'social-icon'),'other_cat','ASC'); $data['logo']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'logo'),'other_cat','ASC'); $this->load->view("Web/header", $data); $this->load->view("Web/service"); $this->load->view("Web/footer2"); } public function event_gallery($id){ $where=array('banner_id'=>$id); $data=$this->model->DetailData('tblbanners', $where); $id=$data[0]['banner_images']; $element=explode('|',$id); $this->db->where_in('tblmedia_id', $element); $data['image']=$this->db->get('tblmedia')->result_array(); $this->load->view("Web/event_gallery",$data,'true'); } public function event($id){ $decrypted_id = $this->model->decryptdata($id); if($id=="allevents"){ $where=array("portfolio_cat_name" => 'event'); $data['postall'] = $this->model->portfolio_model($where); //echo "<pre>"; print_r($data['postall']); die; }else{ $where=array("portfolio_id" => $decrypted_id); $data['event'] = $this->model->portfolio_model($where); //echo "<pre>"; print_r($data['event']); die; if(count($data['event'])==0) { redirect('webcontroller/errorpage'); } } $data['get_address']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'address'),'other_cat','ASC'); $data['get_email']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'email'),'other_cat','ASC'); $data['get_conno']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'contact-no'),'other_cat','ASC'); $data['social']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'social-icon'),'other_cat','ASC'); $data['logo']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'logo'),'other_cat','ASC'); $this->load->view("Web/header", $data); $this->load->view("Web/Template/event"); $this->load->view("Web/footer2"); } //-------------------- feedback form -------------------// public function feedback(){ $code=$this->input->post('code'); $rcode=$this->input->post('rcode'); if($rcode==$code){ $to=$this->input->post('email'); $name=$this->input->post('name'); $org=$this->input->post('org'); $sub='You have got feedback'; $address=$this->input->post('address'); $email=$this->input->post('email'); $Feedback=$this->input->post('Feedback'); $msg=" Name : ".$name."<br/> Organization : ".$org."<br/> Address : ".$address."<br/> Email : ".$email."<br/> Feedback : ".$Feedback."<br/> "; if($to!='' || $message!=''){ $email_config = Array( 'protocol' => 'smtp', 'smtp_host' => 'sl://smtp.gmail.com',//bh-24.webhostbox.net 'smtp_port' => '587', ///465', 'smtp_user' => 'noreplydgps@gmail.com', 'smtp_pass' => '12dgps34', 'mailtype' => 'html', 'starttls' => true, 'newline' => "\r\n", 'charset' => 'iso-8859-1' ); $this->load->library('email', $email_config); $this->email->set_mailtype("html"); $this->email->from('noreplydgps@gmail.com','DGPS'); $this->email->to('');//vishal.panara@staroneweb.co.in $this->email->cc('noreplydgps@gmail.com'); $this->email->subject($sub); $this->email->message($msg); $this->email->send(); $this->email->set_mailtype("html"); $this->session->set_flashdata('msg', '<div class="success-msg"> <h3>Thanks for feedback <i class="fa fa-smile-o" aria-hidden="true"></i></h3> </div>'); }else{ //error $this->session->set_flashdata('msg', '<div class="success-msg"> <h3>Sorry...! Form not submitted. <i class="fa fa-frown-o" aria-hidden="true"></i> <span>Please try again later</span></h3> </div>'); } }else{ $this->session->set_flashdata('msg', '<div class="success-msg"> <h3>Form not submitted. <i class="fa fa-frown-o" aria-hidden="true"></i> <span>Please enter the valid sum</span></h3> </div>'); } redirect('webcontroller/page/Feedback'); } public function slider($id){ $element=explode('|',$id); $this->db->where_in('tblmedia_id', $element); $data['image']=$this->db->get('tblmedia')->result_array(); $this->load->view("Web/banner",$data,'true'); } public function singleslider($id){ $element=explode('|',$id); $this->db->where_in('tblmedia_id', $element); $data['image']=$this->db->get('tblmedia')->result_array(); $this->load->view("Web/single",$data); } public function teamslider($id){ $element=explode('|',$id); $this->db->where_in('tblmedia_id', $element); $data['image']=$this->db->get('tblmedia')->result_array(); $this->load->view("Web/team",$data); } public function profileslider($id){ $element=explode('|',$id); $this->db->where_in('tblmedia_id', $element); $data['image']=$this->db->get('tblmedia')->result_array(); $this->load->view("Web/profile",$data); } public function themecolor($color){ $this->session->set_userdata('themecolor', $color); } public function screenreader(){ $session_data=$this->session->all_userdata(); $flang=$session_data['flang'];$this->load->model('alldata', "model"); $where=array('page_category'=>'index','publish'=>'on'); $data['viewdata']=$this->model->containdetail($where); $this->load->view("Web/header",$data); $this->load->view("Web/screenreader"); $this->load->view("Web/footer"); $this->load->view("Web/footer2"); } public function sitemap() { $session_data=$this->session->all_userdata(); $flang=$session_data['flang']; $this->load->model('alldata', "model"); $where=array('page_category'=>'index','publish'=>'on'); $data['viewdata']=$this->model->containdetail($where); $data['client']=$this->model->portfolio_model(array('portfolio_cat_name'=>'clients')); $data['message']=$this->model->getDatamodel($flang.'tblmsg'); $this->db->select('*'); $this->db->where('post_cat',"homebox"); $data["box"]=$this->db->get($flang.'tblposts')->result_array(); $this->db->select('*'); $this->db->where('post_cat',"messageslider"); $data["msg"]=$this->db->get($flang.'tblposts')->result_array(); $this->db->select('*'); //$this->db->limit(2); $this->db->where('post_cat',"news"); $data["news"]=$this->db->get($flang.'tblposts')->result_array(); $this->db->select('*'); //$this->db->limit(2); $this->db->where('post_cat',"event"); $data["event"]=$this->db->get($flang.'tblposts')->result_array(); $this->db->select('*'); $data["searchmenu"]=$this->db->get($flang.'tblcontent')->result_array(); $this->load->view("Web/header",$data); $this->load->view("Web/sitemap"); $this->load->view("Web/footer"); $this->load->view("Web/footer2"); } public function visit(){ @$source =('count.txt'); @$data = file_get_contents($source); @$handle = fopen($source, "w"); // if($data==""){$data=0;} fwrite($handle, $data+1); fclose($handle); echo number_format($data); /* $fatchcount=$this->model->getDatamodel("tbl_counter"); $count=$fatchcount[0]['count']; $data=array('count'=>$count+0.5); $where=array('count'=>$count); $this->model->UpdateData("tbl_counter",$data,$where); $fatch=$this->model->getDatamodel("tbl_counter"); echo number_format($fatch[0]['count']); */ } public function member_registration() { if($this->input->post('save')=='save') { $code=$this->input->post('code'); $rcode=$this->input->post('rcode'); if($code==$rcode){ $joining_date = date("Y-m-d", strtotime($this->input->post('joining_date'))); $joining_date2 = date("d-M-Y", strtotime($this->input->post('joining_date'))); $dob = date("Y-m-d", strtotime($this->input->post('dob'))); $insertdata=array('name'=>$this->input->post('name'), 'joining_date'=>$joining_date, 'typeofmembership'=>$this->input->post('typeofmembership'), 'rcpt_no'=>$this->input->post('rcpt_no'), 'memb_amt'=>$this->input->post('memb_amt'), 'memb_amt_paidby'=>$this->input->post('memb_amt_paidby'), 'dob'=>$dob, 'contact_no'=>$this->input->post('contact_no'), 'alt_contact_no'=>$this->input->post('alt_contact_no'), 'home_address'=>$this->input->post('home_address'), 'gender'=>$this->input->post('gender'), 'other_address'=>$this->input->post('other_address'), 'email'=>$this->input->post('email'), 'highersecondary'=>$this->input->post('highersecondary'), //'highersecondaryscore'=>$this->input->post('highersecondaryscore'), //'graduation'=>$this->input->post('graduation'), //'graduationascore'=>$this->input->post('graduationascore'), 'graduationayear'=>$this->input->post('graduationayear'), 'postgraduation'=>$this->input->post('postgraduation'), //'postgraduationscore'=>$this->input->post('postgraduationscore'), 'postgraduationyear'=>$this->input->post('postgraduationyear'), 'fieldofstudy'=>$this->input->post('fieldofstudy'), 'fieldofstudyotherinfo'=>$this->input->post('fieldofstudyotherinfo'), //'degreesought'=>$this->input->post('degreesought'), //'intendedmajor'=>$this->input->post('intendedmajor'), 'academic_intake'=>$this->input->post('academic_intake'), //'toefl_score'=>$this->input->post('toefl_score'), //'gre_score'=>$this->input->post('gre_score'), //'gmat_score'=>$this->input->post('gmat_score'), //'sat_act_score'=>$this->input->post('sat_act_score'), 'test_scores'=>$this->input->post('test_scores'), 'field_of_graduation'=>$this->input->post('field_of_graduation'), 'howdidyouknow'=>$this->input->post('howdidyouknow'), 'sharingemailid'=>$this->input->post('sharingemailid'), ); $to='eduadviser@iaesgujarat.org';//eduadviser@iaesgujarat.org $msg = ' <!DOCTYPE html> <html> <head> <title>New Registration</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg, #CF212A 0%, #003865 100%); padding: 10px; text-align: center;"> <h3>New Registration</h3> </div> <div style="padding: 1rem;"> <p><strong>Name :</strong> ' . $this->input->post('name') . '</p> <p><strong>Email :</strong> ' . $this->input->post('email') . '</p> <p><strong>Contact :</strong> ' . $this->input->post('contact_no') . '</p> <p><strong>Joining Date :</strong> ' . $joining_date2 . '</p> <p><strong>Type of Membership :</strong> ' . $this->input->post('typeofmembership') . '</p> <p><strong>Receipt No :</strong> ' . $this->input->post('rcpt_no') . '</p> <p><strong>Membership Amount :</strong> ' . $this->input->post('memb_amt') . '</p> <p><strong>Membership Amount Paid By :</strong> ' . $this->input->post('memb_amt_paidby') . '</p> </div> </div> </body> </html>'; $sub = "New Registration"; $this->model->emailsend2($to, $sub, $msg); $this->model->insertData('tbl_students_registration',$insertdata); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Registration completed. </div>'); }else{ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Please enter the valid sum. </div>'); } redirect('webcontroller/member_registration'); } else { $subid=''; if($subid!=''){ $where=array('submenu'=>$subid); $data['sub']=$this->model->containdetail($where); //level 1 breadcrumbs $lev1=''; foreach($data['sub'] as $key){ if($key['submenu']!=Null) { $lev1=$key['submenu']; } } if($lev1!=''){ $where=array('menu_content'=>$lev1); $data['sub1']=$this->model->containdetail($where); array_push($data['brad'],$data['sub1'][0]); //level 2 breadcrumbs $lev2=''; foreach($data['sub1'] as $key){ if($key['submenu']!=Null) { $lev2=$key['submenu']; } } if($lev2!=''){ $where=array('menu_content'=>$lev2); $data['sub2']=$this->model->containdetail($where); array_push($data['brad'],$data['sub2'][0]);; } } } $data['get_address']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'address'),'other_cat','ASC'); $data['get_email']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'email'),'other_cat','ASC'); $data['get_conno']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'contact-no'),'other_cat','ASC'); $data['social']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'social-icon'),'other_cat','ASC'); $data['logo']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'logo'),'other_cat','ASC'); $this->load->view("Web/header",$data); $this->load->view("Web/member_registration"); $this->load->view("Web/footer2"); } } public function ask() { $code=$this->input->post('code'); $rcode=$this->input->post('rcode'); $current_url=$this->input->post('c_url'); if($code==$rcode){ $to='eduadviser@iaesgujarat.org'; $msg = ' <!DOCTYPE html> <html> <head> <title>New Question</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg, #CF212A 0%, #003865 100%); padding: 10px; text-align: center;"> <h3>New Question</h3> </div> <div style="padding: 1rem;"> <p><strong>Name :</strong> ' . $this->input->post('name') . '</p> <p><strong>Email :</strong> ' . $this->input->post('email') . '</p> <p><strong>Mobile :</strong> ' . $this->input->post('mobile') . '</p> <p><strong>Address :</strong> ' . $this->input->post('address') . '</p> <p><strong>Question :</strong> ' . $this->input->post('que') . '</p> </div> </div> </body> </html>'; $sub = "New Question"; $this->model->emailsend2($to, $sub, $msg); $this->session->set_flashdata('askmsg', ' <div style="position:absolute; z-index:1; top:0;top: 0; left: 0; right: 0; width: 50%; margin: 0 auto;" class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Thank you for asking a question, You will be answered shortly. </div>'); }else{ $this->session->set_flashdata('askmsg', ' <div style="position:absolute; z-index:1; top:0;top: 0; left: 0; right: 0; width: 50%; margin: 0 auto;" class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Please enter the valid sum. </div>'); } redirect($current_url); } public function bam() { $code=$this->input->post('code'); $rcode=$this->input->post('rcode'); $current_url=$this->input->post('c_url'); $occu = implode(',', $this->input->post('occu')); $interest = implode(',', $this->input->post('interest')); if($code==$rcode){ $to='americancorner@iaesgujarat.org'; $msg = ' <!DOCTYPE html> <html> <head> <title>Become a Member</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg, #CF212A 0%, #003865 100%); padding: 10px; text-align: center;"> <h3>Become a Member</h3> </div> <div style="padding: 1rem;"> <p><strong>Name :</strong> ' . $this->input->post('name') . '</p> <p><strong>Email :</strong> ' . $this->input->post('email') . '</p> <p><strong>Mobile :</strong> ' . $this->input->post('mobile') . '</p> <p><strong>Occupation :</strong> ' . $occu . '</p> <p><strong>Interest Area :</strong> ' . $interest . '</p> </div> </div> </body> </html>'; $sub = "Become a Member"; $this->model->emailsend2($to, $sub, $msg); $this->session->set_flashdata('askmsg', ' <div style="position:absolute; z-index:1; top:0;top: 0; left: 0; right: 0; width: 50%; margin: 0 auto;" class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Thank you for become a member. </div>'); }else{ $this->session->set_flashdata('askmsg', ' <div style="position:absolute; z-index:1; top:0;top: 0; left: 0; right: 0; width: 50%; margin: 0 auto;" class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Please enter the valid sum. </div>'); } redirect($current_url); } public function state($id){ $state = $this->model->DetailData('states', array('country_id' => $id)); $html = ''; $html.='<option value="">--Select State--</option>'; foreach ($state as $k => $v) { $html.=' <option value="'.$v["name"].'">'.$v["name"].'</option> '; } $array['html'] = $html; echo json_encode($array); } public function reg(){ if($this->input->post('save') == 'save'){ echo "<pre>"; print_r($_POST); }else{ $data['get_address']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'address'),'other_cat','ASC'); $data['get_email']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'email'),'other_cat','ASC'); $data['get_conno']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'contact-no'),'other_cat','ASC'); $data['social']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'social-icon'),'other_cat','ASC'); $data['logo']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'logo'),'other_cat','ASC'); $this->load->view("Web/header", $data); $this->load->view('Web/reg'); $this->load->view("Web/footer2"); } } public function forgot_pass(){ $otp = mt_rand(100000, 999999); $to = $this->input->post('email'); $username = $this->input->post('username'); $en_to = base64_encode($to); $en_username = base64_encode($username); $sub = 'Forgot Password'; $url = base_url().'users/reset_pass/'.$en_to.'/'.$en_username; $whereGet = array('email' => $to,'username' => $username); $query = $this->app->DetailData('tbl_registration', $whereGet); $cnt = count($query); if($cnt == 1){ $msg = ' <!DOCTYPE html> <html> <head> <title>Forgot Password</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg, #CF212A 0%, #003865 100%); padding: 10px; text-align: center;"> <h3>Forgot Password</h3> </div> <div style="padding: 1rem;"> <p>We are sharing a verification code to access your account. Once you have verified the code, you will be prompted to set a new password immediately. This is to ensure that only you have access to your account.</p> <p>Your OTP: '.$otp.'</p> </div> </div> </body> </html>'; $this->model->emailsend($to, $sub, $msg); $this->session->set_flashdata('msg_n', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Please check your email. An OTP has been sent to your email id</div>'); //$where = array('email' => $to); $where = array('email' => $to,'username' => $username); $data = array('otp' => $otp); $this->app->UpdateData('tbl_registration', $data, $where); redirect('webcontroller/reset_pass/'.$en_to.'/'.$en_username); }else{ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Username and Email not match.</div>'); redirect(base_url()); } } public function reset_pass($en_to='',$en_username=''){ if($this->input->post('save') == 'save'){ $email = $this->input->post('email'); $username = $this->input->post('username'); $otp = $this->input->post('otp'); $pass = $this->input->post('pass'); $conf_pass = $this->input->post('conf_pass'); $password = md5($pass); $enn = base64_encode($email); $enn_user = base64_encode($username); $where = array('email' => $email,'username' => $username); $get = $this->app->DetailData('tbl_registration', array('email'=>$email,'username' => $username)); $get_otp = $get[0]['otp']; if($pass != $conf_pass){ $this->session->set_flashdata('msg_n', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Both passwords are not matched</div>'); }else{ if($otp != $get_otp){ $this->session->set_flashdata('msg_n', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Wrong OTP</div>'); }else{ $this->session->set_flashdata('msg_n', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Password has been changed.</div>'); $data = array( 'otp' => '0', 'pass' => $password ); $this->app->UpdateData('tbl_registration', $data, $where); } } redirect('webcontroller/reset_pass/'.$enn.'/'.$enn_user); }else{ $data['get_address']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'address'),'other_cat','ASC'); $data['get_email']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'email'),'other_cat','ASC'); $data['get_conno']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'contact-no'),'other_cat','ASC'); $data['social']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'social-icon'),'other_cat','ASC'); $data['logo']=$this->model->sortingWheredata('*','tbl_other_detail',array('other_cat'=>'logo'),'other_cat','ASC'); $data['email'] = base64_decode($en_to); $data['username'] = base64_decode($en_username); $this->load->view("Web/header",$data); $this->load->view("Web/reset_pass"); $this->load->view("Web/footer2"); } } public function inquiry(){ $code=$this->input->post('code'); $rcode=$this->input->post('rcode'); $current_url=$this->input->post('current_url'); if($code==$rcode){ $to='cjrajpara@gmail.com'; $msg = ' <!DOCTYPE html> <html> <head> <title>New Inquiry</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg,#f58aeaf2 0%,#30c6d0e0 100%); padding: 10px; text-align: center;"> <h3>New Inquiry</h3> </div> <div style="padding: 1rem;"> <p><strong>Name :</strong> ' . $this->input->post('name') . '</p> <p><strong>Email :</strong> ' . $this->input->post('email') . '</p> <p><strong>Contact :</strong> ' . $this->input->post('mobile') . '</p> <p><strong>Subject :</strong> ' . $this->input->post('subject') . '</p> </div> </div> </body> </html>'; $sub = "New Inquiry"; $this->model->emailsend($to, $sub, $msg); $this->session->set_flashdata('msg_new', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Thank you for inquiry, You will be contacted shortly. </div>'); //redirect("webcontroller/ThankYou"); }else{ $this->session->set_flashdata('msg_new', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Please enter the valid sum. </div>'); //redirect($current_url); } redirect($current_url); } public function get_touch(){ $code=$this->input->post('code'); $rcode=$this->input->post('rcode'); $current_url=$this->input->post('current_url'); if($code==$rcode){ $to='cjrajpara@gmail.com'; $msg = ' <!DOCTYPE html> <html> <head> <title>New Inquiry</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg,#f58aeaf2 0%,#30c6d0e0 100%); padding: 10px; text-align: center;"> <h3>New Inquiry</h3> </div> <div style="padding: 1rem;"> <p><strong>Name :</strong> ' . $this->input->post('name') . '</p> <p><strong>Email :</strong> ' . $this->input->post('email') . '</p> <p><strong>Contact :</strong> ' . $this->input->post('mobile') . '</p> <p><strong>Subject :</strong> ' . $this->input->post('subject') . '</p> </div> </div> </body> </html>'; $sub = "New Inquiry"; $this->model->emailsend($to, $sub, $msg); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Thank you for inquiry, You will be contacted shortly. </div>'); //redirect("webcontroller/ThankYou"); }else{ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Please enter the valid sum. </div>'); //redirect($current_url); } redirect($current_url); } public function newsletter(){ $to='cjrajpara@gmail.com'; $msg = ' <!DOCTYPE html> <html> <head> <title>NEWSLETTER</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg,#f58aeaf2 0%,#30c6d0e0 100%); padding: 10px; text-align: center;"> <h3>NEWSLETTER</h3> </div> <div style="padding: 1rem;"> <p><strong>Newsletter :</strong> ' . $this->input->post('newsletter') . '</p> </div> </div> </body> </html>'; $sub = "NEWSLETTER"; $this->model->emailsend($to, $sub, $msg); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Thank you for inquiry, You will be contacted shortly. </div>'); redirect($current_url); } public function testEmail(){ $to = 'anil.patel@staroneweb.co.in'; $sub = "Paper Push"; $msg = 'Paper'; $this->model->emailsend($to, $sub, $msg); } } /* End of file welcome.php */ /* Location: ./application/controllers/welcome.php */ webapp/master/Tax.php 0000644 00000004134 14642254405 0010572 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Tax extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); } public function index() { $data['tax'] = $this->model->getDatamodel('tbl_tax'); $this->load->view("webapp/master/tax/view", $data); } public function add() { if($this->input->post('save')=='save') { $sgst = implode('|', $this->input->post('sgst')); $cgst = implode('|', $this->input->post('cgst')); $ugst = implode('|', $this->input->post('ugst')); $igst = implode('|', $this->input->post('igst')); $data = array( 'sgst'=>$sgst, 'cgst'=>$cgst, 'ugst'=>$ugst, 'igst'=>$igst ); $this->model->insertData('tbl_tax', $data); redirect('webapp/master/tax'); }else{ $this->load->view("webapp/master/tax/add"); } } public function edit() { if($this->input->post('save')=='save') { $sgst = implode('|', array_filter($this->input->post('sgst'))); $cgst = implode('|', array_filter($this->input->post('cgst'))); $ugst = implode('|', array_filter($this->input->post('ugst'))); $igst = implode('|', array_filter($this->input->post('igst'))); $data = array( 'sgst'=>$sgst, 'cgst'=>$cgst, 'ugst'=>$ugst, 'igst'=>$igst ); $where = array('id' => '1'); $this->model->UpdateData('tbl_tax', $data, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Tax has been updated. </div>'); redirect('webapp/master/tax'); }else{ $data['tax'] = $this->model->getDatamodel('tbl_tax'); $this->load->view("webapp/master/tax/add", $data); } } } webapp/master/Item.php 0000644 00000006311 14642254405 0010733 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Item extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); } public function index() { $data['item'] = $this->model->getItemModel(); //echo "<pre>"; print_r ($data['item']); echo "</pre>"; die; $this->load->view("webapp/master/item/view_item", $data); } public function add() { if($this->input->post('save')=='save') { $data = array( 'cid'=>$this->input->post('cid'), 'gid'=>$this->input->post('gid'), 'uid'=>$this->input->post('uid'), 'item_name'=>$this->input->post('item_name'), 'hsn'=>$this->input->post('hsn') ); $this->model->insertData('tbl_item', $data); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Inserted. </div>'); redirect('webapp/master/item'); }else{ $data['unit'] = $this->model->getDatamodel('tbl_unit'); $data['group'] = $this->model->getDatamodel('tbl_group'); $data['cat'] = $this->model->getDatamodel('tbl_item_cat'); $this->load->view("webapp/master/item/add_item", $data); } } public function edit($enc_id) { $id = $this->model->decryptdata($enc_id); if($this->input->post('save')=='save') { $data = array( 'cid'=>$this->input->post('cid'), 'gid'=>$this->input->post('gid'), 'uid'=>$this->input->post('uid'), 'item_name'=>$this->input->post('item_name'), 'hsn'=>$this->input->post('hsn') ); $where = array('id' => $enc_id); $this->model->UpdateData('tbl_item', $data, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Uploaded. </div>'); redirect('webapp/master/item'); }else{ $data['unit'] = $this->model->getDatamodel('tbl_unit'); $data['group'] = $this->model->getDatamodel('tbl_group'); $data['cat'] = $this->model->getDatamodel('tbl_item_cat'); $where = array('id' => $id); $data['item'] = $this->model->DetailData('tbl_item', $where); $this->load->view("webapp/master/item/add_item", $data); } } public function trash($enc_id) { $id = $this->model->decryptdata($enc_id); $where = array('id' => $id); $this->model->DeleteData('tbl_item', $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Deleted. </div>'); redirect('webapp/master/item'); } } webapp/master/Expense.php 0000644 00000005077 14642254406 0011455 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Expense extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); } public function index() { //$data['expense'] = $this->model->getDatamodel('tbl_expense'); $this->db2->from('tbl_expense'); $this->db2->order_by("eid", "DESC"); $data['expense'] = $this->db2->get()->result_array(); $this->load->view("webapp/master/expense/view", $data); } public function add() { if($this->input->post('save')=='save') { $data = array('ename'=>$this->input->post('ename')); $this->model->insertData('tbl_expense', $data); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Inserted. </div>'); redirect('webapp/master/expense'); }else{ $this->load->view("webapp/master/expense/add"); } } public function edit($enc_id) { $eid = $this->model->decryptdata($enc_id); if($this->input->post('save')=='save') { $data = array('ename'=>$this->input->post('ename')); $where = array('eid' => $enc_id); $this->model->UpdateData('tbl_expense', $data, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Uploaded. </div>'); redirect('webapp/master/expense'); }else{ $where = array('eid' => $eid); $data['expense'] = $this->model->DetailData('tbl_expense', $where); $this->load->view("webapp/master/expense/add", $data); } } public function trash($enc_id) { $eid = $this->model->decryptdata($enc_id); $where = array('eid' => $eid); $this->model->DeleteData('tbl_expense', $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Deleted. </div>'); redirect('webapp/master/expense'); } } webapp/master/Group.php 0000644 00000011715 14642254406 0011136 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Group extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); } public function index() { //$data['group'] = $this->model->getDatamodel('tbl_group'); $this->db2->from('tbl_group'); $this->db2->order_by("gid", "DESC"); $data['group'] = $this->db2->get()->result_array(); $this->load->view("webapp/master/group/view", $data); } public function add() { if($this->input->post('save')=='save') { $data = array('gname'=>$this->input->post('name'), 'gdesc'=>$this->input->post('gdesc')); $this->model->insertData('tbl_group', $data); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Inserted. </div>'); redirect('webapp/master/group'); }else{ $this->load->view("webapp/master/group/add"); } } public function edit($enc_id) { $gid = $this->model->decryptdata($enc_id); if($this->input->post('save')=='save') { $data = array('gname'=>$this->input->post('name'), 'gdesc'=>$this->input->post('gdesc')); $where = array('gid' => $enc_id); $this->model->UpdateData('tbl_group', $data, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Uploaded. </div>'); redirect('webapp/master/group'); }else{ $where = array('gid' => $gid); $data['group'] = $this->model->DetailData('tbl_group', $where); $this->load->view("webapp/master/group/add", $data); } } public function trash($enc_id) { $gid = $this->model->decryptdata($enc_id); $where = array('gid' => $gid); $this->model->DeleteData('tbl_group', $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Deleted. </div>'); redirect('webapp/master/group'); } public function grouped_voucher(){ $data['grouped_voucher'] = $this->model->getGroupedVoucher(); $this->load->view("webapp/master/group/gv_view", $data); } public function add_gv(){ if($this->input->post('save')=='save') { $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $data = array( 'voucher' => $this->input->post('voucher'), 'gid'=> $this->input->post('gid'), 'sg_id'=> $this->input->post('sg_id'), 'updated_by'=>$rid ); $this->model->insertData('tbl_grouped_voucher', $data); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Inserted. </div>'); redirect('webapp/master/group/grouped_voucher'); }else{ $data['group'] = $this->model->getDatamodel('tbl_group'); $this->load->view("webapp/master/group/gv_add", $data); } } public function edit_gv($enc_gvid){ $gvid = $this->model->decryptdata($enc_gvid); if($this->input->post('save')=='save') { $gid = implode('|', $this->input->post('gid')); $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $data = array( 'gid'=> $this->input->post('gid'), 'sg_id'=> $this->input->post('sg_id'), 'updated_by'=>$rid ); $where = array('gv_id' => $enc_gvid); $this->model->UpdateData('tbl_grouped_voucher', $data, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Uploaded. </div>'); redirect('webapp/master/group/grouped_voucher'); }else{ $data['group'] = $this->model->getDatamodel('tbl_group'); $where = array('gv_id' => $gvid); $data['gv'] = $this->model->DetailData('tbl_grouped_voucher', $where); $gid = $data['gv'][0]['gid']; $data['sub_group'] = $this->db2->get_where('tbl_subgroup', array('gid' => $gid))->result_array(); $this->load->view("webapp/master/group/gv_edit", $data); } } } webapp/master/Item_cat.php 0000644 00000014665 14642254407 0011577 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Item_cat extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); } public function index($offset = '0') { //$data['item'] = $this->model->getDatamodel('tbl_item_cat'); $this->db2->from('tbl_item_cat'); $this->db2->order_by("cid", "DESC"); $cnt_data['data'] = $this->db2->get()->result_array(); $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/master/item_cat/index'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $data['item'] = $this->model->get_pagination('tbl_item_cat', $config['per_page'], $offset); $this->load->view("webapp/master/item/view", $data); } public function add() { if($this->input->post('save')=='save') { $data = array('cname'=>$this->input->post('name')); $this->model->insertData('tbl_item_cat', $data); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Inserted. </div>'); redirect('webapp/master/item_cat'); }else{ $this->load->view("webapp/master/item/add"); } } public function edit($enc_id) { $cid = $this->model->decryptdata($enc_id); if($this->input->post('save')=='save') { $data = array('cname'=>$this->input->post('name')); $where = array('cid' => $enc_id); $this->model->UpdateData('tbl_item_cat', $data, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Uploaded. </div>'); redirect('webapp/master/item_cat'); }else{ $where = array('cid' => $cid); $data['item'] = $this->model->DetailData('tbl_item_cat', $where); $this->load->view("webapp/master/item/add", $data); } } public function trash($enc_id) { $cid = $this->model->decryptdata($enc_id); $where = array('cid' => $cid); $this->model->DeleteData('tbl_item_cat', $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Deleted. </div>'); redirect('webapp/master/item_cat'); } public function search() { $search = $this->input->post('src'); $this->db2->like('cname', $search); $result = $this->db2->get('tbl_item_cat')->result_array(); foreach ($result as $key => $value) { $enc_id = $this->model->encryptdata($value['cid']); echo '<tr> <td class="text-capitalize">'.$value["cname"].'</td> <td><a href="'.base_url().'webapp/master/item_cat/edit/'.$enc_id.'" class="btn btn-info"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a> <a href="'.base_url().'webapp/master/item_cat/trash/'.$enc_id.'" class="btn btn-danger"><i class="fa fa-trash" aria-hidden="true"></i></a> </td> </tr>'; } } public function default_cat($offset = '0') { //$data['item'] = $this->model->getDatamodel('tbl_item_cat'); $this->db2->from('tbl_item_cat'); $this->db2->order_by("cid", "DESC"); $cnt_data['data'] = $this->db2->get()->result_array(); $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/master/default_cat'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $result = $this->model->get_pagination('tbl_item_cat', $config['per_page'], $offset); foreach ($result as $key => $value) { $enc_id = $this->model->encryptdata($value['cid']); echo '<tr> <td class="text-capitalize">'.$value["cname"].'</td> <td><a href="'.base_url().'webapp/master/item_cat/edit/'.$enc_id.'" class="btn btn-info"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a> <a href="'.base_url().'webapp/master/item_cat/trash/'.$enc_id.'" class="btn btn-danger"><i class="fa fa-trash" aria-hidden="true"></i></a> </td> </tr>'; } } } webapp/master/Ledger.php 0000644 00000034117 14642254407 0011246 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Ledger extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); } public function index($offset = '0') { $data['count'] = $this->model->getDatamodel('tbl_registration'); $cnt=count($data['count']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/master/ledger/index'; $config['total_rows'] = $cnt; $config['per_page'] = 25; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $data['ledger'] = $this->model->getLedger($config['per_page'], $offset); $where_cust = array('type' => 'customer', 'status' =>'1'); $data['cust'] = $this->db2->get_where('tbl_registration', $where_cust)->result_array(); $this->load->view("webapp/master/ledger/view", $data); } public function add() { if($this->input->post('save')=='save') { //$gid = implode(',', $this->input->post('gid')); if($this->input->post('bal_type') == 'Dr'){ $ob = $this->input->post('open_balance'); $ob = '-'.$ob; }else{ $ob = $this->input->post('open_balance'); } $data = array( 'gid' => $this->input->post('gid'), 'l_name'=>$this->input->post('l_name'), 'rid'=>$this->input->post('rid'), 'sg_id'=>$this->input->post('sg_id'), 'open_balance'=> $ob, 'bal_type'=>$this->input->post('bal_type'), 'state'=>$this->input->post('state'), 'city'=>$this->input->post('city'), 'address'=>$this->input->post('address'), 'gst'=>$this->input->post('gst'), 'pan'=>$this->input->post('pan') ); $this->model->insertData('tbl_ledger', $data); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Inserted. </div>'); redirect('webapp/master/ledger'); }else{ $where_cust = array('type' => 'customer', 'status' =>'1'); $data['cust'] = $this->db2->get_where('tbl_registration', $where_cust)->result_array(); $data['group'] = $this->model->getDatamodel('tbl_group'); $this->load->view("webapp/master/ledger/add", $data); } } public function add_ajax() { //$gid = implode(',', $this->input->post('gid')); if($this->input->post('bal_type') == 'Dr'){ $ob = $this->input->post('open_balance'); $ob = '-'.$ob; }else{ $ob = $this->input->post('open_balance'); } $data = array( 'gid' => $this->input->post('gid'), 'l_name'=>$this->input->post('l_name'), 'rid'=>$this->input->post('rid'), 'sg_id'=>$this->input->post('sg_id'), 'open_balance'=>$ob, 'bal_type'=>$this->input->post('bal_type'), 'state'=>$this->input->post('state'), 'city'=>$this->input->post('city'), 'address'=>$this->input->post('address'), 'gst'=>$this->input->post('gst'), 'pan'=>$this->input->post('pan') ); $this->model->insertData('tbl_ledger', $data); $ledger = $this->model->getFormLedger($this->input->post('rid')); $html = ''; $html.=' <select class="form-control multiselect" name="ms_ledger" required> <option value="">--SELECT--</option>'; foreach($ledger as $key => $led){ $html.='<option value="'.$led['lid'].'">'.$led['l_name'].'</option>'; } $html.='</select> '; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } public function add_ajax_two() { //$gid = implode(',', $this->input->post('gid')); if($this->input->post('bal_type') == 'Dr'){ $ob = $this->input->post('open_balance'); $ob = '-'.$ob; }else{ $ob = $this->input->post('open_balance'); } $data = array( 'gid' => $this->input->post('gid'), 'l_name'=>$this->input->post('l_name'), 'rid'=>$this->input->post('rid'), 'sg_id'=>$this->input->post('sg_id'), 'open_balance'=>$ob, 'bal_type'=>$this->input->post('bal_type'), 'state'=>$this->input->post('state'), 'city'=>$this->input->post('city'), 'address'=>$this->input->post('address'), 'gst'=>$this->input->post('gst'), 'pan'=>$this->input->post('pan') ); $this->model->insertData('tbl_ledger', $data); $stage = $this->input->post('stage'); $where = array('voucher' => $stage); $ledger = $this->model->DetailData('tbl_grouped_voucher', $where); $gid = explode('|', $ledger[0]['gid']); //$new_ledger = $this->model->get_gl($gid, $this->input->post('cid')); $new_ledger = $this->model->selGroup($where, $this->input->post('rid')); $html = ''; $html.=' <select class="form-control multiselect" name="ms_ledger"> <option value="0">--SELECT--</option>'; foreach($new_ledger as $key => $led){ $html.='<option value="'.$led['lid'].'">'.$led['l_name'].'</option>'; } $html.='</select> '; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } public function edit($enc_id) { $lid = $this->model->decryptdata($enc_id); if($this->input->post('save')=='save') { //echo "<pre>"; print_r ($_POST); echo "</pre>"; die; //$gid = implode(',', $this->input->post('gid')); $data = array( 'gid' => $this->input->post('gid'), 'l_name'=>$this->input->post('l_name'), 'rid'=>$this->input->post('rid'), 'sg_id'=>$this->input->post('sg_id'), 'open_balance'=>$this->input->post('open_balance'), 'bal_type'=>$this->input->post('bal_type'), 'state'=>$this->input->post('state'), 'city'=>$this->input->post('city'), 'address'=>$this->input->post('address'), 'gst'=>$this->input->post('gst'), 'pan'=>$this->input->post('pan') ); //echo $enc_id; die; $where = array('lid' => $enc_id); $this->model->UpdateData('tbl_ledger', $data, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Uploaded. </div>'); $rid = $this->db2->get_where('tbl_ledger', array('lid' => $enc_id))->row('rid'); $encrypt = $this->model->encryptdata($rid); redirect('webapp/master/ledger/view_ledger/'.$encrypt); }else{ $where_cust = array('type' => 'customer', 'status' =>'1'); $data['cust'] = $this->db2->get_where('tbl_registration', $where_cust)->result_array(); $where = array('lid' => $lid); $data['ledger'] = $this->model->DetailData('tbl_ledger', $where); $data['group'] = $this->model->getDatamodel('tbl_group'); $gid = $data['ledger'][0]['gid']; $data['sub_group'] = $this->db2->get_where('tbl_subgroup', array('gid' => $gid))->result_array(); $this->load->view("webapp/master/ledger/add", $data); } } public function trash($enc_id) { $lid = $this->model->decryptdata($enc_id); $where = array('lid' => $lid); $this->model->DeleteData('tbl_ledger', $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Deleted. </div>'); redirect('webapp/master/ledger'); } public function get_subgr($gid){ $data = $this->db2->get_where('tbl_subgroup', array('gid' => $gid))->result_array(); $html = ''; $html.='<option value="">--Select--</option>'; foreach ($data as $k => $v) { $html.='<option value="'.$v["sg_id"].'">'.$v["sg_name"].'</option>'; } $array['html'] = $html; echo json_encode($array); } public function import_ledger(){ $this->load->library('excel'); //echo "<pre>"; print_r ($_POST); echo "</pre>"; //echo "<pre>"; print_r ($_FILES); echo "</pre>"; $rid = $this->input->post('rid'); if(isset($_FILES["ledger_file"]["name"])) { $path = $_FILES["ledger_file"]["tmp_name"]; $object = PHPExcel_IOFactory::load($path); foreach($object->getWorksheetIterator() as $worksheet) { $highestRow = $worksheet->getHighestRow(); $highestColumn = $worksheet->getHighestColumn(); for($row=2; $row<=$highestRow; $row++) { $l_name = $worksheet->getCellByColumnAndRow(0, $row)->getValue(); $open_balance = $worksheet->getCellByColumnAndRow(1, $row)->getValue(); if($open_balance < 0){ $bal_type = 'Dr'; }else{ $bal_type = 'Cr'; } $group = $worksheet->getCellByColumnAndRow(2, $row)->getValue(); if($group != ''){ $gid = $this->model->getGroupID($group); }else{ $gid = $this->model->getGroupID('Suspense A/c'); } $sub_group = $worksheet->getCellByColumnAndRow(3, $row)->getValue(); if($sub_group != ''){ $sg_id = $this->model->getSubGroupID($sub_group); }else{ $sg_id = 0; } $state = $worksheet->getCellByColumnAndRow(4, $row)->getValue(); $city = $worksheet->getCellByColumnAndRow(5, $row)->getValue(); $address = $worksheet->getCellByColumnAndRow(6, $row)->getValue(); $gst = $worksheet->getCellByColumnAndRow(7, $row)->getValue(); $pan = $worksheet->getCellByColumnAndRow(8, $row)->getValue(); $data = array( 'l_name' => $l_name, 'open_balance' => $open_balance, 'bal_type' => $bal_type, 'gid' => $gid, 'sg_id' => $sg_id, 'rid' => $rid, 'state' => $state, 'city' => $city, 'address' => $address, 'gst' => $gst, 'pan' => $pan ); $this->model->insertData('tbl_ledger', $data); } } //echo "<pre>"; print_r ($data); echo "</pre>"; } $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> New Ledgers has been imported. </div>'); redirect('webapp/master/ledger'); } public function view_ledger($enc_id, $offset = '0'){ $rid = $this->model->decryptdata($enc_id); $cnt = $this->db2->get_where('tbl_ledger', array('rid' => $rid))->num_rows(); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/master/ledger/view_ledger/'.$enc_id; $config['total_rows'] = $cnt; $config['per_page'] = 25; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $data['ledger'] = $this->model->getLedgerView($rid, $config['per_page'], $offset); $this->load->view("webapp/master/ledger/viewLedger", $data); } public function ledger_xml($enc_id){ $rid = $this->model->decryptdata($enc_id); $data['cust'] = $this->db2->get_where('tbl_registration', array('rid' => $rid))->row_array(); $data['ledger'] = $this->model->getLedgerXml($rid); //echo "<pre>"; print_r ($data['ledger']); echo "</pre>"; die; $this->load->view("webapp/master/ledger/ledger_xml", $data); } public function test(){ //echo "hi"; $data = $this->model->getDatamodel('tbl_ledger'); if (!empty($data)) { $html = '<option value="" >Select</option>'; foreach ($data as $val) { $sp_id = $val['lid']; $job_fun_spec = $val['l_name']; $html .= '<option value="' . $sp_id . '" >' . $job_fun_spec . '</option>'; } } else { $html = '<option value="" >Select</option>'; } if (!empty($data)) { $resultArrauy['status'] = 'Success'; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } else { $resultArrauy['status'] = 'error'; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } } } webapp/master/Subgroup.php 0000644 00000005652 14642254407 0011654 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Subgroup extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); } public function index() { $this->db2->select('a.*, b.gname'); $this->db2->from('tbl_subgroup as a'); $this->db2->order_by("a.sg_id", "DESC"); $this->db2->join('tbl_group as b', 'b.gid = a.gid', 'left'); $data['subgroup'] = $this->db2->get()->result_array(); $this->load->view("webapp/master/subgroup/view", $data); } public function add() { if($this->input->post('save')=='save') { $data = array('gid'=>$this->input->post('gid'), 'sg_name'=>$this->input->post('sg_name'), 'sg_desc'=>$this->input->post('sg_desc')); $this->model->insertData('tbl_subgroup', $data); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Inserted. </div>'); redirect('webapp/master/subgroup'); }else{ $data['group'] = $this->model->getDatamodel('tbl_group'); $this->load->view("webapp/master/subgroup/add", $data); } } public function edit($enc_id) { $sg_id = $this->model->decryptdata($enc_id); if($this->input->post('save')=='save') { $data = array('gid'=>$this->input->post('gid'), 'sg_name'=>$this->input->post('sg_name'), 'sg_desc'=>$this->input->post('sg_desc')); $where = array('sg_id' => $enc_id); $this->model->UpdateData('tbl_subgroup', $data, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Uploaded. </div>'); redirect('webapp/master/subgroup'); }else{ $where = array('sg_id' => $sg_id); $data['subgroup'] = $this->model->DetailData('tbl_subgroup', $where); $data['group'] = $this->model->getDatamodel('tbl_group'); $this->load->view("webapp/master/subgroup/add", $data); } } public function trash($enc_id) { $sg_id = $this->model->decryptdata($enc_id); $where = array('sg_id' => $sg_id); $this->model->DeleteData('tbl_subgroup', $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been Deleted. </div>'); redirect('webapp/master/subgroup'); } } webapp/People.php 0000644 00000171534 14642254410 0007774 0 ustar 00 <?php use Aws\S3\S3Client; use Aws\S3\Exception\S3Exception; use Aws\CommandPool; if ( ! defined('BASEPATH')) exit('No direct script access allowed'); require_once APPPATH."third_party/aws/autoload.php"; class People extends CI_Controller { function __construct() { parent::__construct(); $userdata = $this->session->userdata('reg_info'); if(!isset($userdata)) { $base = base_url(); redirect($base); } $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); //aws $bucketname = 'paperpushbucket'; $key = 'AKIAJJ72VRLHXBD272YQ'; $secret = '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'; $this->s3 = S3Client::factory( array( 'credentials' => array( 'key' => $key, 'secret' => $secret ), 'version' => 'latest', 'region' => 'ap-south-1' ) ); } public function office($offset = '0') { $where = array('type!=' => 'customer'); //$cnt_data['data']=$this->model->DetailData('tbl_registration', $where); $names = array('customer', 'superadmin'); $this->db2->select('*'); $this->db2->from('tbl_registration'); if($_SESSION['reg_info'][0]['type'] == 'admin'){ $this->db2->where_not_in('type', $names); }else{ $this->db2->where($where); } //$this->db2->where_not_in('type', $names); $cnt_data['data'] = $this->db2->get()->result_array(); //echo "<pre>";print_r($cnt_data['data']);die; $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/people/office'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $userdata['data'] = $this->model->get_pagination_where_admin_office('tbl_registration', $config['per_page'], $offset, $where); //echo "<pre>";print_r($userdata['data']);die; $userdata['type'] = 'office'; $this->load->view("webapp/office",$userdata); } public function customer($offset = 0) { if(isset($_GET['showactive']) && $_GET['showactive'] == "1"){ $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> User is Activated. </div>'); //redirect('webapp/people/customer'); } /*$where = array('type' => 'customer'); $cnt_data['data']=$this->model->DetailData('tbl_registration', $where);*/ $where = array('r.type' => 'customer'); $rids = $this->getAssignedCustomer_teamleader($_SESSION['reg_info'][0]['rid']); $this->db2->select('r.*,i.name as leadername'); $this->db2->from('tbl_registration as r'); if($_SESSION['reg_info'][0]['type'] == 'admin' || $_SESSION['reg_info'][0]['type'] == 'superadmin'){ $this->db2->where($where); }else{ $this->db2->where("r.type" , "customer"); $this->db2->where_in("r.rid" , $rids); } $this->db2->join('tbl_assign_customer_teamleader as b', 'b.customer_id = r.rid', 'left'); $this->db2->join('tbl_registration as i', 'i.rid = b.leader_id', 'left'); $cnt_data['data'] = $this->db2->get()->result_array(); $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/people/customer'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $userdata['data'] = $this->model->get_pagination_where_Cust('tbl_registration', $config['per_page'], $offset, $where); //echo "<pre>";print_r($userdata['data']);die; $userdata['type'] = 'customer'; $userdata['customer'] = 'Customer'; /*$this->db2->select('r.*,i.name as leadername'); $this->db2->from('tbl_registration as r'); $this->db2->where('r.type', 'customer'); $this->db2->join('tbl_assign_customer_teamleader as b', 'b.customer_id = r.rid', 'left'); $this->db2->join('tbl_registration as i', 'i.rid = b.leader_id', 'left'); $userdata['Assign_Team_Leader'] = $this->db2->get()->result_array(); //echo "<pre>"; print_r($userdata['Assign_Team_Leader']); die;*/ $this->db2->select('a.rid,a.name'); $this->db2->from('tbl_registration as a'); $this->db2->where('type', 'team_leader'); $userdata['Team_Leader'] = $this->db2->get()->result_array(); //echo "<pre>"; print_r($userdata['Team_Leader']); die; $userdata['All_Customer'] = $this->db2->get_where('tbl_registration', array('type'=>'customer'))->num_rows(); $userdata['EmailVerified'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','status'=>'1'))->num_rows(); $userdata['EmailPending'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','status'=>'0'))->num_rows(); $userdata['PaymentDone'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','payment_status'=>'1'))->num_rows(); $userdata['PaymentPending'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','payment_status'=>'0'))->num_rows(); //echo "<pre>"; print_r($userdata['EmailPending']); die; $this->load->view("webapp/office",$userdata); } public function getAssignedCustomer_teamleader($lid){ $this->db2->select("customer_id"); $this->db2->from("tbl_assign_customer_teamleader"); $this->db2->where("leader_id" , $lid ); $data = $this->db2->get()->result_array(); $temp = [] ; if(!empty($data)){ foreach($data as $k => $v){ $temp[] = $v['customer_id']; } }else{ $temp[] = ""; } return $temp ; } public function assignto(){ //$temp = [] ; if($_POST['assignto'] != "" && $_POST['rids'] != ""){ $assignedIDS = $this->getAssignedCustomer_teamleader($_POST['assignto']); $count = count($_POST['rids']); $customer_id = $_POST['rids']; for($i=0; $i<$count; $i++){ if($customer_id[$i] != ""){ if(in_array($customer_id[$i] , $assignedIDS )){ continue; } $this->db2->select("customer_id"); $this->db2->from("tbl_assign_customer_teamleader"); $this->db2->where("leader_id !=" , $_POST['assignto'] ); $this->db2->where("customer_id" , $customer_id[$i] ); $id2s = $this->db2->get()->row_array(); /*echo "<pre>"; print_r($id2s['customer_id']); die;*/ if(empty($id2s)){ $insertdata=array( 'leader_id'=>$_POST['assignto'], 'customer_id'=>$customer_id[$i], ); $this->model->insertData('tbl_assign_customer_teamleader',$insertdata); }else{ //$temp[] = $id2s['customer_id'] ; $where_upa = array('customer_id' => $customer_id[$i] ); $insertdata_upa=array( 'leader_id'=>$_POST['assignto'], 'customer_id'=>$customer_id[$i], ); $this->model->UpdateData('tbl_assign_customer_teamleader', $insertdata_upa, $where_upa); } } } /*if(count($temp) > 0){ $this->db2->select("group_concat(name) notassignedname"); $this->db2->from("tbl_registration"); $this->db2->where_in("rid" , $temp ); $notassignedname = $this->db2->get()->row_array(); $names = $notassignedname['notassignedname']; }else{ $names = '' ; }*/ $array['status'] = 'success'; $array['message'] = 'Customer Assign Successfully'; //$array['not_assigned'] = $temp; //$array['not_assigned_name'] = $names; }else if($_POST['assignto'] == "" && $_POST['rids'] != ""){ $array['status'] = 'error'; $array['message'] = 'Please Select Team Leader Name'; //$array['not_assigned'] = $temp; //$array['not_assigned_name'] = ''; }else if($_POST['assignto'] != "" && $_POST['rids'] == ""){ $array['status'] = 'error'; $array['message'] = 'Please Select Customer Name'; //$array['not_assigned'] = $temp; //$array['not_assigned_name'] = ''; }else if($_POST['assignto'] == "" && $_POST['rids'] == ""){ $array['status'] = 'error'; $array['message'] = 'Please Select Team Leader and Customer Name'; //$array['not_assigned'] = $temp; //$array['not_assigned_name'] = ''; }else{ $array['status'] = 'error'; $array['message'] = 'You are not Assign this Customer'; //$array['not_assigned'] = $temp; //$array['not_assigned_name'] = ''; } echo json_encode($array); //DIE; } public function view($encrypted_id) { $id = $this->model->decryptdata($encrypted_id); $where=array('rid' => $id); $userdata['data'] = $this->model->DetailData('tbl_registration', $where); $cur_year = date('Y'); $this->db2->order_by('id', 'DESC'); $this->db2->limit(12); $userdata['log'] = $this->db2->get_where('tbl_cust_log', $where)->result_array(); $where2=array('type' => 'office_user'); $userdata['office_user'] = $this->model->DetailData('tbl_registration', $where2); //$where3=array('afrom' => $id); $userdata['access_folder'] = $this->model->getAccess($id); $userdata['encrypted_id'] = $encrypted_id; //echo "<pre>"; print_r($userdata['access_folder']); die; $where = array('code' => $userdata['data'][0]['folder_code']); $userdata['struct'] = $this->db2->get_where('cust_upload_structure', $where)->result_array(); $userdata['code'] = $userdata['data'][0]['folder_code']; $where_current = array('code' => $userdata['data'][0]['folder_code'], 'year'=>$cur_year); $userdata['current_ser'] = $this->db2->get_where('cust_upload_structure', $where_current)->row_array(); //echo "<pre>"; print_r($userdata['struct']); die; $this->db2->select('*'); $this->db2->from('cust_upload_notify'); $this->db2->where('n_from', $id); $this->db2->limit(10); $userdata['logs'] = $this->db2->get()->result_array(); //echo "<pre>"; print_r($userdata); die; $this->load->view("webapp/view_people",$userdata); } public function add_user(){ if($this->input->post('save')=='save'){ $email = $this->input->post('email'); /*$where = array('email' => $email, 'type!=' => 'customer'); $chk_email = $this->model->DetailData('tbl_registration', $where);*/ $username = $this->input->post('username'); $where = array('username' => $username, 'type!=' => 'customer'); $chk_username = $this->model->DetailData('tbl_registration', $where); $cnt = count($chk_username); if($cnt == '0'){ $pass = $this->input->post('phone'); $password = md5($pass); $config['upload_path'] = './webapp/profile/'; $config['allowed_types']= 'gif|jpg|png|jpeg'; $config['encrypt_name'] = TRUE; $this->upload->initialize($config); $this->load->library('upload', $config); $this->upload->do_upload('photo'); $data = $this->upload->data(); $photo = $data['file_name']; $insertdata=array( 'pass'=>$password, 'name'=>$this->input->post('name'), 'email'=>$email, 'username'=>$username, 'mobile'=>$this->input->post('phone'), 'photo'=>$photo, 'type'=>$this->input->post('type'), 'reg_from'=>'system', 'status'=>'1' ); $this->model->insertData('tbl_registration',$insertdata); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> User has been added. </div>'); redirect('webapp/people/office'); }else{ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> User Name is already available. </div>'); redirect('webapp/people/office'); } }else{ $this->load->view('webapp/add_user'); } } public function search(){ $search = $this->input->post('src'); $where = array('type!=' => 'customer'); $names = array('customer', 'superadmin'); $this->db2->select('*'); $this->db2->like('name', $search); if($_SESSION['reg_info'][0]['type'] == 'admin'){ $this->db2->where_not_in('type', $names); }else{ $this->db2->where($where); } //$this->db2->where('type!=', 'customer'); $result = $this->db2->get('tbl_registration')->result_array(); foreach ($result as $key => $value) { $encrypted_id = $this->model->encryptdata($value['rid']); if($value['type'] == 'team_leader'){ $label = "Team Leader"; }elseif($value['type'] == 'office_user'){ $label = "Office User"; }elseif($value['type'] == 'admin'){ $label = "Admin"; }elseif($value['type'] == 'superadmin'){ $label = "Super Admin"; } if($value['status'] == '1'){ $es = '<span class="badge bg-green">Verified</span>'; }else{ $es = '<span class="badge bg-red">pending</span>'; } echo '<tr> <td class="text-capitalize"><a href="'.base_url()."webapp/people/view/".$encrypted_id.'">'.$value["name"].'</a><br><span class="text-danger">'.$label.'</span></td> <td>'.$value["email"].'</td> <td>'.$value["username"].'</td> <td>'.$value["mobile"].'</td> <td>'.$es.'</td> <td>'; echo '<a href="'.base_url().'webapp/people/updateUser/'.$encrypted_id.'" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i></a> '; if($value['type'] != 'admin'){ if($value['status'] == '1'){ echo '<a href="'.base_url().'webapp/people/deactive/'.$encrypted_id.'" class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="Click here to deactive" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i></a>'; }else{ echo '<a href="'.base_url().'webapp/people/active/'.$encrypted_id.'" class="btn btn-success" data-toggle="tooltip" data-placement="top" title="Click here to active" aria-hidden="true"><i class="fa fa-check" aria-hidden="true"></i></a>'; } } '</td> </tr>'; } } public function json_office_rec($offset = '0') { $where = array('type!=' => 'customer'); //$cnt_data['data']=$this->model->DetailData('tbl_registration', $where); $names = array('customer', 'superadmin'); $this->db2->select('*'); $this->db2->from('tbl_registration'); if($_SESSION['reg_info'][0]['type'] == 'admin'){ $this->db2->where_not_in('type', $names); }else{ $this->db2->where($where); } $cnt_data['data'] = $this->db2->get()->result_array(); //echo "<pre>";print_r($cnt_data['data']);die; $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/people/json_office_rec'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $result = $this->model->get_pagination_where_admin_office('tbl_registration', $config['per_page'], $offset, $where); //echo "<pre>"; print_r($result); die; foreach ($result as $key => $value) { $encrypted_id = $this->model->encryptdata($value['rid']); if($value['type'] == 'team_leader'){ $label = "Team Leader"; }elseif($value['type'] == 'office_user'){ $label = "Office User"; }elseif($value['type'] == 'admin'){ $label = "Admin"; }elseif($value['type'] == 'superadmin'){ $label = "Super Admin"; } if($value['status'] == '1'){ $es = '<span class="badge bg-green">Verified</span>'; }else{ $es = '<span class="badge bg-red">pending</span>'; } echo '<tr> <td class="text-capitalize"><a href="'.base_url()."webapp/people/view/".$encrypted_id.'">'.$value["name"].'</a><br><span class="text-danger">'.$label.'</span></td> <td>'.$value["email"].'</td> <td>'.$value["username"].'</td> <td>'.$value["mobile"].'</td> <td>'.$es.'</td> <td>'; echo '<a href="'.base_url().'webapp/people/updateUser/'.$encrypted_id.'" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i></a> '; if($value['type'] != 'admin'){ if($value['status'] == '1'){ echo '<a href="'.base_url().'webapp/people/deactive/'.$encrypted_id.'" class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="Click here to deactive" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i></a>'; }else{ echo '<a href="'.base_url().'webapp/people/active/'.$encrypted_id.'" class="btn btn-success" data-toggle="tooltip" data-placement="top" title="Click here to active" aria-hidden="true"><i class="fa fa-check" aria-hidden="true"></i></a>'; } } '</td> </tr>'; } } public function search_cust(){ $search = $this->input->post('src'); /*$this->db2->select('*'); $this->db2->where('type', 'customer'); $this->db2->like('name', $search); $result = $this->db2->get('tbl_registration')->result_array();*/ //echo "<pre>"; print_r($result); die; $this->db2->select('r.*,i.name as leadername'); $this->db2->where('r.type', 'customer'); $this->db2->like('r.name', $search); $this->db2->from('tbl_registration as r'); $this->db2->join('tbl_assign_customer_teamleader as b', 'b.customer_id = r.rid', 'left'); $this->db2->join('tbl_registration as i', 'i.rid = b.leader_id', 'left'); $result = $this->db2->get()->result_array(); //echo "<pre>"; print_r($result); die; foreach ($result as $key => $value) { $encrypted_id = $this->model->encryptdata($value['rid']); if($value['status'] == '1'){ $email_status = '<span class="badge bg-green">Verified</span>'; }else{ $email_status = '<span class="badge bg-red">Pending</span>'; } if($value['payment_status'] == '1'){ $payment_status = '<span class="badge bg-green">Done</span>'; }else{ $payment_status = '<span class="badge bg-red">Pending</span>'; } $chk = '<input type="checkbox" class="customrid" onchange="setrids()" name="rid[]" value="'.$value["rid"].'" >'; echo '<tr> <td>'.$chk.'</td> <td class="text-capitalize"><a href="'.base_url()."webapp/people/view/".$encrypted_id.'">'.$value["name"].'</a></td> <td>'.$value["leadername"].'</td> <td>'.$value["email"].'</td> <td>'.$value["username"].'</td> <td>'.$value["mobile"].'</td> <td>'.$email_status.'</td> <td>'.$payment_status.'</td> <td>'; echo '<a href="'.base_url().'webapp/people/updateUser/'.$encrypted_id.'" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i></a> '; if($value['type'] != 'admin'){ if($value['payment_status'] == '1'){ echo '<a href="'.base_url().'webapp/people/deactive/'.$encrypted_id.'" class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="Click here to deactive" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i></a>'; }else{ echo '<a href="'.base_url().'webapp/people/active/'.$encrypted_id.'" class="btn btn-success" data-toggle="tooltip" data-placement="top" title="Click here to active" aria-hidden="true"><i class="fa fa-check" aria-hidden="true"></i></a>'; } } '</td> </tr>'; } } public function json_cust_rec($offset = '0') { $where = array('type' => 'customer'); $cnt_data['data']=$this->model->DetailData('tbl_registration', $where); $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/people/json_cust_rec'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); //$result = $this->model->get_pagination_where('tbl_registration', $config['per_page'], $offset, $where); $result = $this->model->get_pagination_where_Cust('tbl_registration', $config['per_page'], $offset, $where); //echo "<pre>"; print_r($result); die; foreach ($result as $key => $value) { $encrypted_id = $this->model->encryptdata($value['rid']); if($value['status'] == '1'){ $email_status = '<span class="badge bg-green">Verified</span>'; }else{ $email_status = '<span class="badge bg-red">Pending</span>'; } if($value['payment_status'] == '1'){ $payment_status = '<span class="badge bg-green">Done</span>'; }else{ $payment_status = '<span class="badge bg-red">Pending</span>'; } $chk = '<input type="checkbox" class="customrid" onchange="setrids()" name="rid[]" value="'.$value["rid"].'" >'; echo '<tr> <td>'.$chk.'</td> <td class="text-capitalize"><a href="'.base_url()."webapp/people/view/".$encrypted_id.'">'.$value["name"].'</a></td> <td>'.$value["leadername"].'</td> <td>'.$value["email"].'</td> <td>'.$value["username"].'</td> <td>'.$value["mobile"].'</td> <td>'.$email_status.'</td> <td>'.$payment_status.'</td> <td>'; echo '<a href="'.base_url().'webapp/people/updateUser/'.$encrypted_id.'" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i></a> '; if($value['type'] != 'admin'){ if($value['payment_status'] == '1'){ echo '<a href="'.base_url().'webapp/people/deactive/'.$encrypted_id.'" class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="Click here to deactive" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i></a>'; }else{ echo '<a href="'.base_url().'webapp/people/active/'.$encrypted_id.'" class="btn btn-success" data-toggle="tooltip" data-placement="top" title="Click here to active" aria-hidden="true"><i class="fa fa-check" aria-hidden="true"></i></a>'; } } '</td> </tr>'; } } /***************************** Start TeamLeader Cutomer Search ***************************************************/ public function search_cust_team(){ $search = $this->input->post('src'); $rids = $this->getAssignedCustomerCheck($_SESSION['reg_info'][0]['rid']); $this->db2->select('r.*,i.name as leadername'); $this->db2->where("r.type" , "customer"); $this->db2->where_in("r.rid" , $rids); $this->db2->like('r.name', $search); $this->db2->from('tbl_registration as r'); $this->db2->join('tbl_assign_customer_teamleader as b', 'b.customer_id = r.rid', 'left'); $this->db2->join('tbl_registration as i', 'i.rid = b.leader_id', 'left'); $result = $this->db2->get()->result_array(); //echo "<pre>"; print_r($result); die; foreach ($result as $key => $value) { $encrypted_id = $this->model->encryptdata($value['rid']); echo '<tr> <td class="text-capitalize"><a href="'.base_url()."webapp/people/view/".$encrypted_id.'">'.$value["name"].'</a></td> <td>'.$value["email"].'</td> <td>'.$value["username"].'</td> <td>'.$value["mobile"].'</td> <td>'; echo '<a href="'.base_url().'webapp/people/updateUser/'.$encrypted_id.'" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i></a> '; '</td> </tr>'; } } public function json_cust_team_rec($offset = '0') { $where = array('type' => 'customer'); $cnt_data['data']=$this->model->DetailData('tbl_registration', $where); $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/people/json_cust_rec'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $result = $this->model->get_pagination_where_Cust('tbl_registration', $config['per_page'], $offset, $where); //echo "<pre>"; print_r($result); die; foreach ($result as $key => $value) { $encrypted_id = $this->model->encryptdata($value['rid']); echo '<tr> <td class="text-capitalize"><a href="'.base_url()."webapp/people/view/".$encrypted_id.'">'.$value["name"].'</a></td> <td>'.$value["email"].'</td> <td>'.$value["username"].'</td> <td>'.$value["mobile"].'</td> <td>'; echo '<a href="'.base_url().'webapp/people/updateUser/'.$encrypted_id.'" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i></a> '; '</td> </tr>'; } } public function getAssignedCustomerCheck($lid){ $this->db2->select("customer_id"); $this->db2->from("tbl_assign_customer_teamleader"); $this->db2->where("leader_id" , $lid ); $data = $this->db2->get()->result_array(); $temp = [] ; if(!empty($data)){ foreach($data as $k => $v){ $temp[] = $v['customer_id']; } }else{ $temp[] = ""; } return $temp ; } /***************************** End TeamLeader Cutomer Search ***************************************************/ public function changePhoto(){ $uid = $this->input->post('uid'); $where = array('rid' => $uid); $user = $this->model->DetailData('tbl_registration', $where); $old_photo = $user[0]['photo']; $config['upload_path'] = './webapp/profile/'; $config['allowed_types']= 'gif|jpg|png|pdf|jpeg'; $config['encrypt_name'] = TRUE; $this->upload->initialize($config); $this->load->library('upload', $config); if($this->upload->do_upload('photo')){ if(!empty($old_photo)){ unlink('webapp/profile/'.$old_photo); } $data = $this->upload->data(); $photo = $data['file_name']; }else{ $photo = $this->input->post('hiddenPhoto'); } $date_incorporation = date("Y-m-d", strtotime($this->input->post('date_incorporation'))); $country = explode('_', $this->input->post('country')); $country = $country[1]; if($country == "India"){ $phone_code = "+91"; $gst = $this->input->post('gst'); $pan = $this->input->post('pan'); $llc_no = $this->input->post('llc_no'); $llp_no = $this->input->post('llp_no'); $cin_no = $this->input->post('cin_no'); $tax_id = ""; $impo_expo_no = $this->input->post('impo_expo_no'); $other_reg_no = $this->input->post('other_reg_no'); }else{ $phone_code = "+1"; $gst = ""; $pan = ""; $llc_no = $this->input->post('llc_no'); $llp_no = $this->input->post('llp_no'); $cin_no = ""; $tax_id = $this->input->post('tax_id'); $impo_expo_no = $this->input->post('impo_expo_no'); $other_reg_no = $this->input->post('other_reg_no'); } $insertdata=array( 'photo' => $photo, 'name' => $this->input->post('name'), 'email' => $this->input->post('email'), 'phone_code' => $phone_code, 'mobile' => $this->input->post('phone'), 'constitution'=>$this->input->post('constitution'), 'business_name'=>$this->input->post('business_name'), 'constitution_other'=>$this->input->post('constitution_other'), 'date_incorporation'=>$date_incorporation, 'nob'=>$this->input->post('nob'), 'ur'=>$this->input->post('ur'), 'ri'=>$this->input->post('ri'), 'gst'=>$gst, 'pan'=>$pan, 'llc_no'=>$llc_no, 'llp_no'=>$llp_no, 'cin_no'=>$cin_no, 'tax_id'=>$tax_id, 'impo_expo_no'=>$impo_expo_no, 'other_reg_no'=>$other_reg_no, 'country'=>$country, 'state'=>$this->input->post('state'), 'address'=>$this->input->post('address') ); $this->model->UpdateData('tbl_registration', $insertdata, $where); /************************************************************************/ $where_fltr=array('rid'=>$uid); $fltrData=$this->model->DetailData('tbl_director',$where_fltr); $fltrData = count($fltrData); if($fltrData >0){ $this->model->DeleteData('tbl_director',$where_fltr); } $count = count($this->input->post('director_name')); $director_name = $this->input->post('director_name'); $din_no = $this->input->post('din_no'); for($i=0; $i<$count; $i++){ if($director_name[$i] != ""){ $insertdata_flo=array( 'rid'=>$uid, 'director_name'=>$director_name[$i], 'din_no'=>$din_no[$i], ); $this->model->insertData('tbl_director', $insertdata_flo); } } /*************************************************************************/ $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been updated. </div>'); redirect('webapp/users/profile'); } public function updateUser($encrypted_id){ $uid = $this->model->decryptdata($encrypted_id); if($this->input->post('save')=='save'){ //echo "<pre>"; print_r($_POST); die; $where = array('rid' => $uid); $user = $this->model->DetailData('tbl_registration', $where); $old_photo = $user[0]['photo']; $config['upload_path'] = './webapp/profile/'; $config['allowed_types']= 'gif|jpg|png|pdf|jpeg'; $config['encrypt_name'] = TRUE; $this->upload->initialize($config); $this->load->library('upload', $config); if($this->upload->do_upload('photo')){ if(!empty($old_photo)){ unlink('webapp/profile/'.$old_photo); } $data = $this->upload->data(); $photo = $data['file_name']; }else{ $photo = $this->input->post('hiddenPhoto'); } /*$username = $this->input->post('username'); $where_username = array('username' => $username); $query = $this->model->DetailData('tbl_registration', $where_username); $cnt = count($query); if($cnt == 0){ $insertdata=array( 'photo' => $photo, 'name' => $this->input->post('name'), 'email' => $this->input->post('email'), 'username' => $this->input->post('username'), 'mobile' => $this->input->post('phone') ); $this->model->UpdateData('tbl_registration', $insertdata, $where); }else{ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> User Name Already Available. </div>'); redirect('webapp/people/office'); }*/ $insertdata=array( 'photo' => $photo, 'name' => $this->input->post('name'), 'email' => $this->input->post('email'), 'mobile' => $this->input->post('phone') ); $this->model->UpdateData('tbl_registration', $insertdata, $where); $this->db2->select("customer_id"); $this->db2->from("tbl_assign_customer_teamleader"); $this->db2->where("leader_id !=" , $_POST['TeamLeader'] ); $this->db2->where("customer_id" , $uid ); $id2s = $this->db2->get()->row_array(); if(empty($id2s)){ $insertdata_ass=array( 'leader_id'=>$_POST['TeamLeader'], 'customer_id'=>$uid, ); $this->model->insertData('tbl_assign_customer_teamleader',$insertdata_ass); }else{ $where2 = array('customer_id' => $uid); $insertdata_ass_upa=array( 'leader_id'=>$_POST['TeamLeader'], 'customer_id'=>$uid, ); $this->model->UpdateData('tbl_assign_customer_teamleader',$insertdata_ass_upa, $where2); } $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been updated. </div>'); redirect('webapp/people/office'); }else{ /*$where = array('rid' => $uid); $data['user'] = $this->model->DetailData('tbl_registration', $where);*/ $this->db2->select('r.*,i.name as LeaderName,i.rid as LeaderId'); $this->db2->from('tbl_registration as r'); $this->db2->where('r.rid', $uid); $this->db2->join('tbl_assign_customer_teamleader as b', 'b.customer_id = r.rid', 'left'); $this->db2->join('tbl_registration as i', 'i.rid = b.leader_id', 'left'); $data['user'] = $this->db2->get()->result_array(); //echo "<pre>"; print_r($data['user']); echo "<br>"; $this->db2->select('a.rid,a.name'); $this->db2->from('tbl_registration as a'); $this->db2->where('type', 'team_leader'); $data['Team_Leader'] = $this->db2->get()->result_array(); //echo "<pre>"; print_r($data['Team_Leader']); die; $this->load->view('webapp/add_user', $data); } } public function deactive($encrypted_id){ $uid = $this->model->decryptdata($encrypted_id); $where = array('rid' => $uid); $upd = array('payment_status' => '0'); $this->model->UpdateData('tbl_registration', $upd, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> User is Deactivated. </div>'); $data = $this->model->DetailData('tbl_registration', $where); $type = $data[0]['type']; if($type == 'customer'){ redirect('webapp/people/customer'); }else{ redirect('webapp/people/office'); } } public function active($encrypted_id){ $uid = $this->model->decryptdata($encrypted_id); $where = array('rid' => $uid); $upd = array('payment_status' => '1'); $this->model->UpdateData('tbl_registration', $upd, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> User is Activated. </div>'); $data = $this->model->DetailData('tbl_registration', $where); $type = $data[0]['type']; if($type == 'customer'){ $name = $data[0]["name"]; $to = $data[0]["email"]; $msg = ' <!DOCTYPE html> <html> <head> <title>PaperPush</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg, #CF212A 0%, #003865 100%); padding: 10px; text-align: center;"> <h3>Welcome to Paperpush</h3> </div> <div style="padding: 1rem;"> <p><strong>Dear '.$name.',</strong></p> <p><strong>PaperPush is glad to inform you that your account has been activated and now you can start uploading your documents with your account credentials.</strong></p> </div> </div> Regards,<br> Team PaperPush. <p>Note: Please do not reply of this email. This is system generated email. </p> </body> </html>'; $sub = "PaperPush"; $this->model->emailsend($to, $sub, $msg); redirect('webapp/people/customer?showactive=1'); }else{ redirect('webapp/people/office'); } } public function directory($path){ $mypath = $path; $path = explode('-', $path); $data['folder'] = $path[0]; $data['year'] = $path[1]; $data['month'] = $path[2]; $data['voucher'] = $path[3]; $data['mypath'] = $mypath; $this->load->view("webapp/view_directory",$data); } public function directory_used($path){ $mypath = $path; $path = explode('-', $path); $data['folder'] = $path[0]; $data['year'] = $path[1]; $data['month'] = $path[2]; $data['voucher'] = $path[3]; $data['mypath'] = $mypath; $this->load->view("webapp/view_directory_used",$data); } public function directory_scratched($path){ $mypath = $path; $path = explode('-', $path); $data['folder'] = $path[0]; $data['year'] = $path[1]; $data['month'] = $path[2]; $data['voucher'] = $path[3]; $data['mypath'] = $mypath; $this->load->view("webapp/view_directory_scratched",$data); } public function makeUsed(){ $folder = $_POST['folder']; $year = $_POST['year']; $month = $_POST['month']; $voucher = $_POST['voucher']; $name = $_POST['name']; $url1 = base_url().'documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/'.$name; $url2 = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/used'; $url3 = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/used/'.$name; $url4 = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/'.$name; if(is_dir($url2)) { if(rename($url4, $url3)){ echo 'Success'; }else{ echo 'somthing went wrong'; } }else{ mkdir($url2); if(rename($url4, $url3)){ echo 'Success'; }else{ echo 'somthing went wrong'; } } } public function makeScratched(){ $folder = $_POST['folder']; $year = $_POST['year']; $month = $_POST['month']; $voucher = $_POST['voucher']; $name = $_POST['name']; $url1 = base_url().'documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/'.$name; $url2 = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/scratched'; $url3 = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/scratched/'.$name; $url4 = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/'.$name; if(is_dir($url2)) { if(rename($url4, $url3)){ echo 'Success'; }else{ echo 'somthing went wrong'; } }else{ mkdir($url2); if(rename($url4, $url3)){ echo 'Success'; }else{ echo 'somthing went wrong'; } } } public function trashUsed(){ $folder = $_POST['folder']; $year = $_POST['year']; $month = $_POST['month']; $voucher = $_POST['voucher']; $name = $_POST['name']; $url = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/used/'.$name; if(unlink($url)){ echo 'Removed'; }else{ echo 'Error'; } } public function trashScratched(){ $folder = $_POST['folder']; $year = $_POST['year']; $month = $_POST['month']; $voucher = $_POST['voucher']; $name = $_POST['name']; $url = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/scratched/'.$name; if(unlink($url)){ echo 'Removed'; }else{ echo 'Error'; } } public function makeStructure_ser(){ //echo '<pre>'; print_r($_POST); die; $user_code = $this->input->post('code'); $year = $this->input->post('year'); $ent = str_replace(' ', '_', $this->input->post('ser_name')); $bucketname = 'paperpushbucket'; $month = ['a_april', 'b_may', 'c_june', 'd_july', 'e_august', 'f_september', 'g_october', 'h_november', 'i_december', 'j_january', 'k_february', 'l_march']; foreach ($month as $value) { $this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/".$ent."/", 'Body' => "", 'ACL' => 'public-read']); } $where = array('code' => $user_code, 'year' => $year); $get = $this->db2->get_where('cust_upload_structure', $where)->row_array(); $stage = $get['stage']; $dec_stage = json_decode($stage); $new_stage=[]; foreach($dec_stage as $key => $val){ $new_stage[]=$val; } $new_stage[]=$ent; $enc_stage = json_encode($new_stage); $upd = array('stage'=>$enc_stage); $this->model->UpdateData('cust_upload_structure',$upd,$where); $array['status'] = 'success'; echo json_encode($array); } public function remService(){ //echo '<pre>'; print_r($_POST); die; $code = $this->input->post('code'); $year = $this->input->post('year'); $posted_stage = $this->input->post('stage'); $where = array('code'=>$code, 'year'=>$year); $get = $this->db2->get_where('cust_upload_structure', $where)->row_array(); //echo '<pre>'; print_r($get); $stage = json_decode($get['stage']); //echo '<pre>'; print_r($stage); if (($key = array_search($posted_stage, $stage)) !== false) { unset($stage[$key]); } $resetArray = array_values($stage); //echo '<pre>'; print_r($resetArray); $jsonArray = json_encode($resetArray); //echo '<pre>'; print_r($jsonArray); //die; $data = array('stage'=>$jsonArray); //echo '<pre>'; print_r($data); die; $this->model->UpdateData('cust_upload_structure', $data, $where); $array['status'] = 'success'; echo json_encode($array); } public function makeStructure_pastDir(){ //echo '<pre>'; print_r($_POST); die; $user_code = $this->input->post('code'); $year = $this->input->post('year'); //$year = '2020'; $check = $this->db2->get_where('cust_upload_structure', array('year'=>$year, 'code'=>$user_code))->num_rows(); if($check == 0){ $array['status'] = 'success'; $entries = ['purchase_invoices', 'sales_invoices', 'cash_payment', 'cash_receipt', 'cheque_paid', 'expense_vouchers', 'debit_notes', 'credit_notes', 'bank_statements', 'cheque_deposited', 'reports', 'others']; $json_entry = json_encode($entries); $data = array( 'code' => $user_code, 'year' => $year, 'stage' => $json_entry ); $this->model->insertData('cust_upload_structure', $data); $bucketname = 'paperpushbucket'; $this->s3->putObject( [ 'Bucket' => $bucketname, 'Key' => $user_code."/", 'Key' => $user_code."/".$year."/", 'Body' => "", 'ACL' => 'public-read' ], ); $month = ['a_april', 'b_may', 'c_june', 'd_july', 'e_august', 'f_september', 'g_october', 'h_november', 'i_december', 'j_january', 'k_february', 'l_march']; foreach ($month as $value) { $this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/", 'Body' => "", 'ACL' => 'public-read']); $entries = ['purchase_invoices', 'sales_invoices', 'cash_payment', 'cash_receipt', 'cheque_paid', 'expense_vouchers', 'debit_notes', 'credit_notes', 'bank_statements', 'cheque_deposited', 'reports', 'others']; foreach ($entries as $ent) { $this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/".$ent."/", 'Body' => "", 'ACL' => 'public-read']); //$this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/".$ent."/completed/", 'Body' => "", 'ACL' => 'public-read']); //$this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/".$ent."/rejected/", 'Body' => "", 'ACL' => 'public-read']); } } }else{ $array['status'] = 'error'; $array['msg'] = 'Selected disrectory is alrady available.'; } echo json_encode($array); } public function upload_temp(){ //echo "<pre>"; print_r($_FILES); echo "<pre>"; print_r($_POST); die; $bucketname = 'paperpushbucket'; $code = $this->input->post('code'); $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $path = $code.'/Templates'; $count = count($_FILES['doc']['size']); for($i = 0; $i < $count; $i++){ $filename = $_FILES['doc']['name'][$i]; $ext = pathinfo($filename, PATHINFO_EXTENSION); $ext = strtolower($ext); if(!empty($ext)){ if($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png' || $ext == 'pdf' || $ext == 'csv' || $ext == 'xls' || $ext == 'xlsb' || $ext == 'xlsx'){ //echo "<pre>"; print_r($_FILES); die; $rand =rand(10,100); $target_file = preg_replace("/[^a-z0-9\_\-\.]/i", '', $_FILES['doc']['name'][$i]); $new_file = $rand.'_'.$target_file; $file_name = $_FILES['doc']['name'][$i]; $temp_file_location = $_FILES['doc']['tmp_name'][$i]; //$ct = ['image/jpg', 'image/jpeg', 'image/png', 'application/csv']; if($ext == 'pdf' || $ext == 'PDF'){ $this->s3->putObject([ 'Bucket' => $bucketname, 'Key' => $path.'/'.$new_file, 'SourceFile' => $temp_file_location, 'ContentType' => 'application/pdf', //'Body' => fopen($temp_file_location, 'rb'), 'ACL' => 'public-read', ]); }else{ $this->s3->putObject([ 'Bucket' => $bucketname, 'Key' => $path.'/'.$new_file, 'SourceFile' => $temp_file_location, //'ContentType' => 'image/jpg', //'Body' => fopen($temp_file_location, 'rb'), 'ACL' => 'public-read', ]); } //insert in table $data = array( 'ct_from' => $rid, 'ct_code' => $code, 'ct_filename' => $new_file, 'datetime' => date('Y-m-d H:i:s'), ); $this->model->insertData('cust_templates', $data); } } } } public function view_temp(){ $code=$this->input->post('code'); $data = $this->db2->get_where('cust_templates', array('ct_code'=>$code))->result_array(); if(!empty($data)){ $html=''; $html.='<ul class="list-unstyled">'; $i=0; foreach($data as $k => $v){ $i++; $path = $code.'/Templates/'.$v["ct_filename"]; $html.='<li>'.$i.') <a href="https://paperpushbucket.s3.ap-south-1.amazonaws.com/'.$path.'">'.$v["ct_filename"].'</a></li>'; } $html.='</ul>'; }else{ $html='Files not available'; } $array['html'] = $html; echo json_encode($array); } public function remUsr(){ $aid=$this->input->post('aid'); $where = array('aid' => $aid); $this->model->DeleteData('tbl_access', $where); $array['status'] = 'success'; echo json_encode($array); } public function orderStatus($id, $status){ if($status == '0'){ $sts = 'Verified'; $tt = '1'; $oo = '0'; $class = 'green'; } $data = array('status' => $tt, 'otp'=>$oo); $where = array('rid' => $id); $this->model->updateData('tbl_registration', $data, $where); $click = "order_status(".$id." , ".$tt." )"; $os = '<span style="cursor:pointer" class="badge bg-'.$class.'">'.$sts.'</span>'; $data['html'] = $os; $data['new_sts'] = $tt; echo json_encode($data); } public function EmailVerified($offset = 0){ $where_n = array('r.type' => 'customer','r.status' => '1'); $rids = $this->getAssignedCustomer_teamleader($_SESSION['reg_info'][0]['rid']); $this->db2->select('r.*,i.name as leadername'); $this->db2->from('tbl_registration as r'); if($_SESSION['reg_info'][0]['type'] == 'admin' || $_SESSION['reg_info'][0]['type'] == 'superadmin'){ $this->db2->where($where_n); }else{ $this->db2->where("r.type" , "customer"); $this->db2->where_in("r.rid" , $rids); } $this->db2->join('tbl_assign_customer_teamleader as b', 'b.customer_id = r.rid', 'left'); $this->db2->join('tbl_registration as i', 'i.rid = b.leader_id', 'left'); $cnt_data['data'] = $this->db2->get()->result_array(); $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/people/EmailVerified'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $userdata['data'] = $this->model->get_pagination_where_Cust_EmailVerified('tbl_registration', $config['per_page'], $offset, $where); //echo "<pre>";print_r($userdata['data']);die; $userdata['type'] = 'customer'; $userdata['customer'] = 'Customer'; $this->db2->select('a.rid,a.name'); $this->db2->from('tbl_registration as a'); $this->db2->where('type', 'team_leader'); $userdata['Team_Leader'] = $this->db2->get()->result_array(); //echo "<pre>"; print_r($userdata['Team_Leader']); die; $userdata['All_Customer'] = $this->db2->get_where('tbl_registration', array('type'=>'customer'))->num_rows(); $userdata['EmailVerified'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','status'=>'1'))->num_rows(); $userdata['EmailPending'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','status'=>'0'))->num_rows(); $userdata['PaymentDone'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','payment_status'=>'1'))->num_rows(); $userdata['PaymentPending'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','payment_status'=>'0'))->num_rows(); //echo "<pre>"; print_r($userdata['EmailPending']); die; $this->load->view("webapp/office",$userdata); } public function EmailPending($offset = 0){ $where_n = array('r.type' => 'customer','r.status' => '0'); $rids = $this->getAssignedCustomer_teamleader($_SESSION['reg_info'][0]['rid']); $this->db2->select('r.*,i.name as leadername'); $this->db2->from('tbl_registration as r'); if($_SESSION['reg_info'][0]['type'] == 'admin' || $_SESSION['reg_info'][0]['type'] == 'superadmin'){ $this->db2->where($where_n); }else{ $this->db2->where("r.type" , "customer"); $this->db2->where_in("r.rid" , $rids); } $this->db2->join('tbl_assign_customer_teamleader as b', 'b.customer_id = r.rid', 'left'); $this->db2->join('tbl_registration as i', 'i.rid = b.leader_id', 'left'); $cnt_data['data'] = $this->db2->get()->result_array(); $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/people/EmailPending'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $userdata['data'] = $this->model->get_pagination_where_Cust_EmailPending('tbl_registration', $config['per_page'], $offset, $where); //echo "<pre>";print_r($userdata['data']);die; $userdata['type'] = 'customer'; $userdata['customer'] = 'Customer'; $this->db2->select('a.rid,a.name'); $this->db2->from('tbl_registration as a'); $this->db2->where('type', 'team_leader'); $userdata['Team_Leader'] = $this->db2->get()->result_array(); //echo "<pre>"; print_r($userdata['Team_Leader']); die; $userdata['All_Customer'] = $this->db2->get_where('tbl_registration', array('type'=>'customer'))->num_rows(); $userdata['EmailVerified'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','status'=>'1'))->num_rows(); $userdata['EmailPending'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','status'=>'0'))->num_rows(); $userdata['PaymentDone'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','payment_status'=>'1'))->num_rows(); $userdata['PaymentPending'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','payment_status'=>'0'))->num_rows(); //echo "<pre>"; print_r($userdata['EmailPending']); die; $this->load->view("webapp/office",$userdata); } public function PaymentDone($offset = 0){ $where_n = array('r.type' => 'customer','r.payment_status' => '1'); $rids = $this->getAssignedCustomer_teamleader($_SESSION['reg_info'][0]['rid']); $this->db2->select('r.*,i.name as leadername'); $this->db2->from('tbl_registration as r'); if($_SESSION['reg_info'][0]['type'] == 'admin' || $_SESSION['reg_info'][0]['type'] == 'superadmin'){ $this->db2->where($where_n); }else{ $this->db2->where("r.type" , "customer"); $this->db2->where_in("r.rid" , $rids); } $this->db2->join('tbl_assign_customer_teamleader as b', 'b.customer_id = r.rid', 'left'); $this->db2->join('tbl_registration as i', 'i.rid = b.leader_id', 'left'); $cnt_data['data'] = $this->db2->get()->result_array(); $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/people/PaymentDone'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $userdata['data'] = $this->model->get_pagination_where_Cust_PaymentDone('tbl_registration', $config['per_page'], $offset, $where); //echo "<pre>";print_r($userdata['data']);die; $userdata['type'] = 'customer'; $userdata['customer'] = 'Customer'; $this->db2->select('a.rid,a.name'); $this->db2->from('tbl_registration as a'); $this->db2->where('type', 'team_leader'); $userdata['Team_Leader'] = $this->db2->get()->result_array(); //echo "<pre>"; print_r($userdata['Team_Leader']); die; $userdata['All_Customer'] = $this->db2->get_where('tbl_registration', array('type'=>'customer'))->num_rows(); $userdata['EmailVerified'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','status'=>'1'))->num_rows(); $userdata['EmailPending'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','status'=>'0'))->num_rows(); $userdata['PaymentDone'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','payment_status'=>'1'))->num_rows(); $userdata['PaymentPending'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','payment_status'=>'0'))->num_rows(); //echo "<pre>"; print_r($userdata['EmailPending']); die; $this->load->view("webapp/office",$userdata); } public function PaymentPending($offset = 0){ $where_n = array('r.type' => 'customer','r.payment_status' => '0'); $rids = $this->getAssignedCustomer_teamleader($_SESSION['reg_info'][0]['rid']); $this->db2->select('r.*,i.name as leadername'); $this->db2->from('tbl_registration as r'); if($_SESSION['reg_info'][0]['type'] == 'admin' || $_SESSION['reg_info'][0]['type'] == 'superadmin'){ $this->db2->where($where_n); }else{ $this->db2->where("r.type" , "customer"); $this->db2->where_in("r.rid" , $rids); } $this->db2->join('tbl_assign_customer_teamleader as b', 'b.customer_id = r.rid', 'left'); $this->db2->join('tbl_registration as i', 'i.rid = b.leader_id', 'left'); $cnt_data['data'] = $this->db2->get()->result_array(); $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/people/PaymentPending'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $userdata['data'] = $this->model->get_pagination_where_Cust_PaymentPending('tbl_registration', $config['per_page'], $offset, $where); //echo "<pre>";print_r($userdata['data']);die; $userdata['type'] = 'customer'; $userdata['customer'] = 'Customer'; $this->db2->select('a.rid,a.name'); $this->db2->from('tbl_registration as a'); $this->db2->where('type', 'team_leader'); $userdata['Team_Leader'] = $this->db2->get()->result_array(); //echo "<pre>"; print_r($userdata['Team_Leader']); die; $userdata['All_Customer'] = $this->db2->get_where('tbl_registration', array('type'=>'customer'))->num_rows(); $userdata['EmailVerified'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','status'=>'1'))->num_rows(); $userdata['EmailPending'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','status'=>'0'))->num_rows(); $userdata['PaymentDone'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','payment_status'=>'1'))->num_rows(); $userdata['PaymentPending'] = $this->db2->get_where('tbl_registration', array('type'=>'customer','payment_status'=>'0'))->num_rows(); //echo "<pre>"; print_r($userdata['EmailPending']); die; $this->load->view("webapp/office",$userdata); } } webapp/Leader.php 0000644 00002040102 14642254411 0007731 0 ustar 00 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Leader extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); } public function index() { //$this->load->view("webapp/customer/view"); } public function fromStatus($sts='NULL', $id='NULL'){ if($sts!='NULL'){ $where = array('fid' => $id); $data = array('approve_status' => 'approved'); $this->model->UpdateData('tbl_form', $data, $where); }else{ $fid = $this->input->post('fid'); $note = $this->input->post('note'); //print_r($note); die; $where = array('fid' => $fid); $form = $this->model->DetailData('tbl_form', $where); $get_note = $form[0]['note']; if(empty($get_note)){ $new_note = $note[0]; }else{ $get_note = explode('|', $get_note); $merge = array_merge($get_note, $note); $new_note = implode('|', $merge); } $data = array('release_status' => 'error', 'approve_status' => 'panding', 'note' => $new_note, 'o_noti' => 'unseen'); $this->model->UpdateData('tbl_form', $data, $where); } $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Status Updated. </div>'); redirect('webapp/office/form_grid'); } public function allStatus(){ $ses = $this->session->get_userdata(); $rid = $ses['reg_info'][0]['rid']; $fid = $this->input->post('check_approve'); $count = count($fid); header("content-type: application/xml; charset=ISO-8859-15"); // "Create" the document. $xml = new DOMDocument("1.0", "ISO-8859-15"); $xml->preserveWhiteSpace = FALSE; // Create some elements. $xml_ENVELOPE = $xml->createElement("ENVELOPE", ""); $xml_HEADER = $xml->createElement("HEADER", " "); $xml_HEADER_TALLYREQUEST = $xml->createElement("TALLYREQUEST", "Import Data"); $xml_BODY = $xml->createElement("BODY", " "); $xml_BODY_IMPORTDATA = $xml->createElement("IMPORTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDESC = $xml->createElement("REQUESTDESC", " "); $xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME = $xml->createElement("REPORTNAME", " Vouchers "); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES = $xml->createElement("STATICVARIABLES", " "); $xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY = $xml->createElement("SVCURRENTCOMPANY", " SANDIP COMPANY "); $xml_BODY_IMPORTDATA_REQUESTDATA = $xml->createElement("REQUESTDATA", " "); for ($i=0; $i < $count; $i++) { $where = array('fid' => $fid[$i]); $ins = array('approve_status' => 'approved'); $this->model->UpdateData('tbl_form', $ins, $where); $eight_randnum = rand(11111111,99999999); $form = $this->model->DetailData('tbl_form', $where); $stage = $form[0]['stage']; if($stage == 'contra'){ //$where = array('fid' => $fid); $form = $this->model->xml_contra($fid[$i]); //echo "<pre>"; print_r($form); die; $stage = $form[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form[0]['voucher_type']; }else{ $stage = $stage; } $date = $form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form[0]['voucher_no']; $m_ledger_name = $form[0]['party_ledger']; $narration = $form[0]['narration']; $amt_gross = $form[0]['amt_gross']; $check_no = $form[0]['check_no']; $check_date = $form[0]['check_date']; $trans_type = $form[0]['trans_type']; $ms_ledger = $form[0]['sub_ledger']; $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start //$s_ledger_name = $form_info[$i]['s_ledger_name']; for ($le=0; $le < 2; $le++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); //if($trans_type == 'fund_transfer'){ if($le == 0){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); } /* }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); }*/ $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); if($le == 0){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); } //start If bill allocation is available if($trans_type == 'withdrawal'){ //if trans type is withdrawal if($le == 0){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); } //if trans type is withdrawal }elseif($trans_type == 'diposit'){ //if trans type is diposit if($le == 0){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //if trans type is deposit } }else{ //For fund transfer $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); if($le == 0){ $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); }else{ $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); } $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //For fund transfer } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } //if contra end elseif($stage == 'sales'){ $sales_form = $this->model->sm($fid[$i]); $note = $sales_form[0]['note_two']; if($note == 'form_two'){ //$this->xml_sales_two($fid[$i], $eight_randnum); $sales_form_two = $this->model->sales_two_model($fid[$i]); $cgst = $sales_form_two[0]['cgst']; $c_aot = $sales_form_two[0]['c_aot']; $sgst = $sales_form_two[0]['sgst']; $s_aot = $sales_form_two[0]['s_aot']; $ugst = $sales_form_two[0]['ugst']; $u_aot = $sales_form_two[0]['u_aot']; $igst = $sales_form_two[0]['igst']; $i_aot = $sales_form_two[0]['i_aot']; //echo "<pre>"; print_r($sales_form_two); die; $stage = $sales_form_two[0]['stage']; $date = $sales_form_two[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($sales_form_two[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $sales_form_two[0]['voucher_no']; $dr_ledger = $sales_form_two[0]['dr_ledger']; $narration = $sales_form_two[0]['narration']; $amt_gross = $sales_form_two[0]['amt_gross']; $cr_ledger = $sales_form_two[0]['cr_ledger']; $cr_amount = $sales_form_two[0]['amt_taxable']; $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $OLDAUDITENTRYIDS_list = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_list->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $DATE = $xml->createElement("DATE", "".$m_date.""); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); //$PARTYNAME = $xml->createElement("PARTYNAME", "".$dr_ledger.""); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $REFERENCE = $xml->createElement("REFERENCE", "".$voucher_no.""); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$dr_ledger.""); $BASICBASEPARTYNAME = $xml->createElement("BASICBASEPARTYNAME", "".$dr_ledger.""); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); //$PLACEOFSUPPLY = $xml->createElement("PLACEOFSUPPLY", "Gujarat"); $BASICBUYERNAME = $xml->createElement("BASICBUYERNAME", "".$dr_ledger.""); $BASICDATETIMEOFINVOICE = $xml->createElement("BASICDATETIMEOFINVOICE", "".$basic_date_time.""); $BASICDATETIMEOFREMOVAL = $xml->createElement("BASICDATETIMEOFREMOVAL", "".$basic_date_time.""); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $ENTEREDBY = $xml->createElement("ENTEREDBY", "Admin"); //$CONSIGNEESTATENAME = $xml->createElement("CONSIGNEESTATENAME", "Gujarat"); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $AUDITED = $xml->createElement("AUDITED", "No"); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $ISVOID = $xml->createElement("ISVOID", "No"); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $ISDELETED = $xml->createElement("ISDELETED", "No"); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $ALTERID = $xml->createElement("ALTERID", "29"); $MASTERID = $xml->createElement("MASTERID", "14"); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066560"); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); /*$VOUCHER->appendChild($adrs_list); $adrs_list->appendChild($adrs); $VOUCHER->appendChild($basic_buy_list); $basic_buy_list->appendChild($basic_buy_adrs); */ $VOUCHER->appendChild($OLDAUDITENTRYIDS_list); $OLDAUDITENTRYIDS_list->appendChild($OLDAUDITENTRYIDS); $VOUCHER->appendChild($DATE); $VOUCHER->appendChild($GUID); $VOUCHER->appendChild($STATENAME); $VOUCHER->appendChild($NARRATION); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); //$VOUCHER->appendChild($PARTYNAME); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHER->appendChild($REFERENCE); $VOUCHER->appendChild($VOUCHERNUMBER); $VOUCHER->appendChild($PARTYLEDGERNAME); $VOUCHER->appendChild($BASICBASEPARTYNAME); $VOUCHER->appendChild($CSTFORMISSUETYPE); $VOUCHER->appendChild($CSTFORMRECVTYPE); $VOUCHER->appendChild($FBTPAYMENTTYPE); $VOUCHER->appendChild($PERSISTEDVIEW); //$VOUCHER->appendChild($PLACEOFSUPPLY); $VOUCHER->appendChild($BASICBUYERNAME); $VOUCHER->appendChild($BASICDATETIMEOFINVOICE); $VOUCHER->appendChild($BASICDATETIMEOFREMOVAL); $VOUCHER->appendChild($VCHGSTCLASS); $VOUCHER->appendChild($ENTEREDBY); //$VOUCHER->appendChild($CONSIGNEESTATENAME); $VOUCHER->appendChild($DIFFACTUALQTY); $VOUCHER->appendChild($ISMSTFROMSYNC); $VOUCHER->appendChild($ASORIGINAL); $VOUCHER->appendChild($AUDITED); $VOUCHER->appendChild($FORJOBCOSTING); $VOUCHER->appendChild($ISOPTIONAL); $VOUCHER->appendChild($EFFECTIVEDATE); $VOUCHER->appendChild($USEFOREXCISE); $VOUCHER->appendChild($ISFORJOBWORKIN); $VOUCHER->appendChild($ALLOWCONSUMPTION); $VOUCHER->appendChild($USEFORINTEREST); $VOUCHER->appendChild($USEFORGAINLOSS); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $VOUCHER->appendChild($USEFORCOMPOUND); $VOUCHER->appendChild($USEFORSERVICETAX); $VOUCHER->appendChild($ISEXCISEVOUCHER); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $VOUCHER->appendChild($EXCISEOPENING); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $VOUCHER->appendChild($ISVATOVERRIDDEN); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $VOUCHER->appendChild($ISISDVOUCHER); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $VOUCHER->appendChild($GSTNOTEXPORTED); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $VOUCHER->appendChild($ISCANCELLED); $VOUCHER->appendChild($HASCASHFLOW); $VOUCHER->appendChild($ISPOSTDATED); $VOUCHER->appendChild($USETRACKINGNUMBER); $VOUCHER->appendChild($ISINVOICE); $VOUCHER->appendChild($MFGJOURNAL); $VOUCHER->appendChild($HASDISCOUNTS); $VOUCHER->appendChild($ASPAYSLIP); $VOUCHER->appendChild($ISCOSTCENTRE); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $VOUCHER->appendChild($ISBLANKCHEQUE); $VOUCHER->appendChild($ISVOID); $VOUCHER->appendChild($ISONHOLD); $VOUCHER->appendChild($ORDERLINESTATUS); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VOUCHER->appendChild($VATISPURCEXEMPTED); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $VOUCHER->appendChild($ISVATDUTYPAID); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $VOUCHER->appendChild($ISDELETED); $VOUCHER->appendChild($CHANGEVCHMODE); $VOUCHER->appendChild($ALTERID); $VOUCHER->appendChild($MASTERID); $VOUCHER->appendChild($VOUCHERKEY); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $VOUCHER->appendChild($AUDITENTRIES_LIST); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //star for debit ledger $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$dr_ledger.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "Yes"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$amt_gross.""); $VATEXPAMOUNT_DR = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $bill_name = $xml->createElement("NAME", "".$voucher_no.""); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "-".$amt_gross.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_DR); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for debit ledger //star for credit ledger $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$cr_ledger.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$cr_amount.""); $VATEXPAMOUNT_CR = $xml->createElement("VATEXPAMOUNT", "".$cr_amount.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$bill_name = $xml->createElement("NAME", "vouchr no"); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "".$cr_amount.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); */ $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_CR); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for credit ledger //star for CGST ledger if($cgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); //$ROUNDTYPE_Ca = $xml->createElement("ROUNDTYPE", ""); $GSTCLASS_c = $xml->createElement("GSTCLASS", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "CGST"); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$c_aot.""); $VATEXPAMOUNT_C = $xml->createElement("VATEXPAMOUNT", "".$c_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); //$LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_Ca); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_c); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_C); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for CGST ledger //star for SGST ledger if($sgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); //$ROUNDTYPE_S = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "SGST"); $GSTCLASS_s = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$s_aot.""); $AMOUNT_S = $xml->createElement("VATEXPAMOUNT", "".$s_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); //$LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_S); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_s); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_S); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for SGST ledger //star for UGST ledger if($ugst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_U = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "UGST"); $GSTCLASS_u = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$u_aot.""); $AMOUNT_U = $xml->createElement("VATEXPAMOUNT", "".$u_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_U); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_u); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_U); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for UGST ledger //star for IGST ledger if($igst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_I = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "IGST"); $GSTCLASS_i = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$taot.""); $AMOUNT_I = $xml->createElement("VATEXPAMOUNT", "".$taot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_I); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_i); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_I); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for IGST ledger $PAYROLLMODEOFPAYMENT_LIST_v = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $ATTDRECORDS_LIST_v = $xml->createElement("ATTDRECORDS.LIST", " "); $GSTEWAYCONSIGNORADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $GSTEWAYCONSIGNEEADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $TEMPGSTRATEDETAILS_LIST_v = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST_v); $VOUCHER->appendChild($ATTDRECORDS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST_v); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST_v); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY2 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO2 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO2->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME2 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE2 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_NAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPNAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPSTATE2); $COMPANY2->appendChild($REMOTECMPINFO2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY3 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO3 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO3->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME3 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME3 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE3 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_NAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPNAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPSTATE3); $COMPANY3->appendChild($REMOTECMPINFO3); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->appendChild($COMPANY3); $test = $xml->createElement("TALLYMESSAGE", " "); $test->setAttribute("xmlns:UDF", "TallyUDF"); } // end of form two else{ $form2 = $this->model->salesModel($fid[$i]); $form3 = $this->model->salesExpenseModel($fid[$i]); $info_cnt = count($form2); $info_cnt2 = count($form3); $tot_g_sgst = 0; $tot_g_cgst = 0; $tot_g_ugst = 0; $tot_g_igst = 0; for ($g=0; $g < $info_cnt2; $g++) { //foreach ($form3 as $gst => $g) { $gamt = $form3[$g]['ex_amount']; $g_sgst = $form3[$g]['sgst']; $g_cgst = $form3[$g]['cgst']; $g_ugst = $form3[$g]['ugst']; $g_igst = $form3[$g]['igst']; if($g_sgst != '0.00'){ $g_sgst_payble = $gamt*$g_sgst/100; //echo "--payble sgst<br>"; $tot_g_sgst += $g_sgst_payble; } if($g_cgst != '0.00'){ $g_cgst_payble = $gamt*$g_cgst/100; //echo "--payble cgst<br>"; $tot_g_cgst += $g_cgst_payble; } if($g_ugst != '0.00'){ $g_ugst_payble = $gamt*$g_ugst/100; //echo "--payble ugst<br>"; $tot_g_ugst += $g_ugst_payble; } if($g_igst != '0.00'){ $g_igst_payble = $gamt*$g_igst/100; //echo "--payble cgst<br>"; $tot_g_igst += $g_igst_payble; } } $tot_g_sgst; $tot_g_cgst; $tot_g_ugst; $tot_g_igst; $all_gst_tot = $tot_g_sgst+$tot_g_cgst+$tot_g_ugst+$tot_g_igst; // sum of same other expenses $result = array(); foreach($form3 as $k => $v) { $id = $v['ex_name']; $result[$id][] = $v['ex_amount']; } $other_expense = array(); foreach($result as $key => $value) { $where_exp = array('eid' => $key); $i_name = $this->model->DetailData('tbl_expense', $where_exp); $in = $i_name[0]['ename']; $other_expense[] = array('ex_name' => $key, 'ex_amount' => array_sum($value), 'iname' => $in); } $oecnt = count($other_expense); //die; $tsgst = 0; $tcgst = 0; $tugst = 0; $tigst = 0; foreach ($form2 as $total => $tot) { $sgst = $tot['s_aot']; $cgst = $tot['c_aot']; $ugst = $tot['u_aot']; $igst = $tot['i_aot']; $tsgst+=$sgst; $tcgst+=$cgst; $tugst+=$ugst; $tigst+=$igst; } $frm = $this->model->sales_form_data($fid[$i]); $amt_gross = $frm[0]['amt_gross']; $new_tot_expns = 0; $amt_tax = 0; foreach ($frm as $key => $tot) { $expns = $tot['expenses']; $amt_taxable = $tot['amt_taxable']; $tot_expns = 0; if($expns != ''){ foreach ($expns as $tt => $t) { $newtt = $t['ex_amount']; $tot_expns+=$newtt; } }else{ $tot_expns = 0; } $new_tot_expns+=$tot_expns; $amt_tax+=$amt_taxable; } $new_tot_expns; $amt_tax; $tot_tax = $tsgst+$tcgst+$tugst+$tigst; $totcredit = $new_tot_expns+$tot_tax+$amt_tax+$all_gst_tot; /*echo $amt_gross."<br>"; echo $totcredit; die; */ $diff_amt = round(abs($amt_gross - $totcredit),2); $stage = $sales_form[0]['stage']; $date = $sales_form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($sales_form[0]['date_time'])); $basic_time = date("h:i", strtotime($sales_form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $sales_form[0]['voucher_no']; $m_ledger_name = $sales_form[0]['l_name']; $narration = $sales_form[0]['narration']; $amt_gross = $sales_form[0]['amt_gross']; if($amt_gross < $totcredit){ $amt_gross = $amt_gross + $diff_amt; }else{ $amt_gross = $amt_gross; } $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Invoice Voucher View"); $adrs_list = $xml->createElement("ADDRESS.LIST", " "); $adrs_list->setAttribute("TYPE", "String"); $adrs = $xml->createElement("ADDRESS", "Gujarat, India"); $basic_buy_list = $xml->createElement("BASICBUYERADDRESS.LIST", " "); $basic_buy_list->setAttribute("TYPE", "String"); $basic_buy_adrs = $xml->createElement("BASICBUYERADDRESS", "Gujarat, India"); $OLDAUDITENTRYIDS_list = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_list->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $DATE = $xml->createElement("DATE", "".$m_date.""); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); $PARTYNAME = $xml->createElement("PARTYNAME", "".$m_ledger_name.""); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $BASICBASEPARTYNAME = $xml->createElement("BASICBASEPARTYNAME", "".$m_ledger_name.""); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Invoice Voucher View"); $PLACEOFSUPPLY = $xml->createElement("PLACEOFSUPPLY", "Gujarat"); $BASICBUYERNAME = $xml->createElement("BASICBUYERNAME", "".$m_ledger_name.""); $BASICDATETIMEOFINVOICE = $xml->createElement("BASICDATETIMEOFINVOICE", "".$basic_date_time.""); $BASICDATETIMEOFREMOVAL = $xml->createElement("BASICDATETIMEOFREMOVAL", "".$basic_date_time.""); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $CONSIGNEESTATENAME = $xml->createElement("CONSIGNEESTATENAME", "Gujarat"); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $AUDITED = $xml->createElement("AUDITED", "No"); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $ISINVOICE = $xml->createElement("ISINVOICE", "Yes"); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "Yes"); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $ISVOID = $xml->createElement("ISVOID", "No"); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $ISDELETED = $xml->createElement("ISDELETED", "No"); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $ALTERID = $xml->createElement("ALTERID", "29"); $MASTERID = $xml->createElement("MASTERID", "14"); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066560"); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $VOUCHER->appendChild($adrs_list); $adrs_list->appendChild($adrs); $VOUCHER->appendChild($basic_buy_list); $basic_buy_list->appendChild($basic_buy_adrs); $VOUCHER->appendChild($OLDAUDITENTRYIDS_list); $OLDAUDITENTRYIDS_list->appendChild($OLDAUDITENTRYIDS); $VOUCHER->appendChild($DATE); $VOUCHER->appendChild($GUID); $VOUCHER->appendChild($STATENAME); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); $VOUCHER->appendChild($PARTYNAME); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHER->appendChild($VOUCHERNUMBER); $VOUCHER->appendChild($PARTYLEDGERNAME); $VOUCHER->appendChild($BASICBASEPARTYNAME); $VOUCHER->appendChild($CSTFORMISSUETYPE); $VOUCHER->appendChild($CSTFORMRECVTYPE); $VOUCHER->appendChild($FBTPAYMENTTYPE); $VOUCHER->appendChild($PERSISTEDVIEW); $VOUCHER->appendChild($PLACEOFSUPPLY); $VOUCHER->appendChild($BASICBUYERNAME); $VOUCHER->appendChild($BASICDATETIMEOFINVOICE); $VOUCHER->appendChild($BASICDATETIMEOFREMOVAL); $VOUCHER->appendChild($VCHGSTCLASS); $VOUCHER->appendChild($CONSIGNEESTATENAME); $VOUCHER->appendChild($DIFFACTUALQTY); $VOUCHER->appendChild($ISMSTFROMSYNC); $VOUCHER->appendChild($ASORIGINAL); $VOUCHER->appendChild($AUDITED); $VOUCHER->appendChild($FORJOBCOSTING); $VOUCHER->appendChild($ISOPTIONAL); $VOUCHER->appendChild($EFFECTIVEDATE); $VOUCHER->appendChild($USEFOREXCISE); $VOUCHER->appendChild($ISFORJOBWORKIN); $VOUCHER->appendChild($ALLOWCONSUMPTION); $VOUCHER->appendChild($USEFORINTEREST); $VOUCHER->appendChild($USEFORGAINLOSS); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $VOUCHER->appendChild($USEFORCOMPOUND); $VOUCHER->appendChild($USEFORSERVICETAX); $VOUCHER->appendChild($ISEXCISEVOUCHER); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $VOUCHER->appendChild($EXCISEOPENING); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $VOUCHER->appendChild($ISVATOVERRIDDEN); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $VOUCHER->appendChild($ISISDVOUCHER); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $VOUCHER->appendChild($GSTNOTEXPORTED); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $VOUCHER->appendChild($ISCANCELLED); $VOUCHER->appendChild($HASCASHFLOW); $VOUCHER->appendChild($ISPOSTDATED); $VOUCHER->appendChild($USETRACKINGNUMBER); $VOUCHER->appendChild($ISINVOICE); $VOUCHER->appendChild($MFGJOURNAL); $VOUCHER->appendChild($HASDISCOUNTS); $VOUCHER->appendChild($ASPAYSLIP); $VOUCHER->appendChild($ISCOSTCENTRE); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $VOUCHER->appendChild($ISBLANKCHEQUE); $VOUCHER->appendChild($ISVOID); $VOUCHER->appendChild($ISONHOLD); $VOUCHER->appendChild($ORDERLINESTATUS); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VOUCHER->appendChild($VATISPURCEXEMPTED); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $VOUCHER->appendChild($ISVATDUTYPAID); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $VOUCHER->appendChild($ISDELETED); $VOUCHER->appendChild($CHANGEVCHMODE); $VOUCHER->appendChild($ALTERID); $VOUCHER->appendChild($MASTERID); $VOUCHER->appendChild($VOUCHERKEY); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $VOUCHER->appendChild($AUDITENTRIES_LIST); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //star for debit ledger $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "Yes"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$amt_gross.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $bill_name = $xml->createElement("NAME", "".$voucher_no.""); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "-".$amt_gross.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for debit ledger //star for other expenses ledger for ($oe=0; $oe < $oecnt; $oe++) { $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$other_expense[$oe]['iname'].""); $GSTCLASS_oe = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$other_expense[$oe]['ex_amount'].""); $VATEXPAMOUNT_LE = $xml->createElement("VATEXPAMOUNT", "".$other_expense[$oe]['ex_amount'].""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_oe); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for other expenses ledger if($amt_gross > $totcredit){ // Start of Round of $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "Round Amount"); $GSTCLASS_oe = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$diff_amt.""); $VATEXPAMOUNT_LE = $xml->createElement("VATEXPAMOUNT", "".$diff_amt.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_oe); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); // End of Round of } //star for CGST ledger if($tcgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_Ca = $xml->createElement("ROUNDTYPE", ""); $GSTCLASS_c = $xml->createElement("GSTCLASS", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "CGST"); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$tcgst+$tot_g_cgst.""); $VATEXPAMOUNT_C = $xml->createElement("VATEXPAMOUNT", "".$tcgst+$tot_g_cgst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_Ca); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_c); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_C); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for CGST ledger //star for SGST ledger if($tsgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_S = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "SGST"); $GSTCLASS_s = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$tsgst+$tot_g_sgst.""); $AMOUNT_S = $xml->createElement("VATEXPAMOUNT", "".$tsgst+$tot_g_sgst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_S); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_s); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_S); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for SGST ledger //star for UGST ledger if($tugst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_U = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "UGST"); $GSTCLASS_u = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$tugst+$tot_g_ugst.""); $AMOUNT_U = $xml->createElement("VATEXPAMOUNT", "".$tugst+$tot_g_ugst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_U); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_u); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_U); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for UGST ledger //star for IGST ledger if($tigst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_I = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "IGST"); $GSTCLASS_i = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$tigst+$tot_g_igst.""); $AMOUNT_I = $xml->createElement("VATEXPAMOUNT", "".$tigst+$tot_g_igst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_I); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_i); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_I); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for IGST ledger for ($inv=0; $inv < $info_cnt; $inv++) { $item_name = $form2[$inv]['item']; $rate = $form2[$inv]['rate']; $discount = $form2[$inv]['discount_two']; $amount = $form2[$inv]['amt_taxable']; $qty = $form2[$inv]['qty']; $s_ledger_name = $form2[$inv]['l_name']; $ALLINVENTORYENTRIES_LIST = $xml->createElement("ALLINVENTORYENTRIES.LIST", " "); $STOCKITEMNAME = $xml->createElement("STOCKITEMNAME", "".$item_name.""); $ISDEEMEDPOSITIVE_LE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ISLASTDEEMEDPOSITIVE_LE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISAUTONEGATE = $xml->createElement("ISAUTONEGATE", "No"); $ISCUSTOMSCLEARANCE = $xml->createElement("ISCUSTOMSCLEARANCE", "No"); $ISTRACKCOMPONENT = $xml->createElement("ISTRACKCOMPONENT", "No"); $ISTRACKPRODUCTION = $xml->createElement("ISTRACKPRODUCTION", "No"); $ISPRIMARYITEM = $xml->createElement("ISPRIMARYITEM", "No"); $ISSCRAP = $xml->createElement("ISSCRAP", "No"); $RATE = $xml->createElement("RATE", "".$rate.""); $DISCOUNT = $xml->createElement("DISCOUNT", "".$discount.""); $AMOUNT = $xml->createElement("AMOUNT", "".$amount.""); $ACTUALQTY_AE = $xml->createElement("ACTUALQTY", "".$qty.""); $BILLEDQTY_AE = $xml->createElement("BILLEDQTY", "".$qty.""); $BATCHALLOCATIONS_LIST = $xml->createElement("BATCHALLOCATIONS.LIST", " "); $GODOWNNAME = $xml->createElement("GODOWNNAME", "Main Location"); $BATCHNAME = $xml->createElement("BATCHNAME", "Primary Batch"); $INDENTNO = $xml->createElement("INDENTNO", ""); $ORDERNO = $xml->createElement("ORDERNO", ""); $TRACKINGNUMBER = $xml->createElement("TRACKINGNUMBER", ""); $DYNAMICCSTISCLEARED = $xml->createElement("DYNAMICCSTISCLEARED", "No"); $AMOUNT_ba = $xml->createElement("AMOUNT", "".$amount.""); $ACTUALQTY = $xml->createElement("ACTUALQTY", "".$qty.""); $BILLEDQTY = $xml->createElement("BILLEDQTY", "".$qty.""); $ADDITIONALDETAILS_LIST = $xml->createElement("ADDITIONALDETAILS.LIST", " "); $VOUCHERCOMPONENTLIST_LIST = $xml->createElement("VOUCHERCOMPONENTLIST.LIST", " "); $ACCOUNTINGALLOCATIONS_LIST = $xml->createElement("ACCOUNTINGALLOCATIONS.LIST", " "); $OLDAUDITENTRYIDS_LIST_AIE = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_AIE->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_AIE = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME_AIE = $xml->createElement("LEDGERNAME", "".$s_ledger_name.""); $GSTCLASS_AIE = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE_AIE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM_AIE = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES_AIE = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER_AIE = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE_AIE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED_AIE = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED_AIE = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_AIE = $xml->createElement("AMOUNT", "".$amount.""); $SERVICETAXDETAILS_LIST_AIE = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_AIE = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST_AIE = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST_AIE = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AIE = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AIE = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AIE = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AIE = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_AIE1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST_AIE = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST_AL = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST_AIE = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST_AIE = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST_AIE = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST_AIE = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST_AIE1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST_AIE = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST_AIE = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST_AIE = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST_AIE1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST_AIE = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_AIE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST_AIE = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $DUTYHEADDETAILS_LIST_AIE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST_AIE = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST_AIE = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST_AIE = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $EXCISEALLOCATIONS_LIST_AIE = $xml->createElement("EXCISEALLOCATIONS.LIST", " "); $EXPENSEALLOCATIONS_LIST_AIE = $xml->createElement("EXPENSEALLOCATIONS.LIST", " "); $VOUCHER->appendChild($ALLINVENTORYENTRIES_LIST); $ALLINVENTORYENTRIES_LIST->appendChild($STOCKITEMNAME); $ALLINVENTORYENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE_LE); $ALLINVENTORYENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE_LE); $ALLINVENTORYENTRIES_LIST->appendChild($ISAUTONEGATE); $ALLINVENTORYENTRIES_LIST->appendChild($ISCUSTOMSCLEARANCE); $ALLINVENTORYENTRIES_LIST->appendChild($ISTRACKCOMPONENT); $ALLINVENTORYENTRIES_LIST->appendChild($ISTRACKPRODUCTION); $ALLINVENTORYENTRIES_LIST->appendChild($ISPRIMARYITEM); $ALLINVENTORYENTRIES_LIST->appendChild($ISSCRAP); $ALLINVENTORYENTRIES_LIST->appendChild($RATE); $ALLINVENTORYENTRIES_LIST->appendChild($DISCOUNT); $ALLINVENTORYENTRIES_LIST->appendChild($AMOUNT); $ALLINVENTORYENTRIES_LIST->appendChild($ACTUALQTY_AE); $ALLINVENTORYENTRIES_LIST->appendChild($BILLEDQTY_AE); $ALLINVENTORYENTRIES_LIST->appendChild($BATCHALLOCATIONS_LIST); $BATCHALLOCATIONS_LIST->appendChild($GODOWNNAME); $BATCHALLOCATIONS_LIST->appendChild($BATCHNAME); $BATCHALLOCATIONS_LIST->appendChild($INDENTNO); $BATCHALLOCATIONS_LIST->appendChild($ORDERNO); $BATCHALLOCATIONS_LIST->appendChild($TRACKINGNUMBER); $BATCHALLOCATIONS_LIST->appendChild($DYNAMICCSTISCLEARED); $BATCHALLOCATIONS_LIST->appendChild($AMOUNT_ba); $BATCHALLOCATIONS_LIST->appendChild($ACTUALQTY); $BATCHALLOCATIONS_LIST->appendChild($BILLEDQTY); $BATCHALLOCATIONS_LIST->appendChild($ADDITIONALDETAILS_LIST); $BATCHALLOCATIONS_LIST->appendChild($VOUCHERCOMPONENTLIST_LIST); $ALLINVENTORYENTRIES_LIST->appendChild($ACCOUNTINGALLOCATIONS_LIST); $ACCOUNTINGALLOCATIONS_LIST->appendChild($OLDAUDITENTRYIDS_LIST_AIE); $OLDAUDITENTRYIDS_LIST_AIE->appendChild($OLDAUDITENTRYIDS_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($LEDGERNAME_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($GSTCLASS_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISDEEMEDPOSITIVE_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($LEDGERFROMITEM_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($REMOVEZEROENTRIES_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISPARTYLEDGER_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISLASTDEEMEDPOSITIVE_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISCAPVATTAXALTERED_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISCAPVATNOTCLAIMED_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($AMOUNT_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($SERVICETAXDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($BANKALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($BILLALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INTERESTCOLLECTION_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($OLDAUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($AUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INPUTCRALLOCS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($DUTYHEADDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($RATEDETAILS_LIST_AL); $ACCOUNTINGALLOCATIONS_LIST->appendChild($SUMMARYALLOCS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($STPYMTDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TAXBILLALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($VATSTATUTORYDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($COSTTRACKALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($REFVOUCHERDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INVOICEWISEDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($VATITCDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ADVANCETAXDETAILS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($EXCISEALLOCATIONS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($EXPENSEALLOCATIONS_LIST_AIE); } $PAYROLLMODEOFPAYMENT_LIST_v = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $ATTDRECORDS_LIST_v = $xml->createElement("ATTDRECORDS.LIST", " "); $GSTEWAYCONSIGNORADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $GSTEWAYCONSIGNEEADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $TEMPGSTRATEDETAILS_LIST_v = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST_v); $VOUCHER->appendChild($ATTDRECORDS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST_v); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST_v); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY2 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO2 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO2->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME2 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE2 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_NAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPNAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPSTATE2); $COMPANY2->appendChild($REMOTECMPINFO2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY3 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO3 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO3->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME3 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME3 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE3 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_NAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPNAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPSTATE3); $COMPANY3->appendChild($REMOTECMPINFO3); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->appendChild($COMPANY3); $test = $xml->createElement("TALLYMESSAGE", " "); $test->setAttribute("xmlns:UDF", "TallyUDF"); } } //end of sales elseif($stage == 'receipt'){ $form_receipt = $this->model->office_form_receipt($fid[$i]); $stage = $form_receipt[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form_receipt[0]['voucher_type']; }else{ $b = $stage; } $date = $form_receipt[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_receipt[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_receipt[0]['voucher_no']; $m_ledger_name = $form_receipt[0]['party_ledger']; $ms_ledger = $form_receipt[0]['cr_ledger']; $ms_ledger_two = $form_receipt[0]['dr_ledger']; $narration = $form_receipt[0]['narration']; $amt_gross = $form_receipt[0]['amt_gross']; $trans_type = $form_receipt[0]['trans_type']; $check_no = $form_receipt[0]['check_no']; $check_date = $form_receipt[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($a=0; $a < 2; $a++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); if($a == '0'){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger_two.""); } $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); if($a == '0'){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$form_receipt[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$form_receipt[0]['amt_gross'].""); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$form_receipt[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$form_receipt[0]['amt_gross'].""); } $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank' && $a == '1'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end } //end of receipt elseif($stage == 'journal'){ $form_journal = $this->model->xml_journal($fid[$i]); //echo "<pre>"; print_r($form); die; $stage = $form_journal[0]['stage']; $date = $form_journal[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_journal[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_journal[0]['voucher_no']; $m_ledger_name = $form_journal[0]['l_name']; $ms_ledger = $form_journal[0]['l_name_one']; $ms_ledger_two = $form_journal[0]['l_name_two']; $narration = $form_journal[0]['narration']; $amt_gross = $form_journal[0]['amt_gross']; $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($b=0; $b < 2; $b++) { if($b == 0){ $s_ledger_name = $ms_ledger; }else{ $s_ledger_name = $ms_ledger_two; } $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$s_ledger_name.""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); if($b == 0){ $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); }else{ $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); } $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); if($b == 0){ $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); }else{ $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); } $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED); if($b == 0){ $m_effect = $form_journal[0]['m_effect']; if($m_effect == 'cr'){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); } }else{ $ms_effect = $form_journal[0]['ms_effect']; if($ms_effect == 'cr'){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); } } $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); /* $DATE_BA_1 = $xml->createElement("DATE", "20180815"); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "20180815"); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "000340"); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "10000.00"); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1);*/ //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } //end of journal elseif($stage == 'payment'){ $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $where = array('fid' => $fid[$i]); //$form = $this->model->DetailData('tbl_form', $where); $form_payment = $this->model->office_form_paymet($fid[$i]); $form_info = $this->model->DetailData('tbl_form_info', $where); $fi_count = count($form_info); $stage = $form_payment[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form_payment[0]['voucher_type']; }else{ $stage = $stage; } $date = $form_payment[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_payment[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_payment[0]['voucher_no']; $m_ledger_name = $form_payment[0]['party_ledger']; $ms_ledger = $form_payment[0]['debit_ledger']; $ms_ledger_two = $form_payment[0]['credit_ledger']; $narration = $form_payment[0]['narration']; $amt_gross = $form_payment[0]['amt_gross']; $trans_type = $form_payment[0]['trans_type']; $check_no = $form_payment[0]['check_no']; $check_date = $form_payment[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-0000aa05:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($c=0; $c < 2; $c++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); if($c == 0){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger_two.""); } $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED_1 = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED_1); $ISCAPVATNOTCLAIMED_1 = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED_1); if($c == 0){ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); } $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available if($trans_type == 'cash'){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); }else{ if($c == 1){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$m_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$m_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$m_ledger_name.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $BANKPARTYNAME_BA_1 = $xml->createElement("BANKPARTYNAME", "".$m_ledger_name.""); $BANKALLOCATIONS_LIST_1->appendChild($BANKPARTYNAME_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //end If bill allocation is available }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); } } $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $GSTEWAYCONSIGNORADDRESS_LIST = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST); $GSTEWAYCONSIGNEEADDRESS_LIST = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } // end of payment elseif($stage == 'credit'){ $where = array('fid' => $fid[$i]); $form_credit = $this->model->xml_credit_one($fid[$i]); //echo "<pre>"; print_r($form); die; $form_info = $this->model->xml_credit_two($fid[$i]); $fi_count = count($form_info); //echo "<pre>"; print_r($form_info); die; $stage = $form_credit[0]['stage']; $date = $form_credit[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_credit[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_credit[0]['voucher_no']; $m_ledger_name = $form_credit[0]['l_name']; $ms_ledger = $form_credit[0]['l_name_one']; //$debit_ledger = $form[0]['debit_ledger']; $narration = $form_credit[0]['narration']; $amt_gross = $form_credit[0]['amt_gross']; $trans_type = $form_credit[0]['trans_type']; $check_no = $form_credit[0]['check_no']; $check_date = $form_credit[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "Credit Note"); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $BASICBUYERADDRESS_LIST = $xml->createElement("BASICBUYERADDRESS.LIST", " "); $BASICBUYERADDRESS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($BASICBUYERADDRESS_LIST); $BASICBUYERADDRESS = $xml->createElement("BASICBUYERADDRESS", "Gandhinagar"); $BASICBUYERADDRESS_LIST->appendChild($BASICBUYERADDRESS); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $REFERENCEDATE = $xml->createElement("REFERENCEDATE", "".$m_date.""); $VOUCHER->appendChild($REFERENCEDATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $VOUCHER->appendChild($STATENAME); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "Credit Note"); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $AMOUNT_1 = $xml->createElement("AMOUNT", "".$form_credit[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$form_credit[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end for ($j=0; $j < $fi_count; $j++){ //ALLLEDGERENTRIES.LIST block start $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$form_info[$j]['debit_ledger'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$form_info[$j]['amt_taxable'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$form_info[$j]['amt_taxable'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available /* $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); }*/ //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end }// for loop ends $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } //end of credit elseif($stage == 'debit'){ $form_debit = $this->model->xml_debit_one($fid[$i]); $form_info = $this->model->xml_debit_two($fid[$i]); $fi_count = count($form_info); //echo "<pre>"; print_r($form_info); die; $stage = $form_debit[0]['stage']; $date = $form_debit[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_debit[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_debit[0]['voucher_no']; $m_ledger_name = $form_debit[0]['l_name']; $ms_ledger = $form_debit[0]['l_name_one']; $ms_ledger_two = $form_debit[0]['ms_ledger_two']; $narration = $form_debit[0]['narration']; $amt_gross = $form_debit[0]['amt_gross']; $trans_type = $form_debit[0]['trans_type']; $check_no = $form_debit[0]['check_no']; $check_date = $form_debit[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "Debit Note"); $VOUCHER->setAttribute("ACTION", "Debit"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $BASICBUYERADDRESS_LIST = $xml->createElement("BASICBUYERADDRESS.LIST", " "); $BASICBUYERADDRESS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($BASICBUYERADDRESS_LIST); $BASICBUYERADDRESS = $xml->createElement("BASICBUYERADDRESS", " "); $BASICBUYERADDRESS_LIST->appendChild($BASICBUYERADDRESS); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $REFERENCEDATE = $xml->createElement("REFERENCEDATE", "".$m_date.""); $VOUCHER->appendChild($REFERENCEDATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $STATENAME = $xml->createElement("STATENAME", " "); $VOUCHER->appendChild($STATENAME); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", " "); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "Debit Note"); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED_1 = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED_1); $ISCAPVATNOTCLAIMED_1 = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED_1); $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$form_debit[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$form_debit[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end for ($j=0; $j < $fi_count; $j++){ //ALLLEDGERENTRIES.LIST block start $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$form_info[$j]['credit_ledger'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED_2 = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED_2); $ISCAPVATNOTCLAIMED_2 = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED_2); $AMOUNT_1 = $xml->createElement("AMOUNT", "".$form_info[$j]['amt_taxable'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$form_info[$j]['amt_taxable'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end }// for loop ends $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } // end of debit elseif($stage == 'purchase'){ $form_pr = $this->model->sm($fid[$i]); $note = $form_pr[0]['note_two']; if($note == 'form_two'){ $form_pr_two = $this->model->sales_two_model($fid[$i]); $cgst = $form_pr_two[0]['cgst']; $c_aot = $form_pr_two[0]['c_aot']; $sgst = $form_pr_two[0]['sgst']; $s_aot = $form_pr_two[0]['s_aot']; $ugst = $form_pr_two[0]['ugst']; $u_aot = $form_pr_two[0]['u_aot']; $igst = $form_pr_two[0]['igst']; $i_aot = $form_pr_two[0]['i_aot']; //echo "<pre>"; print_r($form); die; $stage = $form_pr_two[0]['stage']; $date = $form_pr_two[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_pr_two[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_pr_two[0]['voucher_no']; $dr_ledger = $form_pr_two[0]['dr_ledger']; $narration = $form_pr_two[0]['narration']; $amt_gross = $form_pr_two[0]['amt_gross']; $cr_ledger = $form_pr_two[0]['cr_ledger']; $cr_amount = $form_pr_two[0]['amt_taxable']; $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); // $adrs_list = $xml->createElement("ADDRESS.LIST", " "); // $adrs_list->setAttribute("TYPE", "String"); // $adrs = $xml->createElement("ADDRESS", "Gujarat, India"); // $basic_buy_list = $xml->createElement("BASICBUYERADDRESS.LIST", " "); // $basic_buy_list->setAttribute("TYPE", "String"); // $basic_buy_adrs = $xml->createElement("BASICBUYERADDRESS", "Gujarat, India"); $OLDAUDITENTRYIDS_list = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_list->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $DATE = $xml->createElement("DATE", "".$m_date.""); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); //$PARTYNAME = $xml->createElement("PARTYNAME", "".$dr_ledger.""); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $REFERENCE = $xml->createElement("REFERENCE", "".$voucher_no.""); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$dr_ledger.""); $BASICBASEPARTYNAME = $xml->createElement("BASICBASEPARTYNAME", "".$dr_ledger.""); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); //$PLACEOFSUPPLY = $xml->createElement("PLACEOFSUPPLY", "Gujarat"); $BASICBUYERNAME = $xml->createElement("BASICBUYERNAME", "".$dr_ledger.""); $BASICDATETIMEOFINVOICE = $xml->createElement("BASICDATETIMEOFINVOICE", "".$basic_date_time.""); $BASICDATETIMEOFREMOVAL = $xml->createElement("BASICDATETIMEOFREMOVAL", "".$basic_date_time.""); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $ENTEREDBY = $xml->createElement("ENTEREDBY", "Admin"); //$CONSIGNEESTATENAME = $xml->createElement("CONSIGNEESTATENAME", "Gujarat"); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $AUDITED = $xml->createElement("AUDITED", "No"); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $ISVOID = $xml->createElement("ISVOID", "No"); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $ISDELETED = $xml->createElement("ISDELETED", "No"); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $ALTERID = $xml->createElement("ALTERID", "29"); $MASTERID = $xml->createElement("MASTERID", "14"); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066560"); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); /*$VOUCHER->appendChild($adrs_list); $adrs_list->appendChild($adrs); $VOUCHER->appendChild($basic_buy_list); $basic_buy_list->appendChild($basic_buy_adrs); */ $VOUCHER->appendChild($OLDAUDITENTRYIDS_list); $OLDAUDITENTRYIDS_list->appendChild($OLDAUDITENTRYIDS); $VOUCHER->appendChild($DATE); $VOUCHER->appendChild($GUID); $VOUCHER->appendChild($STATENAME); $VOUCHER->appendChild($NARRATION); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); //$VOUCHER->appendChild($PARTYNAME); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHER->appendChild($REFERENCE); $VOUCHER->appendChild($VOUCHERNUMBER); $VOUCHER->appendChild($PARTYLEDGERNAME); $VOUCHER->appendChild($BASICBASEPARTYNAME); $VOUCHER->appendChild($CSTFORMISSUETYPE); $VOUCHER->appendChild($CSTFORMRECVTYPE); $VOUCHER->appendChild($FBTPAYMENTTYPE); $VOUCHER->appendChild($PERSISTEDVIEW); //$VOUCHER->appendChild($PLACEOFSUPPLY); $VOUCHER->appendChild($BASICBUYERNAME); $VOUCHER->appendChild($BASICDATETIMEOFINVOICE); $VOUCHER->appendChild($BASICDATETIMEOFREMOVAL); $VOUCHER->appendChild($VCHGSTCLASS); $VOUCHER->appendChild($ENTEREDBY); //$VOUCHER->appendChild($CONSIGNEESTATENAME); $VOUCHER->appendChild($DIFFACTUALQTY); $VOUCHER->appendChild($ISMSTFROMSYNC); $VOUCHER->appendChild($ASORIGINAL); $VOUCHER->appendChild($AUDITED); $VOUCHER->appendChild($FORJOBCOSTING); $VOUCHER->appendChild($ISOPTIONAL); $VOUCHER->appendChild($EFFECTIVEDATE); $VOUCHER->appendChild($USEFOREXCISE); $VOUCHER->appendChild($ISFORJOBWORKIN); $VOUCHER->appendChild($ALLOWCONSUMPTION); $VOUCHER->appendChild($USEFORINTEREST); $VOUCHER->appendChild($USEFORGAINLOSS); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $VOUCHER->appendChild($USEFORCOMPOUND); $VOUCHER->appendChild($USEFORSERVICETAX); $VOUCHER->appendChild($ISEXCISEVOUCHER); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $VOUCHER->appendChild($EXCISEOPENING); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $VOUCHER->appendChild($ISVATOVERRIDDEN); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $VOUCHER->appendChild($ISISDVOUCHER); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $VOUCHER->appendChild($GSTNOTEXPORTED); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $VOUCHER->appendChild($ISCANCELLED); $VOUCHER->appendChild($HASCASHFLOW); $VOUCHER->appendChild($ISPOSTDATED); $VOUCHER->appendChild($USETRACKINGNUMBER); $VOUCHER->appendChild($ISINVOICE); $VOUCHER->appendChild($MFGJOURNAL); $VOUCHER->appendChild($HASDISCOUNTS); $VOUCHER->appendChild($ASPAYSLIP); $VOUCHER->appendChild($ISCOSTCENTRE); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $VOUCHER->appendChild($ISBLANKCHEQUE); $VOUCHER->appendChild($ISVOID); $VOUCHER->appendChild($ISONHOLD); $VOUCHER->appendChild($ORDERLINESTATUS); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VOUCHER->appendChild($VATISPURCEXEMPTED); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $VOUCHER->appendChild($ISVATDUTYPAID); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $VOUCHER->appendChild($ISDELETED); $VOUCHER->appendChild($CHANGEVCHMODE); $VOUCHER->appendChild($ALTERID); $VOUCHER->appendChild($MASTERID); $VOUCHER->appendChild($VOUCHERKEY); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $VOUCHER->appendChild($AUDITENTRIES_LIST); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //star for debit ledger $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$dr_ledger.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "Yes"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$amt_gross.""); $VATEXPAMOUNT_DR = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $bill_name = $xml->createElement("NAME", "".$voucher_no.""); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "".$amt_gross.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_DR); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for debit ledger //star for credit ledger $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$cr_ledger.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$cr_amount.""); $VATEXPAMOUNT_CR = $xml->createElement("VATEXPAMOUNT", "-".$cr_amount.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$bill_name = $xml->createElement("NAME", "vouchr no"); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "".$cr_amount.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); */ $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_CR); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for credit ledger //star for CGST ledger if($cgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); //$ROUNDTYPE_Ca = $xml->createElement("ROUNDTYPE", ""); $GSTCLASS_c = $xml->createElement("GSTCLASS", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "CGST"); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$c_aot.""); $VATEXPAMOUNT_C = $xml->createElement("VATEXPAMOUNT", "-".$c_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); //$LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_Ca); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_c); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_C); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for CGST ledger //star for SGST ledger if($sgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); //$ROUNDTYPE_S = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "SGST"); $GSTCLASS_s = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$s_aot.""); $AMOUNT_S = $xml->createElement("VATEXPAMOUNT", "-".$s_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); //$LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_S); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_s); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_S); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for SGST ledger //star for UGST ledger if($ugst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_U = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "UGST"); $GSTCLASS_u = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$u_aot.""); $AMOUNT_U = $xml->createElement("VATEXPAMOUNT", "-".$u_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_U); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_u); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_U); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for UGST ledger //star for IGST ledger if($igst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_I = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "IGST"); $GSTCLASS_i = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$taot.""); $AMOUNT_I = $xml->createElement("VATEXPAMOUNT", "-".$taot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_I); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_i); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_I); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for IGST ledger $PAYROLLMODEOFPAYMENT_LIST_v = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $ATTDRECORDS_LIST_v = $xml->createElement("ATTDRECORDS.LIST", " "); $GSTEWAYCONSIGNORADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $GSTEWAYCONSIGNEEADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $TEMPGSTRATEDETAILS_LIST_v = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST_v); $VOUCHER->appendChild($ATTDRECORDS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST_v); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST_v); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY2 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO2 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO2->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME2 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE2 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_NAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPNAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPSTATE2); $COMPANY2->appendChild($REMOTECMPINFO2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY3 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO3 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO3->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME3 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME3 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE3 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_NAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPNAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPSTATE3); $COMPANY3->appendChild($REMOTECMPINFO3); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->appendChild($COMPANY3); $test = $xml->createElement("TALLYMESSAGE", " "); $test->setAttribute("xmlns:UDF", "TallyUDF"); } // end of purchase form two else{ $pr_form2 = $this->model->salesModel($fid[$i]); $pr_form3 = $this->model->salesExpenseModel($fid[$i]); $info_cnt = count($pr_form2); $info_cnt2 = count($pr_form3); //echo "<pre>"; print_r($pr_form2); die; $tot_g_sgst = 0; $tot_g_cgst = 0; $tot_g_ugst = 0; $tot_g_igst = 0; for ($g=0; $g < $info_cnt2; $g++) { //foreach ($form3 as $gst => $g) { $gamt = $pr_form3[$g]['ex_amount']; $g_sgst = $pr_form3[$g]['sgst']; $g_cgst = $pr_form3[$g]['cgst']; $g_ugst = $pr_form3[$g]['ugst']; $g_igst = $pr_form3[$g]['igst']; if($g_sgst != '0.00'){ $g_sgst_payble = $gamt*$g_sgst/100; //echo "--payble sgst<br>"; $tot_g_sgst += $g_sgst_payble; } if($g_cgst != '0.00'){ $g_cgst_payble = $gamt*$g_cgst/100; //echo "--payble cgst<br>"; $tot_g_cgst += $g_cgst_payble; } if($g_ugst != '0.00'){ $g_ugst_payble = $gamt*$g_ugst/100; //echo "--payble ugst<br>"; $tot_g_ugst += $g_ugst_payble; } if($g_igst != '0.00'){ $g_igst_payble = $gamt*$g_igst/100; //echo "--payble cgst<br>"; $tot_g_igst += $g_igst_payble; } } $tot_g_sgst; $tot_g_cgst; $tot_g_ugst; $tot_g_igst; $all_gst_tot = $tot_g_sgst+$tot_g_cgst+$tot_g_ugst+$tot_g_igst; // sum of same other expenses $result = array(); foreach($pr_form3 as $k => $v) { $id = $v['ex_name']; $result[$id][] = $v['ex_amount']; } $other_expense = array(); foreach($result as $key => $value) { $where_exp = array('eid' => $key); $i_name = $this->model->DetailData('tbl_expense', $where_exp); $in = $i_name[0]['ename']; $other_expense[] = array('ex_name' => $key, 'ex_amount' => array_sum($value), 'iname' => $in); } //echo '<pre>'; print_r($other_expense); // sum of same other expenses $oecnt = count($other_expense); //die; $tsgst = 0; $tcgst = 0; $tugst = 0; $tigst = 0; foreach ($pr_form2 as $total => $tot) { $sgst = $tot['s_aot']; $cgst = $tot['c_aot']; $ugst = $tot['u_aot']; $igst = $tot['i_aot']; $tsgst+=$sgst; $tcgst+=$cgst; $tugst+=$ugst; $tigst+=$igst; } /*echo $tsgst."s<br>"; echo $tcgst."c<br>"; echo $tugst."u<br>"; echo $tigst; die; */ $frm = $this->model->sales_form_data($fid[$i]); $amt_gross = $frm[0]['amt_gross']; $new_tot_expns = 0; $amt_tax = 0; foreach ($frm as $key => $tot) { $expns = $tot['expenses']; $amt_taxable = $tot['amt_taxable']; $tot_expns = 0; if($expns != ''){ foreach ($expns as $tt => $t) { $newtt = $t['ex_amount']; $tot_expns+=$newtt; } }else{ $tot_expns = 0; } $new_tot_expns+=$tot_expns; $amt_tax+=$amt_taxable; } $new_tot_expns; $amt_tax; $tot_tax = $tsgst+$tcgst+$tugst+$tigst; $totdebit = $new_tot_expns+$tot_tax+$amt_tax+$all_gst_tot; /*echo $amt_gross."<br>"; echo $totdebit; die; */ $diff_amt = round(abs($amt_gross - $totdebit),2); $stage = $form_pr[0]['stage']; $date = $form_pr[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_pr[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_pr[0]['voucher_no']; $m_ledger_name = $form_pr[0]['l_name']; $narration = $form_pr[0]['narration']; $amt_gross = $form_pr[0]['amt_gross']; if($amt_gross < $totdebit){ $amt_gross = $amt_gross + $diff_amt; }else{ $amt_gross = $amt_gross; } $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Invoice Voucher View"); $adrs_list = $xml->createElement("ADDRESS.LIST", " "); $adrs_list->setAttribute("TYPE", "String"); $adrs = $xml->createElement("ADDRESS", "Gujarat, India"); $basic_buy_list = $xml->createElement("BASICBUYERADDRESS.LIST", " "); $basic_buy_list->setAttribute("TYPE", "String"); $basic_buy_adrs = $xml->createElement("BASICBUYERADDRESS", "Gujarat, India"); $OLDAUDITENTRYIDS_list = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_list->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $DATE = $xml->createElement("DATE", "".$m_date.""); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); $PARTYNAME = $xml->createElement("PARTYNAME", "".$m_ledger_name.""); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $BASICBASEPARTYNAME = $xml->createElement("BASICBASEPARTYNAME", "".$m_ledger_name.""); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Invoice Voucher View"); $PLACEOFSUPPLY = $xml->createElement("PLACEOFSUPPLY", "Gujarat"); $BASICBUYERNAME = $xml->createElement("BASICBUYERNAME", "".$m_ledger_name.""); $BASICDATETIMEOFINVOICE = $xml->createElement("BASICDATETIMEOFINVOICE", "".$basic_date_time.""); $BASICDATETIMEOFREMOVAL = $xml->createElement("BASICDATETIMEOFREMOVAL", "".$basic_date_time.""); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $CONSIGNEESTATENAME = $xml->createElement("CONSIGNEESTATENAME", "Gujarat"); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $AUDITED = $xml->createElement("AUDITED", "No"); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $ISINVOICE = $xml->createElement("ISINVOICE", "Yes"); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "Yes"); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $ISVOID = $xml->createElement("ISVOID", "No"); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $ISDELETED = $xml->createElement("ISDELETED", "No"); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $ALTERID = $xml->createElement("ALTERID", "29"); $MASTERID = $xml->createElement("MASTERID", "14"); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066560"); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $VOUCHER->appendChild($adrs_list); $adrs_list->appendChild($adrs); $VOUCHER->appendChild($basic_buy_list); $basic_buy_list->appendChild($basic_buy_adrs); $VOUCHER->appendChild($OLDAUDITENTRYIDS_list); $OLDAUDITENTRYIDS_list->appendChild($OLDAUDITENTRYIDS); $VOUCHER->appendChild($DATE); $VOUCHER->appendChild($GUID); $VOUCHER->appendChild($STATENAME); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); $VOUCHER->appendChild($PARTYNAME); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHER->appendChild($VOUCHERNUMBER); $VOUCHER->appendChild($PARTYLEDGERNAME); $VOUCHER->appendChild($BASICBASEPARTYNAME); $VOUCHER->appendChild($CSTFORMISSUETYPE); $VOUCHER->appendChild($CSTFORMRECVTYPE); $VOUCHER->appendChild($FBTPAYMENTTYPE); $VOUCHER->appendChild($PERSISTEDVIEW); $VOUCHER->appendChild($PLACEOFSUPPLY); $VOUCHER->appendChild($BASICBUYERNAME); $VOUCHER->appendChild($BASICDATETIMEOFINVOICE); $VOUCHER->appendChild($BASICDATETIMEOFREMOVAL); $VOUCHER->appendChild($VCHGSTCLASS); $VOUCHER->appendChild($CONSIGNEESTATENAME); $VOUCHER->appendChild($DIFFACTUALQTY); $VOUCHER->appendChild($ISMSTFROMSYNC); $VOUCHER->appendChild($ASORIGINAL); $VOUCHER->appendChild($AUDITED); $VOUCHER->appendChild($FORJOBCOSTING); $VOUCHER->appendChild($ISOPTIONAL); $VOUCHER->appendChild($EFFECTIVEDATE); $VOUCHER->appendChild($USEFOREXCISE); $VOUCHER->appendChild($ISFORJOBWORKIN); $VOUCHER->appendChild($ALLOWCONSUMPTION); $VOUCHER->appendChild($USEFORINTEREST); $VOUCHER->appendChild($USEFORGAINLOSS); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $VOUCHER->appendChild($USEFORCOMPOUND); $VOUCHER->appendChild($USEFORSERVICETAX); $VOUCHER->appendChild($ISEXCISEVOUCHER); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $VOUCHER->appendChild($EXCISEOPENING); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $VOUCHER->appendChild($ISVATOVERRIDDEN); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $VOUCHER->appendChild($ISISDVOUCHER); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $VOUCHER->appendChild($GSTNOTEXPORTED); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $VOUCHER->appendChild($ISCANCELLED); $VOUCHER->appendChild($HASCASHFLOW); $VOUCHER->appendChild($ISPOSTDATED); $VOUCHER->appendChild($USETRACKINGNUMBER); $VOUCHER->appendChild($ISINVOICE); $VOUCHER->appendChild($MFGJOURNAL); $VOUCHER->appendChild($HASDISCOUNTS); $VOUCHER->appendChild($ASPAYSLIP); $VOUCHER->appendChild($ISCOSTCENTRE); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $VOUCHER->appendChild($ISBLANKCHEQUE); $VOUCHER->appendChild($ISVOID); $VOUCHER->appendChild($ISONHOLD); $VOUCHER->appendChild($ORDERLINESTATUS); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VOUCHER->appendChild($VATISPURCEXEMPTED); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $VOUCHER->appendChild($ISVATDUTYPAID); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $VOUCHER->appendChild($ISDELETED); $VOUCHER->appendChild($CHANGEVCHMODE); $VOUCHER->appendChild($ALTERID); $VOUCHER->appendChild($MASTERID); $VOUCHER->appendChild($VOUCHERKEY); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $VOUCHER->appendChild($AUDITENTRIES_LIST); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //star for credit ledger $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "Yes"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$amt_gross.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $bill_name = $xml->createElement("NAME", "".$voucher_no.""); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "".$amt_gross.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for debit ledger if($amt_gross > $totdebit){ // Start of Round of $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "Round Amount"); $GSTCLASS_oe = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$diff_amt.""); $VATEXPAMOUNT_LE = $xml->createElement("VATEXPAMOUNT", "".$diff_amt.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_oe); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); // End of Round of } //star for other expenses ledger for ($oe=0; $oe < $oecnt; $oe++) { $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$other_expense[$oe]['iname'].""); $GSTCLASS_oe = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$other_expense[$oe]['ex_amount'].""); $VATEXPAMOUNT_LE = $xml->createElement("VATEXPAMOUNT", "-".$other_expense[$oe]['ex_amount'].""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_oe); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for other expenses ledger //star for CGST ledger if($tcgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_Ca = $xml->createElement("ROUNDTYPE", ""); $GSTCLASS_c = $xml->createElement("GSTCLASS", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "CGST"); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $forcgst = $tcgst+$tot_g_cgst; $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$forcgst.""); $VATEXPAMOUNT_C = $xml->createElement("VATEXPAMOUNT", "-".$forcgst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_Ca); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_c); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_C); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for CGST ledger //star for SGST ledger if($tsgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_S = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "SGST"); $GSTCLASS_s = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $forsgst = $tsgst+$tot_g_sgst; $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$forsgst.""); $AMOUNT_S = $xml->createElement("VATEXPAMOUNT", "-".$forsgst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_S); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_s); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_S); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for SGST ledger //star for UGST ledger if($tugst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_U = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "UGST"); $GSTCLASS_u = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $forugst = $tugst+$tot_g_ugst; $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$forugst.""); $AMOUNT_U = $xml->createElement("VATEXPAMOUNT", "-".$forugst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_U); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_u); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_U); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for UGST ledger //star for IGST ledger if($tigst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_I = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "IGST"); $GSTCLASS_i = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $forigst = $tigst+$tot_g_igst; $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$forigst.""); $AMOUNT_I = $xml->createElement("VATEXPAMOUNT", "-".$forigst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_I); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_i); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_I); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for IGST ledger for ($inv=0; $inv < $info_cnt; $inv++) { $item_name = $pr_form2[$inv]['item']; $rate = $pr_form2[$inv]['rate']; $discount = $pr_form2[$inv]['discount_two']; $amount = $pr_form2[$inv]['amt_taxable']; $qty = $pr_form2[$inv]['qty']; $s_ledger_name = $pr_form2[$inv]['l_name']; $ALLINVENTORYENTRIES_LIST = $xml->createElement("ALLINVENTORYENTRIES.LIST", " "); $STOCKITEMNAME = $xml->createElement("STOCKITEMNAME", "".$item_name.""); $ISDEEMEDPOSITIVE_LE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ISLASTDEEMEDPOSITIVE_LE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISAUTONEGATE = $xml->createElement("ISAUTONEGATE", "No"); $ISCUSTOMSCLEARANCE = $xml->createElement("ISCUSTOMSCLEARANCE", "No"); $ISTRACKCOMPONENT = $xml->createElement("ISTRACKCOMPONENT", "No"); $ISTRACKPRODUCTION = $xml->createElement("ISTRACKPRODUCTION", "No"); $ISPRIMARYITEM = $xml->createElement("ISPRIMARYITEM", "No"); $ISSCRAP = $xml->createElement("ISSCRAP", "No"); $RATE = $xml->createElement("RATE", "".$rate.""); $DISCOUNT = $xml->createElement("DISCOUNT", "".$discount.""); $AMOUNT = $xml->createElement("AMOUNT", "-".$amount.""); $ACTUALQTY_AE = $xml->createElement("ACTUALQTY", "".$qty.""); $BILLEDQTY_AE = $xml->createElement("BILLEDQTY", "".$qty.""); $BATCHALLOCATIONS_LIST = $xml->createElement("BATCHALLOCATIONS.LIST", " "); $GODOWNNAME = $xml->createElement("GODOWNNAME", "Main Location"); $BATCHNAME = $xml->createElement("BATCHNAME", "Primary Batch"); $INDENTNO = $xml->createElement("INDENTNO", ""); $ORDERNO = $xml->createElement("ORDERNO", ""); $TRACKINGNUMBER = $xml->createElement("TRACKINGNUMBER", ""); $DYNAMICCSTISCLEARED = $xml->createElement("DYNAMICCSTISCLEARED", "No"); $AMOUNT_ba = $xml->createElement("AMOUNT", "-".$amount.""); $ACTUALQTY = $xml->createElement("ACTUALQTY", "".$qty.""); $BILLEDQTY = $xml->createElement("BILLEDQTY", "".$qty.""); $ADDITIONALDETAILS_LIST = $xml->createElement("ADDITIONALDETAILS.LIST", " "); $VOUCHERCOMPONENTLIST_LIST = $xml->createElement("VOUCHERCOMPONENTLIST.LIST", " "); $ACCOUNTINGALLOCATIONS_LIST = $xml->createElement("ACCOUNTINGALLOCATIONS.LIST", " "); $OLDAUDITENTRYIDS_LIST_AIE = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_AIE->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_AIE = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME_AIE = $xml->createElement("LEDGERNAME", "".$s_ledger_name.""); $GSTCLASS_AIE = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE_AIE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM_AIE = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES_AIE = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER_AIE = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE_AIE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED_AIE = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED_AIE = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_AIE = $xml->createElement("AMOUNT", "-".$amount.""); $SERVICETAXDETAILS_LIST_AIE = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_AIE = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST_AIE = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST_AIE = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AIE = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AIE = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AIE = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AIE = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_AIE1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST_AIE = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST_AL = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST_AIE = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST_AIE = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST_AIE = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST_AIE = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST_AIE1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST_AIE = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST_AIE = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST_AIE = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST_AIE1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST_AIE = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_AIE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST_AIE = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $DUTYHEADDETAILS_LIST_AIE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST_AIE = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST_AIE = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST_AIE = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $EXCISEALLOCATIONS_LIST_AIE = $xml->createElement("EXCISEALLOCATIONS.LIST", " "); $EXPENSEALLOCATIONS_LIST_AIE = $xml->createElement("EXPENSEALLOCATIONS.LIST", " "); $VOUCHER->appendChild($ALLINVENTORYENTRIES_LIST); $ALLINVENTORYENTRIES_LIST->appendChild($STOCKITEMNAME); $ALLINVENTORYENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE_LE); $ALLINVENTORYENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE_LE); $ALLINVENTORYENTRIES_LIST->appendChild($ISAUTONEGATE); $ALLINVENTORYENTRIES_LIST->appendChild($ISCUSTOMSCLEARANCE); $ALLINVENTORYENTRIES_LIST->appendChild($ISTRACKCOMPONENT); $ALLINVENTORYENTRIES_LIST->appendChild($ISTRACKPRODUCTION); $ALLINVENTORYENTRIES_LIST->appendChild($ISPRIMARYITEM); $ALLINVENTORYENTRIES_LIST->appendChild($ISSCRAP); $ALLINVENTORYENTRIES_LIST->appendChild($RATE); $ALLINVENTORYENTRIES_LIST->appendChild($DISCOUNT); $ALLINVENTORYENTRIES_LIST->appendChild($AMOUNT); $ALLINVENTORYENTRIES_LIST->appendChild($ACTUALQTY_AE); $ALLINVENTORYENTRIES_LIST->appendChild($BILLEDQTY_AE); $ALLINVENTORYENTRIES_LIST->appendChild($BATCHALLOCATIONS_LIST); $BATCHALLOCATIONS_LIST->appendChild($GODOWNNAME); $BATCHALLOCATIONS_LIST->appendChild($BATCHNAME); $BATCHALLOCATIONS_LIST->appendChild($INDENTNO); $BATCHALLOCATIONS_LIST->appendChild($ORDERNO); $BATCHALLOCATIONS_LIST->appendChild($TRACKINGNUMBER); $BATCHALLOCATIONS_LIST->appendChild($DYNAMICCSTISCLEARED); $BATCHALLOCATIONS_LIST->appendChild($AMOUNT_ba); $BATCHALLOCATIONS_LIST->appendChild($ACTUALQTY); $BATCHALLOCATIONS_LIST->appendChild($BILLEDQTY); $BATCHALLOCATIONS_LIST->appendChild($ADDITIONALDETAILS_LIST); $BATCHALLOCATIONS_LIST->appendChild($VOUCHERCOMPONENTLIST_LIST); $ALLINVENTORYENTRIES_LIST->appendChild($ACCOUNTINGALLOCATIONS_LIST); $ACCOUNTINGALLOCATIONS_LIST->appendChild($OLDAUDITENTRYIDS_LIST_AIE); $OLDAUDITENTRYIDS_LIST_AIE->appendChild($OLDAUDITENTRYIDS_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($LEDGERNAME_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($GSTCLASS_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISDEEMEDPOSITIVE_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($LEDGERFROMITEM_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($REMOVEZEROENTRIES_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISPARTYLEDGER_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISLASTDEEMEDPOSITIVE_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISCAPVATTAXALTERED_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISCAPVATNOTCLAIMED_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($AMOUNT_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($SERVICETAXDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($BANKALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($BILLALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INTERESTCOLLECTION_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($OLDAUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($AUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INPUTCRALLOCS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($DUTYHEADDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($RATEDETAILS_LIST_AL); $ACCOUNTINGALLOCATIONS_LIST->appendChild($SUMMARYALLOCS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($STPYMTDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TAXBILLALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($VATSTATUTORYDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($COSTTRACKALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($REFVOUCHERDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INVOICEWISEDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($VATITCDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ADVANCETAXDETAILS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($EXCISEALLOCATIONS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($EXPENSEALLOCATIONS_LIST_AIE); } $PAYROLLMODEOFPAYMENT_LIST_v = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $ATTDRECORDS_LIST_v = $xml->createElement("ATTDRECORDS.LIST", " "); $GSTEWAYCONSIGNORADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $GSTEWAYCONSIGNEEADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $TEMPGSTRATEDETAILS_LIST_v = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST_v); $VOUCHER->appendChild($ATTDRECORDS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST_v); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST_v); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY2 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO2 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO2->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME2 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE2 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_NAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPNAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPSTATE2); $COMPANY2->appendChild($REMOTECMPINFO2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY3 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO3 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO3->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME3 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME3 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE3 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_NAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPNAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPSTATE3); $COMPANY3->appendChild($REMOTECMPINFO3); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->appendChild($COMPANY3); $test = $xml->createElement("TALLYMESSAGE", " "); $test->setAttribute("xmlns:UDF", "TallyUDF"); } // end of purchase for one } // end of purchase elseif($stage == 'cheque_reg'){ $voucher_type = $form[0]['voucher_type']; if($voucher_type == 'payment'){ $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $where = array('fid' => $fid[$i]); //$form = $this->model->DetailData('tbl_form', $where); $form_payment = $this->model->office_form_paymet($fid[$i]); $form_info = $this->model->DetailData('tbl_form_info', $where); $fi_count = count($form_info); $stage = $form_payment[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form_payment[0]['voucher_type']; }else{ $stage = $stage; } $date = $form_payment[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_payment[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_payment[0]['voucher_no']; $m_ledger_name = $form_payment[0]['party_ledger']; $ms_ledger = $form_payment[0]['debit_ledger']; $ms_ledger_two = $form_payment[0]['credit_ledger']; $narration = $form_payment[0]['narration']; $amt_gross = $form_payment[0]['amt_gross']; $trans_type = $form_payment[0]['trans_type']; $check_no = $form_payment[0]['check_no']; $check_date = $form_payment[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-0000aa05:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($c=0; $c < 2; $c++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); if($c == 0){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger_two.""); } $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED_1 = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED_1); $ISCAPVATNOTCLAIMED_1 = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED_1); if($c == 0){ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); } $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available if($trans_type == 'cash'){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); }else{ if($c == 1){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$m_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$m_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$m_ledger_name.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $BANKPARTYNAME_BA_1 = $xml->createElement("BANKPARTYNAME", "".$m_ledger_name.""); $BANKALLOCATIONS_LIST_1->appendChild($BANKPARTYNAME_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //end If bill allocation is available }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); } } $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $GSTEWAYCONSIGNORADDRESS_LIST = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST); $GSTEWAYCONSIGNEEADDRESS_LIST = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } // end of cheque_reg payment else{ $form_receipt = $this->model->office_form_receipt($fid[$i]); $stage = $form_receipt[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form_receipt[0]['voucher_type']; }else{ $b = $stage; } $date = $form_receipt[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_receipt[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_receipt[0]['voucher_no']; $m_ledger_name = $form_receipt[0]['party_ledger']; $ms_ledger = $form_receipt[0]['cr_ledger']; $ms_ledger_two = $form_receipt[0]['dr_ledger']; $narration = $form_receipt[0]['narration']; $amt_gross = $form_receipt[0]['amt_gross']; $trans_type = $form_receipt[0]['trans_type']; $check_no = $form_receipt[0]['check_no']; $check_date = $form_receipt[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($a=0; $a < 2; $a++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); if($a == '0'){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger_two.""); } $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); if($a == '0'){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$form_receipt[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$form_receipt[0]['amt_gross'].""); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$form_receipt[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$form_receipt[0]['amt_gross'].""); } $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank' && $a == '1'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end } //end of cheque_reg receipt } // end of cheque_reg elseif($stage == 'bank'){ $voucher_type = $form[0]['voucher_type']; if($voucher_type == 'payment'){ $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $where = array('fid' => $fid[$i]); //$form = $this->model->DetailData('tbl_form', $where); $form_payment = $this->model->office_form_paymet($fid[$i]); $form_info = $this->model->DetailData('tbl_form_info', $where); $fi_count = count($form_info); $stage = $form_payment[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form_payment[0]['voucher_type']; }else{ $stage = $stage; } $date = $form_payment[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_payment[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_payment[0]['voucher_no']; $m_ledger_name = $form_payment[0]['party_ledger']; $ms_ledger = $form_payment[0]['debit_ledger']; $ms_ledger_two = $form_payment[0]['credit_ledger']; $narration = $form_payment[0]['narration']; $amt_gross = $form_payment[0]['amt_gross']; $trans_type = $form_payment[0]['trans_type']; $check_no = $form_payment[0]['check_no']; $check_date = $form_payment[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-0000aa05:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($c=0; $c < 2; $c++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); if($c == 0){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger_two.""); } $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED_1 = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED_1); $ISCAPVATNOTCLAIMED_1 = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED_1); if($c == 0){ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); } $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available if($trans_type == 'cash'){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); }else{ if($c == 1){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$m_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$m_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$m_ledger_name.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $BANKPARTYNAME_BA_1 = $xml->createElement("BANKPARTYNAME", "".$m_ledger_name.""); $BANKALLOCATIONS_LIST_1->appendChild($BANKPARTYNAME_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //end If bill allocation is available }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); } } $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $GSTEWAYCONSIGNORADDRESS_LIST = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST); $GSTEWAYCONSIGNEEADDRESS_LIST = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } // end of bank payment elseif($voucher_type == 'receipt'){ $form_receipt = $this->model->office_form_receipt($fid[$i]); $stage = $form_receipt[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form_receipt[0]['voucher_type']; }else{ $b = $stage; } $date = $form_receipt[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form_receipt[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form_receipt[0]['voucher_no']; $m_ledger_name = $form_receipt[0]['party_ledger']; $ms_ledger = $form_receipt[0]['cr_ledger']; $ms_ledger_two = $form_receipt[0]['dr_ledger']; $narration = $form_receipt[0]['narration']; $amt_gross = $form_receipt[0]['amt_gross']; $trans_type = $form_receipt[0]['trans_type']; $check_no = $form_receipt[0]['check_no']; $check_date = $form_receipt[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($a=0; $a < 2; $a++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); if($a == '0'){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger_two.""); } $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); if($a == '0'){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$form_receipt[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$form_receipt[0]['amt_gross'].""); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$form_receipt[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$form_receipt[0]['amt_gross'].""); } $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank' && $a == '1'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end } // end of bank receipt else{ //$where = array('fid' => $fid); $form = $this->model->xml_contra($fid[$i]); //echo "<pre>"; print_r($form); die; $stage = $form[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form[0]['voucher_type']; }else{ $stage = $stage; } $date = $form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form[0]['voucher_no']; $m_ledger_name = $form[0]['party_ledger']; $narration = $form[0]['narration']; $amt_gross = $form[0]['amt_gross']; $check_no = $form[0]['check_no']; $check_date = $form[0]['check_date']; $trans_type = $form[0]['trans_type']; $ms_ledger = $form[0]['sub_ledger']; $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start //$s_ledger_name = $form_info[$i]['s_ledger_name']; for ($le=0; $le < 2; $le++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); //if($trans_type == 'fund_transfer'){ if($le == 0){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); } /* }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); }*/ $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); if($le == 0){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); } //start If bill allocation is available if($trans_type == 'withdrawal'){ //if trans type is withdrawal if($le == 0){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); } //if trans type is withdrawal }elseif($trans_type == 'diposit'){ //if trans type is diposit if($le == 0){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //if trans type is deposit } }else{ //For fund transfer $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); if($le == 0){ $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); }else{ $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); } $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //For fund transfer } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); } // end of bank contra } // end of bank } // end of for $xml_HEADER->appendChild($xml_HEADER_TALLYREQUEST); $xml_ENVELOPE->appendChild($xml_HEADER); $xml_ENVELOPE->appendChild($xml_BODY); $xml_BODY->appendChild($xml_BODY_IMPORTDATA); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA); $xml->appendChild($xml_ENVELOPE); // Parse the XML. //print $xml->saveXML(); /*$xml->save('all_xml/text.xml'); die;*/ $current_year = date('Y'); $current_month = date('M'); $current_date = date('d'); $dirs = array_filter(glob('all_xml/*'), 'is_dir'); if(in_array('all_xml/'.$current_year.'', $dirs)){ //echo "year avail"; echo "<br>"; $dirs_two = array_filter(glob('all_xml/'.$current_year.'/*'), 'is_dir'); //echo 'all_xml/'.$current_year.'/'.$current_month; if(in_array('all_xml/'.$current_year.'/'.$current_month.'', $dirs_two)){ //echo "month avail"; }else{ echo "month not avail"; mkdir("./all_xml/".$current_year."/".$current_month); } }else{ echo "not avail"; mkdir("./all_xml/".$current_year); $dirs_two = array_filter(glob('all_xml/'.$current_year.'/*'), 'is_dir'); //echo 'all_xml/'.$current_year.'/'.$current_month; if(in_array('all_xml/'.$current_year.'/'.$current_month.'', $dirs_two)){ echo "month avail"; }else{ echo "month not avail"; mkdir("./all_xml/".$current_year."/".$current_month); } } //echo "<pre>"; print_r($dirs); $sdr = mt_rand(100000, 999999); $sdr = time().$sdr; $xml->save('all_xml/'.$current_year.'/'.$current_month.'/'.$current_date.'_xml_'.$sdr.'.xml'); //$xml->save('text.xml'); $xml_path = 'all_xml/'.$current_year.'/'.$current_month.'/'.$current_date.'_xml_'.$sdr.'.xml'; $insdata = array( 'x_by' => $rid, 'x_year' => $current_year, 'x_month' => $current_month, 'x_path' => $xml_path, ); $this->model->insertData('tbl_xml', $insdata); //die; $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Selectd data has been approved and XML has been generated. </div>'); redirect('webapp/office/form_grid'); } public function all_xml($offset = '0'){ $data['xml'] = $this->model->getDataModel('tbl_xml'); $cnt=count($data['xml']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/leader/all_xml'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $data['xml'] = $this->model->getGenXML($config['per_page'], $offset); $this->load->view('webapp/all_xml', $data); } } //End of controller webapp/Welcome_07072023.php 0000644 00000015517 14642254423 0011131 0 ustar 00 <?php use Aws\S3\S3Client; use Aws\S3\Exception\S3Exception; use Aws\CommandPool; if ( ! defined('BASEPATH')) exit('No direct script access allowed'); require_once APPPATH."third_party/aws/autoload.php"; class Welcome extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); //aws $bucketname = 'paperpushbucket'; $key = 'AKIAJJ72VRLHXBD272YQ'; $secret = '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'; $this->s3 = S3Client::factory( array( 'credentials' => array( 'key' => $key, 'secret' => $secret ), 'version' => 'latest', 'region' => 'ap-south-1' ) ); } public function index(){ $ses = $this->session->get_userdata(); $userdata = $this->session->userdata('reg_info'); if(!isset($userdata)) { $base = base_url(); redirect($base); } $cur_year = date('Y'); $id = $ses['reg_info'][0]['rid']; $where = array('ato' => $id); $ses_data = $this->model->DetailData('tbl_access', $where); $where_cust = array('type' => 'customer'); $this->db2->order_by('rid', 'DESC'); $this->db2->limit(10); $data['cust'] = $this->db2->get_where('tbl_registration', $where_cust)->result_array(); //echo "<pre>"; print_r($data['cust']); die; $type = $ses['reg_info'][0]['type']; if($type == 'admin' || $type == 'team_leader'){ $where_cust = array('type' => 'customer'); $data['c_count'] = $this->model->getDatamodelCountWhere('tbl_registration', $where_cust); $where_office = array('type' => 'office_user'); $data['of_count'] = $this->model->getDatamodelCountWhere('tbl_registration', $where_office); $where_tl = array('type' => 'team_leader'); $data['tl_count'] = $this->model->getDatamodelCountWhere('tbl_registration', $where_tl); $where_form = array('approve_status' => 'approved'); $data['c_forms'] = $this->model->getDatamodelCountWhere('tbl_form', $where_form); $data['uploads'] = $this->model->uploadNotiAdmin(); $this->load->view('webapp/dashbord', $data); }elseif ($type == 'customer') { $code = $userdata[0]['folder_code']; $where_cust = array('code' => $code, 'year' => $cur_year); $data['struct'] = $this->db2->get_where('cust_upload_structure',$where_cust)->row_array(); $data['templates'] = $this->db2->get_where('cust_templates', array('ct_code'=>$code))->result_array(); //echo "<pre>"; print_r($data); die; $Rid = $ses['reg_info'][0]['rid']; $where = array('rid' => $Rid); $Checkdata = $this->model->DetailData('tbl_registration', $where); //echo "<pre>"; print_r($Checkdata); die; $country = $Checkdata[0]['country']; $gst = $Checkdata[0]['gst']; $pan = $Checkdata[0]['pan']; $cin_no = $Checkdata[0]['cin_no']; $tax_id = $Checkdata[0]['tax_id']; if($country == "India"){ if($gst == "" || $pan == "" || $cin_no == ""){ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Please Fill GST,PAN and CIN Number. </div>'); redirect('webapp/users/profile'); } }elseif($country == "Canada" || $country == "United States"){ if($tax_id == ""){ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Please Fill TAX Id Number. </div>'); redirect('webapp/users/profile'); } } $this->load->view('webapp/customer/dashbord', $data); }elseif ($type == 'office_user') { $where_oid = array('oid' => $id); $data['form_count'] = $this->model->getDatamodelCountWhere('tbl_form', $where_oid); $data['cust_upload'] = $this->model->custUploads2($id); $customer = $this->model->officeModel($id); $data['custCnt'] = count($customer); $this->load->view('webapp/office_user/dashbord', $data); } } public function changeYear($myYear){ mkdir("./all_xml/".$myYear); $dirs = array_filter(glob('documents/*'), 'is_dir'); foreach ($dirs as $key => $value) { $exp = explode('/', $value); $user_folder = $exp[1]; $path = array_filter(glob('documents/'.$user_folder.'/*'), 'is_dir'); $path2 = 'documents/'.$user_folder.'/'.$myYear; if(!in_array($path2,$path)){ mkdir("./documents/".$user_folder."/".$myYear); $month = ['a_january', 'b_february', 'c_march', 'd_april', 'e_may', 'f_june', 'g_july', 'h_august', 'i_september', 'j_october', 'k_november', 'l_december']; foreach ($month as $value) { mkdir("./documents/".$user_folder."/".$myYear.'/'.$value); $entries = ['purchase', 'sales', 'payment', 'receipt', 'contra', 'journal', 'debit', 'credit', 'bank', 'cheque_reg', 'reports']; foreach ($entries as $ent) { mkdir("./documents/".$user_folder."/".$myYear.'/'.$value.'/'.$ent); $stage = ['recycle']; foreach ($stage as $st) { mkdir("./documents/".$user_folder."/".$myYear.'/'.$value.'/'.$ent.'/'.$st); } } } } } $data = array('year' => $myYear); $this->model->insertData('tbl_years', $data); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Folders has been created. </div>'); redirect('webapp/welcome'); } public function abort(){ $this->session->sess_destroy(); redirect(base_url("webapp/welcome")); } public function removeAll($rid){ $rid = $this->model->decryptdata($rid); $this->model->UpdateData('tbl_login_check', ['status' => 0 ], ['rid' => $rid]); $session_id = session_id(); $this->session->set_userdata('mysesion', $session_id ); $this->model->UpdateData('tbl_login_check', ['status' => 0 ], $where); $dataIns = array( 'rid' => $rid, 'session_id' => $session_id, 'status' => '1', ); $this->model->insertData('tbl_login_check', $dataIns); redirect("webapp/welcome"); } public function duplicate($rid){ $existingLoginData = $this->db2->get_where("tbl_login_check" , ['rid' => $rid , 'status' => 1 ])->result_array(); $data['existingLoginData'] = $existingLoginData ; $data['rid'] = $rid ; $this->load->view('webapp/duplicate', $data); } } /* End of file Welcome.php */ webapp/Customer.php 0000644 00000032216 14642254424 0010347 0 ustar 00 <?php use Aws\S3\S3Client; use Aws\S3\Exception\S3Exception; use Aws\CommandPool; if ( ! defined('BASEPATH')) exit('No direct script access allowed'); require_once APPPATH."third_party/aws/autoload.php"; class Customer extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); //aws $bucketname = 'paperpushbucket'; $key = 'AKIAJJ72VRLHXBD272YQ'; $secret = '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'; $this->s3 = S3Client::factory( array( 'credentials' => array( 'key' => $key, 'secret' => $secret ), 'version' => 'latest', 'region' => 'ap-south-1' ) ); } public function index() { $userdata = $this->session->userdata('reg_info'); $code = $userdata[0]['folder_code']; $where = array('code' => $code); $data['cust'] = $this->db2->get_where('cust_upload_structure', $where)->result_array(); $data['templates'] = $this->db2->get_where('cust_templates', array('ct_code'=>$code))->result_array(); $Rid = $userdata[0]['rid']; $where = array('rid' => $Rid); $Checkdata = $this->model->DetailData('tbl_registration', $where); //echo "<pre>"; print_r($Checkdata); die; $country = $Checkdata[0]['country']; $gst = $Checkdata[0]['gst']; $pan = $Checkdata[0]['pan']; $cin_no = $Checkdata[0]['cin_no']; $tax_id = $Checkdata[0]['tax_id']; if($country == "India"){ if($gst == "" || $pan == "" || $cin_no == ""){ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Please Fill GST,PAN and CIN Number. </div>'); redirect('webapp/users/profile'); } }elseif($country == "Canada" || $country == "United States"){ if($tax_id == ""){ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Please Fill TAX Id Number. </div>'); redirect('webapp/users/profile'); } } $this->load->view("webapp/customer/view", $data); } public function listView() { //echo'<pre>'; print_r($_POST); die; $data['code'] = $this->input->post('code'); $data['year'] = $this->input->post('year'); $data['month'] = $this->input->post('month'); $where = array('code' => $this->input->post('code'), 'year' => $this->input->post('year')); $data['struct'] = $this->db2->get_where('cust_upload_structure', $where)->row_array(); //echo "<pre>"; print_r($where); die; $data['templates'] = $this->db2->get_where('cust_templates', array('ct_code'=>$this->input->post('code')))->result_array(); $data['all_struct'] = $this->db2->get_where('cust_upload_structure', array('code' => $this->input->post('code')))->result_array(); $this->load->view("webapp/customer/list_view", $data); } public function upload(){ //echo "<pre>"; print_r($_FILES); echo "<pre>"; print_r($_POST); die; $bucketname = 'paperpushbucket'; $dash_url = $this->input->post('dash_url'); $code = $this->input->post('code'); $stage = $this->input->post('stage'); $year = $this->input->post('year'); $month = $this->input->post('month'); $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $path = $code.'/'.$year.'/'.$month.'/'.$stage; $count = count($_FILES['doc']['size']); for($i = 0; $i < $count; $i++){ $filename = $_FILES['doc']['name'][$i]; $ext = pathinfo($filename, PATHINFO_EXTENSION); $ext = strtolower($ext); if(!empty($ext)){ if($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png' || $ext == 'pdf' || $ext == 'csv' || $ext == 'xls' || $ext == 'xlsb' || $ext == 'xlsx'){ //echo "<pre>"; print_r($_FILES); die; $rand =rand(10,100); $target_file = preg_replace("/[^a-z0-9\_\-\.]/i", '', $_FILES['doc']['name'][$i]); $new_file = $rand.'_'.$target_file; $file_name = $_FILES['doc']['name'][$i]; $temp_file_location = $_FILES['doc']['tmp_name'][$i]; //$ct = ['image/jpg', 'image/jpeg', 'image/png', 'application/csv']; if($ext == 'pdf' || $ext == 'PDF'){ $this->s3->putObject([ 'Bucket' => $bucketname, 'Key' => $path.'/'.$new_file, 'SourceFile' => $temp_file_location, //'ContentType' => 'image/jpg', 'ContentType' => 'application/pdf', //'Body' => fopen($temp_file_location, 'rb'), 'ACL' => 'public-read', ]); }else{ $this->s3->putObject([ 'Bucket' => $bucketname, 'Key' => $path.'/'.$new_file, 'SourceFile' => $temp_file_location, //'ContentType' => 'image/jpg', //'Body' => fopen($temp_file_location, 'rb'), 'ACL' => 'public-read', ]); } //insert in table $data = array( 'cu_from' => $rid, 'code' => $code, 'year' => $year, 'month' => $month, 'stage' => $stage, 'file_name' => $new_file, 'path' => $path.'/'.$new_file, 'date_time' => date('Y-m-d H:i:s'), ); $this->model->insertData('cust_upload', $data); } } } //Notify $wr_cust = array('rid'=>$rid); $cust_data = $this->db2->get_where('tbl_registration', $wr_cust)->row_array(); $cust_name = $cust_data['name']; $new_month = substr($month, strpos($month, "_") + 1); $folders = $year.'/'.$new_month.'/'.$stage; $where_access = array('afrom' => $rid); $access_data = $this->model->DetailData('tbl_access', $where_access); $ins_admin = array( 'cu_from' => $rid, 'year' => $year, 'month' => $month, 'stage' => $stage, 'path' => $folders, 'file_count' => $count, 'datetime' => date('Y-m-d H:i:s') ); $this->model->insertData('cust_upload_notify_admin', $ins_admin); $to = 'cjrajpara@gmail.com'; //vishal.panara@staroneweb.co.in $sub = 'New files Uploaded'; $msg = ' <!DOCTYPE html> <html> <head> <title>New files Uploaded</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg, #CF212A 0%, #003865 100%); padding: 10px; text-align: center;"> <h3>New files Uploaded</h3> </div> <div style="padding: 1rem;"> <p><strong>Hello,</strong></p> <p><strong>New '.$count.' files have been uploaded from '.$cust_name.' in '.$folders.'.</strong></p> </div> </div> </body> </html>'; $this->model->emailsend($to, $sub, $msg); foreach ($access_data as $key => $ad) { $ex_ad = explode('|', $ad['folder']); $wise = $ad['wise']; //echo $stage; //echo "<pre>"; print_r($ex_ad); if(in_array($stage,$ex_ad)){ $ato = $ad['ato']; $ins = array( 'n_from' => $rid, 'n_to' => $ato, 'year' => $year, 'month' => $month, 'stage' => $stage, 'file_count' => $count, 'datetime' => date('Y-m-d H:i:s') ); $this->model->insertData('cust_upload_notify', $ins); $wr_off = array('rid'=>$ato); $office_data = $this->db2->get_where('tbl_registration', $wr_off)->row_array(); $off_email = $office_data['email']; }elseif($wise == 'all'){ $at = $ad['ato']; $ins2 = array( 'n_from' => $rid, 'n_to' => $at, 'year' => $year, 'month' => $month, 'stage' => $stage, 'file_count' => $count, 'datetime' => date('Y-m-d H:i:s') ); $this->model->insertData('cust_upload_notify', $ins2); }else{//$wise == 'month') $ex_mn = explode('|', $ad['folder']); if(in_array($month,$ex_ad)){ $am = $ad['ato']; $ins3 = array( 'n_from' => $rid, 'n_to' => $am, 'year' => $year, 'month' => $month, 'stage' => $stage, 'file_count' => $count, 'datetime' => date('Y-m-d H:i:s') ); $this->model->insertData('cust_upload_notify', $ins3); } } } //notify } public function log($path){ $dec_path = base64_decode($path); $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $data = array('rid' => $rid, 'path' => $dec_path, 'status'=>'download'); $this->model->insertData('tbl_cust_log', $data); } public function view_files($arrayDetail, $type="NULL"){ $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $str_arr = unserialize(urldecode($arrayDetail)); /*echo '<pre>'; print_r($str_arr); $path = $str_arr['code'].'/'.$str_arr['year'].'/'.$str_arr['month'].'/'.$str_arr['stage']; $Prefix = $path.'/'; $objects = getAWS($Prefix); echo '<pre>'; print_r($objects);*/ $where = array( 'cu_from'=>$rid, 'year'=>$str_arr['year'], 'month'=>$str_arr['month'], 'stage'=>$str_arr['stage'], 'trash'=>'0' ); $data['count']=$this->db2->get_where('cust_upload', $where)->num_rows(); $data['str_arr'] = $str_arr; //echo '<pre>'; print_r($data); die; $this->load->view("webapp/customer/file_all", $data); } public function loadRecord_file($start=0){ $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $this->load->library('pagination'); // Pagging $where = array( 'cu_from'=>$rid, 'year'=>$this->input->post('year'), 'month'=>$this->input->post('month'), 'stage'=>$this->input->post('stage'), 'trash'=>'0' ); $cnt=$this->db2->get_where('cust_upload', $where)->num_rows(); $rowperpage = 25; if($start != 0){ $start = ($start-1) * $rowperpage; } $ad = urlencode(serialize($where)); $config['base_url'] = base_url()."webapp/customer/view_files/".$ad; $config['use_page_numbers'] = TRUE; $config['total_rows'] = $cnt; $config['per_page'] = $rowperpage; $this->pagination->initialize($config); $userdata['pagination'] = $this->pagination->create_links(); $userdata['row'] = $start; $userdata['result']= array(); $getData=$this->model->get_cust_data('cust_upload', $where, $config["per_page"], $start); if(count($getData)>0){ foreach ($getData as $key){ //$id=$this->model->encryptdata($key["station_id"]); $exp = explode('/', $key["path"]); $file = array_pop($exp); if($key["file_status"] == 0){ $status='<span class="badge bg-yellow">Pending</span>'; }elseif($key["file_status"] == 1){ $status='<span class="badge bg-blue">Received</span>'; }elseif($key["file_status"] == 2){ $status='<span class="badge bg-green">Completed</span>'; }else{ $status='<span class="badge bg-red">Rejected</span>'; } $path = $key["path"]; $link = "https://paperpushbucket.s3.ap-south-1.amazonaws.com/".$path; $result1='<tr> <td><a href="'.$link.'">'.$key["file_name"].'</a></td> <td>'.$status.'</td> <td>'.$key["remarks"].'</td> </tr>'; $userdata['result'][] = $result1; } }else{ $result1='<tr><td colspan="7" class="text-center">No data available.</td></tr>'; $userdata['result'][] = $result1; } echo json_encode($userdata); } public function search_file($start=0){ $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $this->load->library('pagination'); $where = array( 'cu_from'=>$rid, 'year'=>$this->input->post('year'), 'month'=>$this->input->post('month'), 'stage'=>$this->input->post('stage'), 'search'=>$this->input->post('search'), 'status'=>$this->input->post('status') ); $cnt=count($this->model->search_cust_file($where,NULL,NULL)); $rowperpage = 25; if($start != 0){ $start = ($start-1) * $rowperpage; } $ad = urlencode(serialize($where)); $config['base_url'] = base_url()."webapp/customer/view_files/".$ad; $config['use_page_numbers'] = TRUE; $config['total_rows'] = $cnt; $config['per_page'] = $rowperpage; $this->pagination->initialize($config); $userdata['pagination'] = $this->pagination->create_links(); $userdata['row'] = $start; $getData=$this->model->search_cust_file($where,$config["per_page"], $start); $userdata['result']= array(); if(count($getData)>0){ foreach ($getData as $key){ //$id=$this->model->encryptdata($key["station_id"]); $exp = explode('/', $key["path"]); $file = array_pop($exp); if($key["file_status"] == 0){ $status='<span class="badge bg-yellow">Pending</span>'; }elseif($key["file_status"] == 1){ $status='<span class="badge bg-blue">Received</span>'; }elseif($key["file_status"] == 2){ $status='<span class="badge bg-green">Completed</span>'; }else{ $status='<span class="badge bg-red">Rejected</span>'; } $path = $key["path"]; $link = "https://paperpushbucket.s3.ap-south-1.amazonaws.com/".$path; $result1='<tr> <td><a href="'.$link.'">'.$key["file_name"].'</a></td> <td>'.$status.'</td> <td>'.$key["remarks"].'</td> </tr>'; $userdata['result'][] = $result1; } }else{ $result1='<tr><td colspan="7" class="text-center">No matching records found</td></tr>'; $userdata['result'][] = $result1; } echo json_encode($userdata); } } webapp/Welcome.php 0000644 00000024065 14642254424 0010144 0 ustar 00 <?php use Aws\S3\S3Client; use Aws\S3\Exception\S3Exception; use Aws\CommandPool; if ( ! defined('BASEPATH')) exit('No direct script access allowed'); require_once APPPATH."third_party/aws/autoload.php"; class Welcome extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); //aws $bucketname = 'paperpushbucket'; $key = 'AKIAJJ72VRLHXBD272YQ'; $secret = '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'; $this->s3 = S3Client::factory( array( 'credentials' => array( 'key' => $key, 'secret' => $secret ), 'version' => 'latest', 'region' => 'ap-south-1' ) ); } public function index(){ $ses = $this->session->get_userdata(); $userdata = $this->session->userdata('reg_info'); //echo "<pre>"; print_r($userdata); die; if(!isset($userdata)) { $base = base_url(); redirect($base); } $cur_year = date('Y'); $id = $ses['reg_info'][0]['rid']; $where = array('ato' => $id); $ses_data = $this->model->DetailData('tbl_access', $where); /*$where_cust = array('type' => 'customer'); $this->db2->order_by('rid', 'DESC'); $this->db2->limit(10); $data['cust'] = $this->db2->get_where('tbl_registration', $where_cust)->result_array(); echo "<pre>"; print_r($data['cust']); die;*/ /*if($_SESSION['reg_info'][0]['type'] == "team_leader"){ $rids = $this->getAssignedCustomerCheck($_SESSION['reg_info'][0]['rid']); $this->db2->select('r.*,i.name as leadername'); $this->db2->from('tbl_registration as r'); $this->db2->where("r.type" , "customer"); $this->db2->where_in("r.rid" , $rids); $this->db2->order_by('r.rid', 'DESC'); $this->db2->limit(10); $this->db2->join('tbl_assign_customer_teamleader as b', 'b.customer_id = r.rid', 'left'); $this->db2->join('tbl_registration as i', 'i.rid = b.leader_id', 'left'); $data['cust'] = $this->db2->get()->result_array(); //echo "<pre>"; print_r($data['cust']); die; }*/ $type = $ses['reg_info'][0]['type']; if($type == 'admin'){ /*$where_cust_new = array('type' => 'customer'); $this->db2->order_by('rid', 'DESC'); $this->db2->limit(10); $data['cust'] = $this->db2->get_where('tbl_registration', $where_cust_new)->result_array(); //echo "<pre>"; print_r($data['cust']); die;*/ $this->db2->select('r.*,i.name as leadername'); $this->db2->from('tbl_registration as r'); $this->db2->where('r.type', 'customer'); $this->db2->order_by('r.rid', 'DESC'); $this->db2->limit(10); $this->db2->join('tbl_assign_customer_teamleader as b', 'b.customer_id = r.rid', 'left'); $this->db2->join('tbl_registration as i', 'i.rid = b.leader_id', 'left'); $data['cust'] = $this->db2->get()->result_array(); //echo "<pre>"; print_r($data['cust']); die; $where_cust = array('type' => 'customer'); $data['c_count'] = $this->model->getDatamodelCountWhere('tbl_registration', $where_cust); $where_office = array('type' => 'office_user'); $data['of_count'] = $this->model->getDatamodelCountWhere('tbl_registration', $where_office); $where_tl = array('type' => 'team_leader'); $data['tl_count'] = $this->model->getDatamodelCountWhere('tbl_registration', $where_tl); $where_form = array('approve_status' => 'approved'); $data['c_forms'] = $this->model->getDatamodelCountWhere('tbl_form', $where_form); $data['uploads'] = $this->model->uploadNotiAdmin(); $this->load->view('webapp/dashbord', $data); }elseif ($type == 'team_leader') { $rids = $this->getAssignedCustomerCheck($_SESSION['reg_info'][0]['rid']); $this->db2->select('r.*,i.name as leadername'); $this->db2->from('tbl_registration as r'); $this->db2->where("r.type" , "customer"); $this->db2->where_in("r.rid" , $rids); $this->db2->order_by('r.rid', 'DESC'); $this->db2->limit(10); $this->db2->join('tbl_assign_customer_teamleader as b', 'b.customer_id = r.rid', 'left'); $this->db2->join('tbl_registration as i', 'i.rid = b.leader_id', 'left'); $data['cust'] = $this->db2->get()->result_array(); //echo "<pre>"; print_r($data['cust']); die; /*$where_cust = array('type' => 'customer'); $data['c_count'] = $this->model->getDatamodelCountWhere('tbl_registration', $where_cust);*/ $data['c_count'] = count($data['cust']); $where_office = array('type' => 'office_user'); $data['of_count'] = $this->model->getDatamodelCountWhere('tbl_registration', $where_office); $where_tl = array('type' => 'team_leader'); $data['tl_count'] = $this->model->getDatamodelCountWhere('tbl_registration', $where_tl); $where_form = array('approve_status' => 'approved'); $data['c_forms'] = $this->model->getDatamodelCountWhere('tbl_form', $where_form); $data['uploads'] = $this->model->uploadNotiAdmin(); $this->load->view('webapp/dashbord', $data); }elseif ($type == 'customer') { $code = $userdata[0]['folder_code']; $where_cust = array('code' => $code, 'year' => $cur_year); $data['struct'] = $this->db2->get_where('cust_upload_structure',$where_cust)->row_array(); $data['templates'] = $this->db2->get_where('cust_templates', array('ct_code'=>$code))->result_array(); //echo "<pre>"; print_r($data); die; $Rid = $ses['reg_info'][0]['rid']; $where = array('rid' => $Rid); $Checkdata = $this->model->DetailData('tbl_registration', $where); //echo "<pre>"; print_r($Checkdata); die; $country = $Checkdata[0]['country']; $gst = $Checkdata[0]['gst']; $pan = $Checkdata[0]['pan']; $cin_no = $Checkdata[0]['cin_no']; $tax_id = $Checkdata[0]['tax_id']; if($country == "India"){ if($gst == "" || $pan == "" || $cin_no == ""){ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> One of the information is missing in GST, PAN and CIN. </div>'); redirect('webapp/users/profile'); } }elseif($country == "Canada" || $country == "United States"){ if($tax_id == ""){ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Please Fill TAX Id Number. </div>'); redirect('webapp/users/profile'); } } //die; $this->load->view('webapp/customer/dashbord', $data); }elseif ($type == 'office_user') { $where_oid = array('oid' => $id); $data['form_count'] = $this->model->getDatamodelCountWhere('tbl_form', $where_oid); $data['cust_upload'] = $this->model->custUploads2($id); $customer = $this->model->officeModel($id); $data['custCnt'] = count($customer); $this->load->view('webapp/office_user/dashbord', $data); } } public function getAssignedCustomerCheck($lid){ $this->db2->select("customer_id"); $this->db2->from("tbl_assign_customer_teamleader"); $this->db2->where("leader_id" , $lid ); $data = $this->db2->get()->result_array(); //echo "<pre>"; print_r($data); die; $temp = [] ; if(!empty($data)){ foreach($data as $k => $v){ $temp[] = $v['customer_id']; } }else{ $temp[] = ""; } return $temp ; } public function changeYear($myYear){ mkdir("./all_xml/".$myYear); $dirs = array_filter(glob('documents/*'), 'is_dir'); foreach ($dirs as $key => $value) { $exp = explode('/', $value); $user_folder = $exp[1]; $path = array_filter(glob('documents/'.$user_folder.'/*'), 'is_dir'); $path2 = 'documents/'.$user_folder.'/'.$myYear; if(!in_array($path2,$path)){ mkdir("./documents/".$user_folder."/".$myYear); $month = ['a_january', 'b_february', 'c_march', 'd_april', 'e_may', 'f_june', 'g_july', 'h_august', 'i_september', 'j_october', 'k_november', 'l_december']; foreach ($month as $value) { mkdir("./documents/".$user_folder."/".$myYear.'/'.$value); $entries = ['purchase', 'sales', 'payment', 'receipt', 'contra', 'journal', 'debit', 'credit', 'bank', 'cheque_reg', 'reports']; foreach ($entries as $ent) { mkdir("./documents/".$user_folder."/".$myYear.'/'.$value.'/'.$ent); $stage = ['recycle']; foreach ($stage as $st) { mkdir("./documents/".$user_folder."/".$myYear.'/'.$value.'/'.$ent.'/'.$st); } } } } } $data = array('year' => $myYear); $this->model->insertData('tbl_years', $data); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Folders has been created. </div>'); redirect('webapp/welcome'); } public function abort(){ $this->session->sess_destroy(); redirect(base_url("webapp/welcome")); } public function removeAll($rid){ $rid = $this->model->decryptdata($rid); $this->model->UpdateData('tbl_login_check', ['status' => 0 ], ['rid' => $rid]); $session_id = session_id(); $this->session->set_userdata('mysesion', $session_id ); $this->model->UpdateData('tbl_login_check', ['status' => 0 ], $where); $dataIns = array( 'rid' => $rid, 'session_id' => $session_id, 'status' => '1', ); $this->model->insertData('tbl_login_check', $dataIns); redirect("webapp/welcome"); } public function duplicate($rid){ $existingLoginData = $this->db2->get_where("tbl_login_check" , ['rid' => $rid , 'status' => 1 ])->result_array(); $data['existingLoginData'] = $existingLoginData ; $data['rid'] = $rid ; $this->load->view('webapp/duplicate', $data); } } /* End of file Welcome.php */ webapp/error_log 0000644 00000255720 14642254425 0007762 0 ustar 00 [10-May-2024 05:22:01 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [10-May-2024 05:22:01 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [10-May-2024 05:22:01 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [10-May-2024 05:22:01 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [10-May-2024 05:22:01 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [10-May-2024 05:22:01 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [10-May-2024 05:22:01 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [10-May-2024 05:22:01 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [10-May-2024 15:49:22 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [10-May-2024 15:49:22 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [10-May-2024 15:49:22 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [10-May-2024 15:49:22 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [10-May-2024 15:49:22 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [10-May-2024 15:49:22 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [10-May-2024 15:49:22 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [10-May-2024 15:49:22 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [10-May-2024 15:49:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [10-May-2024 15:49:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [10-May-2024 15:49:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [10-May-2024 15:49:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [10-May-2024 15:49:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [10-May-2024 15:49:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [10-May-2024 15:49:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [10-May-2024 15:49:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [11-May-2024 17:10:06 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [11-May-2024 17:10:06 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [11-May-2024 17:10:06 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [11-May-2024 17:10:06 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [11-May-2024 17:10:06 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [11-May-2024 17:10:06 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [11-May-2024 17:10:06 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [11-May-2024 17:10:06 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [13-May-2024 17:14:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [13-May-2024 17:14:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [13-May-2024 17:14:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [13-May-2024 17:14:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [13-May-2024 17:14:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [13-May-2024 17:14:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [13-May-2024 17:14:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [13-May-2024 17:14:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [14-May-2024 07:20:35 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [14-May-2024 07:20:35 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [14-May-2024 07:20:35 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [14-May-2024 07:20:35 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [14-May-2024 07:20:35 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [14-May-2024 07:20:35 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [14-May-2024 07:20:35 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [14-May-2024 07:20:35 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [14-May-2024 07:20:38 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [14-May-2024 07:20:38 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [14-May-2024 07:20:38 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [14-May-2024 07:20:38 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [14-May-2024 07:20:38 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [14-May-2024 07:20:38 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [14-May-2024 07:20:38 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [14-May-2024 07:20:38 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [14-May-2024 07:21:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [19-May-2024 09:03:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [19-May-2024 09:03:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [19-May-2024 09:03:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [19-May-2024 09:03:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [19-May-2024 09:03:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [19-May-2024 09:03:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [19-May-2024 09:03:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [19-May-2024 09:03:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [19-May-2024 10:45:27 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [19-May-2024 10:45:27 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [19-May-2024 10:45:27 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [19-May-2024 10:45:27 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [19-May-2024 10:45:27 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [19-May-2024 10:45:27 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [19-May-2024 10:45:27 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [19-May-2024 10:45:27 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [19-May-2024 16:27:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [19-May-2024 16:27:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [19-May-2024 16:27:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [19-May-2024 16:27:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [19-May-2024 16:27:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [19-May-2024 16:27:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [19-May-2024 16:27:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [19-May-2024 16:27:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [19-May-2024 16:38:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [19-May-2024 16:38:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [19-May-2024 16:38:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [19-May-2024 16:38:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [19-May-2024 16:38:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [19-May-2024 16:38:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [19-May-2024 16:38:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [19-May-2024 16:38:24 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [24-May-2024 04:31:14 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [24-May-2024 04:31:14 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [24-May-2024 04:31:14 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [24-May-2024 04:31:14 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [24-May-2024 04:31:14 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [24-May-2024 04:31:14 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [24-May-2024 04:31:14 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [24-May-2024 04:31:14 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [24-May-2024 08:18:33 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [24-May-2024 08:18:33 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [24-May-2024 08:18:33 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [24-May-2024 08:18:33 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [24-May-2024 08:18:33 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [24-May-2024 08:18:33 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [24-May-2024 08:18:33 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [24-May-2024 08:18:33 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [26-May-2024 12:44:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [26-May-2024 12:44:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [26-May-2024 12:44:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [26-May-2024 12:44:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [26-May-2024 12:44:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [26-May-2024 12:44:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [26-May-2024 12:44:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [26-May-2024 12:44:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [26-May-2024 12:59:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [26-May-2024 12:59:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [26-May-2024 12:59:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [26-May-2024 12:59:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [26-May-2024 12:59:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [26-May-2024 12:59:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [26-May-2024 12:59:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [26-May-2024 12:59:40 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [26-May-2024 13:28:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [26-May-2024 13:28:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [26-May-2024 13:28:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [26-May-2024 13:28:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [26-May-2024 13:28:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [26-May-2024 13:28:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [26-May-2024 13:28:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [26-May-2024 13:28:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [29-May-2024 04:20:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [29-May-2024 04:20:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [29-May-2024 04:20:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [29-May-2024 04:20:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [29-May-2024 04:20:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [29-May-2024 04:20:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [29-May-2024 04:20:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [29-May-2024 04:20:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [29-May-2024 21:51:58 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [29-May-2024 21:51:58 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [29-May-2024 21:51:58 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [29-May-2024 21:51:58 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [29-May-2024 21:51:58 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [29-May-2024 21:51:58 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [29-May-2024 21:51:58 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [29-May-2024 21:51:58 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [29-May-2024 21:52:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [29-May-2024 21:52:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [29-May-2024 21:52:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [29-May-2024 21:52:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [29-May-2024 21:52:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [29-May-2024 21:52:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [29-May-2024 21:52:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [29-May-2024 21:52:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [31-May-2024 18:55:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [31-May-2024 18:55:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [31-May-2024 18:55:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [31-May-2024 18:55:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [31-May-2024 18:55:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [31-May-2024 18:55:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [31-May-2024 18:55:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [31-May-2024 18:55:53 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [04-Jun-2024 01:54:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [04-Jun-2024 01:54:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [04-Jun-2024 01:54:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [04-Jun-2024 01:54:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [04-Jun-2024 01:54:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [04-Jun-2024 01:54:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [04-Jun-2024 01:54:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [04-Jun-2024 01:54:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [04-Jun-2024 01:55:15 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [04-Jun-2024 01:55:15 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [04-Jun-2024 01:55:15 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [04-Jun-2024 01:55:15 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [04-Jun-2024 01:55:15 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [04-Jun-2024 01:55:15 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [04-Jun-2024 01:55:15 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [04-Jun-2024 01:55:15 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [07-Jun-2024 05:54:50 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [07-Jun-2024 05:54:50 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [07-Jun-2024 05:54:50 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [07-Jun-2024 05:54:50 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [07-Jun-2024 05:54:50 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [07-Jun-2024 05:54:50 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [07-Jun-2024 05:54:50 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [07-Jun-2024 05:54:50 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [07-Jun-2024 05:57:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [07-Jun-2024 05:57:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [07-Jun-2024 05:57:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [07-Jun-2024 05:57:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [07-Jun-2024 05:57:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [07-Jun-2024 05:57:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [07-Jun-2024 05:57:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [07-Jun-2024 05:57:37 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [08-Jun-2024 08:16:29 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [08-Jun-2024 08:16:29 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [08-Jun-2024 08:16:29 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [08-Jun-2024 08:16:29 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [08-Jun-2024 08:16:29 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [08-Jun-2024 08:16:29 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [08-Jun-2024 08:16:29 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [08-Jun-2024 08:16:29 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [08-Jun-2024 08:17:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [08-Jun-2024 08:17:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [08-Jun-2024 08:17:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [08-Jun-2024 08:17:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [08-Jun-2024 08:17:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [08-Jun-2024 08:17:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [08-Jun-2024 08:17:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [08-Jun-2024 08:17:45 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [09-Jun-2024 01:32:32 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [09-Jun-2024 01:32:32 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [09-Jun-2024 01:32:32 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [09-Jun-2024 01:32:32 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [09-Jun-2024 01:32:32 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [09-Jun-2024 01:32:32 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [09-Jun-2024 01:32:32 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [09-Jun-2024 01:32:32 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [17-Jun-2024 01:20:02 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [17-Jun-2024 04:33:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [17-Jun-2024 04:33:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [17-Jun-2024 04:33:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [17-Jun-2024 04:33:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [17-Jun-2024 04:33:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [17-Jun-2024 04:33:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [17-Jun-2024 04:33:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [17-Jun-2024 04:33:56 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [26-Jun-2024 00:05:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [26-Jun-2024 00:05:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [26-Jun-2024 00:05:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [26-Jun-2024 00:05:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [26-Jun-2024 00:05:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [26-Jun-2024 00:05:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [26-Jun-2024 00:05:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [26-Jun-2024 00:05:26 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [26-Jun-2024 00:05:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [26-Jun-2024 00:05:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [26-Jun-2024 00:05:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [26-Jun-2024 00:05:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [26-Jun-2024 00:05:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [26-Jun-2024 00:05:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [26-Jun-2024 00:05:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [26-Jun-2024 00:05:42 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [27-Jun-2024 16:18:09 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [27-Jun-2024 16:18:09 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [27-Jun-2024 16:18:09 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [27-Jun-2024 16:18:09 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [27-Jun-2024 16:18:09 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [27-Jun-2024 16:18:09 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [27-Jun-2024 16:18:09 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [27-Jun-2024 16:18:09 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [27-Jun-2024 16:19:00 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [27-Jun-2024 16:19:00 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [27-Jun-2024 16:19:00 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [27-Jun-2024 16:19:00 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [27-Jun-2024 16:19:00 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [27-Jun-2024 16:19:00 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [27-Jun-2024 16:19:00 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [27-Jun-2024 16:19:00 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [29-Jun-2024 02:07:55 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [29-Jun-2024 02:07:55 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [29-Jun-2024 02:07:55 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [29-Jun-2024 02:07:55 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [29-Jun-2024 02:07:55 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [29-Jun-2024 02:07:55 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [29-Jun-2024 02:07:55 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [29-Jun-2024 02:07:55 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [29-Jun-2024 02:07:59 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [29-Jun-2024 02:07:59 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [29-Jun-2024 02:07:59 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [29-Jun-2024 02:07:59 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [29-Jun-2024 02:07:59 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [29-Jun-2024 02:07:59 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [29-Jun-2024 02:07:59 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [29-Jun-2024 02:07:59 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [04-Jul-2024 18:46:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [04-Jul-2024 18:46:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [04-Jul-2024 18:46:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [04-Jul-2024 18:46:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [04-Jul-2024 18:46:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [04-Jul-2024 18:46:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [04-Jul-2024 18:46:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [04-Jul-2024 18:46:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [04-Jul-2024 18:50:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [04-Jul-2024 18:50:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [04-Jul-2024 18:50:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [04-Jul-2024 18:50:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [04-Jul-2024 18:50:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [04-Jul-2024 18:50:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [04-Jul-2024 18:50:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [04-Jul-2024 18:50:28 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 [05-Jul-2024 15:22:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3930 [05-Jul-2024 15:22:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 3931 [05-Jul-2024 15:22:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4030 [05-Jul-2024 15:22:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4031 [05-Jul-2024 15:22:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4150 [05-Jul-2024 15:22:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4151 [05-Jul-2024 15:22:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4272 [05-Jul-2024 15:22:04 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Office.php on line 4273 [06-Jul-2024 06:30:16 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2285 [06-Jul-2024 06:30:16 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2286 [06-Jul-2024 06:30:16 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2385 [06-Jul-2024 06:30:16 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2386 [06-Jul-2024 06:30:16 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2505 [06-Jul-2024 06:30:16 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2506 [06-Jul-2024 06:30:16 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2627 [06-Jul-2024 06:30:16 UTC] PHP Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/papecmvm/public_html/application/controllers/webapp/Leader.php on line 2628 webapp/People_07072023.php 0000644 00000102766 14642254427 0010771 0 ustar 00 <?php use Aws\S3\S3Client; use Aws\S3\Exception\S3Exception; use Aws\CommandPool; if ( ! defined('BASEPATH')) exit('No direct script access allowed'); require_once APPPATH."third_party/aws/autoload.php"; class People extends CI_Controller { function __construct() { parent::__construct(); $userdata = $this->session->userdata('reg_info'); if(!isset($userdata)) { $base = base_url(); redirect($base); } $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); //aws $bucketname = 'paperpushbucket'; $key = 'AKIAJJ72VRLHXBD272YQ'; $secret = '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'; $this->s3 = S3Client::factory( array( 'credentials' => array( 'key' => $key, 'secret' => $secret ), 'version' => 'latest', 'region' => 'ap-south-1' ) ); } public function office($offset = '0') { $where = array('type!=' => 'customer'); $cnt_data['data']=$this->model->DetailData('tbl_registration', $where); $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/people/office'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $userdata['data'] = $this->model->get_pagination_where('tbl_registration', $config['per_page'], $offset, $where); $userdata['type'] = 'office'; $this->load->view("webapp/office",$userdata); } public function customer($offset = 0) { $where = array('type' => 'customer'); $cnt_data['data']=$this->model->DetailData('tbl_registration', $where); $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/people/customer'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $userdata['data'] = $this->model->get_pagination_where('tbl_registration', $config['per_page'], $offset, $where); $userdata['type'] = 'customer'; $userdata['customer'] = 'Customer'; $this->load->view("webapp/office",$userdata); } public function view($encrypted_id) { $id = $this->model->decryptdata($encrypted_id); $where=array('rid' => $id); $userdata['data'] = $this->model->DetailData('tbl_registration', $where); $cur_year = date('Y'); $this->db2->order_by('id', 'DESC'); $this->db2->limit(12); $userdata['log'] = $this->db2->get_where('tbl_cust_log', $where)->result_array(); $where2=array('type' => 'office_user'); $userdata['office_user'] = $this->model->DetailData('tbl_registration', $where2); //$where3=array('afrom' => $id); $userdata['access_folder'] = $this->model->getAccess($id); $userdata['encrypted_id'] = $encrypted_id; //echo "<pre>"; print_r($userdata['access_folder']); die; $where = array('code' => $userdata['data'][0]['folder_code']); $userdata['struct'] = $this->db2->get_where('cust_upload_structure', $where)->result_array(); $userdata['code'] = $userdata['data'][0]['folder_code']; $where_current = array('code' => $userdata['data'][0]['folder_code'], 'year'=>$cur_year); $userdata['current_ser'] = $this->db2->get_where('cust_upload_structure', $where_current)->row_array(); //echo "<pre>"; print_r($userdata['struct']); die; $this->db2->select('*'); $this->db2->from('cust_upload_notify'); $this->db2->where('n_from', $id); $this->db2->limit(10); $userdata['logs'] = $this->db2->get()->result_array(); //echo "<pre>"; print_r($userdata); die; $this->load->view("webapp/view_people",$userdata); } public function add_user(){ if($this->input->post('save')=='save'){ $email = $this->input->post('email'); $username = $this->input->post('username'); $where = array('username' => $username, 'type!=' => 'customer'); $chk_username = $this->model->DetailData('tbl_registration', $where); $cnt = count($chk_username); if($cnt == '0'){ $pass = $this->input->post('phone'); $password = md5($pass); $config['upload_path'] = './webapp/profile/'; $config['allowed_types']= 'gif|jpg|png|jpeg'; $config['encrypt_name'] = TRUE; $this->upload->initialize($config); $this->load->library('upload', $config); $this->upload->do_upload('photo'); $data = $this->upload->data(); $photo = $data['file_name']; $insertdata=array('pass'=>$password, 'name'=>$this->input->post('name'), 'email'=>$email, 'username'=>$username, 'mobile'=>$this->input->post('phone'), 'photo'=>$photo, 'type'=>$this->input->post('type'), 'reg_from'=>'system', 'status'=>'1' ); $this->model->insertData('tbl_registration',$insertdata); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> User has been added. </div>'); redirect('webapp/people/office'); }else{ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> User Name is already available. </div>'); redirect('webapp/people/office'); } }else{ $this->load->view('webapp/add_user'); } } public function search(){ $search = $this->input->post('src'); $this->db2->select('*'); $this->db2->like('name', $search); $result = $this->db2->get('tbl_registration')->result_array(); foreach ($result as $key => $value) { $encrypted_id = $this->model->encryptdata($value['rid']); if($value['type'] == 'team_leader'){ $label = "Team Leader"; }elseif($value['type'] == 'office_user'){ $label = "Office User"; }elseif($value['type'] == 'admin'){ $label = "Admin"; } if($value['status'] == '1'){ $es = '<span class="badge bg-green">Verified</span>'; }else{ $es = '<span class="badge bg-red">pending</span>'; } echo '<tr> <td class="text-capitalize"><a href="'.base_url()."webapp/people/view/".$encrypted_id.'">'.$value["name"].'</a><br><span class="text-danger">'.$label.'</span></td> <td>'.$value["email"].'</td> <td>'.$value["mobile"].'</td> <td>'.$es.'</td> <td>'; echo '<a href="'.base_url().'webapp/people/updateUser/'.$encrypted_id.'" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i></a> '; if($value['type'] != 'admin'){ if($value['status'] == '1'){ echo '<a href="'.base_url().'webapp/people/deactive/'.$encrypted_id.'" class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="Click here to deactive" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i></a>'; }else{ echo '<a href="'.base_url().'webapp/people/active/'.$encrypted_id.'" class="btn btn-success" data-toggle="tooltip" data-placement="top" title="Click here to active" aria-hidden="true"><i class="fa fa-check" aria-hidden="true"></i></a>'; } } '</td> </tr>'; } } public function json_office_rec($offset = '0') { $where = array('type!=' => 'customer'); $cnt_data['data']=$this->model->DetailData('tbl_registration', $where); $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/people/json_office_rec'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $result = $this->model->get_pagination_where('tbl_registration', $config['per_page'], $offset, $where); foreach ($result as $key => $value) { $encrypted_id = $this->model->encryptdata($value['rid']); if($value['type'] == 'team_leader'){ $label = "Team Leader"; }elseif($value['type'] == 'office_user'){ $label = "Office User"; }elseif($value['type'] == 'admin'){ $label = "Admin"; } echo '<tr> <td class="text-capitalize"><a href="'.base_url()."webapp/people/view/".$encrypted_id.'">'.$value["name"].'</a><br><span class="text-danger">'.$label.'</span></td> <td>'.$value["email"].'</td> <td>'.$value["mobile"].'</td> <td>'; echo '<a href="'.base_url().'webapp/people/updateUser/'.$encrypted_id.'" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i></a> '; if($value['type'] != 'admin'){ if($value['status'] == '1'){ echo '<a href="'.base_url().'webapp/people/deactive/'.$encrypted_id.'" class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="Click here to deactive" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i></a>'; }else{ echo '<a href="'.base_url().'webapp/people/active/'.$encrypted_id.'" class="btn btn-success" data-toggle="tooltip" data-placement="top" title="Click here to active" aria-hidden="true"><i class="fa fa-check" aria-hidden="true"></i></a>'; } } '</td> </tr>'; } } public function search_cust(){ $search = $this->input->post('src'); $this->db2->select('*'); $this->db2->where('type', 'customer'); $this->db2->like('name', $search); $result = $this->db2->get('tbl_registration')->result_array(); foreach ($result as $key => $value) { $encrypted_id = $this->model->encryptdata($value['rid']); if($value['status'] == '1'){ $email_status = '<span class="badge bg-green">Verified</span>'; }else{ $email_status = '<span class="badge bg-red">Pending</span>'; } if($value['payment_status'] == '1'){ $payment_status = '<span class="badge bg-green">Done</span>'; }else{ $payment_status = '<span class="badge bg-red">Pending</span>'; } echo '<tr> <td class="text-capitalize"><a href="'.base_url()."webapp/people/view/".$encrypted_id.'">'.$value["name"].'</a></td> <td>'.$value["email"].'</td> <td>'.$value["mobile"].'</td> <td>'.$email_status.'</td> <td>'.$payment_status.'</td> <td>'; echo '<a href="'.base_url().'webapp/people/updateUser/'.$encrypted_id.'" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i></a> '; if($value['type'] != 'admin'){ if($value['payment_status'] == '1'){ echo '<a href="'.base_url().'webapp/people/deactive/'.$encrypted_id.'" class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="Click here to deactive" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i></a>'; }else{ echo '<a href="'.base_url().'webapp/people/active/'.$encrypted_id.'" class="btn btn-success" data-toggle="tooltip" data-placement="top" title="Click here to active" aria-hidden="true"><i class="fa fa-check" aria-hidden="true"></i></a>'; } } '</td> </tr>'; } } public function json_cust_rec($offset = '0') { $where = array('type' => 'customer'); $cnt_data['data']=$this->model->DetailData('tbl_registration', $where); $cnt=count($cnt_data['data']); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/people/json_cust_rec'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $result = $this->model->get_pagination_where('tbl_registration', $config['per_page'], $offset, $where); foreach ($result as $key => $value) { $encrypted_id = $this->model->encryptdata($value['rid']); if($value['status'] == '1'){ $email_status = '<span class="badge bg-green">Verified</span>'; }else{ $email_status = '<span class="badge bg-red">Pending</span>'; } if($value['payment_status'] == '1'){ $payment_status = '<span class="badge bg-green">Done</span>'; }else{ $payment_status = '<span class="badge bg-red">Pending</span>'; } echo '<tr> <td class="text-capitalize"><a href="'.base_url()."webapp/people/view/".$encrypted_id.'">'.$value["name"].'</a></td> <td>'.$value["email"].'</td> <td>'.$value["mobile"].'</td> <td>'.$email_status.'</td> <td>'.$payment_status.'</td> <td>'; echo '<a href="'.base_url().'webapp/people/updateUser/'.$encrypted_id.'" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i></a> '; if($value['type'] != 'admin'){ if($value['payment_status'] == '1'){ echo '<a href="'.base_url().'webapp/people/deactive/'.$encrypted_id.'" class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="Click here to deactive" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i></a>'; }else{ echo '<a href="'.base_url().'webapp/people/active/'.$encrypted_id.'" class="btn btn-success" data-toggle="tooltip" data-placement="top" title="Click here to active" aria-hidden="true"><i class="fa fa-check" aria-hidden="true"></i></a>'; } } '</td> </tr>'; } } public function changePhoto(){ $uid = $this->input->post('uid'); $where = array('rid' => $uid); $user = $this->model->DetailData('tbl_registration', $where); $old_photo = $user[0]['photo']; $config['upload_path'] = './webapp/profile/'; $config['allowed_types']= 'gif|jpg|png|pdf|jpeg'; $config['encrypt_name'] = TRUE; $this->upload->initialize($config); $this->load->library('upload', $config); if($this->upload->do_upload('photo')){ if(!empty($old_photo)){ unlink('webapp/profile/'.$old_photo); } $data = $this->upload->data(); $photo = $data['file_name']; }else{ $photo = $this->input->post('hiddenPhoto'); } $date_incorporation = date("Y-m-d", strtotime($this->input->post('date_incorporation'))); $country = explode('_', $this->input->post('country')); $country = $country[1]; if($country == "India"){ $phone_code = "+91"; $gst = $this->input->post('gst'); $pan = $this->input->post('pan'); $llc_no = $this->input->post('llc_no'); $llp_no = $this->input->post('llp_no'); $cin_no = $this->input->post('cin_no'); $tax_id = ""; $impo_expo_no = $this->input->post('impo_expo_no'); $other_reg_no = $this->input->post('other_reg_no'); }else{ $phone_code = "+1"; $gst = ""; $pan = ""; $llc_no = $this->input->post('llc_no'); $llp_no = $this->input->post('llp_no'); $cin_no = ""; $tax_id = $this->input->post('tax_id'); $impo_expo_no = $this->input->post('impo_expo_no'); $other_reg_no = $this->input->post('other_reg_no'); } $insertdata=array( 'photo' => $photo, 'name' => $this->input->post('name'), 'email' => $this->input->post('email'), 'phone_code' => $phone_code, 'mobile' => $this->input->post('phone'), 'constitution'=>$this->input->post('constitution'), 'business_name'=>$this->input->post('business_name'), 'constitution_other'=>$this->input->post('constitution_other'), 'date_incorporation'=>$date_incorporation, 'nob'=>$this->input->post('nob'), 'ur'=>$this->input->post('ur'), 'ri'=>$this->input->post('ri'), 'gst'=>$gst, 'pan'=>$pan, 'llc_no'=>$llc_no, 'llp_no'=>$llp_no, 'cin_no'=>$cin_no, 'tax_id'=>$tax_id, 'impo_expo_no'=>$impo_expo_no, 'other_reg_no'=>$other_reg_no, 'country'=>$country, 'state'=>$this->input->post('state'), 'address'=>$this->input->post('address') ); $this->model->UpdateData('tbl_registration', $insertdata, $where); /************************************************************************/ $where_fltr=array('rid'=>$uid); $fltrData=$this->model->DetailData('tbl_director',$where_fltr); $fltrData = count($fltrData); if($fltrData >0){ $this->model->DeleteData('tbl_director',$where_fltr); } $count = count($this->input->post('director_name')); $director_name = $this->input->post('director_name'); $din_no = $this->input->post('din_no'); for($i=0; $i<$count; $i++){ if($director_name[$i] != ""){ $insertdata_flo=array( 'rid'=>$uid, 'director_name'=>$director_name[$i], 'din_no'=>$din_no[$i], ); $this->model->insertData('tbl_director', $insertdata_flo); } } /*************************************************************************/ $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been updated. </div>'); redirect('webapp/users/profile'); } public function updateUser($encrypted_id){ $uid = $this->model->decryptdata($encrypted_id); if($this->input->post('save')=='save'){ $where = array('rid' => $uid); $user = $this->model->DetailData('tbl_registration', $where); $old_photo = $user[0]['photo']; $config['upload_path'] = './webapp/profile/'; $config['allowed_types']= 'gif|jpg|png|pdf|jpeg'; $config['encrypt_name'] = TRUE; $this->upload->initialize($config); $this->load->library('upload', $config); if($this->upload->do_upload('photo')){ if(!empty($old_photo)){ unlink('webapp/profile/'.$old_photo); } $data = $this->upload->data(); $photo = $data['file_name']; }else{ $photo = $this->input->post('hiddenPhoto'); } $insertdata=array( 'photo' => $photo, 'name' => $this->input->post('name'), 'email' => $this->input->post('email'), 'mobile' => $this->input->post('phone') ); $this->model->UpdateData('tbl_registration', $insertdata, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Data has been updated. </div>'); redirect('webapp/people/office'); }else{ $where = array('rid' => $uid); $data['user'] = $this->model->DetailData('tbl_registration', $where); $this->load->view('webapp/add_user', $data); } } public function deactive($encrypted_id){ $uid = $this->model->decryptdata($encrypted_id); $where = array('rid' => $uid); $upd = array('payment_status' => '0'); $this->model->UpdateData('tbl_registration', $upd, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> User is Deactivated. </div>'); $data = $this->model->DetailData('tbl_registration', $where); $type = $data[0]['type']; if($type == 'customer'){ redirect('webapp/people/customer'); }else{ redirect('webapp/people/office'); } } public function active($encrypted_id){ $uid = $this->model->decryptdata($encrypted_id); $where = array('rid' => $uid); $upd = array('payment_status' => '1'); $this->model->UpdateData('tbl_registration', $upd, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> User is Activated. </div>'); $data = $this->model->DetailData('tbl_registration', $where); $type = $data[0]['type']; if($type == 'customer'){ $name = $data[0]["name"]; $to = $data[0]["email"]; $msg = ' <!DOCTYPE html> <html> <head> <title>PaperPush</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg, #CF212A 0%, #003865 100%); padding: 10px; text-align: center;"> <h3>Welcome to Paperpush</h3> </div> <div style="padding: 1rem;"> <p><strong>Dear '.$name.',</strong></p> <p><strong>PaperPush is glad to inform you that your account has been activated and now you can start uploading your documents with your account credentials.</strong></p> </div> </div> Regards,<br> Team PaperPush. <p>Note: Please do not reply of this email. This is system generated email. </p> </body> </html>'; $sub = "PaperPush"; $this->model->emailsend($to, $sub, $msg); redirect('webapp/people/customer'); }else{ redirect('webapp/people/office'); } } public function directory($path){ $mypath = $path; $path = explode('-', $path); $data['folder'] = $path[0]; $data['year'] = $path[1]; $data['month'] = $path[2]; $data['voucher'] = $path[3]; $data['mypath'] = $mypath; $this->load->view("webapp/view_directory",$data); } public function directory_used($path){ $mypath = $path; $path = explode('-', $path); $data['folder'] = $path[0]; $data['year'] = $path[1]; $data['month'] = $path[2]; $data['voucher'] = $path[3]; $data['mypath'] = $mypath; $this->load->view("webapp/view_directory_used",$data); } public function directory_scratched($path){ $mypath = $path; $path = explode('-', $path); $data['folder'] = $path[0]; $data['year'] = $path[1]; $data['month'] = $path[2]; $data['voucher'] = $path[3]; $data['mypath'] = $mypath; $this->load->view("webapp/view_directory_scratched",$data); } public function makeUsed(){ $folder = $_POST['folder']; $year = $_POST['year']; $month = $_POST['month']; $voucher = $_POST['voucher']; $name = $_POST['name']; $url1 = base_url().'documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/'.$name; $url2 = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/used'; $url3 = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/used/'.$name; $url4 = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/'.$name; if(is_dir($url2)) { if(rename($url4, $url3)){ echo 'Success'; }else{ echo 'somthing went wrong'; } }else{ mkdir($url2); if(rename($url4, $url3)){ echo 'Success'; }else{ echo 'somthing went wrong'; } } } public function makeScratched(){ $folder = $_POST['folder']; $year = $_POST['year']; $month = $_POST['month']; $voucher = $_POST['voucher']; $name = $_POST['name']; $url1 = base_url().'documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/'.$name; $url2 = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/scratched'; $url3 = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/scratched/'.$name; $url4 = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/'.$name; if(is_dir($url2)) { if(rename($url4, $url3)){ echo 'Success'; }else{ echo 'somthing went wrong'; } }else{ mkdir($url2); if(rename($url4, $url3)){ echo 'Success'; }else{ echo 'somthing went wrong'; } } } public function trashUsed(){ $folder = $_POST['folder']; $year = $_POST['year']; $month = $_POST['month']; $voucher = $_POST['voucher']; $name = $_POST['name']; $url = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/used/'.$name; if(unlink($url)){ echo 'Removed'; }else{ echo 'Error'; } } public function trashScratched(){ $folder = $_POST['folder']; $year = $_POST['year']; $month = $_POST['month']; $voucher = $_POST['voucher']; $name = $_POST['name']; $url = './documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/scratched/'.$name; if(unlink($url)){ echo 'Removed'; }else{ echo 'Error'; } } public function makeStructure_ser(){ //echo '<pre>'; print_r($_POST); die; $user_code = $this->input->post('code'); $year = $this->input->post('year'); $ent = str_replace(' ', '_', $this->input->post('ser_name')); $bucketname = 'paperpushbucket'; $month = ['a_april', 'b_may', 'c_june', 'd_july', 'e_august', 'f_september', 'g_october', 'h_november', 'i_december', 'j_january', 'k_february', 'l_march']; foreach ($month as $value) { $this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/".$ent."/", 'Body' => "", 'ACL' => 'public-read']); } $where = array('code' => $user_code, 'year' => $year); $get = $this->db2->get_where('cust_upload_structure', $where)->row_array(); $stage = $get['stage']; $dec_stage = json_decode($stage); $new_stage=[]; foreach($dec_stage as $key => $val){ $new_stage[]=$val; } $new_stage[]=$ent; $enc_stage = json_encode($new_stage); $upd = array('stage'=>$enc_stage); $this->model->UpdateData('cust_upload_structure',$upd,$where); $array['status'] = 'success'; echo json_encode($array); } public function remService(){ //echo '<pre>'; print_r($_POST); die; $code = $this->input->post('code'); $year = $this->input->post('year'); $posted_stage = $this->input->post('stage'); $where = array('code'=>$code, 'year'=>$year); $get = $this->db2->get_where('cust_upload_structure', $where)->row_array(); $stage = json_decode($get['stage']); //echo '<pre>'; print_r($stage); if (($key = array_search($posted_stage, $stage)) !== false) { unset($stage[$key]); } //echo '<pre>'; print_r($stage); die; $enc_stage = json_encode($stage); $data = array('stage'=>$enc_stage); $this->model->UpdateData('cust_upload_structure', $data, $where); $array['status'] = 'success'; echo json_encode($array); } public function makeStructure_pastDir(){ //echo '<pre>'; print_r($_POST); die; $user_code = $this->input->post('code'); $year = $this->input->post('year'); //$year = '2020'; $check = $this->db2->get_where('cust_upload_structure', array('year'=>$year, 'code'=>$user_code))->num_rows(); if($check == 0){ $array['status'] = 'success'; $entries = ['purchase_invoices', 'sales_invoices', 'cash_payment', 'cash_receipt', 'cheque_paid', 'expense_vouchers', 'debit_notes', 'credit_notes', 'bank_statements', 'cheque_deposited', 'reports', 'others']; $json_entry = json_encode($entries); $data = array( 'code' => $user_code, 'year' => $year, 'stage' => $json_entry ); $this->model->insertData('cust_upload_structure', $data); $bucketname = 'paperpushbucket'; $this->s3->putObject( [ 'Bucket' => $bucketname, 'Key' => $user_code."/", 'Key' => $user_code."/".$year."/", 'Body' => "", 'ACL' => 'public-read' ], ); $month = ['a_april', 'b_may', 'c_june', 'd_july', 'e_august', 'f_september', 'g_october', 'h_november', 'i_december', 'j_january', 'k_february', 'l_march']; foreach ($month as $value) { $this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/", 'Body' => "", 'ACL' => 'public-read']); $entries = ['purchase_invoices', 'sales_invoices', 'cash_payment', 'cash_receipt', 'cheque_paid', 'expense_vouchers', 'debit_notes', 'credit_notes', 'bank_statements', 'cheque_deposited', 'reports', 'others']; foreach ($entries as $ent) { $this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/".$ent."/", 'Body' => "", 'ACL' => 'public-read']); //$this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/".$ent."/completed/", 'Body' => "", 'ACL' => 'public-read']); //$this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/".$ent."/rejected/", 'Body' => "", 'ACL' => 'public-read']); } } }else{ $array['status'] = 'error'; $array['msg'] = 'Selected disrectory is alrady available.'; } echo json_encode($array); } public function upload_temp(){ //echo "<pre>"; print_r($_FILES); echo "<pre>"; print_r($_POST); die; $bucketname = 'paperpushbucket'; $code = $this->input->post('code'); $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $path = $code.'/Templates'; $count = count($_FILES['doc']['size']); for($i = 0; $i < $count; $i++){ $filename = $_FILES['doc']['name'][$i]; $ext = pathinfo($filename, PATHINFO_EXTENSION); $ext = strtolower($ext); if(!empty($ext)){ if($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png' || $ext == 'pdf' || $ext == 'csv' || $ext == 'xls' || $ext == 'xlsb' || $ext == 'xlsx'){ //echo "<pre>"; print_r($_FILES); die; $rand =rand(10,100); $target_file = preg_replace("/[^a-z0-9\_\-\.]/i", '', $_FILES['doc']['name'][$i]); $new_file = $rand.'_'.$target_file; $file_name = $_FILES['doc']['name'][$i]; $temp_file_location = $_FILES['doc']['tmp_name'][$i]; //$ct = ['image/jpg', 'image/jpeg', 'image/png', 'application/csv']; if($ext == 'pdf' || $ext == 'PDF'){ $this->s3->putObject([ 'Bucket' => $bucketname, 'Key' => $path.'/'.$new_file, 'SourceFile' => $temp_file_location, 'ContentType' => 'application/pdf', //'Body' => fopen($temp_file_location, 'rb'), 'ACL' => 'public-read', ]); }else{ $this->s3->putObject([ 'Bucket' => $bucketname, 'Key' => $path.'/'.$new_file, 'SourceFile' => $temp_file_location, //'ContentType' => 'image/jpg', //'Body' => fopen($temp_file_location, 'rb'), 'ACL' => 'public-read', ]); } //insert in table $data = array( 'ct_from' => $rid, 'ct_code' => $code, 'ct_filename' => $new_file, 'datetime' => date('Y-m-d H:i:s'), ); $this->model->insertData('cust_templates', $data); } } } } public function view_temp(){ $code=$this->input->post('code'); $data = $this->db2->get_where('cust_templates', array('ct_code'=>$code))->result_array(); if(!empty($data)){ $html=''; $html.='<ul class="list-unstyled">'; $i=0; foreach($data as $k => $v){ $i++; $path = $code.'/Templates/'.$v["ct_filename"]; $html.='<li>'.$i.') <a href="https://paperpushbucket.s3.ap-south-1.amazonaws.com/'.$path.'">'.$v["ct_filename"].'</a></li>'; } $html.='</ul>'; }else{ $html='Files not available'; } $array['html'] = $html; echo json_encode($array); } public function remUsr(){ $aid=$this->input->post('aid'); $where = array('aid' => $aid); $this->model->DeleteData('tbl_access', $where); $array['status'] = 'success'; echo json_encode($array); } } webapp/Users.php 0000644 00000076052 14642254427 0007660 0 ustar 00 <?php use Aws\S3\S3Client; use Aws\S3\Exception\S3Exception; use Aws\CommandPool; if ( ! defined('BASEPATH')) exit('No direct script access allowed'); require_once APPPATH."third_party/aws/autoload.php"; class Users extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); //aws $bucketname = 'paperpushbucket'; $key = 'AKIAJJ72VRLHXBD272YQ'; $secret = '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'; $this->s3 = S3Client::factory( array( 'credentials' => array( 'key' => $key, 'secret' => $secret ), 'version' => 'latest', 'region' => 'ap-south-1' ) ); } public function registration() { //echo "<pre>"; print_r($_POST); die; //echo "hi"; die; $country = explode('_', $this->input->post('country')); $country = $country[1]; $code=$this->input->post('code'); $rcode=$this->input->post('rcode'); $pass=$this->input->post('pass'); $repass=$this->input->post('repass'); $current_url=$this->input->post('current_url'); $year = date('Y'); $email = $this->input->post('email'); $username = $this->input->post('username'); $where_username = array('username' => $username); $query = $this->model->DetailData('tbl_registration', $where_username); $cnt = count($query); //$cnt = 0; if($cnt == 0){ if($code==$rcode){ if($pass == $repass){ if($this->input->post('name') != '' && $this->input->post('email') != '' && $this->input->post('mobile') != '' && $this->input->post('address') != '' && $pass != '' && $code != ''){ $name = $this->input->post('name'); $mobile = $this->input->post('mobile'); $arr = explode(' ',trim($name)); $new_name = $arr[0]; $random_number = mt_rand(1000, 9999); $user_code = $random_number.'_'.$new_name; $where_code = array('folder_code' => $user_code); $chk_folder = $this->model->DetailData('tbl_registration', $where_code); $otp = mt_rand(100000, 999999); $password = md5($pass); $date_incorporation = date("Y-m-d", strtotime($this->input->post('date_incorporation'))); $insertdata=array('pass'=>$password, 'name'=>$this->input->post('name'), 'phone_code'=>$this->input->post('phone_code'), 'email'=>$this->input->post('email'), 'username'=>$this->input->post('username'), 'country'=>$country, 'mobile'=>$this->input->post('mobile'), 'address'=>$this->input->post('address'), /*'constitution'=>$this->input->post('constitution'), 'date_incorporation'=>$date_incorporation, 'nob'=>$this->input->post('nob'), 'ur'=>$this->input->post('ur'), 'ri'=>$this->input->post('ri'), 'gst'=>$this->input->post('gst'), 'pan'=>$this->input->post('pan'), 'country'=>$country, 'state'=>$this->input->post('state'),*/ 'folder_code'=>$user_code, 'type'=>'customer', 'reg_from'=>'web', 'otp'=>$otp ); $last_insid = $this->model->insertData('tbl_registration',$insertdata); //make struct $entries = ['purchase_invoices', 'sales_invoices', 'cash_payment', 'cash_receipt', 'cheque_paid', 'expense_vouchers', 'debit_notes', 'credit_notes', 'bank_statements', 'cheque_deposited', 'reports', 'others']; $json_entry = json_encode($entries); $ins_struct = array( 'code'=>$user_code, 'year'=>$year, 'stage'=>$json_entry, ); $this->model->insertData('cust_upload_structure',$ins_struct); //make struct //echo "<pre>"; print_r($last_insid); //echo $insert_id = $this->db2->insert_id(); die; //$last_insid = 2; $enc_id = $this->model->encryptdata($last_insid); $enc_otp = $this->model->encryptdata($otp); $url = base_url()."webapp/users/auth/".$enc_id."/".$enc_otp; $to = $this->input->post('email'); //$to='vishal.panara@staroneweb.co.in'; $msg = ' <!DOCTYPE html> <html> <head> <title>Authentication</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg, #CF212A 0%, #003865 100%); padding: 10px; text-align: center;"> <h3>Welcome to Paperpush</h3> </div> <div style="padding: 1rem;"> <p><strong>Dear User,</strong></p> <p><strong>Thank you for registering with PaperPush. Please click on verfication link to verify your email address.</strong></p> <p><strong>Verfication link:</strong> <a href="'.$url.'">'.$url.'</a></p> <p><strong>Your Username:</strong> "'.$username.'"</p> <p><strong>Your Password:</strong> "'.$pass.'"</p> </div> </div> Regards,<br> Team PaperPush. <p>Note: Please do not reply of this email. This is system generated email. </p> </body> </html>'; $sub = "Authentication"; $this->model->emailsend($to, $sub, $msg); //======================================================= $msg_admin = ' <!DOCTYPE html> <html> <head> <title>New user registation</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg, #CF212A 0%, #003865 100%); padding: 10px; text-align: center;"> <h3>New user registation</h3> </div> <div style="padding: 1rem;"> <p><strong>Hello,</strong></p> <p><strong>New account has been registered. You can activate the account from Admin Panel after received payment authentication.</strong></p> <p><strong>Registration Details:</strong></p> <p><strong>Name:</strong> "'.$name.'"</p> <p><strong>Email:</strong> "'.$email.'"</p> <p><strong>Phone:</strong> "'.$mobile.'"</p> </div> </div> </body> </html>'; $to_admin='cjrajpara@gmail.com'; //anil.patel@staroneweb.co.in $sub_admin = "New user registation"; $this->model->emailsend_reg($to_admin, $sub_admin, $msg_admin); $bucketname = 'paperpushbucket'; $this->s3->putObject( [ 'Bucket' => $bucketname, 'Key' => $user_code."/", 'Key' => $user_code."/".$year."/", 'Key' => $user_code."/Templates/", 'Body' => "", 'ACL' => 'public-read' ], ); //$sdr = md5($six_digit_random_number); //$sdr = password_hash($six_digit_random_number, PASSWORD_BCRYPT); //$authcode['auth'] = $sdr; //$this->load->view('Web/auth'); $j_array['msg'] = '<p style="text-align:center!important;"><strong style="color: #c82333; text-align:center!important;">Thank you for registering with PaperPush. Please check your email to verify your account. If you don't see email in your INBOX please check in SPAM BOX.</strong></p>'; $j_array['year'] = $year; $j_array['code'] = $user_code; echo json_encode($j_array); //$this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Thankyou for Registration. </div>'); }else{ $j_array['msg'] = 'sum'; echo json_encode($j_array); } }else{ //$this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Password and Re-Password should be match. </div>'); /* echo ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> <h3 class="text-danger">Password and Re-Password should be match.</h3>'; */ $j_array['msg'] = 'pass'; echo json_encode($j_array); } }else{ //$this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Please enter the valid sum. </div>'); // echo ' // <button type="button" class="close" data-dismiss="modal" aria-label="Close"> // <span aria-hidden="true">×</span> // </button> // <h3 class="text-danger">Please enter the valid sum.</h3>'; $j_array['msg'] = 'sum'; echo json_encode($j_array); } }else{ //$this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Email ID is already available. </div>'); /* echo ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> <h3 class="text-danger">Sorry, Email ID is already available.</h3>'; */ $j_array['msg'] = 'username'; echo json_encode($j_array); } //redirect($current_url); } public function makeStructure(){ $user_code = $this->input->post('code'); $year = $this->input->post('year'); $bucketname = 'paperpushbucket'; //$this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/", 'Body' => "", 'ACL' => 'public-read']); $month = ['a_april', 'b_may', 'c_june', 'd_july', 'e_august', 'f_september', 'g_october', 'h_november', 'i_december', 'j_january', 'k_february', 'l_march']; foreach ($month as $value) { $this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/", 'Body' => "", 'ACL' => 'public-read']); $entries = ['purchase_invoices', 'sales_invoices', 'cash_payment', 'cash_receipt', 'cheque_paid', 'expense_vouchers', 'debit_notes', 'credit_notes', 'bank_statements', 'cheque_deposited', 'reports', 'others']; foreach ($entries as $ent) { $this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/".$ent."/", 'Body' => "", 'ACL' => 'public-read']); //$this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/".$ent."/completed/", 'Body' => "", 'ACL' => 'public-read']); //$this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/".$ent."/rejected/", 'Body' => "", 'ACL' => 'public-read']); } } $array['status'] = 'success'; echo json_encode($array); } public function makeStructure_cust(){ $user_code = $this->input->post('code'); $year = $this->input->post('year'); $this->db2->select('*'); $this->db2->from('cust_upload_structure'); $this->db2->where('code', $user_code); $this->db2->order_by('year', 'DESC'); $get = $this->db2->get()->row_array(); $entries = json_decode($get['stage'], TRUE); $bucketname = 'paperpushbucket'; //$this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/", 'Body' => "", 'ACL' => 'public-read']); $month = ['a_april', 'b_may', 'c_june', 'd_july', 'e_august', 'f_september', 'g_october', 'h_november', 'i_december', 'j_january', 'k_february', 'l_march']; foreach ($month as $value) { $this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/", 'Body' => "", 'ACL' => 'public-read']); //$entries = ['purchase_invoices', 'sales_invoices', 'cash_payment', 'cash_receipt', 'cheque_paid', 'expense_vouchers', 'debit_notes', 'credit_notes', 'bank_statements', 'cheque_deposited', 'reports', 'others']; foreach ($entries as $ent) { $this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/".$ent."/", 'Body' => "", 'ACL' => 'public-read']); //$this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/".$ent."/completed/", 'Body' => "", 'ACL' => 'public-read']); //$this->s3->putObject(['Bucket' => $bucketname, 'Key' => $user_code."/".$year."/".$value."/".$ent."/rejected/", 'Body' => "", 'ACL' => 'public-read']); } } $json_entry = json_encode($entries); $ins_struct = array( 'code'=>$user_code, 'year'=>$year, 'stage'=>$json_entry, ); $this->model->insertData('cust_upload_structure',$ins_struct); $array['status'] = 'success'; echo json_encode($array); } public function check_login(){ $code=$this->input->post('code'); $rcode=$this->input->post('rcode'); $current_url=$this->input->post('current_url'); if($code==$rcode){ $pass=md5($this->input->post("pass")); $this->db2 ->where("username", $this->input->post("username")); $this->db2->where("pass",$pass); $this->db2->where("status", '1'); //$this->db2->where("payment_status", '1'); $query=$this->db2->get("tbl_registration"); $logindata=$query->result_array(); //echo "<pre>"; print_r($logindata); die; if($query->num_rows() == 1){ $rid = $logindata[0]['rid']; $type = $logindata[0]['type']; $payment_status = $logindata[0]['payment_status']; if($type != 'customer' && $type != 'admin'){ if($_SERVER['REMOTE_ADDR'] != '122.170.114.66'){ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Your IP Address is Blocked. </div>'); redirect($current_url); } } if($type == 'customer'){ if($payment_status == 0){ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Your payment is pending. </div>'); redirect($current_url); } } $current_time = date('Y-m-d H-:i:s'); $data = array('last_activity' => $current_time,'login_status' => "yes",); $where = array('rid' => $rid); $this->model->UpdateData('tbl_registration', $data, $where); $this->session->set_userdata('reg_info', $logindata); // start check duplicate login $rid = $logindata[0]['rid']; $encrypted_id = $this->model->encryptdata($rid); $existingrows = $this->db2->get_where("tbl_login_check" , ['rid' => $rid , 'status' => 1 ])->num_rows(); $session_id = session_id(); if($existingrows > 0){ // is login $customurl = base_url("webcontroller/index?duplicate=yes&rid=$encrypted_id"); redirect($customurl) ; }else{ // nothinng $dataIns = array( 'rid' => $rid, 'session_id' => $session_id, 'status' => '1', ); $this->model->insertData('tbl_login_check', $dataIns); redirect("webapp/welcome"); } // end check duplicate login }else{ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Wrong username or Password OR email not verified. </div>'); redirect($current_url); } }else{ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Please enter the valid sum. </div>'); redirect($current_url); } } public function auth($enc_id, $enc_otp){ $id = $this->model->decryptdata($enc_id); $otp = $this->model->decryptdata($enc_otp); $where = array('rid' => $id); $regData = $this->model->DetailData('tbl_registration', $where); $reg_otp = $regData[0]['otp']; if($otp != $reg_otp){ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Oopps!</strong> Something went wrong. </div>'); }else{ $data = array('status'=>'1', 'otp'=>'0'); $this->model->UpdateData('tbl_registration', $data, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Thank you for veryfing your account. You will receive account activation email from PaperPush shortly! </div>'); } $base = base_url(); redirect($base); } public function logout(){ $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $current_time = date('Y-m-d H-:i:s'); $data = array('last_activity' => $current_time,'login_status' => "no",); $where = array('rid' => $rid); $this->model->UpdateData('tbl_registration', $data, $where); $dataUpa = array( 'status' => "0", ); $where = array('rid' => $rid, 'status' => '1',); $this->model->UpdateData('tbl_login_check', $dataUpa, $where); $this->session->unset_userdata('reg_info'); $this->session->userdata('reg_info'); $this->session->unset_userdata('mysession'); $base = base_url(); redirect($base); } public function access_two(){ $folder = implode('|', $this->input->post('folder')); $posted_fol = $this->input->post('folder'); $wise = $this->input->post('wise'); $hid = $this->input->post('hid'); $ato = $this->input->post('to'); $ato_cnt = count($ato); //echo $hid; die; $where = array('afrom'=>$hid); $check = $this->model->DetailData('tbl_access', $where); //echo "<pre>"; print_r($check); die; if(!empty($check)){ for ($i=0; $i < $ato_cnt; $i++) { //echo $ato[$i]; die; $where_ato = array('afrom'=>$hid, 'ato'=>$ato[$i]); $check_ato = $this->model->DetailData('tbl_access', $where_ato); //echo "<pre>"; print_r($check_ato); die; if(!empty($check_ato)){ $where = array('afrom'=>$hid, 'ato'=>$ato[$i]); $upd = array('folder'=> $folder, 'wise' => $wise); $this->model->UpdateData('tbl_access', $upd, $where); }else{ $insertdata=array( 'afrom'=>$hid, 'ato'=>$ato[$i], 'folder'=>$folder, 'wise'=>$wise ); $this->model->insertData('tbl_access', $insertdata); } //for notifications $ins=array( 'afrom'=>$hid, 'ato'=>$ato[$i], 'banned'=>'', 'given'=>$folder, 'status'=>'unseen' ); $this->model->insertData('tbl_access_notification',$ins); } //for }else{ for ($i=0; $i < $ato_cnt; $i++) { $insertdata=array( 'afrom'=>$hid, 'ato'=>$ato[$i], 'folder'=>$folder, 'wise'=>$wise ); $this->model->insertData('tbl_access', $insertdata); //for notifications $ins=array( 'afrom'=>$hid, 'ato'=>$ato[$i], 'banned'=>'', 'given'=>$folder, 'status'=>'unseen' ); $this->model->insertData('tbl_access_notification',$ins); } //for } $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Access has been given. </div>'); $id = $this->model->encryptdata($hid); redirect('webapp/people/view/'.$id); } //access_two public function access(){ $folder = implode('|', $this->input->post('folder')); $posted_fol = $this->input->post('folder'); $hid = $this->input->post('hid'); $ato = $this->input->post('to'); $where = array('afrom'=>$hid); $check = $this->model->DetailData('tbl_access', $where); if(!empty($check)){ //$avail_fol = $check[0]['folder']; //$ex_avail_fol = explode('|', $avail_fol); foreach ($check as $key => $value) { $avail_fol = $value['folder']; $avail_ato = $value['ato']; $ex_avail_fol = explode('|', $avail_fol); for ($i=0; $i < count($posted_fol) ; $i++) { $pf = $posted_fol[$i]; if(in_array($pf,$ex_avail_fol)){ //echo $pf."available"."<br>"; $where3 = array('afrom'=>$hid, 'ato'=>$avail_ato); //$check3 = $this->model->DetailData('tbl_access', $where3); //$get_fol = explode('|', $check3[0]['folder']); if (($key2 = array_search($pf, $ex_avail_fol)) !== false) { $ins4=array( 'afrom'=>$hid, 'ato'=>$avail_ato, 'banned'=>$ex_avail_fol[$key2], 'given'=>'', 'status'=>'unseen' ); unset($ex_avail_fol[$key2]); $this->model->insertData('tbl_access_notification',$ins4); } $imp_get_all = implode('|', $ex_avail_fol); $upd2 = array('folder'=> $imp_get_all); $this->model->UpdateData('tbl_access', $upd2, $where3); //echo "banned ",$folder."<br>"; /*$ins1=array( 'afrom'=>$hid, 'ato'=>$avail_ato, 'banned'=>$folder, 'given'=>'', 'status'=>'unseen' ); $this->model->UpdateData('tbl_access_notification',$ins1,$where3);*/ //echo "<pre>"; print_r($imp_get_all); } } } } //die; $where2 = array('afrom'=>$hid, 'ato'=>$ato); $check2 = $this->model->DetailData('tbl_access', $where2); if(!empty($check2)){ //echo "available"; $avail_fol2 = $check2[0]['folder']; $ex_avail_fol2 = explode('|', $avail_fol2); $merge = array_merge($posted_fol, $ex_avail_fol2); $imp_mrg = implode('|', $merge); $upd = array('folder'=> $imp_mrg); $this->model->UpdateData('tbl_access', $upd, $where2); //echo "<pre>"; print_r($imp_mrg); //echo "all ".$imp_mrg."<br>"; $ins2=array( 'afrom'=>$hid, 'ato'=>$ato, 'banned'=>'', 'given'=>$imp_mrg, 'status'=>'unseen' ); $this->model->insertData('tbl_access_notification',$ins2); }else{ $insertdata=array( 'afrom'=>$hid, 'ato'=>$ato, 'folder'=>$folder ); $last_insid = $this->model->insertData('tbl_access',$insertdata); //echo "only insert ".$folder."<br>"; $ins3=array( 'afrom'=>$hid, 'ato'=>$ato, 'banned'=>'', 'given'=>$folder, 'status'=>'unseen' ); $this->model->insertData('tbl_access_notification',$ins3); } $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Access has been given. </div>'); $id = $this->model->encryptdata($hid); redirect('webapp/people/view/'.$id); } public function upload(){ $id = $this->input->post('id'); $path = $this->input->post('path'); $filename = $_FILES['doc']['name']; $ext = pathinfo($filename, PATHINFO_EXTENSION); $ext = strtolower($ext); if(!empty($ext)){ if($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png' || $ext == 'pdf'){ //$date_time = date('d').'_'.time(); $rand =rand(10,100); $target_file = preg_replace("/[^a-z0-9\_\-\.]/i", '', $_FILES['doc']['name']); $new_file = $rand.'_'.$target_file; $_FILES['file']['name'] = $new_file; $_FILES['file']['type'] = $_FILES['doc']['type']; $_FILES['file']['tmp_name'] = $_FILES['doc']['tmp_name']; $_FILES['file']['error'] = $_FILES['doc']['error']; $_FILES['file']['size'] = $_FILES['doc']['size']; // File upload configuration $config['upload_path'] = './'.$path.'/'; $config['allowed_types']= 'gif|jpg|png|pdf|jpeg'; //$config['encrypt_name'] = TRUE; // Load and initialize upload library $this->load->library('upload', $config); $this->upload->initialize($config); // Upload file to server $this->upload->do_upload('file'); $fileData = $this->upload->data(); } } $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> File has been Uploaded. </div>'); redirect('webapp/people/view/'.$id); } public function remove($enc_url, $id){ $dec_url = base64_decode($enc_url); $old = substr($dec_url, 0, strrpos( $dec_url, '/')); $name = substr($dec_url, strrpos($dec_url, '/') + 1); $new = $old.'/recycle/'.$name; //rename($dec_url, $new) //if(unlink($dec_url)){ if(rename($dec_url, $new)){ $cust_id = $this->model->decryptdata($id); $where = array('ufrom' => $cust_id, 'path' => $dec_url); $upd = array('recycle' => '1'); $this->model->UpdateData('tbl_cust_uploads', $upd, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> File has been Recycled. </div>'); redirect('webapp/people/view/'.$id); }else{ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Something went wrong. </div>'); redirect('webapp/people/view/'.$id); } } public function trash($rt_enc_url, $id){ $dec_url = base64_decode($rt_enc_url); $old = substr($dec_url, 0, strrpos( $dec_url, '/')); $name = substr($dec_url, strrpos($dec_url, '/') + 1); $new = $old.'/recycle/'.$name; if(unlink($dec_url)){ //if(rename($dec_url, $new)){ $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> File has been Deleted. </div>'); redirect('webapp/people/view/'.$id); }else{ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Something went wrong. </div>'); redirect('webapp/people/view/'.$id); } } public function recover($rt_enc_url, $rt_enc_url2, $id){ $old = base64_decode($rt_enc_url); $new = base64_decode($rt_enc_url2); $new_name = "rec_".$lastWord = substr($new, strrpos($new, '/') + 1); $new = substr($new, 0, strrpos( $new, '/')); $new = $new.'/'.$new_name; if(rename($old, $new)){ $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> File has been Recovered. </div>'); redirect('webapp/people/view/'.$id); }else{ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Something went wrong. </div>'); redirect('webapp/people/view/'.$id); } } public function profile(){ $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $where = array('rid' => $rid); $userdata['data'] = $this->model->DetailData('tbl_registration', $where); //echo "<pre>"; print_r($userdata); die; $this->load->view('webapp/profile', $userdata); } public function changepass(){ $userdata = $this->session->userdata('reg_info'); $users['data'] = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $pass = $userdata[0]['pass']; $old_pass = md5($this->input->post('old_pass')); $new_pass = $this->input->post('new_pass'); $confirm_pass = $this->input->post('confirm_pass'); $mypass = md5($confirm_pass); if($pass != $old_pass){ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Wrong old password. </div>'); redirect('webapp/users/profile'); }elseif($new_pass != $confirm_pass){ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Both password are not matching. </div>'); redirect('webapp/users/profile'); }else{ $where = array('rid' => $rid); $upd = array('pass' => $mypass); $this->model->UpdateData('tbl_registration', $upd, $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Password has been changed, Please login to continue. </div>'); $this->session->unset_userdata('reg_info'); $base = base_url(); redirect($base); } } public function getAWS(){ $Prefix = 'main/'; $objects = getAWS($Prefix); echo '<pre>'; print_r($objects); } public function testMail(){ //echo 'hi'; $to = 'anil.patel@staroneweb.co.in'; $sub = 'test'; $msg = ' <!DOCTYPE html> <html> <head> <title>New user registation</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg, #CF212A 0%, #003865 100%); padding: 10px; text-align: center;"> <h3>Welcome to Paperpush</h3> </div> <div style="padding: 1rem;"> <p><strong>Hello,</strong></p> <p><strong>New account has been registered. You can activate the account from Admin Panel after received payment authentication.</strong></p> <p><strong>Registration Details:</strong></p> <p><strong>Name:</strong> vishal</p> <p><strong>Email:</strong> "'.$to.'"</p> <p><strong>Phone:</strong> 9658985458</p> </div> </div> </body> </html>'; $this->model->emailsend($to, $sub, $msg); //redirect('webapp/users'); } public function testEmail(){ $to = 'anil.patel@staroneweb.co.in'; $sub = "Paper Push"; $msg = 'Paper'; $this->model->emailsend($to, $sub, $msg); } } /* End of file Users.php */ webapp/Office.php 0000644 00002213305 14642254430 0007740 0 ustar 00 <?php use Aws\S3\S3Client; use Aws\S3\Exception\S3Exception; use Aws\CommandPool; if ( ! defined('BASEPATH')) exit('No direct script access allowed'); require_once APPPATH."third_party/aws/autoload.php"; class Office extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('app', "model"); $CI = & get_instance(); $this->db = $CI->load->database('default', TRUE); $this->db2 = $CI->load->database('db2', TRUE); //aws $bucketname = 'paperpushbucket'; $key = 'AKIAJJ72VRLHXBD272YQ'; $secret = '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'; $this->s3 = S3Client::factory( array( 'credentials' => array( 'key' => $key, 'secret' => $secret ), 'version' => 'latest', 'region' => 'ap-south-1' ) ); } public function index() { $ses = $this->session->get_userdata(); $rid = $ses['reg_info'][0]['rid']; $data['access'] = $this->model->officeModel($rid); //echo "<pre>"; print_r($data['access']); die; $this->load->view("webapp/office_user/customer", $data); } public function viewCust($encrypted_id) { $ses = $this->session->get_userdata(); $id = $this->model->decryptdata($encrypted_id); $rid = $ses['reg_info'][0]['rid']; $userdata['data'] = $this->model->viewOfficeModel($id, $rid); $userdata['encrypted_id'] = $encrypted_id; $userdata['wise'] = $userdata['data'][0]['wise']; $where = array('code' => $userdata['data'][0]['folder_code']); $userdata['struct'] = $this->db2->get_where('cust_upload_structure', $where)->result_array(); $userdata['code'] = $userdata['data'][0]['folder_code']; //echo "<pre>"; print_r($userdata['code']); die; $this->load->view("webapp/office_user/view_cust",$userdata); } public function viewCust_x($encrypted_id) { $ses = $this->session->get_userdata(); $id = $this->model->decryptdata($encrypted_id); /*$where=array('rid' => $id); $userdata['data'] = $this->model->DetailData('tbl_registration', $where);*/ $rid = $ses['reg_info'][0]['rid']; $userdata['data'] = $this->model->viewOfficeModel($id, $rid); echo "<pre>"; print_r($userdata['data']); die; $userdata['encrypted_id'] = $encrypted_id; $wise = $userdata['data'][0]['wise']; if($wise == 'all'){ $this->load->view("webapp/office_user/view_customer_all",$userdata); }elseif($wise == 'month'){ $this->load->view("webapp/office_user/view_customer_month",$userdata); }else{ $this->load->view("webapp/office_user/view_customer",$userdata); } } public function viewCustTwo($cust_id, $noti_id) { $ses = $this->session->get_userdata(); $id = $this->model->decryptdata($cust_id); $ni = $this->model->decryptdata($noti_id); /*$where=array('rid' => $id); $userdata['data'] = $this->model->DetailData('tbl_registration', $where);*/ $rid = $ses['reg_info'][0]['rid']; $userdata['data'] = $this->model->viewOfficeModel($id, $rid); //echo "<pre>"; print_r($userdata['data']); die; $userdata['encrypted_id'] = $cust_id; $data = array('status' => 'seen'); $where=array('id' => $ni); $this->model->UpdateData('tbl_access_notification', $data, $where); $this->load->view("webapp/office_user/view_customer",$userdata); } public function seeNoti($id){ $data = array('status' => 'seen'); $where=array('ato' => $id, 'status' => 'unseen'); $this->model->UpdateData('tbl_access_notification', $data, $where); $html = ''; $resultArrauy['status'] = 'success'; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } public function leaderNoti($id){ $data = array('status' => 'seen'); $where=array('ato' => $id, 'status' => 'unseen'); $this->model->UpdateData('tbl_access_notification', $data, $where); $html = ''; $resultArrauy['status'] = 'success'; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } public function officeNoti($id){ $data = array('status' => 'seen'); $where=array('ato' => $id, 'status' => 'unseen'); $this->model->UpdateData('tbl_access_notification', $data, $where); $html = ''; $resultArrauy['status'] = 'success'; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } public function custData($cid, $cu_folder){ $ses = $this->session->get_userdata(); $uid = $ses['reg_info'][0]['rid']; $cid = $this->model->decryptdata($cid); $where = array( 'ufrom' => $cid, 'uto' => $uid, 'folder' => $cu_folder ); $cust_data['data'] = $this->model->DetailData('tbl_cust_uploads', $where); //echo "<pre>"; print_r($cust_data['data']); $this->load->view('webapp/office_user/view_cust_data', $cust_data); } public function custDataTwo($cid, $stage, $avail_folder){ $ses = $this->session->get_userdata(); $oid = $ses['reg_info'][0]['rid']; $cust_data['cid'] = $cid; $cust_id = $this->model->decryptdata($cid); /* echo $cid; echo "<br>"; echo $cust_id; echo "<br>"; echo $tt = $this->model->decryptdata($cust_data['cid']); */ $cust_data['st'] = $stage; $cust_data['data']= base64_decode($avail_folder); $ex_avail = explode('/', $cust_data['data']); $cust_data['year'] = $ex_avail[2]; $month = $ex_avail[3]; $cust_data['month2'] = substr($month, strpos($month, "_") + 1); //echo ($cust_data['month2']); die; $ufrom = $cust_id; $uto = $oid; $folder = $stage; $where_noti = array( 'ufrom' => $ufrom, 'uto' => $uto, 'folder' => $folder, 'status' => 'unseen' ); $upd = array('status' => 'seen'); $this->model->UpdateData('tbl_cust_uploads', $upd, $where_noti); if($stage == 'cheque_reg' || $stage == 'bank'){ $dirs = array_filter(glob($cust_data['data'].'/*'), 'is_file'); $q = []; foreach ($dirs as $key => $val) { $q[] = $val; } $t = []; foreach ($dirs as $key => $value) { $where = array( 'stage' => $stage, 'year' => $cust_data['year'], 'month' => $cust_data['month2'], 'path' => $value ); //$fs = $this->model->DetailData('tbl_form_status', $where); $fs = $this->model->getFormStatus($where); $t[] = $fs; } //echo "<pre>"; print_r($t); die; foreach ($t as $k => $v) { $temp = []; $data['voucher_type'] = []; $data['cid'] = ''; $data['oid'] = ''; $data['stage'] = ''; $data['year'] = ''; $data['month'] = ''; $data['path'] = ''; $data['path_two'] = ''; foreach ($v as $ke => $va) { //echo "<pre>"; print_r ($va); echo "</pre>"; if($va['voucher_type'] != '') $temp[] = $va['voucher_type']; $data['cid'] = $va['cid']; $data['oid'] = $va['oid']; $data['stage'] = $va['stage']; $data['year'] = $va['year']; $data['month'] = $va['month']; $data['path'] = $va['path']; if(!empty($va) && $va['path'] == $v[0]['path']){ $data["filled_status"] = $va['filled_status']; $data['name'] = $va['name']; }else{ $data["filled_status"] = ''; $data['name'] = ''; } } $data['path_two'] = $q[$k]; $temp = implode("|" , $temp); $data['voucher_type'] = $temp; unset($t[$k]); $t[$k] = $data ; } $cust_data['cd'] = $t; $cust_data['cst_id'] = $cid; //echo "<pre>"; print_r ($cust_data); echo "</pre>"; die; $this->load->view('webapp/office_user/view_cust_data_two', $cust_data); //end for bank and cheque_reg }else{ //echo "<pre>"; print_r ($cust_data); echo "</pre>"; die; $temp = []; $dirs = array_filter(glob($cust_data['data'].'/*'), 'is_file'); foreach ($dirs as $key => $value) { $temp[]=$value; } foreach ($temp as $k => &$v) { $where = array( 'stage' => $stage, 'year' => $cust_data['year'], 'month' => $cust_data['month2'], 'path' => $v ); //$fs = $this->model->DetailData('tbl_form_status', $where); $fs = $this->model->getFormStatus($where); //echo "<pre>"; print_r ($fs); echo "</pre>"; if(!empty($fs)){ $test["status"] = "yes"; $test["voucher_type"] = $fs[0]['voucher_type']; $test["filled_status"] = $fs[0]['filled_status']; $test['oid'] = $fs[0]['oid']; $test['name'] = $fs[0]['name']; }else{ $test["status"] = "no"; $test["voucher_type"] = ""; $test["filled_status"] = ""; $test['oid'] = '0'; $test['name'] = ''; } $test["path"] = $v; $temp[$k] = $test; } //die; //echo "<pre>"; print_r($temp); die; $cust_data['cd'] = $temp; $cust_data['cst_id'] = $cid; //echo "<pre>"; print_r($cust_data['cd']); die; $this->load->view('webapp/office_user/view_cust_data', $cust_data); } } public function check_fs(){ $where_fs = array( 'stage' => $this->input->post('stage'), 'year' => $this->input->post('year'), 'month' => $this->input->post('month'), 'path' => $this->input->post('path') ); $fs = $this->model->DetailData('tbl_form_status', $where_fs); //echo "<pre>"; print_r ($fs); echo "</pre>"; die; if(!empty($fs)){ if($fs[0]['filled_status'] == 'pending' || $fs[0]['filled_status'] == 'done'){ echo 'pending'; } } } public function form(){ //echo "<pre>"; print_r($_POST); die; /* $path = base64_decode($path); $stage = explode('/', $path); $current_stage = $stage[4]; $data['stage'] = $stage[4]; $data['path'] = $path;*/ $where_cust = array('type' => 'customer', 'status' =>'1'); $data['cust'] = $this->db2->get_where('tbl_registration', $where_cust)->result_array(); $data['max_fid'] = $this->model->maxId('tbl_form', 'fid'); $ses = $this->session->get_userdata(); $oid = $ses['reg_info'][0]['rid']; $stg = $this->input->post('stg'); $path = $this->input->post('path'); $data['yr'] = $this->input->post('year'); $data['mn'] = $this->input->post('month'); $current_stage = $stg; $data['stg'] = $stg; $cid = $this->input->post('cid'); $data['path'] = implode('|-|', $path) ; $dec_cid = $this->model->decryptdata($cid); $data['customer_id'] = $this->model->decryptdata($cid); $data['items'] = $this->model->getDatamodel('tbl_item'); $data['expense'] = $this->model->getDatamodel('tbl_expense'); $data['ledger'] = $this->model->getFormLedger($data['customer_id']); $data['tax'] = $this->model->getDatamodel('tbl_tax'); /*$url = $this->input->post('url'); $exp_path_one = $this->input->post('path'); $epc_one = count($exp_path_one); $hid_oid = $this->input->post('hidden_oid'); if($hid_oid != $oid){ for ($z=0; $z < $epc_one; $z++) { $where_fs = array( 'stage' => $this->input->post('stg'), 'year' => $this->input->post('year'), 'month' => $this->input->post('month'), 'path' => $exp_path_one[$z] ); $fs = $this->model->DetailData('tbl_form_status', $where_fs); if(!empty($fs)){ if($fs[0]['filled_status'] == 'pending'){ $this->session->set_flashdata('msg', ' <div class="alert alert-danger alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Error!</strong> Submission pending by other user. </div>'); redirect($url); } } } }*/ /*if($current_stage == 'cheque_reg' || $current_stage == 'bank'){ $vt = $this->input->post('voucher_type'); }else{ $vt = 'NULL'; }*/ // update in form status even form is open $exp_path = $this->input->post('path'); $epc = count($exp_path); for ($i=0; $i < $epc; $i++) { $ins_form_status = array( 'cid' => $this->model->decryptdata($this->input->post('cid')), 'oid' => $oid, 'stage' => $this->input->post('stg'), 'year' => $this->input->post('year'), 'month' => $this->input->post('month'), 'path' => $exp_path[$i], 'filled_status' => 'pending' ); $fs_count = $this->db2->get_where('tbl_form_status', array( 'cid' => $this->model->decryptdata($this->input->post('cid')), 'oid' => $oid, 'stage' => $this->input->post('stg'), 'path' => $exp_path[$i], ) )->num_rows(); /*echo $fs_count; echo "<br>";*/ if($fs_count == '0'){ $this->model->insertData('tbl_form_status', $ins_form_status); } } $data['group_all'] = $this->model->getDatamodel('tbl_group'); if($current_stage == 'contra'){ $this->load->view('webapp/office_user/contra_form', $data); }elseif($current_stage == 'receipt'){ $where = array('voucher' => 'receipt'); $data['group'] = $this->model->DetailData('tbl_grouped_voucher', $where); $data['rec_group'] = $this->model->selGroup($where, $dec_cid); $this->load->view('webapp/office_user/receipt_form', $data); }elseif($current_stage == 'payment'){ $where = array('voucher' => 'payment'); $data['group'] = $this->model->DetailData('tbl_grouped_voucher', $where); $data['rec_group'] = $this->model->selGroup($where, $dec_cid); $this->load->view('webapp/office_user/payment_form', $data); }elseif($current_stage == 'journal'){ $this->load->view('webapp/office_user/journal_form', $data); }elseif($current_stage == 'credit'){ $this->load->view('webapp/office_user/credit_form', $data); }elseif($current_stage == 'debit'){ $this->load->view('webapp/office_user/debit_form', $data); }elseif($current_stage == 'cheque_reg'){ $voucher_type = $this->input->post('voucher_type'); $data['voucher_type'] = $voucher_type; if($voucher_type == 'payment'){ $where = array('voucher' => 'payment'); $data['group'] = $this->model->DetailData('tbl_grouped_voucher', $where); $data['rec_group'] = $this->model->selGroup($where, $dec_cid); $this->load->view('webapp/office_user/payment_form', $data); }else{ $where = array('voucher' => 'receipt'); $data['group'] = $this->model->DetailData('tbl_grouped_voucher', $where); $data['rec_group'] = $this->model->selGroup($where, $dec_cid); $this->load->view('webapp/office_user/receipt_form', $data); } }elseif($current_stage == 'bank'){ $voucher_type = $this->input->post('voucher_type'); $data['voucher_type'] = $voucher_type; if($voucher_type == 'payment'){ $where = array('voucher' => 'payment'); $data['group'] = $this->model->DetailData('tbl_grouped_voucher', $where); $data['rec_group'] = $this->model->selGroup($where, $dec_cid); //echo "<pre>"; print_r ($data['rec_group']); echo "</pre>"; die; $this->load->view('webapp/office_user/payment_form', $data); }elseif($voucher_type == 'receipt'){ $where = array('voucher' => 'receipt'); $data['group'] = $this->model->DetailData('tbl_grouped_voucher', $where); $data['rec_group'] = $this->model->selGroup($where, $dec_cid); $this->load->view('webapp/office_user/receipt_form', $data); }else{ $this->load->view('webapp/office_user/contra_form', $data); } }else{ if($stg == 'purchase'){ $where = array('voucher' => 'purchase'); $data['group'] = $this->model->DetailData('tbl_grouped_voucher', $where); $data['rec_group'] = $this->model->selGroup($where, $dec_cid); }else{ $where = array('voucher' => 'sales'); $data['group'] = $this->model->DetailData('tbl_grouped_voucher', $where); $data['rec_group'] = $this->model->selGroup($where, $dec_cid); } $this->load->view('webapp/office_user/generate_form', $data); } } public function form_x($path, $cid){ $path = base64_decode($path); $stage = explode('/', $path); $current_stage = $stage[4]; $data['stage'] = $stage[4]; $data['path'] = $path; $data['customer_id'] = $this->model->decryptdata($cid); $data['items'] = $this->model->getDatamodel('tbl_item'); $data['expense'] = $this->model->getDatamodel('tbl_expense'); $data['ledger'] = $this->model->getDatamodel('tbl_ledger'); $data['tax'] = $this->model->getDatamodel('tbl_tax'); if($current_stage == 'contra'){ $this->load->view('webapp/office_user/contra_form', $data); }elseif($current_stage == 'receipt'){ $this->load->view('webapp/office_user/receipt_form', $data); }elseif($current_stage == 'payment'){ $this->load->view('webapp/office_user/payment_form', $data); }elseif($current_stage == 'journal'){ $this->load->view('webapp/office_user/journal_form', $data); }elseif($current_stage == 'credit'){ $this->load->view('webapp/office_user/credit_form', $data); }elseif($current_stage == 'debit'){ $this->load->view('webapp/office_user/debit_form', $data); }else{ $this->load->view('webapp/office_user/generate_form', $data); } } //add form sales public function add_form(){ //echo "<pre>"; print_r($_POST); die; $m_date = date("Y-m-d", strtotime($this->input->post('date'))); $d = date("d", strtotime($this->input->post('date'))); $m = date("m", strtotime($this->input->post('date'))); $ses = $this->session->get_userdata(); $oid = $ses['reg_info'][0]['rid']; // $path = explode('/', $this->input->post('path')); // $year = $path[2]; // $m1 = explode('_',$path[3]); // $month = $m1[1]; $year = $this->input->post('year'); $month = $this->input->post('month'); $ins_main = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'year' => $year, 'month' => $month, 'd' => $d, 'm' => $m, 'path' => $this->input->post('path'), 'm_date' => $m_date, 'voucher_no' => $this->input->post('voucher_no'), 'ref_no' => $this->input->post('ref_no'), 'm_ledger_name' => $this->input->post('ledger_name_main'), 'm_effect' => $this->input->post('effect_main'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'release_status' => 'released', 'approve_status' => 'panding', 'l_noti' => 'unseen' ); $ins = $this->model->insertData('tbl_form', $ins_main); $count = count($this->input->post('ledger_name_sub')); $s_ledger_name = $this->input->post('ledger_name_sub'); $s_effect = $this->input->post('effect_sub'); $discount_one = $this->input->post('dis_one'); $amt_taxable = $this->input->post('amt_taxable'); $sgst = $this->input->post('sgst'); $s_aot = $this->input->post('sgst_tax_amt'); $cgst = $this->input->post('cgst'); $c_aot = $this->input->post('cgst_tax_amt'); $ugst = $this->input->post('ugst'); $u_aot = $this->input->post('ugst_tax_amt'); $igst = $this->input->post('igst'); $i_aot = $this->input->post('igst_tax_amt'); $cess_code = $this->input->post('cess_code'); $discount_two = $this->input->post('dis_two'); $item_name = $this->input->post('item_name'); $qty = $this->input->post('qty'); $rate = $this->input->post('rate'); $unit = $this->input->post('unit'); $lot_no = $this->input->post('lot_no'); for ($i=0; $i < $count; $i++) { $md = $_POST['mfg_date'][$i]; $md = date("Y-m-d", strtotime($md)); $ed = $_POST['exp_date'][$i]; $ed = date("Y-m-d", strtotime($ed)); if(empty($sgst[$i])){ $sgst[$i] = '0.00'; } if(empty($cgst[$i])){ $cgst[$i] = '0.00'; } if(empty($ugst[$i])){ $ugst[$i] = '0.00'; } if(empty($igst[$i])){ $igst[$i] = '0.00'; } if(empty($discount_one[$i])){ $discount_one[$i] = '0.00'; } if(empty($discount_two[$i])){ $discount_two[$i] = '0.00'; } $ins_sub = array( 'fid' => $ins, 's_ledger_name' => $s_ledger_name[$i], 's_effect' => $s_effect[$i], 'discount_one' => $discount_one[$i], 'amt_taxable' => $amt_taxable[$i], 'sgst' => $sgst[$i], 's_aot' => $s_aot[$i], 'cgst' => $cgst[$i], 'c_aot' => $c_aot[$i], 'ugst' => $ugst[$i], 'u_aot' => $u_aot[$i], 'igst' => $igst[$i], 'i_aot' => $i_aot[$i], 'cess_code' => $cess_code[$i], 'discount_two' => $discount_two[$i], 'item_name' => $item_name[$i], 'qty' => $qty[$i], 'rate' => $rate[$i], 'unit' => $unit[$i], 'lot_no' => $lot_no[$i], 'lot_mfg_date' => $md, 'lot_exp_date' => $ed ); $ins2 = $this->model->insertData('tbl_form_info', $ins_sub); $pass_data = $_POST; $this->tbl_other_expens_entry($ins2, $pass_data, $count, $i+1); } $exp_path = explode('|-|', $this->input->post('path')); $epc = count($exp_path); for ($i=0; $i < $epc; $i++) { /* $ins_form_status = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'year' => $year, 'month' => $month, 'path' => $exp_path[$i], 'filled_status' => 'done' ); $this->model->insertData('tbl_form_status', $ins_form_status);*/ $ins_form_status = array( 'filled_status' => 'done' ); $if_where = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'path' => $exp_path[$i] ); $this->model->UpdateData('tbl_form_status', $ins_form_status, $if_where); } redirect('webapp/office/form_grid'); } //add form sales public function tbl_other_expens_entry($ins2, $pass_data, $count, $j){ $ledger_name_sub = $pass_data['ledger_name_sub']; $dynamic_name = "exp_name_".$j ; $exp_name = $pass_data[$dynamic_name]; $dynamic_amt = "exp_amt_".$j ; $exp_amt = $pass_data[$dynamic_amt]; for ($i=0; $i < count($exp_name); $i++) { $xyz = $exp_name[$i]; $xyz_amt = $exp_amt[$i]; if($xyz != ''){ $ins_exp = array('fi_id' => $ins2, 'ex_name' => $xyz, 'ex_amount' => $xyz_amt); $this->model->insertData('tbl_other_expens', $ins_exp); } } } //update form sales public function update_form($encrypted_id, $noti='NULL'){ if($this->input->post('save') == 'Save'){ //echo $this->input->post('amt_gross'); die; //echo "<pre>"; print_r($_POST); die; //Update in main table $fid = $this->model->decryptdata($encrypted_id); $m_date = date("Y-m-d", strtotime($this->input->post('date'))); $d = date("d", strtotime($this->input->post('date'))); $m = date("m", strtotime($this->input->post('date'))); $ins_main = array( 'm_date' => $m_date, 'd' => $d, 'm' => $m, 'voucher_no' => $this->input->post('voucher_no'), 'ref_no' => $this->input->post('ref_no'), 'm_ledger_name' => $this->input->post('ledger_name_main'), 'm_effect' => $this->input->post('effect_main'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'release_status' => 'released', 'l_noti' => 'unseen' ); $whare_main = array('fid' => $fid); $this->model->UpdateData('tbl_form', $ins_main, $whare_main); //Update in sub table $count1 = count($this->input->post('fi_id')); $fi_id = $this->input->post('fi_id'); $s_ledger_name = $this->input->post('ledger_name_sub'); //$s_effect = $this->input->post('effect_sub'); //$discount_one = $this->input->post('dis_one'); $amt_taxable = $this->input->post('amt_taxable'); $sgst = $this->input->post('sgst'); $s_aot = $this->input->post('sgst_tax_amt'); $cgst = $this->input->post('cgst'); $c_aot = $this->input->post('cgst_tax_amt'); $ugst = $this->input->post('ugst'); $u_aot = $this->input->post('ugst_tax_amt'); $igst = $this->input->post('igst'); $i_aot = $this->input->post('igst_tax_amt'); $cess_code = $this->input->post('cess_code'); $discount_two = $this->input->post('dis_two'); $item_name = $this->input->post('item_name'); $qty = $this->input->post('qty'); $rate = $this->input->post('rate'); $unit = $this->input->post('unit'); $lot_no = $this->input->post('lot_no'); for ($i=0; $i < $count1; $i++) { $md = $_POST['mfg_date'][$i]; $md = date("Y-m-d", strtotime($md)); $ed = $_POST['exp_date'][$i]; $ed = date("Y-m-d", strtotime($ed)); if(empty($sgst[$i])){ $sgst[$i] = '0.00'; } if(empty($cgst[$i])){ $cgst[$i] = '0.00'; } if(empty($ugst[$i])){ $ugst[$i] = '0.00'; } if(empty($igst[$i])){ $igst[$i] = '0.00'; } //if(empty($edit_discount_one[$i])){ $edit_discount_one[$i] = '0.00'; } if(empty($discount_two[$i])){ $discount_two[$i] = '0.00'; } $upd_sub = array( 'fid' => $fid, 's_ledger_name' => $s_ledger_name[$i], //'s_effect' => $s_effect[$i], //'discount_one' => $discount_one[$i], 'amt_taxable' => $amt_taxable[$i], 'sgst' => $sgst[$i], 's_aot' => $s_aot[$i], 'cgst' => $cgst[$i], 'c_aot' => $c_aot[$i], 'ugst' => $ugst[$i], 'u_aot' => $u_aot[$i], 'igst' => $igst[$i], 'i_aot' => $i_aot[$i], 'cess_code' => $cess_code[$i], 'discount_two' => $discount_two[$i], 'item_name' => $item_name[$i], 'qty' => $qty[$i], 'rate' => $rate[$i], 'unit' => $unit[$i], 'lot_no' => $lot_no[$i], 'lot_mfg_date' => $md, 'lot_exp_date' => $ed ); if($fi_id[$i] != ''){ $where_sub_one = array('fi_id' => $fi_id[$i]); $this->model->UpdateData('tbl_form_info', $upd_sub, $where_sub_one); }else{ $ins = $this->model->insertData('tbl_form_info', $upd_sub); } $this->db2->delete('tbl_other_expens', array('fi_id' => $fi_id[$i])); $pass_data = $_POST; if($fi_id[$i] != ''){ $this->tbl_other_expens_entry($fi_id[$i], $pass_data, $count='NULL', $i+1); }else{ $this->tbl_other_expens_entry($ins, $pass_data, $count='NULL', $i+1); } } //insert in sub table /* $count_two = count($this->input->post('ledger_name_sub')); $s_ledger_name = $this->input->post('ledger_name_sub'); $s_effect = $this->input->post('effect_sub'); $discount_one = $this->input->post('dis_one'); $amt_taxable = $this->input->post('amt_taxable'); $sgst = $this->input->post('sgst'); $s_aot = $this->input->post('sgst_tax_amt'); $cgst = $this->input->post('cgst'); $c_aot = $this->input->post('cgst_tax_amt'); $ugst = $this->input->post('ugst'); $u_aot = $this->input->post('ugst_tax_amt'); $igst = $this->input->post('igst'); $i_aot = $this->input->post('igst_tax_amt'); $cess_code = $this->input->post('cess_code'); $discount_two = $this->input->post('dis_two'); $item_name = $this->input->post('item_name'); $qty = $this->input->post('qty'); $rate = $this->input->post('rate'); $unit = $this->input->post('unit'); $lot_no = $this->input->post('lot_no'); for ($k=0; $k < $count_two; $k++) { $md = $_POST['mfg_date'][$k]; $md = date("Y-m-d", strtotime($md)); $ed = $_POST['exp_date'][$k]; $ed = date("Y-m-d", strtotime($ed)); if(empty($sgst[$k])){ $sgst[$k] = '0.00'; } if(empty($cgst[$k])){ $cgst[$k] = '0.00'; } if(empty($ugst[$k])){ $ugst[$k] = '0.00'; } if(empty($kgst[$k])){ $kgst[$k] = '0.00'; } if(empty($discount_one[$k])){ $discount_one[$k] = '0.00'; } if(empty($discount_two[$k])){ $discount_two[$k] = '0.00'; } $ins_sub = array( 'fid' => $fid, 's_ledger_name' => $s_ledger_name[$k], 's_effect' => $s_effect[$k], 'discount_one' => $discount_one[$k], 'amt_taxable' => $amt_taxable[$k], 'sgst' => $sgst[$k], 's_aot' => $s_aot[$k], 'cgst' => $cgst[$k], 'c_aot' => $c_aot[$k], 'ugst' => $ugst[$k], 'u_aot' => $u_aot[$k], 'igst' => $kgst[$k], 'i_aot' => $i_aot[$k], 'cess_code' => $cess_code[$k], 'discount_two' => $discount_two[$k], 'item_name' => $item_name[$k], 'qty' => $qty[$k], 'rate' => $rate[$k], 'unit' => $unit[$k], 'lot_no' => $lot_no[$k], 'lot_mfg_date' => $md, 'lot_exp_date' => $ed ); $in = $this->model->insertData('tbl_form_info', $ins_sub); $pass_data = $_POST; $this->tbl_other_expens_entry($in, $pass_data, $count='NULL', $k+1); } */ $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Form has been updated. </div>'); redirect('webapp/office/form_grid'); }else{ $id = $this->model->decryptdata($encrypted_id); $data['form'] = $this->model->sales_form_data($id); //echo "<pre>"; print_r($data['form']); die; $stage = $data['form'][0]['stage']; $path = $data['form'][0]['path']; $cid = $data['form'][0]['cid']; $data['mn'] = $data['form'][0]['month']; $data['yr'] = $data['form'][0]['year']; $note_two = $data['form'][0]['note_two']; $data['stage'] = $stage; $data['path'] = $path; $data['customer_id'] = $cid; $data['tax'] = $this->model->getDatamodel('tbl_tax'); if($noti != 'NULL'){ $where = array('fid' => $id); $sts = array('o_noti' => 'seen'); $this->model->UpdateData('tbl_form', $sts, $where); } $data['items'] = $this->model->getDatamodel('tbl_item'); $data['expn'] = $this->model->getDatamodel('tbl_expense'); $data['ledger'] = $this->model->getDatamodel('tbl_ledger'); if(isset($note_two) && $note_two == 'form_two'){ $this->load->view("webapp/office_user/edit_form_two",$data); }else{ $this->load->view("webapp/office_user/edit_form",$data); } } } //end of update form sales //start add contra form public function add_contra(){ //echo "<pre>"; print_r($_POST); die; $m_date = date("Y-m-d", strtotime($this->input->post('date'))); $check_date = date("Y-m-d", strtotime($this->input->post('check_date'))); $d = date("d", strtotime($this->input->post('date'))); $m = date("m", strtotime($this->input->post('date'))); $ses = $this->session->get_userdata(); $oid = $ses['reg_info'][0]['rid']; $year = $this->input->post('year'); $month = $this->input->post('month'); //$path = explode('/', $this->input->post('path')); //$year = $path[2]; //$m1 = explode('_',$path[3]); //$month = $m1[1]; $ins_main = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'year' => $year, 'month' => $month, 'd' => $d, 'm' => $m, 'path' => $this->input->post('path'), 'm_date' => $m_date, 'voucher_no' => $this->input->post('voucher_no'), 'm_ledger_name' => $this->input->post('ledger_name_main'), 'trans_type' => $this->input->post('trans_type'), 'voucher_type' => $this->input->post('voucher_type'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'ms_ledger' => $this->input->post('ms_ledger'), 'check_no' => $this->input->post('check_no'), 'check_date' => $check_date, 'release_status' => 'released', 'approve_status' => 'panding', 'l_noti' => 'unseen' ); $ins = $this->model->insertData('tbl_form', $ins_main); $exp_path = explode('|-|', $this->input->post('path')); $epc = count($exp_path); for ($i=0; $i < $epc; $i++) { /* $ins_form_status = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'year' => $year, 'month' => $month, 'path' => $exp_path[$i], 'l_noti' => 'unseen' ); $this->model->insertData('tbl_form_status', $ins_form_status);*/ $ins_form_status = array( 'voucher_type' => $this->input->post('voucher_type'), 'filled_status' => 'done' ); $rec = $this->db2->get_where('tbl_form_status', $if_where)->row_array(); if(!empty($rec)){ $vt = $rec['voucher_type']; if($vt != 'NULL'){ $vt = explode('|', $vt); $vt[] = $this->input->post('voucher_type'); //echo "<pre>"; print_r ($vt); echo "</pre>"; $vt = implode('|', $vt); }else{ $vt = $this->input->post('voucher_type'); } }else{ $vt = $this->input->post('voucher_type'); } $if_where = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'path' => $exp_path[$i], ); $this->model->UpdateData('tbl_form_status', $ins_form_status, $if_where); } redirect('webapp/office/form_grid'); } //end add contra form //end update contra form public function update_contra($encrypted_id, $noti='NULL'){ if($this->input->post('save') == 'Save'){ $id = $this->model->decryptdata($encrypted_id); $m_date = date("Y-m-d", strtotime($this->input->post('date'))); $check_date = date("Y-m-d", strtotime($this->input->post('check_date'))); $ins_main = array( 'm_date' => $m_date, 'voucher_no' => $this->input->post('voucher_no'), 'm_ledger_name' => $this->input->post('ledger_name_main'), 'trans_type' => $this->input->post('trans_type'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'ms_ledger' => $this->input->post('ms_ledger'), 'check_no' => $this->input->post('check_no'), 'check_date' => $check_date, 'l_noti' => 'unseen', 'release_status' => 'released' ); $where = array("fid" => $id); $ins = $this->model->UpdateData('tbl_form', $ins_main, $where); redirect('webapp/office/form_grid'); }else{ $id = $this->model->decryptdata($encrypted_id); $data['form'] = $this->model->office_form_contra($id); //echo "<pre>"; print_r($data['form']); die; $stage = $data['form'][0]['stage']; $voucher_type = $data['form'][0]['voucher_type']; $data['voucher_type'] = $voucher_type; $path = $data['form'][0]['path']; $cid = $data['form'][0]['cid']; $data['stage'] = $stage; $data['path'] = $path; $data['customer_id'] = $cid; $data['ledger'] = $this->model->getDatamodel('tbl_ledger'); $data['items'] = $this->model->getDatamodel('tbl_item'); $this->load->view("webapp/office_user/edit_contra",$data); } } //end update contra form //start add receipt form public function add_receipt(){ //echo "<pre>"; print_r($_POST); die; $m_date = date("Y-m-d", strtotime($this->input->post('date'))); $check_date = date("Y-m-d", strtotime($this->input->post('check_date'))); $d = date("d", strtotime($this->input->post('date'))); $m = date("m", strtotime($this->input->post('date'))); $ses = $this->session->get_userdata(); $oid = $ses['reg_info'][0]['rid']; $path = explode('/', $this->input->post('path')); $year = $path[2]; $m1 = explode('_',$path[3]); $month = $m1[1]; $ins_main = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'year' => $year, 'month' => $month, 'd' => $d, 'm' => $m, 'path' => $this->input->post('path'), 'm_date' => $m_date, 'voucher_no' => $this->input->post('voucher_no'), 'm_ledger_name' => $this->input->post('ledger_name_main'), 'trans_type' => $this->input->post('trans_type'), 'voucher_type' => $this->input->post('voucher_type'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'ms_ledger' => $this->input->post('ms_ledger'), 'ms_ledger_two' => $this->input->post('ms_ledger_two'), 'check_no' => $this->input->post('check_no'), 'check_date' => $check_date, 'release_status' => 'released', 'approve_status' => 'panding', 'l_noti' => 'unseen' ); $ins = $this->model->insertData('tbl_form', $ins_main); $exp_path = explode('|-|', $this->input->post('path')); $epc = count($exp_path); for ($i=0; $i < $epc; $i++) { /* $ins_form_status = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'voucher_type' => $this->input->post('voucher_type'), 'year' => $year, 'month' => $month, 'path' => $exp_path[$i] ); $this->model->insertData('tbl_form_status', $ins_form_status);*/ $if_where = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'path' => $exp_path[$i] ); $rec = $this->db2->get_where('tbl_form_status', $if_where)->row_array(); if(!empty($rec)){ $vt = $rec['voucher_type']; if($vt != 'NULL'){ $vt = explode('|', $vt); $vt[] = $this->input->post('voucher_type'); //echo "<pre>"; print_r ($vt); echo "</pre>"; $vt = implode('|', $vt); }else{ $vt = $this->input->post('voucher_type'); } }else{ $vt = $this->input->post('voucher_type'); } $ins_form_status = array( 'voucher_type' => $vt, 'filled_status' => 'done' ); $this->model->UpdateData('tbl_form_status', $ins_form_status, $if_where); } redirect('webapp/office/form_grid'); } //end add receipt form //start update receipt form public function update_receipt($encrypted_id, $noti='NULL'){ if($this->input->post('save') == 'Save'){ //echo "<pre>"; print_r($_POST); die; $id = $this->model->decryptdata($encrypted_id); $m_date = date("Y-m-d", strtotime($this->input->post('date'))); $check_date = date("Y-m-d", strtotime($this->input->post('check_date'))); $ins_main = array( 'm_date' => $m_date, 'voucher_no' => $this->input->post('voucher_no'), 'm_ledger_name' => $this->input->post('ledger_name_main'), 'trans_type' => $this->input->post('trans_type'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'ms_ledger' => $this->input->post('ms_ledger'), 'ms_ledger_two' => $this->input->post('ms_ledger_two'), 'check_no' => $this->input->post('check_no'), 'check_date' => $check_date, 'l_noti' => 'unseen', 'release_status' => 'released' ); $where = array("fid" => $id); $ins = $this->model->UpdateData('tbl_form', $ins_main, $where); redirect('webapp/office/form_grid'); }else{ $id = $this->model->decryptdata($encrypted_id); $data['form'] = $this->model->office_form_contra($id); //echo "<pre>"; print_r($data['form']); die; $stage = $data['form'][0]['stage']; $voucher_type = $data['form'][0]['voucher_type']; $data['voucher_type'] = $voucher_type; $path = $data['form'][0]['path']; $cid = $data['form'][0]['cid']; $data['stage'] = $stage; $data['path'] = $path; $data['customer_id'] = $cid; $data['ledger'] = $this->model->getDatamodel('tbl_ledger'); $data['items'] = $this->model->getDatamodel('tbl_item'); $where = array('voucher' => 'receipt'); $data['group'] = $this->model->DetailData('tbl_grouped_voucher', $where); $this->load->view("webapp/office_user/edit_receipt",$data); } } //end update receipt form //start add payment form public function add_payment(){ //echo "<pre>"; print_r($_POST); die; $m_date = date("Y-m-d", strtotime($this->input->post('date'))); $check_date = date("Y-m-d", strtotime($this->input->post('check_date'))); $d = date("d", strtotime($this->input->post('date'))); $m = date("m", strtotime($this->input->post('date'))); $ses = $this->session->get_userdata(); $oid = $ses['reg_info'][0]['rid']; $path = explode('/', $this->input->post('path')); $year = $path[2]; $m1 = explode('_',$path[3]); $month = $m1[1]; $ins_main = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'year' => $year, 'month' => $month, 'd' => $d, 'm' => $m, 'path' => $this->input->post('path'), 'm_date' => $m_date, 'voucher_no' => $this->input->post('voucher_no'), 'm_ledger_name' => $this->input->post('ledger_name_main'), 'trans_type' => $this->input->post('trans_type'), 'voucher_type' => $this->input->post('voucher_type'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'ms_ledger' => $this->input->post('ms_ledger'), 'ms_ledger_two' => $this->input->post('ms_ledger_two'), 'check_no' => $this->input->post('check_no'), 'check_date' => $check_date, 'release_status' => 'released', 'approve_status' => 'panding', 'l_noti' => 'unseen' ); $ins = $this->model->insertData('tbl_form', $ins_main); $exp_path = explode('|-|', $this->input->post('path')); $epc = count($exp_path); for ($i=0; $i < $epc; $i++) { /*$ins_form_status = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'voucher_type' => $this->input->post('voucher_type'), 'year' => $year, 'month' => $month, 'path' => $exp_path[$i] ); $this->model->insertData('tbl_form_status', $ins_form_status);*/ $ins_form_status = array( 'voucher_type' => $this->input->post('voucher_type'), 'filled_status' => 'done' ); $rec = $this->db2->get_where('tbl_form_status', $if_where)->row_array(); if(!empty($rec)){ $vt = $rec['voucher_type']; if($vt != 'NULL'){ $vt = explode('|', $vt); $vt[] = $this->input->post('voucher_type'); echo "<pre>"; print_r ($vt); echo "</pre>"; $vt = implode('|', $vt); }else{ $vt = $this->input->post('voucher_type'); } }else{ $vt = $this->input->post('voucher_type'); } $if_where = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'path' => $exp_path[$i] ); $this->model->UpdateData('tbl_form_status', $ins_form_status, $if_where); } redirect('webapp/office/form_grid'); } //end add payment form //start update payment form public function update_payment($encrypted_id, $noti='NULL'){ if($this->input->post('save') == 'Save'){ //echo "<pre>"; print_r($_POST); die; $id = $this->model->decryptdata($encrypted_id); $m_date = date("Y-m-d", strtotime($this->input->post('date'))); $check_date = date("Y-m-d", strtotime($this->input->post('check_date'))); $ins_main = array( 'm_date' => $m_date, 'voucher_no' => $this->input->post('voucher_no'), 'm_ledger_name' => $this->input->post('ledger_name_main'), 'trans_type' => $this->input->post('trans_type'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'ms_ledger' => $this->input->post('ms_ledger'), 'ms_ledger_two' => $this->input->post('ms_ledger_two'), 'check_no' => $this->input->post('check_no'), 'check_date' => $check_date, 'l_noti' => 'unseen', 'release_status' => 'released' ); $where = array("fid" => $id); $ins = $this->model->UpdateData('tbl_form', $ins_main, $where); redirect('webapp/office/form_grid'); }else{ $id = $this->model->decryptdata($encrypted_id); $data['form'] = $this->model->office_form_contra($id); //echo "<pre>"; print_r($data['form']); die; $stage = $data['form'][0]['stage']; $voucher_type = $data['form'][0]['voucher_type']; $data['voucher_type'] = $voucher_type; $path = $data['form'][0]['path']; $cid = $data['form'][0]['cid']; $data['stage'] = $stage; $data['path'] = $path; $data['customer_id'] = $cid; $data['ledger'] = $this->model->getDatamodel('tbl_ledger'); $data['items'] = $this->model->getDatamodel('tbl_item'); $where = array('voucher' => 'payment'); $data['group'] = $this->model->DetailData('tbl_grouped_voucher', $where); $this->load->view("webapp/office_user/edit_payment",$data); } } //end update payment form //start add journal form public function add_journal(){ //echo "<pre>"; print_r($_POST); die; $m_date = date("Y-m-d", strtotime($this->input->post('date'))); //$check_date = date("Y-m-d", strtotime($this->input->post('check_date'))); $d = date("d", strtotime($this->input->post('date'))); $m = date("m", strtotime($this->input->post('date'))); $ses = $this->session->get_userdata(); $oid = $ses['reg_info'][0]['rid']; /*$path = explode('/', $this->input->post('path')); $year = $path[2]; $m1 = explode('_',$path[3]); $month = $m1[1];*/ $year = $this->input->post('year'); $month = $this->input->post('month'); $ins_main = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'year' => $year, 'month' => $month, 'd' => $d, 'm' => $m, 'path' => $this->input->post('path'), 'm_date' => $m_date, 'voucher_no' => $this->input->post('voucher_no'), 'm_effect' => $this->input->post('m_effect'), 'ms_effect' => $this->input->post('ms_effect'), 'm_ledger_name' => $this->input->post('ledger_name_main'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'ms_ledger' => $this->input->post('ms_ledger'), 'ms_ledger_two' => $this->input->post('ms_ledger_two'), 'release_status' => 'released', 'approve_status' => 'panding', 'l_noti' => 'unseen' ); $ins = $this->model->insertData('tbl_form', $ins_main); $exp_path = explode('|-|', $this->input->post('path')); $epc = count($exp_path); for ($i=0; $i < $epc; $i++) { /*$ins_form_status = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'year' => $year, 'month' => $month, 'path' => $exp_path[$i] ); */ //$this->model->insertData('tbl_form_status', $ins_form_status); $ins_form_status = array( 'filled_status' => 'done' ); $if_where = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'path' => $exp_path[$i] ); $this->model->UpdateData('tbl_form_status', $ins_form_status, $if_where); } redirect('webapp/office/form_grid'); } //end add journal form //start update journal form public function update_journal($encrypted_id, $noti='NULL'){ if($this->input->post('save') == 'Save'){ //echo "<pre>"; print_r($_POST); die; $id = $this->model->decryptdata($encrypted_id); $m_date = date("Y-m-d", strtotime($this->input->post('date'))); $ins_main = array( 'm_date' => $m_date, 'voucher_no' => $this->input->post('voucher_no'), 'm_effect' => $this->input->post('m_effect'), 'ms_effect' => $this->input->post('ms_effect'), 'm_ledger_name' => $this->input->post('ledger_name_main'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'ms_ledger' => $this->input->post('ms_ledger'), 'ms_ledger_two' => $this->input->post('ms_ledger_two'), 'l_noti' => 'unseen', 'release_status' => 'released' ); $where = array("fid" => $id); $ins = $this->model->UpdateData('tbl_form', $ins_main, $where); redirect('webapp/office/form_grid'); }else{ $id = $this->model->decryptdata($encrypted_id); $data['form'] = $this->model->office_form_contra($id); //echo "<pre>"; print_r($data['form']); die; $stage = $data['form'][0]['stage']; $path = $data['form'][0]['path']; $cid = $data['form'][0]['cid']; $data['stage'] = $stage; $data['path'] = $path; $data['customer_id'] = $cid; //$data['tax'] = $this->model->getDatamodel('tbl_tax'); $data['ledger'] = $this->model->getDatamodel('tbl_ledger'); $data['items'] = $this->model->getDatamodel('tbl_item'); $this->load->view("webapp/office_user/edit_journal",$data); } } //end update journal form //start add credit note form public function add_credit(){ //echo "<pre>"; print_r($_POST); die; $m_date = date("Y-m-d", strtotime($this->input->post('date'))); $check_date = date("Y-m-d", strtotime($this->input->post('check_date'))); $d = date("d", strtotime($this->input->post('date'))); $m = date("m", strtotime($this->input->post('date'))); $ses = $this->session->get_userdata(); $oid = $ses['reg_info'][0]['rid']; /*$path = explode('/', $this->input->post('path')); $year = $path[2]; $m1 = explode('_',$path[3]); $month = $m1[1];*/ $year = $this->input->post('year'); $month = $this->input->post('month'); $ins_main = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'year' => $year, 'month' => $month, 'd' => $d, 'm' => $m, 'path' => $this->input->post('path'), 'm_date' => $m_date, 'voucher_no' => $this->input->post('voucher_no'), 'm_ledger_name' => $this->input->post('ledger_name_main'), 'trans_type' => $this->input->post('trans_type'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'ms_ledger' => $this->input->post('ms_ledger'), 'check_no' => $this->input->post('check_no'), 'check_date' => $check_date, 'release_status' => 'released', 'approve_status' => 'panding', 'l_noti' => 'unseen' ); $ins = $this->model->insertData('tbl_form', $ins_main); $count = count($this->input->post('s_ledger_name')); $amt_taxable = $this->input->post('amt_taxable'); $s_ledger_name = $this->input->post('s_ledger_name'); for ($i=0; $i < $count; $i++) { $ins_sub = array( 'fid' => $ins, 's_ledger_name' => $s_ledger_name[$i], 'amt_taxable' => $amt_taxable[$i] ); $this->model->insertData('tbl_form_info', $ins_sub); } $exp_path = explode('|-|', $this->input->post('path')); $epc = count($exp_path); for ($i=0; $i < $epc; $i++) { /* $ins_form_status = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'year' => $year, 'month' => $month, 'path' => $exp_path[$i] ); */ //$this->model->insertData('tbl_form_status', $ins_form_status); $ins_form_status = array( 'filled_status' => 'done' ); $if_where = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'path' => $exp_path[$i] ); $this->model->UpdateData('tbl_form_status', $ins_form_status, $if_where); } redirect('webapp/office/form_grid'); } //end add credit note form //start update credit note form public function update_credit($encrypted_id, $noti='NULL'){ if($this->input->post('save') == 'Save'){ //echo "<pre>"; print_r($_POST); die; $id = $this->model->decryptdata($encrypted_id); $m_date = date("Y-m-d", strtotime($this->input->post('date'))); $check_date = date("Y-m-d", strtotime($this->input->post('check_date'))); $ins_main = array( 'm_date' => $m_date, 'voucher_no' => $this->input->post('voucher_no'), 'm_ledger_name' => $this->input->post('ledger_name_main'), 'trans_type' => $this->input->post('trans_type'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'ms_ledger' => $this->input->post('ms_ledger'), 'check_no' => $this->input->post('check_no'), 'check_date' => $check_date, 'l_noti' => 'unseen', 'release_status' => 'released' ); $where = array("fid" => $id); $ins = $this->model->UpdateData('tbl_form', $ins_main, $where); //Update in sub table $count1 = count($this->input->post('fi_id')); $fi_id = $this->input->post('fi_id'); $s_ledger_name_upd = $this->input->post('s_ledger_name_upd'); $amt_taxable_upd = $this->input->post('amt_taxable_upd'); //echo "<pre>"; print_r($fi_id); die; for ($i=0; $i < $count1; $i++) { if(empty($edit_sgst[$i])){ $edit_sgst[$i] = '0.00'; } if(empty($edit_cgst[$i])){ $edit_cgst[$i] = '0.00'; } if(empty($edit_ugst[$i])){ $edit_ugst[$i] = '0.00'; } if(empty($edit_igst[$i])){ $edit_igst[$i] = '0.00'; } if(empty($edit_discount_one[$i])){ $edit_discount_one[$i] = '0.00'; } if(empty($edit_discount_two[$i])){ $edit_discount_two[$i] = '0.00'; } $upd_sub = array( 's_ledger_name' => $s_ledger_name_upd[$i], 'amt_taxable' => $amt_taxable_upd[$i], ); $where_sub_one = array('fi_id' => $fi_id[$i]); $this->model->UpdateData('tbl_form_info', $upd_sub, $where_sub_one); } //insert in sub table $count_two = count($this->input->post('s_ledger_name')); $s_ledger_name = $this->input->post('s_ledger_name'); $amt_taxable = $this->input->post('amt_taxable'); for ($k=0; $k < $count_two; $k++) { if(empty($sgst[$k])){ $sgst[$k] = '0.00'; } if(empty($cgst[$k])){ $cgst[$k] = '0.00'; } if(empty($ugst[$k])){ $ugst[$k] = '0.00'; } if(empty($kgst[$k])){ $kgst[$k] = '0.00'; } if(empty($discount_one[$k])){ $discount_one[$k] = '0.00'; } if(empty($discount_two[$k])){ $discount_two[$k] = '0.00'; } $ins_sub = array( 'fid' => $id, 's_ledger_name' => $s_ledger_name[$k], 'amt_taxable' => $amt_taxable[$k], ); $this->model->insertData('tbl_form_info', $ins_sub); } redirect('webapp/office/form_grid'); }else{ $id = $this->model->decryptdata($encrypted_id); $data['form'] = $this->model->office_form_data($id); //echo "<pre>"; print_r($data['form']); die; $stage = $data['form'][0]['stage']; $path = $data['form'][0]['path']; $cid = $data['form'][0]['cid']; $data['stage'] = $stage; $data['path'] = $path; $data['customer_id'] = $cid; $data['ledger'] = $this->model->getDatamodel('tbl_ledger'); $data['items'] = $this->model->getDatamodel('tbl_item'); $this->load->view("webapp/office_user/edit_credit",$data); } } //end update credit note form //start add debit note form public function add_debit(){ //echo "<pre>"; print_r($_POST); die; $m_date = date("Y-m-d", strtotime($this->input->post('date'))); $check_date = date("Y-m-d", strtotime($this->input->post('check_date'))); $d = date("d", strtotime($this->input->post('date'))); $m = date("m", strtotime($this->input->post('date'))); $ses = $this->session->get_userdata(); $oid = $ses['reg_info'][0]['rid']; /*$path = explode('/', $this->input->post('path')); $year = $path[2]; $m1 = explode('_',$path[3]); $month = $m1[1];*/ $year = $this->input->post('year'); $month = $this->input->post('month'); $ins_main = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'year' => $year, 'month' => $month, 'd' => $d, 'm' => $m, 'path' => $this->input->post('path'), 'm_date' => $m_date, 'voucher_no' => $this->input->post('voucher_no'), 'm_ledger_name' => $this->input->post('ledger_name_main'), 'trans_type' => $this->input->post('trans_type'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'ms_ledger' => $this->input->post('ms_ledger'), 'check_no' => $this->input->post('check_no'), 'check_date' => $check_date, 'release_status' => 'released', 'approve_status' => 'panding', 'l_noti' => 'unseen' ); $ins = $this->model->insertData('tbl_form', $ins_main); $count = count($this->input->post('s_ledger_name')); $amt_taxable = $this->input->post('amt_taxable'); $s_ledger_name = $this->input->post('s_ledger_name'); for ($i=0; $i < $count; $i++) { $ins_sub = array( 'fid' => $ins, 's_ledger_name' => $s_ledger_name[$i], 'amt_taxable' => $amt_taxable[$i] ); $this->model->insertData('tbl_form_info', $ins_sub); } $exp_path = explode('|-|', $this->input->post('path')); $epc = count($exp_path); for ($i=0; $i < $epc; $i++) { /*$ins_form_status = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'year' => $year, 'month' => $month, 'path' => $exp_path[$i] ); */ //$this->model->insertData('tbl_form_status', $ins_form_status); $ins_form_status = array( 'filled_status' => 'done' ); $if_where = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'path' => $exp_path[$i] ); $this->model->UpdateData('tbl_form_status', $ins_form_status, $if_where); } redirect('webapp/office/form_grid'); } //end add debit note form //start update debit note form public function update_debit($encrypted_id, $noti='NULL'){ if($this->input->post('save') == 'Save'){ //echo "<pre>"; print_r($_POST); die; $id = $this->model->decryptdata($encrypted_id); $m_date = date("Y-m-d", strtotime($this->input->post('date'))); $check_date = date("Y-m-d", strtotime($this->input->post('check_date'))); $ins_main = array( 'm_date' => $m_date, 'voucher_no' => $this->input->post('voucher_no'), 'm_ledger_name' => $this->input->post('ledger_name_main'), 'trans_type' => $this->input->post('trans_type'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'ms_ledger' => $this->input->post('ms_ledger'), 'check_no' => $this->input->post('check_no'), 'check_date' => $check_date, 'l_noti' => 'unseen', 'release_status' => 'released' ); $where = array("fid" => $id); $ins = $this->model->UpdateData('tbl_form', $ins_main, $where); //Update in sub table $count1 = count($this->input->post('fi_id')); $fi_id = $this->input->post('fi_id'); $s_ledger_name_upd = $this->input->post('s_ledger_name_upd'); $amt_taxable_upd = $this->input->post('amt_taxable_upd'); //echo "<pre>"; print_r($amt_taxable_upd); die; for ($i=0; $i < $count1; $i++) { if(empty($edit_sgst[$i])){ $edit_sgst[$i] = '0.00'; } if(empty($edit_cgst[$i])){ $edit_cgst[$i] = '0.00'; } if(empty($edit_ugst[$i])){ $edit_ugst[$i] = '0.00'; } if(empty($edit_igst[$i])){ $edit_igst[$i] = '0.00'; } if(empty($edit_discount_one[$i])){ $edit_discount_one[$i] = '0.00'; } if(empty($edit_discount_two[$i])){ $edit_discount_two[$i] = '0.00'; } $upd_sub = array( 's_ledger_name' => $s_ledger_name_upd[$i], 'amt_taxable' => $amt_taxable_upd[$i], ); $where_sub_one = array('fi_id' => $fi_id[$i]); $this->model->UpdateData('tbl_form_info', $upd_sub, $where_sub_one); } //insert in sub table $count_two = count($this->input->post('s_ledger_name')); $s_ledger_name = $this->input->post('s_ledger_name'); $amt_taxable = $this->input->post('amt_taxable'); for ($k=0; $k < $count_two; $k++) { if(empty($sgst[$k])){ $sgst[$k] = '0.00'; } if(empty($cgst[$k])){ $cgst[$k] = '0.00'; } if(empty($ugst[$k])){ $ugst[$k] = '0.00'; } if(empty($kgst[$k])){ $kgst[$k] = '0.00'; } if(empty($discount_one[$k])){ $discount_one[$k] = '0.00'; } if(empty($discount_two[$k])){ $discount_two[$k] = '0.00'; } $ins_sub = array( 'fid' => $id, 's_ledger_name' => $s_ledger_name[$k], 'amt_taxable' => $amt_taxable[$k], ); $this->model->insertData('tbl_form_info', $ins_sub); } redirect('webapp/office/form_grid'); }else{ $id = $this->model->decryptdata($encrypted_id); $data['form'] = $this->model->office_form_data($id); //echo "<pre>"; print_r($data['form']); die; $stage = $data['form'][0]['stage']; $path = $data['form'][0]['path']; $cid = $data['form'][0]['cid']; $data['stage'] = $stage; $data['path'] = $path; $data['customer_id'] = $cid; $data['ledger'] = $this->model->getDatamodel('tbl_ledger'); $data['items'] = $this->model->getDatamodel('tbl_item'); $this->load->view("webapp/office_user/edit_debit",$data); } } //end update debit note form public function form_grid($offset=0){ $ses = $this->session->get_userdata(); $data['status'] = 'all'; if($ses['reg_info'][0]['type'] == 'office_user'){ $oid = $ses['reg_info'][0]['rid']; $where = array('oid' => $oid); $cnt=count($this->model->DetailData('tbl_form', $where)); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/office/form_grid'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); //$this->db->order_by("cid", "desc"); $data['form'] = $this->model->getFormModel2($oid, $config['per_page'], $offset); //$data['form'] = $this->model->getFormModel2($oid); }else{ $cnt=count($this->model->getDatamodel('tbl_form')); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/office/form_grid'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); //$this->db->order_by("cid", "desc"); $data['form'] = $this->model->getFormModel($config['per_page'], $offset); //$data['form'] = $this->model->getFormModel(); //echo "<pre>"; print_r($data['form']); die; } //echo "<pre>"; print_r($data['form']); die; $this->load->view("webapp/office_user/form",$data); } public function form_grid_aprv($offset=0){ $data['status'] = 'approved'; $ses = $this->session->get_userdata(); if($ses['reg_info'][0]['type'] == 'office_user'){ $oid = $ses['reg_info'][0]['rid']; $where = array('oid' => $oid, 'approve_status' => 'approved'); $cnt=count($this->model->DetailData('tbl_form', $where)); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/office/form_grid_aprv'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); //$this->db->order_by("cid", "desc"); $sts = 'approved'; $data['form'] = $this->model->getFormModel2($oid, $config['per_page'], $offset, $sts); //$data['form'] = $this->model->getFormModel2($oid); }else{ $where = array('approve_status' => 'approved'); $cnt=count($this->model->DetailData('tbl_form', $where)); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/office/form_grid_aprv'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); //$this->db->order_by("cid", "desc"); $sts = 'approved'; $data['form'] = $this->model->getFormModel($config['per_page'], $offset, $sts); //$data['form'] = $this->model->getFormModel(); //echo "<pre>"; print_r($data['form']); die; } //echo "<pre>"; print_r($data['form']); die; $this->load->view("webapp/office_user/form",$data); } public function form_grid_panding($offset=0){ $data['status'] = 'panding'; $ses = $this->session->get_userdata(); if($ses['reg_info'][0]['type'] == 'office_user'){ $oid = $ses['reg_info'][0]['rid']; $where = array('oid' => $oid, 'approve_status' => 'panding', 'release_status !=' => 'error'); $cnt=count($this->model->DetailData('tbl_form', $where)); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/office/form_grid_panding'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); //$this->db->order_by("cid", "desc"); $sts = 'panding'; $data['form'] = $this->model->getFormModel2($oid, $config['per_page'], $offset, $sts); //$data['form'] = $this->model->getFormModel2($oid); }else{ $where = array('approve_status' => 'panding', 'release_status' => 'released'); $cnt=count($this->model->DetailData('tbl_form', $where)); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/office/form_grid_panding'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); //$this->db->order_by("cid", "desc"); $sts = 'panding'; $data['form'] = $this->model->getFormModel($config['per_page'], $offset, $sts); //$data['form'] = $this->model->getFormModel(); //echo "<pre>"; print_r($data['form']); die; } //echo "<pre>"; print_r($data['form']); die; $this->load->view("webapp/office_user/form",$data); } public function form_grid_rejected($offset=0){ $data['status'] = 'rejected'; $ses = $this->session->get_userdata(); if($ses['reg_info'][0]['type'] == 'office_user'){ $oid = $ses['reg_info'][0]['rid']; $where = array('oid' => $oid, 'release_status' => 'error'); $cnt=count($this->model->DetailData('tbl_form', $where)); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/office/form_grid_panding'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); //$this->db->order_by("cid", "desc"); $sts = 'error'; $data['form'] = $this->model->getFormModelRej2($oid, $config['per_page'], $offset, $sts); //$data['form'] = $this->model->getFormModel2($oid); }else{ $where = array('release_status' => 'error'); $cnt=count($this->model->DetailData('tbl_form', $where)); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/office/form_grid_panding'; $config['total_rows'] = $cnt; $config['per_page'] = 20; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); //$this->db->order_by("cid", "desc"); $sts = 'error'; $data['form'] = $this->model->getFormModelRej($config['per_page'], $offset, $sts); //$data['form'] = $this->model->getFormModel(); //echo "<pre>"; print_r($data['form']); die; } //echo "<pre>"; print_r($data['form']); die; $this->load->view("webapp/office_user/form",$data); } public function form_grid_date(){ $fdate = $this->input->post('from_date'); $tdate = $this->input->post('to_date'); $ses = $this->session->get_userdata(); if($ses['reg_info'][0]['type'] == 'office_user'){ $oid = $ses['reg_info'][0]['rid']; $where = array('oid' => $oid); $data['form'] = $this->model->getFormModelDate2($oid, $fdate, $tdate); $data['nopage'] = 'no'; $data['fdate'] = $fdate; $data['tdate'] = $tdate; //echo "<pre>"; print_r($data['form']); die; }else{ $data['form'] = $this->model->getFormModelDate($fdate, $tdate); $data['nopage'] = 'no'; $data['fdate'] = $fdate; $data['tdate'] = $tdate; //echo "<pre>"; print_r($data['form']); die; } //echo "<pre>"; print_r($data['form']); die; $this->load->view("webapp/office_user/form",$data); } public function form_grid_custom(){ $src = $this->input->post('voucher_srch'); $ses = $this->session->get_userdata(); if($ses['reg_info'][0]['type'] == 'office_user'){ $oid = $ses['reg_info'][0]['rid']; $where = array('oid' => $oid); $data['form'] = $this->model->getFormModelCustom2($oid, $src); $data['nopage'] = 'no'; $data['src'] = $src; //echo "<pre>"; print_r($data['form']); die; }else{ $data['form'] = $this->model->getFormModelCustom($src); $data['nopage'] = 'no'; $data['src'] = $src; //echo "<pre>"; print_r($data['form']); die; } //echo "<pre>"; print_r($data['form']); die; $this->load->view("webapp/office_user/form",$data); } public function grid_type($type, $offset=0){ /*if($type != 'all'){ $where = array('approve_status' => $type); $data = $this->model->DetailData('tbl_form', $where); }else{ $data = $this->model->getDataModel('tbl_form'); }*/ $ses = $this->session->get_userdata(); if($ses['reg_info'][0]['type'] == 'office_user'){ $oid = $ses['reg_info'][0]['rid']; $where = array('oid' => $oid, 'approve_status' => $type); $cnt=count($this->model->DetailData('tbl_form', $where)); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/office/form_grid'; $config['total_rows'] = $cnt; $config['per_page'] = 50; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); //$this->db->order_by("cid", "desc"); $data['form'] = $this->model->getAjaxFormModel2($oid, $config['per_page'], $offset, $type); //$data['form'] = $this->model->getFormModel2($oid); }else{ $where = array('approve_status' => $type); $cnt=count($this->model->DetailData('tbl_form', $where)); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/office/form_grid'; $config['total_rows'] = $cnt; $config['per_page'] = 50; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); //$this->db->order_by("cid", "desc"); $data['form'] = $this->model->getAjaxFormModel($config['per_page'], $offset, $type); //$data['form'] = $this->model->getFormModel(); } //echo "<pre>"; print_r($data['form']); die; } public function form_grid_json($offset=0){ $ses = $this->session->get_userdata(); if($ses['reg_info'][0]['type'] == 'office_user'){ $oid = $ses['reg_info'][0]['rid']; $where = array('oid' => $oid); $cnt=count($this->model->DetailData('tbl_form', $where)); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/office/form_grid'; $config['total_rows'] = $cnt; $config['per_page'] = 50; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); //$this->db->order_by("cid", "desc"); $data['form'] = $this->model->getFormModel2($oid, $config['per_page'], $offset); //$data['form'] = $this->model->getFormModel2($oid); }else{ $cnt=count($this->model->getDatamodel('tbl_form')); $this->load->library('pagination'); $config['base_url'] = base_url().'webapp/office/form_grid'; $config['total_rows'] = $cnt; $config['per_page'] = 50; $config['full_tag_open'] = '<div class="pagination"><ul class="list-inline">'; $config['full_tag_close'] = '</ul></div>'; $config['first_link'] = '« First'; $config['first_tag_open'] = '<li class="prev page">'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last »'; $config['last_tag_open'] = '<li class="next page">'; $config['last_tag_close'] = '</li>'; $config['next_link'] = 'Next →'; $config['next_tag_open'] = '<li class="next page">'; $config['next_tag_close'] = '</li>'; $config['prev_link'] = '← Previous'; $config['prev_tag_open'] = '<li class="prev page">'; $config['prev_tag_close'] = '</li>'; $config['cur_tag_open'] = '<li class="active"><a href="">'; $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li class="page">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); //$this->db->order_by("cid", "desc"); $data['form'] = $this->model->getFormModel($config['per_page'], $offset); //$data['form'] = $this->model->getFormModel(); //echo "<pre>"; print_r($data['form']); die; } //echo "<pre>"; print_r($data['form']); die; $data_form = $data['form']; $html = ''; foreach ($data_form as $val) { $encrypted_id = $this->model->encryptdata($val['fid']); $date = date("d-m-Y", strtotime($val['m_date'])); $as = $val['approve_status']; if($as == 'panding'){ $as2 = '<span class="label label-danger text-capitalize">'.$as.'</span>'; }else{ $as2 = '<span class="label label-success text-capitalize">'.$as.'</span>'; } $cust = $val['cname']."<br><strong class='text-danger'>".$val['stage']."</strong>"; $stage = $val['stage']; if($stage == 'contra'){ $url = base_url().'webapp/office/update_contra/'.$encrypted_id; }elseif($stage == 'receipt'){ $url = base_url().'webapp/office/update_receipt/'.$encrypted_id; }elseif($stage == 'payment'){ $url = base_url().'webapp/office/update_payment/'.$encrypted_id; }elseif($stage == 'journal'){ $url = base_url().'webapp/office/update_journal/'.$encrypted_id; }elseif($stage == 'credit'){ $url = base_url().'webapp/office/update_credit/'.$encrypted_id; }elseif($stage == 'debit'){ $url = base_url().'webapp/office/update_debit/'.$encrypted_id; }else{ $url = base_url().'webapp/office/update_form/'.$encrypted_id; } if($as != 'approved'){ $upd = '<a href='.$url.' class="btn btn-info" data-toggle="tooltip" data-placement="top" title="Update"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> </a>'; }else{ $upd=''; } if($ses['reg_info'][0]['type'] == 'admin' && $val['approve_status'] != 'approved'){ $del = '<a onclick="" href="'.base_url().'webapp/office/trash_form/'.$encrypted_id.'" class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="Delete"><i class="fa fa-trash" aria-hidden="true"></i></a>'; }else{ $del = ''; } if($as == 'approved'){ $xml = '<a data-toggle="tooltip" data-placement="top" title="Generate XML" class="btn btn-primary" href="'.base_url().'webapp/office/xml/'.$encrypted_id.'"> <i class="fa fa-file" aria-hidden="true"></i> </a>'; }else{ $xml = ''; } $html .= '<tr> <td> <input type="checkbox" name="ck" class="minimal-red" value="' . $val['fid'] . '"> </td> <td>'.$date.'<br><strong class="text-danger">Released By '.$val['name'].'</strong></td> <td>'.$as2.'</td> <td class="text-capitalize">'.$cust.'</td> <td>'.$val['voucher_no'].'</td> <td>'.$val['amt_gross'].'</td> <td>'.$upd." ".$del." ".$xml.'</td> </tr> '; } /*$resultArrauy['status'] = 'Success'; $resultArrauy['html'] = $html; $resultArrauy['pagination'] = $this->pagination->create_links(); echo json_encode($resultArrauy);*/ //echo $html; echo json_encode($html); // $this->load->view("webapp/office_user/form",$data); } public function viewForm($encrypted_id){ $id = $this->model->decryptdata($encrypted_id); $where = array('fid' => $id); $data['form'] = $this->model->DetailData('tbl_form', $where); $stage = $data['form'][0]['stage']; $voucher_type = $data['form'][0]['voucher_type']; //echo "<pre>"; print_r($data['form']); die; $noti = array('l_noti' => 'seen'); $this->model->UpdateData('tbl_form', $noti, $where); if($stage == 'contra'){ $data['frm'] = $this->model->office_form_contra($id); $this->load->view("webapp/office_user/view_form_contra",$data); }elseif($stage == 'receipt'){ $data['frm'] = $this->model->office_form_receipt($id); //echo "<pre>"; print_r($data['frm']); die; $this->load->view("webapp/office_user/view_form_receipt",$data); }elseif($stage == 'payment'){ $data['frm'] = $this->model->office_form_paymet($id); //echo "<pre>"; print_r($data['frm']); die; $this->load->view("webapp/office_user/view_form_payment",$data); }elseif($stage == 'journal'){ $data['frm'] = $this->model->office_form_journal($id); //echo "<pre>"; print_r($data['frm']); die; $this->load->view("webapp/office_user/view_form_journal",$data); }elseif($stage == 'credit'){ $data['frm'] = $this->model->of_cr($id); //echo "<pre>"; print_r($data['frm']); die; $this->load->view("webapp/office_user/view_form_credit",$data); }elseif($stage == 'debit'){ $data['frm'] = $this->model->of_cr($id); $this->load->view("webapp/office_user/view_form_debit",$data); }elseif($stage == 'cheque_reg'){ $data['voucher_type'] = $voucher_type; if($voucher_type == 'payment'){ $data['frm'] = $this->model->office_form_paymet($id); //echo "<pre>"; print_r($data['frm']); die; $this->load->view("webapp/office_user/view_form_payment",$data); }else{ $data['frm'] = $this->model->office_form_receipt($id); //echo "<pre>"; print_r($data['frm']); die; $this->load->view("webapp/office_user/view_form_receipt",$data); } }elseif($stage == 'bank'){ $data['voucher_type'] = $voucher_type; if($voucher_type == 'payment'){ $data['frm'] = $this->model->office_form_paymet($id); //echo "<pre>"; print_r($data['frm']); die; $this->load->view("webapp/office_user/view_form_payment",$data); }elseif($voucher_type == 'receipt'){ $data['frm'] = $this->model->office_form_receipt($id); //echo "<pre>"; print_r($data['frm']); die; $this->load->view("webapp/office_user/view_form_receipt",$data); }else{ $data['frm'] = $this->model->office_form_contra($id); $this->load->view("webapp/office_user/view_form_contra",$data); } }else{ $data['frm'] = $this->model->sales_form_data($id); $form2 = $this->model->salesModel($id); $info_cnt = count($form2); $form3 = $this->model->salesExpenseModel($id); //echo "<pre>"; print_r($form3); $info_cnt2 = count($form3); $tot_g_sgst = 0; $tot_g_cgst = 0; $tot_g_ugst = 0; $tot_g_igst = 0; for ($g=0; $g < $info_cnt2; $g++) { //foreach ($form3 as $gst => $g) { $gamt = $form3[$g]['ex_amount']; $g_sgst = $form3[$g]['sgst']; $g_cgst = $form3[$g]['cgst']; $g_ugst = $form3[$g]['ugst']; $g_igst = $form3[$g]['igst']; if($g_sgst != '0.00'){ $g_sgst_payble = $gamt*$g_sgst/100; //echo "--payble sgst<br>"; $tot_g_sgst += $g_sgst_payble; } if($g_cgst != '0.00'){ $g_cgst_payble = $gamt*$g_cgst/100; //echo "--payble cgst<br>"; $tot_g_cgst += $g_cgst_payble; } if($g_ugst != '0.00'){ $g_ugst_payble = $gamt*$g_ugst/100; //echo "--payble ugst<br>"; $tot_g_ugst += $g_ugst_payble; } if($g_igst != '0.00'){ $g_igst_payble = $gamt*$g_igst/100; //echo "--payble cgst<br>"; $tot_g_igst += $g_igst_payble; } } $tot_g_sgst; $tot_g_cgst; $tot_g_ugst; $tot_g_igst; $tsgst = 0; $tcgst = 0; $tugst = 0; $tigst = 0; foreach ($form2 as $total => $tot) { $sgst = $tot['s_aot']; $cgst = $tot['c_aot']; $ugst = $tot['u_aot']; $igst = $tot['i_aot']; $tsgst+=$sgst; $tcgst+=$cgst; $tugst+=$ugst; $tigst+=$igst; } $tsgst; $tcgst; $tugst; $tigst; $data['tsgst'] = $tsgst+$tot_g_sgst; $data['tcgst'] = $tcgst+$tot_g_cgst; $data['tugst'] = $tugst+$tot_g_ugst; $data['tigst'] = $tigst+$tot_g_igst; //echo "<pre>"; print_r($data['frm']); die; $this->load->view("webapp/office_user/view_form",$data); } } public function removeInfo($fiid){ $where = array('fi_id' => $fiid); $this->model->DeleteData('tbl_form_info', $where); $this->model->DeleteData('tbl_other_expens', $where); } public function removeDebitInfo($fiid){ $where = array('fi_id' => $fiid); $this->model->DeleteData('tbl_form_info', $where); } public function removeExp($eid){ $where = array('eid' => $eid); $this->model->DeleteData('tbl_other_expens', $where); } public function uploadNoti($uid){ $where = array('uid' => $uid); $data = array('status' => 'seen'); $this->model->UpdateData('tbl_cust_uploads', $data, $where); } public function trash_form($fid){ $id = $this->model->decryptdata($fid); $where = array('fid' => $id); $this->model->DeleteData('tbl_form', $where); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> Form has been deleted. </div>'); redirect('webapp/office/form_grid'); } public function export(){ $this->load->dbutil(); $sql = "select * from tbl_access"; $query = $this->db2->query($sql); $config = array ( 'root' => 'root', 'element' => 'element', 'newline' => "\n", 'tab' => "\t" ); $xml = $this->dbutil->xml_from_result($query, $config); $this->load->helper('file'); $file_name = './documents/myfile.xml'; write_file($file_name, $xml); // Optionally redirect to the file you (hopefully) just created redirect($file_name); } public function xml($id){ $eight_randnum = rand(11111111,99999999); $fid = $this->model->decryptdata($id); $where = array('fid' => $fid); $form = $this->model->DetailData('tbl_form', $where); $stage = $form[0]['stage']; if($stage == 'sales'){ $this->xml_sales($fid, $eight_randnum); }elseif($stage == 'contra'){ $this->xml_contra($fid, $eight_randnum); }elseif($stage == 'receipt'){ $this->xml_receipt($fid, $eight_randnum); }elseif($stage == 'journal'){ $this->xml_journal($fid, $eight_randnum); }elseif($stage == 'payment'){ $this->xml_payment($fid, $eight_randnum); }elseif($stage == 'credit'){ $this->xml_credit($fid, $eight_randnum); }elseif($stage == 'debit'){ $this->xml_debit($fid, $eight_randnum); }elseif($stage == 'purchase'){ $this->xml_purchase($fid, $eight_randnum); }elseif($stage == 'cheque_reg'){ $voucher_type = $form[0]['voucher_type']; if($voucher_type == 'payment'){ $this->xml_payment($fid, $eight_randnum); }else{ $this->xml_receipt($fid, $eight_randnum); } }elseif($stage == 'bank'){ $voucher_type = $form[0]['voucher_type']; if($voucher_type == 'payment'){ $this->xml_payment($fid, $eight_randnum); }elseif($voucher_type == 'receipt'){ $this->xml_receipt($fid, $eight_randnum); }else{ $this->xml_contra($fid, $eight_randnum); } } } public function xml2($id){ $fid = $this->model->decryptdata($id); $where = array('fid' => $fid); $form = $this->model->DetailData('tbl_form', $where); $subform = $this->model->DetailData('tbl_form_info', $where); $xml = new SimpleXMLElement('<xml/>'); foreach ($form as $key => $value) { $track = $xml->addChild('form'); $track->addChild('STAGE', $value['stage']); $track->addChild('YEAR', $value['year']); $track->addChild('MONTH', $value['month']); $track->addChild('DATE', $value['m_date']); $track->addChild('VOUCHERNO', $value['voucher_no']); $track->addChild('REFNO', $value['ref_no']); $track->addChild('LEDGERNAME', $value['m_ledger_name']); $track->addChild('EFFECT', $value['m_effect']); $track->addChild('GROSSAMT', $value['amt_gross']); } foreach ($subform as $key2 => $value2) { $track = $xml->addChild('block'); $track->addChild('s_ledger_name', $value2['s_ledger_name']); $track->addChild('s_effect', $value2['s_effect']); $track->addChild('discount_one', $value2['discount_one']); $track->addChild('amt_taxable', $value2['amt_taxable']); $track->addChild('sgst', $value2['sgst']); $track->addChild('s_aot', $value2['s_aot']); $track->addChild('cgst', $value2['cgst']); $track->addChild('c_aot', $value2['c_aot']); $track->addChild('ugst', $value2['ugst']); $track->addChild('u_aot', $value2['u_aot']); $track->addChild('igst', $value2['igst']); $track->addChild('i_aot ', $value2['i_aot']); $track->addChild('cess_code', $value2['cess_code']); $track->addChild('discount_two', $value2['discount_two']); $track->addChild('item_name', $value2['item_name']); $track->addChild('qty', $value2['qty']); $track->addChild('rate', $value2['rate']); $track->addChild('unit', $value2['unit']); $track->addChild('lot_no', $value2['lot_no']); $track->addChild('lot_mfg_date', $value2['lot_mfg_date']); $track->addChild('lot_exp_date', $value2['lot_exp_date']); $track->addChild('test', ' '); } Header('Content-type: text/xml'); print($xml->asXML()); } public function xml3($id){ $fid = $this->model->decryptdata($id); $where = array('fid' => $fid); $form = $this->model->DetailData('tbl_form', $where); //echo "<pre>"; print_r($form); die; $path = $form[0]['path']; $p = substr($path, 0, strrpos( $path, '/')); $n = substr($path, strrpos($path, '/') + 1); $n = explode('.', $n); $n = $n[0]; $ins = array('xml' => '1'); $this->model->UpdateData('tbl_form', $ins, $where); $this->load->dbutil(); $sql = "SELECT tbl_form.fid as FORMID, cid as CATID, oid as OID, stage as STAGE, year as YEAR, month as MONTH, m_date as DATE, voucher_no as VOUCHERNO, ref_no as REFFERENCE, m_ledger_name as LEDGERNAME, m_effect as EFFECT, amt_gross as GROSSAMT, s_ledger_name as SUBLEDGER, s_effect as EFFECT, discount_one as DISCOUNT_ONE, amt_taxable as TAXABLEAMT, sgst AS SGST, s_aot as SGSTTAX, cgst as CGST, c_aot as CGSTTAX, ugst AS UGST, u_aot AS UGSTTAX, igst as IGST, i_aot as IGSTTAX, cess_code as CESS, discount_two as DISCOUNT_TWO, item_name as ITEAMNAME, qty as QUANTITY, rate as RATE, unit as UNIT, lot_no as LOTNO, lot_mfg_date as MFGDATE, lot_exp_date as EXPDATE FROM tbl_form LEFT JOIN tbl_form_info ON tbl_form_info.fid=tbl_form.fid WHERE tbl_form.fid=$fid"; $query = $this->db2->query($sql); $config = array ( 'root' => 'BODY', 'element' => 'IMPORTDATA', 'newline' => "\n", 'tab' => "\t" ); //echo "<pre>"; print_r($sql); die; $xml = $this->dbutil->xml_from_result($query, $config); $this->load->helper('file'); $file_name = './'.$p.'/'.$fid.'_'.$n.'.xml'; write_file($file_name, $xml); // Optionally redirect to the file you (hopefully) just created //redirect($file_name); $this->session->set_flashdata('msg', ' <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> <strong>Success!</strong> XML has been Generated. </div>'); redirect('webapp/office/form_grid'); } public function excel(){ $current=date("d-M-y"); $this->load->library('excel'); $this->excel->getActiveSheet()->setCellValue('Z1', 'AVAILABILITY'); $this->excel->setActiveSheetIndex(0); $this->excel->getActiveSheet()->setTitle('Export Information'); $this->excel->getActiveSheet()->setCellValue('A1', 'Date'); $this->excel->getActiveSheet()->setCellValue('B1', 'Voucher No.'); $this->excel->getActiveSheet()->setCellValue('C1', 'Day'); $this->excel->getActiveSheet()->setCellValue('D1', 'Month'); $this->excel->getActiveSheet()->setCellValue('E1', 'Reference No.'); $this->excel->getActiveSheet()->setCellValue('F1', 'Ledger Name'); $this->excel->getActiveSheet()->setCellValue('G1', 'Effect'); $this->excel->getActiveSheet()->setCellValue('H1', 'Amount'); $this->excel->getActiveSheet()->setCellValue('I1', 'Ledger Name'); $this->excel->getActiveSheet()->setCellValue('J1', 'Effect'); $this->excel->getActiveSheet()->setCellValue('K1', 'Amount'); $this->excel->getActiveSheet()->setCellValue('L1', 'Ledger Name'); $this->excel->getActiveSheet()->setCellValue('M1', 'Effect'); $this->excel->getActiveSheet()->setCellValue('N1', 'Amount'); $this->excel->getActiveSheet()->setCellValue('O1', 'Ledger Name'); $this->excel->getActiveSheet()->setCellValue('P1', 'Effect'); $this->excel->getActiveSheet()->setCellValue('Q1', 'Amount'); $this->excel->getActiveSheet()->setCellValue('R1', 'Ledger Name'); $this->excel->getActiveSheet()->setCellValue('S1', 'Effect'); $this->excel->getActiveSheet()->setCellValue('T1', 'Amount'); $this->excel->getActiveSheet()->setCellValue('U1', 'Ledger Name'); $this->excel->getActiveSheet()->setCellValue('V1', 'Effect'); $this->excel->getActiveSheet()->setCellValue('W1', 'Amount'); $this->excel->getActiveSheet()->setCellValue('X1', 'Ledger Name'); $this->excel->getActiveSheet()->setCellValue('Y1', 'Effect'); $this->excel->getActiveSheet()->setCellValue('Z1', 'Amount'); $data2['view2']=$this->model->getExcelData(); //echo "<pre>"; print_r($data2['view2']); die; $data = $data2['view2']; $this->excel->getActiveSheet()->fromArray($data, NULL, 'A2'); $this->excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('B1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('C1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('D1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('E1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('F1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('G1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('H1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('I1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('J1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('K1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('L1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('M1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('N1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('O1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('P1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('Q1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('R1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('S1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('T1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('U1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('V1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('W1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('X1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('Y1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('Z1')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); $filename=$current.'_Export_Information.xls'; /* $explod=explode("_",$filename); $file=$explod[0]; $file1=$explode[1]; */ header('Content-Type: application/vnd.ms-excel'); header('Content-Disposition: attachment;filename="'.$filename.'"'); header('Cache-Control: max-age=0'); $objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5'); $objWriter->save('php://output'); } //functions for XML public function xml_sales($fid, $eight_randnum){ //$where = array('fid' => $fid); //$form = $this->model->DetailData('tbl_form', $where); $form = $this->model->sm($fid); $note_two = $form[0]['note_two']; if($note_two == 'form_two'){ $this->xml_sales_two($fid, $eight_randnum); } $form2 = $this->model->salesModel($fid); $form3 = $this->model->salesExpenseModel($fid); $info_cnt = count($form2); $info_cnt2 = count($form3); //echo "<pre>"; print_r($form3); die; $tot_g_sgst = 0; $tot_g_cgst = 0; $tot_g_ugst = 0; $tot_g_igst = 0; for ($g=0; $g < $info_cnt2; $g++) { //foreach ($form3 as $gst => $g) { $gamt = $form3[$g]['ex_amount']; $g_sgst = $form3[$g]['sgst']; $g_cgst = $form3[$g]['cgst']; $g_ugst = $form3[$g]['ugst']; $g_igst = $form3[$g]['igst']; if($g_sgst != '0.00'){ $g_sgst_payble = $gamt*$g_sgst/100; //echo "--payble sgst<br>"; $tot_g_sgst += $g_sgst_payble; } if($g_cgst != '0.00'){ $g_cgst_payble = $gamt*$g_cgst/100; //echo "--payble cgst<br>"; $tot_g_cgst += $g_cgst_payble; } if($g_ugst != '0.00'){ $g_ugst_payble = $gamt*$g_ugst/100; //echo "--payble ugst<br>"; $tot_g_ugst += $g_ugst_payble; } if($g_igst != '0.00'){ $g_igst_payble = $gamt*$g_igst/100; //echo "--payble cgst<br>"; $tot_g_igst += $g_igst_payble; } } $tot_g_sgst; $tot_g_cgst; $tot_g_ugst; $tot_g_igst; $all_gst_tot = $tot_g_sgst+$tot_g_cgst+$tot_g_ugst+$tot_g_igst; // sum of same other expenses $result = array(); foreach($form3 as $k => $v) { $id = $v['ex_name']; $result[$id][] = $v['ex_amount']; } $other_expense = array(); foreach($result as $key => $value) { $where_exp = array('eid' => $key); $i_name = $this->model->DetailData('tbl_expense', $where_exp); $in = $i_name[0]['ename']; $other_expense[] = array('ex_name' => $key, 'ex_amount' => array_sum($value), 'iname' => $in); } //echo '<pre>'; print_r($other_expense); // sum of same other expenses $oecnt = count($other_expense); //die; $tsgst = 0; $tcgst = 0; $tugst = 0; $tigst = 0; foreach ($form2 as $total => $tot) { $sgst = $tot['s_aot']; $cgst = $tot['c_aot']; $ugst = $tot['u_aot']; $igst = $tot['i_aot']; $tsgst+=$sgst; $tcgst+=$cgst; $tugst+=$ugst; $tigst+=$igst; } /*echo $tsgst."s<br>"; echo $tcgst."c<br>"; echo $tugst."u<br>"; echo $tigst; die; */ $frm = $this->model->sales_form_data($fid); $amt_gross = $frm[0]['amt_gross']; $new_tot_expns = 0; $amt_tax = 0; foreach ($frm as $key => $tot) { $expns = $tot['expenses']; $amt_taxable = $tot['amt_taxable']; $tot_expns = 0; if($expns != ''){ foreach ($expns as $tt => $t) { $newtt = $t['ex_amount']; $tot_expns+=$newtt; } }else{ $tot_expns = 0; } $new_tot_expns+=$tot_expns; $amt_tax+=$amt_taxable; } $new_tot_expns; $amt_tax; $tot_tax = $tsgst+$tcgst+$tugst+$tigst; $totcredit = $new_tot_expns+$tot_tax+$amt_tax+$all_gst_tot; /*echo $amt_gross."<br>"; echo $totcredit; die; */ $diff_amt = round(abs($amt_gross - $totcredit),2); $stage = $form[0]['stage']; $date = $form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($form[0]['date_time'])); $basic_time = date("h:i", strtotime($form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form[0]['voucher_no']; $m_ledger_name = $form[0]['l_name']; $narration = $form[0]['narration']; $amt_gross = $form[0]['amt_gross']; if($amt_gross < $totcredit){ $amt_gross = $amt_gross + $diff_amt; }else{ $amt_gross = $amt_gross; } // Set the content type to be XML, so that the browser will recognise it as XML. header("content-type: application/xml; charset=ISO-8859-15"); // "Create" the document. $xml = new DOMDocument("1.0", "ISO-8859-15"); // Create some elements. $xml_ENVELOPE = $xml->createElement("ENVELOPE", ""); $xml_HEADER = $xml->createElement("HEADER", " "); $xml_HEADER_TALLYREQUEST = $xml->createElement("TALLYREQUEST", "Import Data"); $xml_BODY = $xml->createElement("BODY", " "); $xml_BODY_IMPORTDATA = $xml->createElement("IMPORTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDESC = $xml->createElement("REQUESTDESC", " "); $xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME = $xml->createElement("REPORTNAME", " Vouchers "); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES = $xml->createElement("STATICVARIABLES", " "); $xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY = $xml->createElement("SVCURRENTCOMPANY", " SANDIP COMPANY "); $xml_BODY_IMPORTDATA_REQUESTDATA = $xml->createElement("REQUESTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Invoice Voucher View"); $adrs_list = $xml->createElement("ADDRESS.LIST", " "); $adrs_list->setAttribute("TYPE", "String"); $adrs = $xml->createElement("ADDRESS", "Gujarat, India"); $basic_buy_list = $xml->createElement("BASICBUYERADDRESS.LIST", " "); $basic_buy_list->setAttribute("TYPE", "String"); $basic_buy_adrs = $xml->createElement("BASICBUYERADDRESS", "Gujarat, India"); $OLDAUDITENTRYIDS_list = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_list->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $DATE = $xml->createElement("DATE", "".$m_date.""); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); $PARTYNAME = $xml->createElement("PARTYNAME", "".$m_ledger_name.""); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $BASICBASEPARTYNAME = $xml->createElement("BASICBASEPARTYNAME", "".$m_ledger_name.""); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Invoice Voucher View"); $PLACEOFSUPPLY = $xml->createElement("PLACEOFSUPPLY", "Gujarat"); $BASICBUYERNAME = $xml->createElement("BASICBUYERNAME", "".$m_ledger_name.""); $BASICDATETIMEOFINVOICE = $xml->createElement("BASICDATETIMEOFINVOICE", "".$basic_date_time.""); $BASICDATETIMEOFREMOVAL = $xml->createElement("BASICDATETIMEOFREMOVAL", "".$basic_date_time.""); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $CONSIGNEESTATENAME = $xml->createElement("CONSIGNEESTATENAME", "Gujarat"); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $AUDITED = $xml->createElement("AUDITED", "No"); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $ISINVOICE = $xml->createElement("ISINVOICE", "Yes"); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "Yes"); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $ISVOID = $xml->createElement("ISVOID", "No"); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $ISDELETED = $xml->createElement("ISDELETED", "No"); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $ALTERID = $xml->createElement("ALTERID", "29"); $MASTERID = $xml->createElement("MASTERID", "14"); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066560"); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $VOUCHER->appendChild($adrs_list); $adrs_list->appendChild($adrs); $VOUCHER->appendChild($basic_buy_list); $basic_buy_list->appendChild($basic_buy_adrs); $VOUCHER->appendChild($OLDAUDITENTRYIDS_list); $OLDAUDITENTRYIDS_list->appendChild($OLDAUDITENTRYIDS); $VOUCHER->appendChild($DATE); $VOUCHER->appendChild($GUID); $VOUCHER->appendChild($STATENAME); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); $VOUCHER->appendChild($PARTYNAME); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHER->appendChild($VOUCHERNUMBER); $VOUCHER->appendChild($PARTYLEDGERNAME); $VOUCHER->appendChild($BASICBASEPARTYNAME); $VOUCHER->appendChild($CSTFORMISSUETYPE); $VOUCHER->appendChild($CSTFORMRECVTYPE); $VOUCHER->appendChild($FBTPAYMENTTYPE); $VOUCHER->appendChild($PERSISTEDVIEW); $VOUCHER->appendChild($PLACEOFSUPPLY); $VOUCHER->appendChild($BASICBUYERNAME); $VOUCHER->appendChild($BASICDATETIMEOFINVOICE); $VOUCHER->appendChild($BASICDATETIMEOFREMOVAL); $VOUCHER->appendChild($VCHGSTCLASS); $VOUCHER->appendChild($CONSIGNEESTATENAME); $VOUCHER->appendChild($DIFFACTUALQTY); $VOUCHER->appendChild($ISMSTFROMSYNC); $VOUCHER->appendChild($ASORIGINAL); $VOUCHER->appendChild($AUDITED); $VOUCHER->appendChild($FORJOBCOSTING); $VOUCHER->appendChild($ISOPTIONAL); $VOUCHER->appendChild($EFFECTIVEDATE); $VOUCHER->appendChild($USEFOREXCISE); $VOUCHER->appendChild($ISFORJOBWORKIN); $VOUCHER->appendChild($ALLOWCONSUMPTION); $VOUCHER->appendChild($USEFORINTEREST); $VOUCHER->appendChild($USEFORGAINLOSS); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $VOUCHER->appendChild($USEFORCOMPOUND); $VOUCHER->appendChild($USEFORSERVICETAX); $VOUCHER->appendChild($ISEXCISEVOUCHER); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $VOUCHER->appendChild($EXCISEOPENING); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $VOUCHER->appendChild($ISVATOVERRIDDEN); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $VOUCHER->appendChild($ISISDVOUCHER); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $VOUCHER->appendChild($GSTNOTEXPORTED); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $VOUCHER->appendChild($ISCANCELLED); $VOUCHER->appendChild($HASCASHFLOW); $VOUCHER->appendChild($ISPOSTDATED); $VOUCHER->appendChild($USETRACKINGNUMBER); $VOUCHER->appendChild($ISINVOICE); $VOUCHER->appendChild($MFGJOURNAL); $VOUCHER->appendChild($HASDISCOUNTS); $VOUCHER->appendChild($ASPAYSLIP); $VOUCHER->appendChild($ISCOSTCENTRE); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $VOUCHER->appendChild($ISBLANKCHEQUE); $VOUCHER->appendChild($ISVOID); $VOUCHER->appendChild($ISONHOLD); $VOUCHER->appendChild($ORDERLINESTATUS); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VOUCHER->appendChild($VATISPURCEXEMPTED); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $VOUCHER->appendChild($ISVATDUTYPAID); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $VOUCHER->appendChild($ISDELETED); $VOUCHER->appendChild($CHANGEVCHMODE); $VOUCHER->appendChild($ALTERID); $VOUCHER->appendChild($MASTERID); $VOUCHER->appendChild($VOUCHERKEY); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $VOUCHER->appendChild($AUDITENTRIES_LIST); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //star for debit ledger $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "Yes"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$amt_gross.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $bill_name = $xml->createElement("NAME", "".$voucher_no.""); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "-".$amt_gross.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for debit ledger //star for other expenses ledger for ($oe=0; $oe < $oecnt; $oe++) { $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$other_expense[$oe]['iname'].""); $GSTCLASS_oe = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$other_expense[$oe]['ex_amount'].""); $VATEXPAMOUNT_LE = $xml->createElement("VATEXPAMOUNT", "".$other_expense[$oe]['ex_amount'].""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_oe); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for other expenses ledger if($amt_gross > $totcredit){ // Start of Round of $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "Round Amount"); $GSTCLASS_oe = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$diff_amt.""); $VATEXPAMOUNT_LE = $xml->createElement("VATEXPAMOUNT", "".$diff_amt.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_oe); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); // End of Round of } //star for CGST ledger if($tcgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_Ca = $xml->createElement("ROUNDTYPE", ""); $GSTCLASS_c = $xml->createElement("GSTCLASS", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "CGST"); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$tcgst+$tot_g_cgst.""); $VATEXPAMOUNT_C = $xml->createElement("VATEXPAMOUNT", "".$tcgst+$tot_g_cgst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_Ca); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_c); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_C); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for CGST ledger //star for SGST ledger if($tsgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_S = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "SGST"); $GSTCLASS_s = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$tsgst+$tot_g_sgst.""); $AMOUNT_S = $xml->createElement("VATEXPAMOUNT", "".$tsgst+$tot_g_sgst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_S); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_s); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_S); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for SGST ledger //star for UGST ledger if($tugst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_U = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "UGST"); $GSTCLASS_u = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$tugst+$tot_g_ugst.""); $AMOUNT_U = $xml->createElement("VATEXPAMOUNT", "".$tugst+$tot_g_ugst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_U); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_u); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_U); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for UGST ledger //star for IGST ledger if($tigst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_I = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "IGST"); $GSTCLASS_i = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$tigst+$tot_g_igst.""); $AMOUNT_I = $xml->createElement("VATEXPAMOUNT", "".$tigst+$tot_g_igst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_I); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_i); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_I); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for IGST ledger for ($inv=0; $inv < $info_cnt; $inv++) { $item_name = $form2[$inv]['item']; $rate = $form2[$inv]['rate']; $discount = $form2[$inv]['discount_two']; $amount = $form2[$inv]['amt_taxable']; $qty = $form2[$inv]['qty']; $s_ledger_name = $form2[$inv]['l_name']; $ALLINVENTORYENTRIES_LIST = $xml->createElement("ALLINVENTORYENTRIES.LIST", " "); $STOCKITEMNAME = $xml->createElement("STOCKITEMNAME", "".$item_name.""); $ISDEEMEDPOSITIVE_LE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ISLASTDEEMEDPOSITIVE_LE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISAUTONEGATE = $xml->createElement("ISAUTONEGATE", "No"); $ISCUSTOMSCLEARANCE = $xml->createElement("ISCUSTOMSCLEARANCE", "No"); $ISTRACKCOMPONENT = $xml->createElement("ISTRACKCOMPONENT", "No"); $ISTRACKPRODUCTION = $xml->createElement("ISTRACKPRODUCTION", "No"); $ISPRIMARYITEM = $xml->createElement("ISPRIMARYITEM", "No"); $ISSCRAP = $xml->createElement("ISSCRAP", "No"); $RATE = $xml->createElement("RATE", "".$rate.""); $DISCOUNT = $xml->createElement("DISCOUNT", "".$discount.""); $AMOUNT = $xml->createElement("AMOUNT", "".$amount.""); $ACTUALQTY_AE = $xml->createElement("ACTUALQTY", "".$qty.""); $BILLEDQTY_AE = $xml->createElement("BILLEDQTY", "".$qty.""); $BATCHALLOCATIONS_LIST = $xml->createElement("BATCHALLOCATIONS.LIST", " "); $GODOWNNAME = $xml->createElement("GODOWNNAME", "Main Location"); $BATCHNAME = $xml->createElement("BATCHNAME", "Primary Batch"); $INDENTNO = $xml->createElement("INDENTNO", ""); $ORDERNO = $xml->createElement("ORDERNO", ""); $TRACKINGNUMBER = $xml->createElement("TRACKINGNUMBER", ""); $DYNAMICCSTISCLEARED = $xml->createElement("DYNAMICCSTISCLEARED", "No"); $AMOUNT_ba = $xml->createElement("AMOUNT", "".$amount.""); $ACTUALQTY = $xml->createElement("ACTUALQTY", "".$qty.""); $BILLEDQTY = $xml->createElement("BILLEDQTY", "".$qty.""); $ADDITIONALDETAILS_LIST = $xml->createElement("ADDITIONALDETAILS.LIST", " "); $VOUCHERCOMPONENTLIST_LIST = $xml->createElement("VOUCHERCOMPONENTLIST.LIST", " "); $ACCOUNTINGALLOCATIONS_LIST = $xml->createElement("ACCOUNTINGALLOCATIONS.LIST", " "); $OLDAUDITENTRYIDS_LIST_AIE = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_AIE->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_AIE = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME_AIE = $xml->createElement("LEDGERNAME", "".$s_ledger_name.""); $GSTCLASS_AIE = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE_AIE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM_AIE = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES_AIE = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER_AIE = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE_AIE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED_AIE = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED_AIE = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_AIE = $xml->createElement("AMOUNT", "".$amount.""); $SERVICETAXDETAILS_LIST_AIE = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_AIE = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST_AIE = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST_AIE = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AIE = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AIE = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AIE = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AIE = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_AIE1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST_AIE = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST_AL = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST_AIE = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST_AIE = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST_AIE = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST_AIE = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST_AIE1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST_AIE = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST_AIE = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST_AIE = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST_AIE1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST_AIE = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_AIE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST_AIE = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $DUTYHEADDETAILS_LIST_AIE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST_AIE = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST_AIE = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST_AIE = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $EXCISEALLOCATIONS_LIST_AIE = $xml->createElement("EXCISEALLOCATIONS.LIST", " "); $EXPENSEALLOCATIONS_LIST_AIE = $xml->createElement("EXPENSEALLOCATIONS.LIST", " "); $VOUCHER->appendChild($ALLINVENTORYENTRIES_LIST); $ALLINVENTORYENTRIES_LIST->appendChild($STOCKITEMNAME); $ALLINVENTORYENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE_LE); $ALLINVENTORYENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE_LE); $ALLINVENTORYENTRIES_LIST->appendChild($ISAUTONEGATE); $ALLINVENTORYENTRIES_LIST->appendChild($ISCUSTOMSCLEARANCE); $ALLINVENTORYENTRIES_LIST->appendChild($ISTRACKCOMPONENT); $ALLINVENTORYENTRIES_LIST->appendChild($ISTRACKPRODUCTION); $ALLINVENTORYENTRIES_LIST->appendChild($ISPRIMARYITEM); $ALLINVENTORYENTRIES_LIST->appendChild($ISSCRAP); $ALLINVENTORYENTRIES_LIST->appendChild($RATE); $ALLINVENTORYENTRIES_LIST->appendChild($DISCOUNT); $ALLINVENTORYENTRIES_LIST->appendChild($AMOUNT); $ALLINVENTORYENTRIES_LIST->appendChild($ACTUALQTY_AE); $ALLINVENTORYENTRIES_LIST->appendChild($BILLEDQTY_AE); $ALLINVENTORYENTRIES_LIST->appendChild($BATCHALLOCATIONS_LIST); $BATCHALLOCATIONS_LIST->appendChild($GODOWNNAME); $BATCHALLOCATIONS_LIST->appendChild($BATCHNAME); $BATCHALLOCATIONS_LIST->appendChild($INDENTNO); $BATCHALLOCATIONS_LIST->appendChild($ORDERNO); $BATCHALLOCATIONS_LIST->appendChild($TRACKINGNUMBER); $BATCHALLOCATIONS_LIST->appendChild($DYNAMICCSTISCLEARED); $BATCHALLOCATIONS_LIST->appendChild($AMOUNT_ba); $BATCHALLOCATIONS_LIST->appendChild($ACTUALQTY); $BATCHALLOCATIONS_LIST->appendChild($BILLEDQTY); $BATCHALLOCATIONS_LIST->appendChild($ADDITIONALDETAILS_LIST); $BATCHALLOCATIONS_LIST->appendChild($VOUCHERCOMPONENTLIST_LIST); $ALLINVENTORYENTRIES_LIST->appendChild($ACCOUNTINGALLOCATIONS_LIST); $ACCOUNTINGALLOCATIONS_LIST->appendChild($OLDAUDITENTRYIDS_LIST_AIE); $OLDAUDITENTRYIDS_LIST_AIE->appendChild($OLDAUDITENTRYIDS_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($LEDGERNAME_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($GSTCLASS_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISDEEMEDPOSITIVE_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($LEDGERFROMITEM_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($REMOVEZEROENTRIES_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISPARTYLEDGER_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISLASTDEEMEDPOSITIVE_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISCAPVATTAXALTERED_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISCAPVATNOTCLAIMED_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($AMOUNT_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($SERVICETAXDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($BANKALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($BILLALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INTERESTCOLLECTION_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($OLDAUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($AUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INPUTCRALLOCS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($DUTYHEADDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($RATEDETAILS_LIST_AL); $ACCOUNTINGALLOCATIONS_LIST->appendChild($SUMMARYALLOCS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($STPYMTDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TAXBILLALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($VATSTATUTORYDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($COSTTRACKALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($REFVOUCHERDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INVOICEWISEDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($VATITCDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ADVANCETAXDETAILS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($EXCISEALLOCATIONS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($EXPENSEALLOCATIONS_LIST_AIE); } $PAYROLLMODEOFPAYMENT_LIST_v = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $ATTDRECORDS_LIST_v = $xml->createElement("ATTDRECORDS.LIST", " "); $GSTEWAYCONSIGNORADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $GSTEWAYCONSIGNEEADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $TEMPGSTRATEDETAILS_LIST_v = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST_v); $VOUCHER->appendChild($ATTDRECORDS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST_v); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST_v); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY2 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO2 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO2->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME2 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE2 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_NAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPNAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPSTATE2); $COMPANY2->appendChild($REMOTECMPINFO2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY3 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO3 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO3->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME3 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME3 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE3 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_NAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPNAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPSTATE3); $COMPANY3->appendChild($REMOTECMPINFO3); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->appendChild($COMPANY3); $test = $xml->createElement("TALLYMESSAGE", " "); $test->setAttribute("xmlns:UDF", "TallyUDF"); //Set the attributes. /*$xml_HEADER->setAttribute("length", "0:01:15"); $xml_HEADER->setAttribute("bitrate", "64kb/s"); $xml_HEADER->setAttribute("channels", "2");*/ $xml_HEADER->appendChild($xml_HEADER_TALLYREQUEST); $xml_ENVELOPE->appendChild($xml_HEADER); $xml_ENVELOPE->appendChild($xml_BODY); $xml_BODY->appendChild($xml_BODY_IMPORTDATA); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3); //for ($i = 1; $i <2; $i++) { // $test = '$name_' . $i; // $test = $xml->createElement("TALLYMESSAGE", " "); // $test->setAttribute("xmlns:UDF", "TallyUDF"); // $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($test); //} $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA); $xml->appendChild($xml_ENVELOPE); // Parse the XML. print $xml->saveXML(); } public function xml_contra($fid, $eight_randnum){ //$where = array('fid' => $fid); $form = $this->model->xml_contra($fid); //echo "<pre>"; print_r($form); die; $stage = $form[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form[0]['voucher_type']; }else{ $stage = $stage; } $date = $form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form[0]['voucher_no']; $m_ledger_name = $form[0]['party_ledger']; $narration = $form[0]['narration']; $amt_gross = $form[0]['amt_gross']; $check_no = $form[0]['check_no']; $check_date = $form[0]['check_date']; $trans_type = $form[0]['trans_type']; $ms_ledger = $form[0]['sub_ledger']; header("content-type: application/xml; charset=ISO-8859-15"); // "Create" the document. $xml = new DOMDocument("1.0", "ISO-8859-15"); // Create some elements. $xml_ENVELOPE = $xml->createElement("ENVELOPE", ""); $xml_HEADER = $xml->createElement("HEADER", " "); $xml_HEADER_TALLYREQUEST = $xml->createElement("TALLYREQUEST", "Import Data"); $xml_BODY = $xml->createElement("BODY", " "); $xml_BODY_IMPORTDATA = $xml->createElement("IMPORTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDESC = $xml->createElement("REQUESTDESC", " "); $xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME = $xml->createElement("REPORTNAME", " Vouchers "); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES = $xml->createElement("STATICVARIABLES", " "); $xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY = $xml->createElement("SVCURRENTCOMPANY", " SANDIP COMPANY "); $xml_BODY_IMPORTDATA_REQUESTDATA = $xml->createElement("REQUESTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start //$s_ledger_name = $form_info[$i]['s_ledger_name']; for ($le=0; $le < 2; $le++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); //if($trans_type == 'fund_transfer'){ if($le == 0){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); } /* }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); }*/ $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); if($le == 0){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); } //start If bill allocation is available if($trans_type == 'withdrawal'){ //if trans type is withdrawal if($le == 0){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); } //if trans type is withdrawal }elseif($trans_type == 'diposit'){ //if trans type is diposit if($le == 0){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //if trans type is deposit } }else{ //For fund transfer $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); if($le == 0){ $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); }else{ $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); } $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //For fund transfer } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ } // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); for ($t=0; $t < 2; $t++) { # code... $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2); $COMPANY_1 = $xml->createElement("COMPANY", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY_1); $REMOTECMPINFO_1 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO_1->setAttribute("MERGE", "Yes"); $COMPANY_1->appendChild($REMOTECMPINFO_1); $NAME_TALLY_2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_1->appendChild($NAME_TALLY_2); $REMOTECMPNAME_1 = $xml->createElement("REMOTECMPNAME", "Sndp & Co"); $REMOTECMPINFO_1->appendChild($REMOTECMPNAME_1); $REMOTECMPSTATE_1 = $xml->createElement("REMOTECMPSTATE", "Gujarat"); $REMOTECMPINFO_1->appendChild($REMOTECMPSTATE_1); } /* $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3);*/ $xml_HEADER->appendChild($xml_HEADER_TALLYREQUEST); $xml_ENVELOPE->appendChild($xml_HEADER); $xml_ENVELOPE->appendChild($xml_BODY); $xml_BODY->appendChild($xml_BODY_IMPORTDATA); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA); $xml->appendChild($xml_ENVELOPE); // Parse the XML. print $xml->saveXML(); } public function xml_receipt($fid, $eight_randnum){ //$where = array('fid' => $fid); $form = $this->model->office_form_receipt($fid); /*$form_info = $this->model->DetailData('tbl_form_info', $where); $fi_count = count($form_info);*/ $stage = $form[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form[0]['voucher_type']; }else{ $b = $stage; } $date = $form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form[0]['voucher_no']; $m_ledger_name = $form[0]['party_ledger']; $ms_ledger = $form[0]['cr_ledger']; $ms_ledger_two = $form[0]['dr_ledger']; $narration = $form[0]['narration']; $amt_gross = $form[0]['amt_gross']; $trans_type = $form[0]['trans_type']; $check_no = $form[0]['check_no']; $check_date = $form[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); header("content-type: application/xml; charset=ISO-8859-15"); // "Create" the document. $xml = new DOMDocument("1.0", "ISO-8859-15"); // Create some elements. $xml_ENVELOPE = $xml->createElement("ENVELOPE", ""); $xml_HEADER = $xml->createElement("HEADER", " "); $xml_HEADER_TALLYREQUEST = $xml->createElement("TALLYREQUEST", "Import Data"); $xml_BODY = $xml->createElement("BODY", " "); $xml_BODY_IMPORTDATA = $xml->createElement("IMPORTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDESC = $xml->createElement("REQUESTDESC", " "); $xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME = $xml->createElement("REPORTNAME", " Vouchers "); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES = $xml->createElement("STATICVARIABLES", " "); $xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY = $xml->createElement("SVCURRENTCOMPANY", " SANDIP COMPANY "); $xml_BODY_IMPORTDATA_REQUESTDATA = $xml->createElement("REQUESTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($i=0; $i < 2; $i++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); if($i == '0'){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger_two.""); } $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); if($i == '0'){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$form[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$form[0]['amt_gross'].""); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$form[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$form[0]['amt_gross'].""); } $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank' && $i == '1'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); for ($t=0; $t < 2; $t++) { $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2); $COMPANY_1 = $xml->createElement("COMPANY", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY_1); $REMOTECMPINFO_1 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO_1->setAttribute("MERGE", "Yes"); $COMPANY_1->appendChild($REMOTECMPINFO_1); $NAME_TALLY_2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_1->appendChild($NAME_TALLY_2); $REMOTECMPNAME_1 = $xml->createElement("REMOTECMPNAME", "Sndp & Co"); $REMOTECMPINFO_1->appendChild($REMOTECMPNAME_1); $REMOTECMPSTATE_1 = $xml->createElement("REMOTECMPSTATE", "Gujarat"); $REMOTECMPINFO_1->appendChild($REMOTECMPSTATE_1); } /* $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3);*/ $xml_HEADER->appendChild($xml_HEADER_TALLYREQUEST); $xml_ENVELOPE->appendChild($xml_HEADER); $xml_ENVELOPE->appendChild($xml_BODY); $xml_BODY->appendChild($xml_BODY_IMPORTDATA); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA); $xml->appendChild($xml_ENVELOPE); // Parse the XML. print $xml->saveXML(); } public function xml_credit($fid, $eight_randnum){ $where = array('fid' => $fid); $form = $this->model->xml_credit_one($fid); //echo "<pre>"; print_r($form); die; $form_info = $this->model->xml_credit_two($fid); $fi_count = count($form_info); //echo "<pre>"; print_r($form_info); die; $stage = $form[0]['stage']; $date = $form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form[0]['voucher_no']; $m_ledger_name = $form[0]['l_name']; $ms_ledger = $form[0]['l_name_one']; //$debit_ledger = $form[0]['debit_ledger']; $narration = $form[0]['narration']; $amt_gross = $form[0]['amt_gross']; $trans_type = $form[0]['trans_type']; $check_no = $form[0]['check_no']; $check_date = $form[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); header("content-type: application/xml; charset=ISO-8859-15"); // "Create" the document. $xml = new DOMDocument("1.0", "ISO-8859-15"); // Create some elements. $xml_ENVELOPE = $xml->createElement("ENVELOPE", ""); $xml_HEADER = $xml->createElement("HEADER", " "); $xml_HEADER_TALLYREQUEST = $xml->createElement("TALLYREQUEST", "Import Data"); $xml_BODY = $xml->createElement("BODY", " "); $xml_BODY_IMPORTDATA = $xml->createElement("IMPORTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDESC = $xml->createElement("REQUESTDESC", " "); $xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME = $xml->createElement("REPORTNAME", " Vouchers "); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES = $xml->createElement("STATICVARIABLES", " "); $xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY = $xml->createElement("SVCURRENTCOMPANY", " SANDIP COMPANY "); $xml_BODY_IMPORTDATA_REQUESTDATA = $xml->createElement("REQUESTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "Credit Note"); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $BASICBUYERADDRESS_LIST = $xml->createElement("BASICBUYERADDRESS.LIST", " "); $BASICBUYERADDRESS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($BASICBUYERADDRESS_LIST); $BASICBUYERADDRESS = $xml->createElement("BASICBUYERADDRESS", "Gandhinagar"); $BASICBUYERADDRESS_LIST->appendChild($BASICBUYERADDRESS); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $REFERENCEDATE = $xml->createElement("REFERENCEDATE", "".$m_date.""); $VOUCHER->appendChild($REFERENCEDATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $VOUCHER->appendChild($STATENAME); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "Credit Note"); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $AMOUNT_1 = $xml->createElement("AMOUNT", "".$form[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$form[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end for ($j=0; $j < $fi_count; $j++){ //ALLLEDGERENTRIES.LIST block start $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$form_info[$j]['debit_ledger'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$form_info[$j]['amt_taxable'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$form_info[$j]['amt_taxable'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available /* $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); }*/ //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end }// for loop ends $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); for ($t=0; $t < 2; $t++) { $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2); $COMPANY_1 = $xml->createElement("COMPANY", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY_1); $REMOTECMPINFO_1 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO_1->setAttribute("MERGE", "Yes"); $COMPANY_1->appendChild($REMOTECMPINFO_1); $NAME_TALLY_2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_1->appendChild($NAME_TALLY_2); $REMOTECMPNAME_1 = $xml->createElement("REMOTECMPNAME", "Sndp & Co"); $REMOTECMPINFO_1->appendChild($REMOTECMPNAME_1); $REMOTECMPSTATE_1 = $xml->createElement("REMOTECMPSTATE", "Gujarat"); $REMOTECMPINFO_1->appendChild($REMOTECMPSTATE_1); } /* $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3);*/ $xml_HEADER->appendChild($xml_HEADER_TALLYREQUEST); $xml_ENVELOPE->appendChild($xml_HEADER); $xml_ENVELOPE->appendChild($xml_BODY); $xml_BODY->appendChild($xml_BODY_IMPORTDATA); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA); $xml->appendChild($xml_ENVELOPE); // Parse the XML. print $xml->saveXML(); } public function xml_debit($fid, $eight_randnum){ //$where = array('fid' => $fid); $form = $this->model->xml_debit_one($fid); $form_info = $this->model->xml_debit_two($fid); $fi_count = count($form_info); //echo "<pre>"; print_r($form_info); die; $stage = $form[0]['stage']; $date = $form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form[0]['voucher_no']; $m_ledger_name = $form[0]['l_name']; $ms_ledger = $form[0]['l_name_one']; $ms_ledger_two = $form[0]['ms_ledger_two']; $narration = $form[0]['narration']; $amt_gross = $form[0]['amt_gross']; $trans_type = $form[0]['trans_type']; $check_no = $form[0]['check_no']; $check_date = $form[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); header("content-type: application/xml; charset=ISO-8859-15"); // "Create" the document. $xml = new DOMDocument("1.0", "ISO-8859-15"); // Create some elements. $xml_ENVELOPE = $xml->createElement("ENVELOPE", ""); $xml_HEADER = $xml->createElement("HEADER", " "); $xml_HEADER_TALLYREQUEST = $xml->createElement("TALLYREQUEST", "Import Data"); $xml_BODY = $xml->createElement("BODY", " "); $xml_BODY_IMPORTDATA = $xml->createElement("IMPORTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDESC = $xml->createElement("REQUESTDESC", " "); $xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME = $xml->createElement("REPORTNAME", " Vouchers "); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES = $xml->createElement("STATICVARIABLES", " "); $xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY = $xml->createElement("SVCURRENTCOMPANY", " SANDIP COMPANY "); $xml_BODY_IMPORTDATA_REQUESTDATA = $xml->createElement("REQUESTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "Debit Note"); $VOUCHER->setAttribute("ACTION", "Debit"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $BASICBUYERADDRESS_LIST = $xml->createElement("BASICBUYERADDRESS.LIST", " "); $BASICBUYERADDRESS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($BASICBUYERADDRESS_LIST); $BASICBUYERADDRESS = $xml->createElement("BASICBUYERADDRESS", " "); $BASICBUYERADDRESS_LIST->appendChild($BASICBUYERADDRESS); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $REFERENCEDATE = $xml->createElement("REFERENCEDATE", "".$m_date.""); $VOUCHER->appendChild($REFERENCEDATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $STATENAME = $xml->createElement("STATENAME", " "); $VOUCHER->appendChild($STATENAME); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", " "); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "Debit Note"); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED_1 = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED_1); $ISCAPVATNOTCLAIMED_1 = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED_1); $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$form[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$form[0]['amt_gross'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end for ($j=0; $j < $fi_count; $j++){ //ALLLEDGERENTRIES.LIST block start $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$form_info[$j]['credit_ledger'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED_2 = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED_2); $ISCAPVATNOTCLAIMED_2 = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED_2); $AMOUNT_1 = $xml->createElement("AMOUNT", "".$form_info[$j]['amt_taxable'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$form_info[$j]['amt_taxable'].""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); if($trans_type == 'bank'){ $DATE_BA_1 = $xml->createElement("DATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$check_date2.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$ms_ledger.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); } //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end }// for loop ends $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); for ($t=0; $t < 2; $t++) { $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2); $COMPANY_1 = $xml->createElement("COMPANY", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY_1); $REMOTECMPINFO_1 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO_1->setAttribute("MERGE", "Yes"); $COMPANY_1->appendChild($REMOTECMPINFO_1); $NAME_TALLY_2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_1->appendChild($NAME_TALLY_2); $REMOTECMPNAME_1 = $xml->createElement("REMOTECMPNAME", "Sndp & Co"); $REMOTECMPINFO_1->appendChild($REMOTECMPNAME_1); $REMOTECMPSTATE_1 = $xml->createElement("REMOTECMPSTATE", "Gujarat"); $REMOTECMPINFO_1->appendChild($REMOTECMPSTATE_1); } /* $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3);*/ $xml_HEADER->appendChild($xml_HEADER_TALLYREQUEST); $xml_ENVELOPE->appendChild($xml_HEADER); $xml_ENVELOPE->appendChild($xml_BODY); $xml_BODY->appendChild($xml_BODY_IMPORTDATA); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA); $xml->appendChild($xml_ENVELOPE); // Parse the XML. print $xml->saveXML(); } public function xml_journal($fid, $eight_randnum){ //$where = array('fid' => $fid); $form = $this->model->xml_journal($fid); //echo "<pre>"; print_r($form); die; $stage = $form[0]['stage']; $date = $form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form[0]['voucher_no']; $m_ledger_name = $form[0]['l_name']; $ms_ledger = $form[0]['l_name_one']; $ms_ledger_two = $form[0]['l_name_two']; $narration = $form[0]['narration']; $amt_gross = $form[0]['amt_gross']; header("content-type: application/xml; charset=ISO-8859-15"); // "Create" the document. $xml = new DOMDocument("1.0", "ISO-8859-15"); // Create some elements. $xml_ENVELOPE = $xml->createElement("ENVELOPE", ""); $xml_HEADER = $xml->createElement("HEADER", " "); $xml_HEADER_TALLYREQUEST = $xml->createElement("TALLYREQUEST", "Import Data"); $xml_BODY = $xml->createElement("BODY", " "); $xml_BODY_IMPORTDATA = $xml->createElement("IMPORTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDESC = $xml->createElement("REQUESTDESC", " "); $xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME = $xml->createElement("REPORTNAME", " Vouchers "); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES = $xml->createElement("STATICVARIABLES", " "); $xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY = $xml->createElement("SVCURRENTCOMPANY", " SANDIP COMPANY "); $xml_BODY_IMPORTDATA_REQUESTDATA = $xml->createElement("REQUESTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($i=0; $i < 2; $i++) { if($i == 0){ $s_ledger_name = $ms_ledger; }else{ $s_ledger_name = $ms_ledger_two; } $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$s_ledger_name.""); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); if($i == 0){ $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); }else{ $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); } $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); if($i == 0){ $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); }else{ $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); } $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED); if($i == 0){ $m_effect = $form[0]['m_effect']; if($m_effect == 'cr'){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); } }else{ $ms_effect = $form[0]['ms_effect']; if($ms_effect == 'cr'){ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); } } $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); /* $DATE_BA_1 = $xml->createElement("DATE", "20180815"); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "20180815"); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "Sndp & Co"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "000340"); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "10000.00"); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1);*/ //end If bill allocation is available $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); for ($t=0; $t < 2; $t++) { $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2); $COMPANY_1 = $xml->createElement("COMPANY", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY_1); $REMOTECMPINFO_1 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO_1->setAttribute("MERGE", "Yes"); $COMPANY_1->appendChild($REMOTECMPINFO_1); $NAME_TALLY_2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_1->appendChild($NAME_TALLY_2); $REMOTECMPNAME_1 = $xml->createElement("REMOTECMPNAME", "Sndp & Co"); $REMOTECMPINFO_1->appendChild($REMOTECMPNAME_1); $REMOTECMPSTATE_1 = $xml->createElement("REMOTECMPSTATE", "Gujarat"); $REMOTECMPINFO_1->appendChild($REMOTECMPSTATE_1); } /* $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3);*/ $xml_HEADER->appendChild($xml_HEADER_TALLYREQUEST); $xml_ENVELOPE->appendChild($xml_HEADER); $xml_ENVELOPE->appendChild($xml_BODY); $xml_BODY->appendChild($xml_BODY_IMPORTDATA); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA); $xml->appendChild($xml_ENVELOPE); // Parse the XML. print $xml->saveXML(); } public function xml_payment($fid, $eight_randnum){ $where = array('fid' => $fid); //$form = $this->model->DetailData('tbl_form', $where); $form = $this->model->office_form_paymet($fid); $form_info = $this->model->DetailData('tbl_form_info', $where); $fi_count = count($form_info); $stage = $form[0]['stage']; if($stage == 'bank' || $stage == 'cheque_reg'){ $stage = $form[0]['voucher_type']; }else{ $stage = $stage; } $date = $form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form[0]['voucher_no']; $m_ledger_name = $form[0]['party_ledger']; $ms_ledger = $form[0]['debit_ledger']; $ms_ledger_two = $form[0]['credit_ledger']; $narration = $form[0]['narration']; $amt_gross = $form[0]['amt_gross']; $trans_type = $form[0]['trans_type']; $check_no = $form[0]['check_no']; $check_date = $form[0]['check_date']; $check_date2 = str_replace(["-", ""], '', $check_date); header("content-type: application/xml; charset=ISO-8859-15"); // "Create" the document. $xml = new DOMDocument("1.0", "ISO-8859-15"); // Create some elements. $xml_ENVELOPE = $xml->createElement("ENVELOPE", ""); $xml_HEADER = $xml->createElement("HEADER", " "); $xml_HEADER_TALLYREQUEST = $xml->createElement("TALLYREQUEST", "Import Data"); $xml_BODY = $xml->createElement("BODY", " "); $xml_BODY_IMPORTDATA = $xml->createElement("IMPORTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDESC = $xml->createElement("REQUESTDESC", " "); $xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME = $xml->createElement("REPORTNAME", " Vouchers "); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES = $xml->createElement("STATICVARIABLES", " "); $xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY = $xml->createElement("SVCURRENTCOMPANY", " Star One Web "); $xml_BODY_IMPORTDATA_REQUESTDATA = $xml->createElement("REQUESTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-0000aa05:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $VOUCHER->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS); $DATE = $xml->createElement("DATE", "".$m_date.""); $VOUCHER->appendChild($DATE); $GUID = $xml->createElement("GUID", "b5a4cee1-360d-4d70-bc3f-288ba2b5f40e-".$eight_randnum.""); $VOUCHER->appendChild($GUID); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $VOUCHER->appendChild($NARRATION); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $VOUCHER->appendChild($VOUCHERNUMBER); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $VOUCHER->appendChild($PARTYLEDGERNAME); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $VOUCHER->appendChild($CSTFORMISSUETYPE); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $VOUCHER->appendChild($CSTFORMRECVTYPE); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $VOUCHER->appendChild($FBTPAYMENTTYPE); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); $VOUCHER->appendChild($PERSISTEDVIEW); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $VOUCHER->appendChild($VCHGSTCLASS); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $VOUCHER->appendChild($DIFFACTUALQTY); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $VOUCHER->appendChild($ISMSTFROMSYNC); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $VOUCHER->appendChild($ASORIGINAL); $AUDITED = $xml->createElement("AUDITED", "No"); $VOUCHER->appendChild($AUDITED); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $VOUCHER->appendChild($FORJOBCOSTING); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $VOUCHER->appendChild($ISOPTIONAL); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $VOUCHER->appendChild($EFFECTIVEDATE); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $VOUCHER->appendChild($USEFOREXCISE); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $VOUCHER->appendChild($ISFORJOBWORKIN); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $VOUCHER->appendChild($ALLOWCONSUMPTION); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $VOUCHER->appendChild($USEFORINTEREST); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $VOUCHER->appendChild($USEFORGAINLOSS); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $VOUCHER->appendChild($USEFORCOMPOUND); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $VOUCHER->appendChild($USEFORSERVICETAX); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $VOUCHER->appendChild($ISEXCISEVOUCHER); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $VOUCHER->appendChild($EXCISEOPENING); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $VOUCHER->appendChild($ISVATOVERRIDDEN); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $VOUCHER->appendChild($ISISDVOUCHER); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $VOUCHER->appendChild($GSTNOTEXPORTED); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $VOUCHER->appendChild($ISCANCELLED); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "Yes"); $VOUCHER->appendChild($HASCASHFLOW); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $VOUCHER->appendChild($ISPOSTDATED); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $VOUCHER->appendChild($USETRACKINGNUMBER); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $VOUCHER->appendChild($ISINVOICE); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $VOUCHER->appendChild($MFGJOURNAL); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $VOUCHER->appendChild($HASDISCOUNTS); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $VOUCHER->appendChild($ASPAYSLIP); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $VOUCHER->appendChild($ISCOSTCENTRE); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $VOUCHER->appendChild($ISBLANKCHEQUE); $ISVOID = $xml->createElement("ISVOID", "No"); $VOUCHER->appendChild($ISVOID); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $VOUCHER->appendChild($ISONHOLD); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VOUCHER->appendChild($ORDERLINESTATUS); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $VOUCHER->appendChild($VATISPURCEXEMPTED); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $VOUCHER->appendChild($ISVATDUTYPAID); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $ISDELETED = $xml->createElement("ISDELETED", "No"); $VOUCHER->appendChild($ISDELETED); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $VOUCHER->appendChild($CHANGEVCHMODE); $ALTERID = $xml->createElement("ALTERID", "14"); $VOUCHER->appendChild($ALTERID); $MASTERID = $xml->createElement("MASTERID", "9"); $VOUCHER->appendChild($MASTERID); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066536"); $VOUCHER->appendChild($VOUCHERKEY); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $VOUCHER->appendChild($AUDITENTRIES_LIST); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //ALLLEDGERENTRIES.LIST block start for ($i=0; $i < 2; $i++) { $ALLLEDGERENTRIES_LIST_1 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_1); $OLDAUDITENTRYIDS_LIST_LA_1 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_LA_1->setAttribute("TYPE", "Number"); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRYIDS_LIST_LA_1); $OLDAUDITENTRYIDS_LA_1 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_1->appendChild($OLDAUDITENTRYIDS_LA_1); if($i == 0){ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger.""); }else{ $LEDGERNAME_1 = $xml->createElement("LEDGERNAME", "".$ms_ledger_two.""); } $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERNAME_1); $GSTCLASS_1 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_1); $ISDEEMEDPOSITIVE_1 = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISDEEMEDPOSITIVE_1); $LEDGERFROMITEM_1 = $xml->createElement("LEDGERFROMITEM", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($LEDGERFROMITEM_1); $REMOVEZEROENTRIES_1 = $xml->createElement("REMOVEZEROENTRIES", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($REMOVEZEROENTRIES_1); $ISPARTYLEDGER_1 = $xml->createElement("ISPARTYLEDGER", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISPARTYLEDGER_1); $ISLASTDEEMEDPOSITIVE_1 = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISLASTDEEMEDPOSITIVE_1); $ISCAPVATTAXALTERED_1 = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATTAXALTERED_1); $ISCAPVATNOTCLAIMED_1 = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $ALLLEDGERENTRIES_LIST_1->appendChild($ISCAPVATNOTCLAIMED_1); if($i == 0){ $AMOUNT_1 = $xml->createElement("AMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); }else{ $AMOUNT_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($AMOUNT_1); $VATEXPAMOUNT_1 = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $ALLLEDGERENTRIES_LIST_1->appendChild($VATEXPAMOUNT_1); } $SERVICETAXDETAILS_LIST_1 = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SERVICETAXDETAILS_LIST_1); //start If bill allocation is available if($trans_type == 'cash'){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); }else{ if($i == 1){ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); $DATE_BA_1 = $xml->createElement("DATE", "".$m_date.""); $BANKALLOCATIONS_LIST_1->appendChild($DATE_BA_1); $INSTRUMENTDATE_BA_1 = $xml->createElement("INSTRUMENTDATE", "".$m_date.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTDATE_BA_1); $NAME_BA_1 = $xml->createElement("NAME", "78e5852b-2d90-45c5-ae44-14c11f53fda2"); $BANKALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $TRANSACTIONTYPE_BA_1 = $xml->createElement("TRANSACTIONTYPE", "Cheque"); $BANKALLOCATIONS_LIST_1->appendChild($TRANSACTIONTYPE_BA_1); $PAYMENTFAVOURING_BA_1 = $xml->createElement("PAYMENTFAVOURING", "".$m_ledger_name.""); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTFAVOURING_BA_1); $CHEQUECROSSCOMMENT_BA_1 = $xml->createElement("CHEQUECROSSCOMMENT", "A/c Payee"); $BANKALLOCATIONS_LIST_1->appendChild($CHEQUECROSSCOMMENT_BA_1); $INSTRUMENTNUMBER_BA_1 = $xml->createElement("INSTRUMENTNUMBER", "".$check_no.""); $BANKALLOCATIONS_LIST_1->appendChild($INSTRUMENTNUMBER_BA_1); $UNIQUEREFERENCENUMBER_BA_1 = $xml->createElement("UNIQUEREFERENCENUMBER", "4fsc5mOvdJLoDvnD"); $BANKALLOCATIONS_LIST_1->appendChild($UNIQUEREFERENCENUMBER_BA_1); $STATUS_BA_1 = $xml->createElement("STATUS", "No"); $BANKALLOCATIONS_LIST_1->appendChild($STATUS_BA_1); $PAYMENTMODE_BA_1 = $xml->createElement("PAYMENTMODE", "Transacted"); $BANKALLOCATIONS_LIST_1->appendChild($PAYMENTMODE_BA_1); $BANKPARTYNAME_BA_1 = $xml->createElement("BANKPARTYNAME", "".$m_ledger_name.""); $BANKALLOCATIONS_LIST_1->appendChild($BANKPARTYNAME_BA_1); $ISCONNECTEDPAYMENT_BA_1 = $xml->createElement("ISCONNECTEDPAYMENT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONNECTEDPAYMENT_BA_1); $ISSPLIT_BA_1 = $xml->createElement("ISSPLIT", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISSPLIT_BA_1); $ISCONTRACTUSED_BA_1 = $xml->createElement("ISCONTRACTUSED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISCONTRACTUSED_BA_1); $ISACCEPTEDWITHWARNING_BA_1 = $xml->createElement("ISACCEPTEDWITHWARNING", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISACCEPTEDWITHWARNING_BA_1); $ISTRANSFORCED_BA_1 = $xml->createElement("ISTRANSFORCED", "No"); $BANKALLOCATIONS_LIST_1->appendChild($ISTRANSFORCED_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "".$amt_gross.""); $BANKALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $CONTRACTDETAILS_LIST_BA_1 = $xml->createElement("CONTRACTDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($CONTRACTDETAILS_LIST_BA_1); $BANKSTATUSINFO_LIST_BA_1 = $xml->createElement("BANKSTATUSINFO.LIST", " "); $BANKALLOCATIONS_LIST_1->appendChild($BANKSTATUSINFO_LIST_BA_1); //end If bill allocation is available }else{ $BANKALLOCATIONS_LIST_1 = $xml->createElement("BANKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($BANKALLOCATIONS_LIST_1); } } $BILLALLOCATIONS_LIST_1 = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$NAME_BA_1 = $xml->createElement("NAME", "21, 28 & 29"); $BILLALLOCATIONS_LIST_1->appendChild($NAME_BA_1); $BILLTYPE_BA_1 = $xml->createElement("BILLTYPE", "New Ref"); $BILLALLOCATIONS_LIST_1->appendChild($BILLTYPE_BA_1); $TDSDEDUCTEEISSPECIALRATE_BA_1 = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $BILLALLOCATIONS_LIST_1->appendChild($TDSDEDUCTEEISSPECIALRATE_BA_1); $AMOUNT_BA_1 = $xml->createElement("AMOUNT", "5000,00"); $BILLALLOCATIONS_LIST_1->appendChild($AMOUNT_BA_1); $INTERESTCOLLECTION_LIST_BA_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($INTERESTCOLLECTION_LIST_BA_1); $STBILLCATEGORIES_LIST_BA_1 = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST_1->appendChild($STBILLCATEGORIES_LIST_BA_1);*/ $ALLLEDGERENTRIES_LIST_1->appendChild($BILLALLOCATIONS_LIST_1); $INTERESTCOLLECTION_LIST_1 = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INTERESTCOLLECTION_LIST_1); $OLDAUDITENTRIES_LIST_1 = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($OLDAUDITENTRIES_LIST_1); $ACCOUNTAUDITENTRIES_LIST_1 = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ACCOUNTAUDITENTRIES_LIST_1); $AUDITENTRIES_LIST_1 = $xml->createElement("AUDITENTRIES.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($AUDITENTRIES_LIST_1); $INPUTCRALLOCS_LIST_1 = $xml->createElement("INPUTCRALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INPUTCRALLOCS_LIST_1); $DUTYHEADDETAILS_LIST_1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($DUTYHEADDETAILS_LIST_1); $EXCISEDUTYHEADDETAILS_LIST_1 = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEDUTYHEADDETAILS_LIST_1); $RATEDETAILS_LIST_1 = $xml->createElement("RATEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($RATEDETAILS_LIST_1); $SUMMARYALLOCS_LIST_1 = $xml->createElement("SUMMARYALLOCS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($SUMMARYALLOCS_LIST_1); $STPYMTDETAILS_LIST_1 = $xml->createElement("STPYMTDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($STPYMTDETAILS_LIST_1); $EXCISEPAYMENTALLOCATIONS_LIST_1 = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_1); $TAXBILLALLOCATIONS_LIST_1 = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXBILLALLOCATIONS_LIST_1); $TAXOBJECTALLOCATIONS_LIST_1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TAXOBJECTALLOCATIONS_LIST_1); $TDSEXPENSEALLOCATIONS_LIST_1 = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($TDSEXPENSEALLOCATIONS_LIST_1); $VATSTATUTORYDETAILS_LIST_1 = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATSTATUTORYDETAILS_LIST_1); $COSTTRACKALLOCATIONS_LIST_1 = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($COSTTRACKALLOCATIONS_LIST_1); $REFVOUCHERDETAILS_LIST_1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($REFVOUCHERDETAILS_LIST_1); $INVOICEWISEDETAILS_LIST_1 = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($INVOICEWISEDETAILS_LIST_1); $VATITCDETAILS_LIST_1 = $xml->createElement("VATITCDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($VATITCDETAILS_LIST_1); $ADVANCETAXDETAILS_LIST_1 = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $ALLLEDGERENTRIES_LIST_1->appendChild($ADVANCETAXDETAILS_LIST_1); } /*$ALLLEDGERENTRIES_LIST_2 = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $VOUCHER->appendChild($ALLLEDGERENTRIES_LIST_2); $OLDAUDITENTRYIDS_LIST_LA_2 = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $ALLLEDGERENTRIES_LIST_2->appendChild($OLDAUDITENTRYIDS_LIST_LA_2); $OLDAUDITENTRYIDS_LA_2 = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $OLDAUDITENTRYIDS_LIST_LA_2->appendChild($OLDAUDITENTRYIDS_LA_2); $LEDGERNAME_2 = $xml->createElement("LEDGERNAME", "Bank of Baroda"); $ALLLEDGERENTRIES_LIST_2->appendChild($LEDGERNAME_2); $GSTCLASS_2 = $xml->createElement("GSTCLASS", ""); $ALLLEDGERENTRIES_LIST_1->appendChild($GSTCLASS_2);*/ // ALLLEDGERENTRIES.LIST block end $PAYROLLMODEOFPAYMENT_LIST = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST); $ATTDRECORDS_LIST = $xml->createElement("ATTDRECORDS.LIST", " "); $VOUCHER->appendChild($ATTDRECORDS_LIST); $GSTEWAYCONSIGNORADDRESS_LIST = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST); $GSTEWAYCONSIGNEEADDRESS_LIST = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST); $TEMPGSTRATEDETAILS_LIST = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST); /* for ($t=0; $t < 2; $t++) { $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2); $COMPANY_1 = $xml->createElement("COMPANY", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY_1); $REMOTECMPINFO_1 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO_1->setAttribute("MERGE", "Yes"); $COMPANY_1->appendChild($REMOTECMPINFO_1); $NAME_TALLY_2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_1->appendChild($NAME_TALLY_2); $REMOTECMPNAME_1 = $xml->createElement("REMOTECMPNAME", "Sndp & Co"); $REMOTECMPINFO_1->appendChild($REMOTECMPNAME_1); $REMOTECMPSTATE_1 = $xml->createElement("REMOTECMPSTATE", "Gujarat"); $REMOTECMPINFO_1->appendChild($REMOTECMPSTATE_1); }*/ /* $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3);*/ $xml_HEADER->appendChild($xml_HEADER_TALLYREQUEST); $xml_ENVELOPE->appendChild($xml_HEADER); $xml_ENVELOPE->appendChild($xml_BODY); $xml_BODY->appendChild($xml_BODY_IMPORTDATA); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA); $xml->appendChild($xml_ENVELOPE); // Parse the XML. print $xml->saveXML(); } //functions for XML public function xml_purchase($fid, $eight_randnum){ //$where = array('fid' => $fid); //$form = $this->model->DetailData('tbl_form', $where); $form = $this->model->sm($fid); $note_two = $form[0]['note_two']; if($note_two == 'form_two'){ $this->xml_purchase_two($fid, $eight_randnum); } $form2 = $this->model->salesModel($fid); $form3 = $this->model->salesExpenseModel($fid); $info_cnt = count($form2); $info_cnt2 = count($form3); //echo "<pre>"; print_r($form2); die; $tot_g_sgst = 0; $tot_g_cgst = 0; $tot_g_ugst = 0; $tot_g_igst = 0; for ($g=0; $g < $info_cnt2; $g++) { //foreach ($form3 as $gst => $g) { $gamt = $form3[$g]['ex_amount']; $g_sgst = $form3[$g]['sgst']; $g_cgst = $form3[$g]['cgst']; $g_ugst = $form3[$g]['ugst']; $g_igst = $form3[$g]['igst']; if($g_sgst != '0.00'){ $g_sgst_payble = $gamt*$g_sgst/100; //echo "--payble sgst<br>"; $tot_g_sgst += $g_sgst_payble; } if($g_cgst != '0.00'){ $g_cgst_payble = $gamt*$g_cgst/100; //echo "--payble cgst<br>"; $tot_g_cgst += $g_cgst_payble; } if($g_ugst != '0.00'){ $g_ugst_payble = $gamt*$g_ugst/100; //echo "--payble ugst<br>"; $tot_g_ugst += $g_ugst_payble; } if($g_igst != '0.00'){ $g_igst_payble = $gamt*$g_igst/100; //echo "--payble cgst<br>"; $tot_g_igst += $g_igst_payble; } } $tot_g_sgst; $tot_g_cgst; $tot_g_ugst; $tot_g_igst; $all_gst_tot = $tot_g_sgst+$tot_g_cgst+$tot_g_ugst+$tot_g_igst; // sum of same other expenses $result = array(); foreach($form3 as $k => $v) { $id = $v['ex_name']; $result[$id][] = $v['ex_amount']; } $other_expense = array(); foreach($result as $key => $value) { $where_exp = array('eid' => $key); $i_name = $this->model->DetailData('tbl_expense', $where_exp); $in = $i_name[0]['ename']; $other_expense[] = array('ex_name' => $key, 'ex_amount' => array_sum($value), 'iname' => $in); } //echo '<pre>'; print_r($other_expense); // sum of same other expenses $oecnt = count($other_expense); //die; $tsgst = 0; $tcgst = 0; $tugst = 0; $tigst = 0; foreach ($form2 as $total => $tot) { $sgst = $tot['s_aot']; $cgst = $tot['c_aot']; $ugst = $tot['u_aot']; $igst = $tot['i_aot']; $tsgst+=$sgst; $tcgst+=$cgst; $tugst+=$ugst; $tigst+=$igst; } /*echo $tsgst."s<br>"; echo $tcgst."c<br>"; echo $tugst."u<br>"; echo $tigst; die; */ $frm = $this->model->sales_form_data($fid); $amt_gross = $frm[0]['amt_gross']; $new_tot_expns = 0; $amt_tax = 0; foreach ($frm as $key => $tot) { $expns = $tot['expenses']; $amt_taxable = $tot['amt_taxable']; $tot_expns = 0; if($expns != ''){ foreach ($expns as $tt => $t) { $newtt = $t['ex_amount']; $tot_expns+=$newtt; } }else{ $tot_expns = 0; } $new_tot_expns+=$tot_expns; $amt_tax+=$amt_taxable; } $new_tot_expns; $amt_tax; $tot_tax = $tsgst+$tcgst+$tugst+$tigst; $totdebit = $new_tot_expns+$tot_tax+$amt_tax+$all_gst_tot; /*echo $amt_gross."<br>"; echo $totdebit; die; */ $diff_amt = round(abs($amt_gross - $totdebit),2); $stage = $form[0]['stage']; $date = $form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form[0]['voucher_no']; $m_ledger_name = $form[0]['l_name']; $narration = $form[0]['narration']; $amt_gross = $form[0]['amt_gross']; if($amt_gross < $totdebit){ $amt_gross = $amt_gross + $diff_amt; }else{ $amt_gross = $amt_gross; } // Set the content type to be XML, so that the browser will recognise it as XML. header("content-type: application/xml; charset=ISO-8859-15"); // "Create" the document. $xml = new DOMDocument("1.0", "ISO-8859-15"); // Create some elements. $xml_ENVELOPE = $xml->createElement("ENVELOPE", ""); $xml_HEADER = $xml->createElement("HEADER", " "); $xml_HEADER_TALLYREQUEST = $xml->createElement("TALLYREQUEST", "Import Data"); $xml_BODY = $xml->createElement("BODY", " "); $xml_BODY_IMPORTDATA = $xml->createElement("IMPORTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDESC = $xml->createElement("REQUESTDESC", " "); $xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME = $xml->createElement("REPORTNAME", " Vouchers "); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES = $xml->createElement("STATICVARIABLES", " "); $xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY = $xml->createElement("SVCURRENTCOMPANY", " SANDIP COMPANY "); $xml_BODY_IMPORTDATA_REQUESTDATA = $xml->createElement("REQUESTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Invoice Voucher View"); $adrs_list = $xml->createElement("ADDRESS.LIST", " "); $adrs_list->setAttribute("TYPE", "String"); $adrs = $xml->createElement("ADDRESS", "Gujarat, India"); $basic_buy_list = $xml->createElement("BASICBUYERADDRESS.LIST", " "); $basic_buy_list->setAttribute("TYPE", "String"); $basic_buy_adrs = $xml->createElement("BASICBUYERADDRESS", "Gujarat, India"); $OLDAUDITENTRYIDS_list = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_list->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $DATE = $xml->createElement("DATE", "".$m_date.""); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); $PARTYNAME = $xml->createElement("PARTYNAME", "".$m_ledger_name.""); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$m_ledger_name.""); $BASICBASEPARTYNAME = $xml->createElement("BASICBASEPARTYNAME", "".$m_ledger_name.""); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Invoice Voucher View"); $PLACEOFSUPPLY = $xml->createElement("PLACEOFSUPPLY", "Gujarat"); $BASICBUYERNAME = $xml->createElement("BASICBUYERNAME", "".$m_ledger_name.""); $BASICDATETIMEOFINVOICE = $xml->createElement("BASICDATETIMEOFINVOICE", "".$basic_date_time.""); $BASICDATETIMEOFREMOVAL = $xml->createElement("BASICDATETIMEOFREMOVAL", "".$basic_date_time.""); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $CONSIGNEESTATENAME = $xml->createElement("CONSIGNEESTATENAME", "Gujarat"); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $AUDITED = $xml->createElement("AUDITED", "No"); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $ISINVOICE = $xml->createElement("ISINVOICE", "Yes"); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "Yes"); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $ISVOID = $xml->createElement("ISVOID", "No"); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $ISDELETED = $xml->createElement("ISDELETED", "No"); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $ALTERID = $xml->createElement("ALTERID", "29"); $MASTERID = $xml->createElement("MASTERID", "14"); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066560"); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); $VOUCHER->appendChild($adrs_list); $adrs_list->appendChild($adrs); $VOUCHER->appendChild($basic_buy_list); $basic_buy_list->appendChild($basic_buy_adrs); $VOUCHER->appendChild($OLDAUDITENTRYIDS_list); $OLDAUDITENTRYIDS_list->appendChild($OLDAUDITENTRYIDS); $VOUCHER->appendChild($DATE); $VOUCHER->appendChild($GUID); $VOUCHER->appendChild($STATENAME); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); $VOUCHER->appendChild($PARTYNAME); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHER->appendChild($VOUCHERNUMBER); $VOUCHER->appendChild($PARTYLEDGERNAME); $VOUCHER->appendChild($BASICBASEPARTYNAME); $VOUCHER->appendChild($CSTFORMISSUETYPE); $VOUCHER->appendChild($CSTFORMRECVTYPE); $VOUCHER->appendChild($FBTPAYMENTTYPE); $VOUCHER->appendChild($PERSISTEDVIEW); $VOUCHER->appendChild($PLACEOFSUPPLY); $VOUCHER->appendChild($BASICBUYERNAME); $VOUCHER->appendChild($BASICDATETIMEOFINVOICE); $VOUCHER->appendChild($BASICDATETIMEOFREMOVAL); $VOUCHER->appendChild($VCHGSTCLASS); $VOUCHER->appendChild($CONSIGNEESTATENAME); $VOUCHER->appendChild($DIFFACTUALQTY); $VOUCHER->appendChild($ISMSTFROMSYNC); $VOUCHER->appendChild($ASORIGINAL); $VOUCHER->appendChild($AUDITED); $VOUCHER->appendChild($FORJOBCOSTING); $VOUCHER->appendChild($ISOPTIONAL); $VOUCHER->appendChild($EFFECTIVEDATE); $VOUCHER->appendChild($USEFOREXCISE); $VOUCHER->appendChild($ISFORJOBWORKIN); $VOUCHER->appendChild($ALLOWCONSUMPTION); $VOUCHER->appendChild($USEFORINTEREST); $VOUCHER->appendChild($USEFORGAINLOSS); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $VOUCHER->appendChild($USEFORCOMPOUND); $VOUCHER->appendChild($USEFORSERVICETAX); $VOUCHER->appendChild($ISEXCISEVOUCHER); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $VOUCHER->appendChild($EXCISEOPENING); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $VOUCHER->appendChild($ISVATOVERRIDDEN); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $VOUCHER->appendChild($ISISDVOUCHER); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $VOUCHER->appendChild($GSTNOTEXPORTED); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $VOUCHER->appendChild($ISCANCELLED); $VOUCHER->appendChild($HASCASHFLOW); $VOUCHER->appendChild($ISPOSTDATED); $VOUCHER->appendChild($USETRACKINGNUMBER); $VOUCHER->appendChild($ISINVOICE); $VOUCHER->appendChild($MFGJOURNAL); $VOUCHER->appendChild($HASDISCOUNTS); $VOUCHER->appendChild($ASPAYSLIP); $VOUCHER->appendChild($ISCOSTCENTRE); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $VOUCHER->appendChild($ISBLANKCHEQUE); $VOUCHER->appendChild($ISVOID); $VOUCHER->appendChild($ISONHOLD); $VOUCHER->appendChild($ORDERLINESTATUS); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VOUCHER->appendChild($VATISPURCEXEMPTED); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $VOUCHER->appendChild($ISVATDUTYPAID); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $VOUCHER->appendChild($ISDELETED); $VOUCHER->appendChild($CHANGEVCHMODE); $VOUCHER->appendChild($ALTERID); $VOUCHER->appendChild($MASTERID); $VOUCHER->appendChild($VOUCHERKEY); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $VOUCHER->appendChild($AUDITENTRIES_LIST); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //star for credit ledger $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$m_ledger_name.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "Yes"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$amt_gross.""); //diff_amt $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $bill_name = $xml->createElement("NAME", "".$voucher_no.""); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "".$amt_gross.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for debit ledger if($amt_gross > $totdebit){ // Start of Round of $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "Round Amount"); $GSTCLASS_oe = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$diff_amt.""); $VATEXPAMOUNT_LE = $xml->createElement("VATEXPAMOUNT", "".$diff_amt.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_oe); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); // End of Round of } //star for other expenses ledger for ($oe=0; $oe < $oecnt; $oe++) { $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$other_expense[$oe]['iname'].""); $GSTCLASS_oe = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$other_expense[$oe]['ex_amount'].""); $VATEXPAMOUNT_LE = $xml->createElement("VATEXPAMOUNT", "-".$other_expense[$oe]['ex_amount'].""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_oe); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for other expenses ledger //star for CGST ledger if($tcgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_Ca = $xml->createElement("ROUNDTYPE", ""); $GSTCLASS_c = $xml->createElement("GSTCLASS", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "CGST"); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $forcgst = $tcgst+$tot_g_cgst; $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$forcgst.""); $VATEXPAMOUNT_C = $xml->createElement("VATEXPAMOUNT", "-".$forcgst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_Ca); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_c); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_C); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for CGST ledger //star for SGST ledger if($tsgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_S = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "SGST"); $GSTCLASS_s = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $forsgst = $tsgst+$tot_g_sgst; $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$forsgst.""); $AMOUNT_S = $xml->createElement("VATEXPAMOUNT", "-".$forsgst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_S); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_s); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_S); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for SGST ledger //star for UGST ledger if($tugst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_U = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "UGST"); $GSTCLASS_u = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $forugst = $tugst+$tot_g_ugst; $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$forugst.""); $AMOUNT_U = $xml->createElement("VATEXPAMOUNT", "-".$forugst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_U); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_u); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_U); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for UGST ledger //star for IGST ledger if($tigst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("LEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_I = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "IGST"); $GSTCLASS_i = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $forigst = $tigst+$tot_g_igst; $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$forigst.""); $AMOUNT_I = $xml->createElement("VATEXPAMOUNT", "-".$forigst.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_I); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_i); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_I); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for IGST ledger for ($inv=0; $inv < $info_cnt; $inv++) { $item_name = $form2[$inv]['item']; $rate = $form2[$inv]['rate']; $discount = $form2[$inv]['discount_two']; $amount = $form2[$inv]['amt_taxable']; $qty = $form2[$inv]['qty']; $s_ledger_name = $form2[$inv]['l_name']; $ALLINVENTORYENTRIES_LIST = $xml->createElement("ALLINVENTORYENTRIES.LIST", " "); $STOCKITEMNAME = $xml->createElement("STOCKITEMNAME", "".$item_name.""); $ISDEEMEDPOSITIVE_LE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $ISLASTDEEMEDPOSITIVE_LE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISAUTONEGATE = $xml->createElement("ISAUTONEGATE", "No"); $ISCUSTOMSCLEARANCE = $xml->createElement("ISCUSTOMSCLEARANCE", "No"); $ISTRACKCOMPONENT = $xml->createElement("ISTRACKCOMPONENT", "No"); $ISTRACKPRODUCTION = $xml->createElement("ISTRACKPRODUCTION", "No"); $ISPRIMARYITEM = $xml->createElement("ISPRIMARYITEM", "No"); $ISSCRAP = $xml->createElement("ISSCRAP", "No"); $RATE = $xml->createElement("RATE", "".$rate.""); $DISCOUNT = $xml->createElement("DISCOUNT", "".$discount.""); $AMOUNT = $xml->createElement("AMOUNT", "-".$amount.""); $ACTUALQTY_AE = $xml->createElement("ACTUALQTY", "".$qty.""); $BILLEDQTY_AE = $xml->createElement("BILLEDQTY", "".$qty.""); $BATCHALLOCATIONS_LIST = $xml->createElement("BATCHALLOCATIONS.LIST", " "); $GODOWNNAME = $xml->createElement("GODOWNNAME", "Main Location"); $BATCHNAME = $xml->createElement("BATCHNAME", "Primary Batch"); $INDENTNO = $xml->createElement("INDENTNO", ""); $ORDERNO = $xml->createElement("ORDERNO", ""); $TRACKINGNUMBER = $xml->createElement("TRACKINGNUMBER", ""); $DYNAMICCSTISCLEARED = $xml->createElement("DYNAMICCSTISCLEARED", "No"); $AMOUNT_ba = $xml->createElement("AMOUNT", "-".$amount.""); $ACTUALQTY = $xml->createElement("ACTUALQTY", "".$qty.""); $BILLEDQTY = $xml->createElement("BILLEDQTY", "".$qty.""); $ADDITIONALDETAILS_LIST = $xml->createElement("ADDITIONALDETAILS.LIST", " "); $VOUCHERCOMPONENTLIST_LIST = $xml->createElement("VOUCHERCOMPONENTLIST.LIST", " "); $ACCOUNTINGALLOCATIONS_LIST = $xml->createElement("ACCOUNTINGALLOCATIONS.LIST", " "); $OLDAUDITENTRYIDS_LIST_AIE = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST_AIE->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_AIE = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME_AIE = $xml->createElement("LEDGERNAME", "".$s_ledger_name.""); $GSTCLASS_AIE = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE_AIE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM_AIE = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES_AIE = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER_AIE = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE_AIE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED_AIE = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED_AIE = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_AIE = $xml->createElement("AMOUNT", "-".$amount.""); $SERVICETAXDETAILS_LIST_AIE = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST_AIE = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST_AIE = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST_AIE = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AIE = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AIE = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AIE = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AIE = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_AIE1 = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST_AIE = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST_AL = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST_AIE = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST_AIE = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST_AIE = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST_AIE = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST_AIE1 = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST_AIE = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST_AIE = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST_AIE = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST_AIE1 = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST_AIE = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_AIE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST_AIE = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $DUTYHEADDETAILS_LIST_AIE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST_AIE = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST_AIE = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST_AIE = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $EXCISEALLOCATIONS_LIST_AIE = $xml->createElement("EXCISEALLOCATIONS.LIST", " "); $EXPENSEALLOCATIONS_LIST_AIE = $xml->createElement("EXPENSEALLOCATIONS.LIST", " "); $VOUCHER->appendChild($ALLINVENTORYENTRIES_LIST); $ALLINVENTORYENTRIES_LIST->appendChild($STOCKITEMNAME); $ALLINVENTORYENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE_LE); $ALLINVENTORYENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE_LE); $ALLINVENTORYENTRIES_LIST->appendChild($ISAUTONEGATE); $ALLINVENTORYENTRIES_LIST->appendChild($ISCUSTOMSCLEARANCE); $ALLINVENTORYENTRIES_LIST->appendChild($ISTRACKCOMPONENT); $ALLINVENTORYENTRIES_LIST->appendChild($ISTRACKPRODUCTION); $ALLINVENTORYENTRIES_LIST->appendChild($ISPRIMARYITEM); $ALLINVENTORYENTRIES_LIST->appendChild($ISSCRAP); $ALLINVENTORYENTRIES_LIST->appendChild($RATE); $ALLINVENTORYENTRIES_LIST->appendChild($DISCOUNT); $ALLINVENTORYENTRIES_LIST->appendChild($AMOUNT); $ALLINVENTORYENTRIES_LIST->appendChild($ACTUALQTY_AE); $ALLINVENTORYENTRIES_LIST->appendChild($BILLEDQTY_AE); $ALLINVENTORYENTRIES_LIST->appendChild($BATCHALLOCATIONS_LIST); $BATCHALLOCATIONS_LIST->appendChild($GODOWNNAME); $BATCHALLOCATIONS_LIST->appendChild($BATCHNAME); $BATCHALLOCATIONS_LIST->appendChild($INDENTNO); $BATCHALLOCATIONS_LIST->appendChild($ORDERNO); $BATCHALLOCATIONS_LIST->appendChild($TRACKINGNUMBER); $BATCHALLOCATIONS_LIST->appendChild($DYNAMICCSTISCLEARED); $BATCHALLOCATIONS_LIST->appendChild($AMOUNT_ba); $BATCHALLOCATIONS_LIST->appendChild($ACTUALQTY); $BATCHALLOCATIONS_LIST->appendChild($BILLEDQTY); $BATCHALLOCATIONS_LIST->appendChild($ADDITIONALDETAILS_LIST); $BATCHALLOCATIONS_LIST->appendChild($VOUCHERCOMPONENTLIST_LIST); $ALLINVENTORYENTRIES_LIST->appendChild($ACCOUNTINGALLOCATIONS_LIST); $ACCOUNTINGALLOCATIONS_LIST->appendChild($OLDAUDITENTRYIDS_LIST_AIE); $OLDAUDITENTRYIDS_LIST_AIE->appendChild($OLDAUDITENTRYIDS_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($LEDGERNAME_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($GSTCLASS_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISDEEMEDPOSITIVE_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($LEDGERFROMITEM_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($REMOVEZEROENTRIES_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISPARTYLEDGER_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISLASTDEEMEDPOSITIVE_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISCAPVATTAXALTERED_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ISCAPVATNOTCLAIMED_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($AMOUNT_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($SERVICETAXDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($BANKALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($BILLALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INTERESTCOLLECTION_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($OLDAUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($AUDITENTRIES_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INPUTCRALLOCS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($DUTYHEADDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($RATEDETAILS_LIST_AL); $ACCOUNTINGALLOCATIONS_LIST->appendChild($SUMMARYALLOCS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($STPYMTDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TAXBILLALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($VATSTATUTORYDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($COSTTRACKALLOCATIONS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($REFVOUCHERDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($INVOICEWISEDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($VATITCDETAILS_LIST_AIE); $ACCOUNTINGALLOCATIONS_LIST->appendChild($ADVANCETAXDETAILS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST_AIE1); $ALLINVENTORYENTRIES_LIST->appendChild($EXCISEALLOCATIONS_LIST_AIE); $ALLINVENTORYENTRIES_LIST->appendChild($EXPENSEALLOCATIONS_LIST_AIE); } $PAYROLLMODEOFPAYMENT_LIST_v = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $ATTDRECORDS_LIST_v = $xml->createElement("ATTDRECORDS.LIST", " "); $GSTEWAYCONSIGNORADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $GSTEWAYCONSIGNEEADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $TEMPGSTRATEDETAILS_LIST_v = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST_v); $VOUCHER->appendChild($ATTDRECORDS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST_v); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST_v); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY2 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO2 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO2->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME2 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE2 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_NAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPNAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPSTATE2); $COMPANY2->appendChild($REMOTECMPINFO2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY3 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO3 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO3->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME3 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME3 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE3 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_NAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPNAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPSTATE3); $COMPANY3->appendChild($REMOTECMPINFO3); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->appendChild($COMPANY3); $test = $xml->createElement("TALLYMESSAGE", " "); $test->setAttribute("xmlns:UDF", "TallyUDF"); //Set the attributes. /*$xml_HEADER->setAttribute("length", "0:01:15"); $xml_HEADER->setAttribute("bitrate", "64kb/s"); $xml_HEADER->setAttribute("channels", "2");*/ $xml_HEADER->appendChild($xml_HEADER_TALLYREQUEST); $xml_ENVELOPE->appendChild($xml_HEADER); $xml_ENVELOPE->appendChild($xml_BODY); $xml_BODY->appendChild($xml_BODY_IMPORTDATA); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3); //for ($i = 1; $i <2; $i++) { // $test = '$name_' . $i; // $test = $xml->createElement("TALLYMESSAGE", " "); // $test->setAttribute("xmlns:UDF", "TallyUDF"); // $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($test); //} $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA); $xml->appendChild($xml_ENVELOPE); // Parse the XML. print $xml->saveXML(); } public function add_sales_two(){ //echo "<pre>"; print_r($_POST); die; $m_date = date("Y-m-d", strtotime($this->input->post('date'))); $d = date("d", strtotime($this->input->post('date'))); $m = date("m", strtotime($this->input->post('date'))); $ses = $this->session->get_userdata(); $oid = $ses['reg_info'][0]['rid']; /*$path = explode('/', $this->input->post('path')); $year = $path[2]; $m1 = explode('_',$path[3]); $month = $m1[1];*/ $year = $this->input->post('year'); $month = $this->input->post('month'); $ins_main = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'year' => $year, 'month' => $month, 'd' => $d, 'm' => $m, 'path' => $this->input->post('path'), 'm_date' => $m_date, 'voucher_no' => $this->input->post('voucher_no'), 'ref_no' => $this->input->post('ref_no'), 'm_ledger_name' => $this->input->post('dr_ledger'), 'amt_gross' => $this->input->post('amt_gross'), 'narration' => $this->input->post('narration'), 'release_status' => 'released', 'approve_status' => 'panding', 'note_two' => 'form_two', 'l_noti' => 'unseen' ); $ins = $this->model->insertData('tbl_form', $ins_main); $cr_ledger = $this->input->post('cr_ledger'); $cr_amt = $this->input->post('cr_amt'); $sgst = $this->input->post('sgst'); $s_aot = $this->input->post('sgst_tax_amt'); $cgst = $this->input->post('cgst'); $c_aot = $this->input->post('cgst_tax_amt'); $ugst = $this->input->post('ugst'); $u_aot = $this->input->post('ugst_tax_amt'); $igst = $this->input->post('igst'); $i_aot = $this->input->post('igst_tax_amt'); //$cess_code = $this->input->post('cess_code'); if(empty($sgst)){ $sgst = '0.00'; } if(empty($cgst)){ $cgst = '0.00'; } if(empty($ugst)){ $ugst = '0.00'; } if(empty($igst)){ $igst = '0.00'; } if(empty($discount_one)){ $discount_one = '0.00'; } if(empty($discount_two)){ $discount_two = '0.00'; } $ins_sub = array( 'fid' => $ins, 's_ledger_name' => $cr_ledger, 'amt_taxable' => $cr_amt, 'sgst' => $sgst, 's_aot' => $s_aot, 'cgst' => $cgst, 'c_aot' => $c_aot, 'ugst' => $ugst, 'u_aot' => $u_aot, 'igst' => $igst, 'i_aot' => $i_aot, //'cess_code' => $cess_code[$i], ); $ins2 = $this->model->insertData('tbl_form_info', $ins_sub); $exp_path = explode('|-|', $this->input->post('path')); $epc = count($exp_path); for ($i=0; $i < $epc; $i++) { /* $ins_form_status = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'stage' => $this->input->post('stage'), 'year' => $year, 'month' => $month, 'path' => $exp_path[$i] ); */ //$this->model->insertData('tbl_form_status', $ins_form_status); $ins_form_status = array( 'filled_status' => 'done' ); $if_where = array( 'cid' => $this->input->post('cid'), 'oid' => $oid, 'path' => $exp_path[$i] ); $this->model->UpdateData('tbl_form_status', $ins_form_status, $if_where); } redirect('webapp/office/form_grid'); } public function xml_sales_two($fid, $eight_randnum){ //echo $eight_randnum; die; $form = $this->model->sales_two_model($fid); $cgst = $form[0]['cgst']; $c_aot = $form[0]['c_aot']; $sgst = $form[0]['sgst']; $s_aot = $form[0]['s_aot']; $ugst = $form[0]['ugst']; $u_aot = $form[0]['u_aot']; $igst = $form[0]['igst']; $i_aot = $form[0]['i_aot']; //echo "<pre>"; print_r($form); die; $stage = $form[0]['stage']; $date = $form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form[0]['voucher_no']; $dr_ledger = $form[0]['dr_ledger']; $narration = $form[0]['narration']; $amt_gross = $form[0]['amt_gross']; $cr_ledger = $form[0]['cr_ledger']; $cr_amount = $form[0]['amt_taxable']; // Set the content type to be XML, so th header("content-type: application/xml; charset=ISO-8859-15"); // "Create" the document. $xml = new DOMDocument("1.0", "ISO-8859-15"); // Create some elements. $xml_ENVELOPE = $xml->createElement("ENVELOPE", ""); $xml_HEADER = $xml->createElement("HEADER", " "); $xml_HEADER_TALLYREQUEST = $xml->createElement("TALLYREQUEST", "Import Data"); $xml_BODY = $xml->createElement("BODY", " "); $xml_BODY_IMPORTDATA = $xml->createElement("IMPORTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDESC = $xml->createElement("REQUESTDESC", " "); $xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME = $xml->createElement("REPORTNAME", " Vouchers "); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES = $xml->createElement("STATICVARIABLES", " "); $xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY = $xml->createElement("SVCURRENTCOMPANY", " Star One Web "); $xml_BODY_IMPORTDATA_REQUESTDATA = $xml->createElement("REQUESTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); // $adrs_list = $xml->createElement("ADDRESS.LIST", " "); // $adrs_list->setAttribute("TYPE", "String"); // $adrs = $xml->createElement("ADDRESS", "Gujarat, India"); // $basic_buy_list = $xml->createElement("BASICBUYERADDRESS.LIST", " "); // $basic_buy_list->setAttribute("TYPE", "String"); // $basic_buy_adrs = $xml->createElement("BASICBUYERADDRESS", "Gujarat, India"); $OLDAUDITENTRYIDS_list = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_list->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $DATE = $xml->createElement("DATE", "".$m_date.""); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); //$PARTYNAME = $xml->createElement("PARTYNAME", "".$dr_ledger.""); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $REFERENCE = $xml->createElement("REFERENCE", "".$voucher_no.""); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$dr_ledger.""); $BASICBASEPARTYNAME = $xml->createElement("BASICBASEPARTYNAME", "".$dr_ledger.""); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); //$PLACEOFSUPPLY = $xml->createElement("PLACEOFSUPPLY", "Gujarat"); $BASICBUYERNAME = $xml->createElement("BASICBUYERNAME", "".$dr_ledger.""); $BASICDATETIMEOFINVOICE = $xml->createElement("BASICDATETIMEOFINVOICE", "".$basic_date_time.""); $BASICDATETIMEOFREMOVAL = $xml->createElement("BASICDATETIMEOFREMOVAL", "".$basic_date_time.""); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $ENTEREDBY = $xml->createElement("ENTEREDBY", "Admin"); //$CONSIGNEESTATENAME = $xml->createElement("CONSIGNEESTATENAME", "Gujarat"); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $AUDITED = $xml->createElement("AUDITED", "No"); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $ISVOID = $xml->createElement("ISVOID", "No"); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $ISDELETED = $xml->createElement("ISDELETED", "No"); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $ALTERID = $xml->createElement("ALTERID", "29"); $MASTERID = $xml->createElement("MASTERID", "14"); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066560"); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); /*$VOUCHER->appendChild($adrs_list); $adrs_list->appendChild($adrs); $VOUCHER->appendChild($basic_buy_list); $basic_buy_list->appendChild($basic_buy_adrs); */ $VOUCHER->appendChild($OLDAUDITENTRYIDS_list); $OLDAUDITENTRYIDS_list->appendChild($OLDAUDITENTRYIDS); $VOUCHER->appendChild($DATE); $VOUCHER->appendChild($GUID); $VOUCHER->appendChild($STATENAME); $VOUCHER->appendChild($NARRATION); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); //$VOUCHER->appendChild($PARTYNAME); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHER->appendChild($REFERENCE); $VOUCHER->appendChild($VOUCHERNUMBER); $VOUCHER->appendChild($PARTYLEDGERNAME); $VOUCHER->appendChild($BASICBASEPARTYNAME); $VOUCHER->appendChild($CSTFORMISSUETYPE); $VOUCHER->appendChild($CSTFORMRECVTYPE); $VOUCHER->appendChild($FBTPAYMENTTYPE); $VOUCHER->appendChild($PERSISTEDVIEW); //$VOUCHER->appendChild($PLACEOFSUPPLY); $VOUCHER->appendChild($BASICBUYERNAME); $VOUCHER->appendChild($BASICDATETIMEOFINVOICE); $VOUCHER->appendChild($BASICDATETIMEOFREMOVAL); $VOUCHER->appendChild($VCHGSTCLASS); $VOUCHER->appendChild($ENTEREDBY); //$VOUCHER->appendChild($CONSIGNEESTATENAME); $VOUCHER->appendChild($DIFFACTUALQTY); $VOUCHER->appendChild($ISMSTFROMSYNC); $VOUCHER->appendChild($ASORIGINAL); $VOUCHER->appendChild($AUDITED); $VOUCHER->appendChild($FORJOBCOSTING); $VOUCHER->appendChild($ISOPTIONAL); $VOUCHER->appendChild($EFFECTIVEDATE); $VOUCHER->appendChild($USEFOREXCISE); $VOUCHER->appendChild($ISFORJOBWORKIN); $VOUCHER->appendChild($ALLOWCONSUMPTION); $VOUCHER->appendChild($USEFORINTEREST); $VOUCHER->appendChild($USEFORGAINLOSS); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $VOUCHER->appendChild($USEFORCOMPOUND); $VOUCHER->appendChild($USEFORSERVICETAX); $VOUCHER->appendChild($ISEXCISEVOUCHER); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $VOUCHER->appendChild($EXCISEOPENING); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $VOUCHER->appendChild($ISVATOVERRIDDEN); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $VOUCHER->appendChild($ISISDVOUCHER); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $VOUCHER->appendChild($GSTNOTEXPORTED); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $VOUCHER->appendChild($ISCANCELLED); $VOUCHER->appendChild($HASCASHFLOW); $VOUCHER->appendChild($ISPOSTDATED); $VOUCHER->appendChild($USETRACKINGNUMBER); $VOUCHER->appendChild($ISINVOICE); $VOUCHER->appendChild($MFGJOURNAL); $VOUCHER->appendChild($HASDISCOUNTS); $VOUCHER->appendChild($ASPAYSLIP); $VOUCHER->appendChild($ISCOSTCENTRE); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $VOUCHER->appendChild($ISBLANKCHEQUE); $VOUCHER->appendChild($ISVOID); $VOUCHER->appendChild($ISONHOLD); $VOUCHER->appendChild($ORDERLINESTATUS); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VOUCHER->appendChild($VATISPURCEXEMPTED); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $VOUCHER->appendChild($ISVATDUTYPAID); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $VOUCHER->appendChild($ISDELETED); $VOUCHER->appendChild($CHANGEVCHMODE); $VOUCHER->appendChild($ALTERID); $VOUCHER->appendChild($MASTERID); $VOUCHER->appendChild($VOUCHERKEY); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $VOUCHER->appendChild($AUDITENTRIES_LIST); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //star for debit ledger $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$dr_ledger.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "Yes"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$amt_gross.""); $VATEXPAMOUNT_DR = $xml->createElement("VATEXPAMOUNT", "-".$amt_gross.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $bill_name = $xml->createElement("NAME", "".$voucher_no.""); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "-".$amt_gross.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_DR); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for debit ledger //star for credit ledger $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$cr_ledger.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$cr_amount.""); $VATEXPAMOUNT_CR = $xml->createElement("VATEXPAMOUNT", "".$cr_amount.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$bill_name = $xml->createElement("NAME", "vouchr no"); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "".$cr_amount.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); */ $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_CR); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for credit ledger //star for CGST ledger if($cgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); //$ROUNDTYPE_Ca = $xml->createElement("ROUNDTYPE", ""); $GSTCLASS_c = $xml->createElement("GSTCLASS", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "CGST"); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$c_aot.""); $VATEXPAMOUNT_C = $xml->createElement("VATEXPAMOUNT", "".$c_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); //$LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_Ca); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_c); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_C); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for CGST ledger //star for SGST ledger if($sgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); //$ROUNDTYPE_S = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "SGST"); $GSTCLASS_s = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$s_aot.""); $AMOUNT_S = $xml->createElement("VATEXPAMOUNT", "".$s_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); //$LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_S); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_s); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_S); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for SGST ledger //star for UGST ledger if($ugst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_U = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "UGST"); $GSTCLASS_u = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$u_aot.""); $AMOUNT_U = $xml->createElement("VATEXPAMOUNT", "".$u_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_U); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_u); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_U); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for UGST ledger //star for IGST ledger if($igst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_I = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "IGST"); $GSTCLASS_i = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$taot.""); $AMOUNT_I = $xml->createElement("VATEXPAMOUNT", "".$taot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_I); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_i); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_I); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for IGST ledger $PAYROLLMODEOFPAYMENT_LIST_v = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $ATTDRECORDS_LIST_v = $xml->createElement("ATTDRECORDS.LIST", " "); $GSTEWAYCONSIGNORADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $GSTEWAYCONSIGNEEADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $TEMPGSTRATEDETAILS_LIST_v = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST_v); $VOUCHER->appendChild($ATTDRECORDS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST_v); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST_v); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY2 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO2 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO2->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME2 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE2 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_NAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPNAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPSTATE2); $COMPANY2->appendChild($REMOTECMPINFO2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY3 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO3 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO3->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME3 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME3 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE3 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_NAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPNAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPSTATE3); $COMPANY3->appendChild($REMOTECMPINFO3); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->appendChild($COMPANY3); $test = $xml->createElement("TALLYMESSAGE", " "); $test->setAttribute("xmlns:UDF", "TallyUDF"); //Set the attributes. /*$xml_HEADER->setAttribute("length", "0:01:15"); $xml_HEADER->setAttribute("bitrate", "64kb/s"); $xml_HEADER->setAttribute("channels", "2");*/ $xml_HEADER->appendChild($xml_HEADER_TALLYREQUEST); $xml_ENVELOPE->appendChild($xml_HEADER); $xml_ENVELOPE->appendChild($xml_BODY); $xml_BODY->appendChild($xml_BODY_IMPORTDATA); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3); //for ($i = 1; $i <2; $i++) { // $test = '$name_' . $i; // $test = $xml->createElement("TALLYMESSAGE", " "); // $test->setAttribute("xmlns:UDF", "TallyUDF"); // $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($test); //} $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA); $xml->appendChild($xml_ENVELOPE); // Parse the XML. print $xml->saveXML(); die; } public function xml_purchase_two($fid, $eight_randnum){ //echo $eight_randnum; die; $form = $this->model->sales_two_model($fid); $cgst = $form[0]['cgst']; $c_aot = $form[0]['c_aot']; $sgst = $form[0]['sgst']; $s_aot = $form[0]['s_aot']; $ugst = $form[0]['ugst']; $u_aot = $form[0]['u_aot']; $igst = $form[0]['igst']; $i_aot = $form[0]['i_aot']; //echo "<pre>"; print_r($form); die; $stage = $form[0]['stage']; $date = $form[0]['m_date']; $m_date = str_replace(["-", ""], '', $date); $basic_date = date("d-M-Y", strtotime($date)); $basic_time = date("h:i", strtotime($form[0]['date_time'])); $basic_date_time = $basic_date." at ".$basic_time; $voucher_no = $form[0]['voucher_no']; $dr_ledger = $form[0]['dr_ledger']; $narration = $form[0]['narration']; $amt_gross = $form[0]['amt_gross']; $cr_ledger = $form[0]['cr_ledger']; $cr_amount = $form[0]['amt_taxable']; // Set the content type to be XML, so th header("content-type: application/xml; charset=ISO-8859-15"); // "Create" the document. $xml = new DOMDocument("1.0", "ISO-8859-15"); // Create some elements. $xml_ENVELOPE = $xml->createElement("ENVELOPE", ""); $xml_HEADER = $xml->createElement("HEADER", " "); $xml_HEADER_TALLYREQUEST = $xml->createElement("TALLYREQUEST", "Import Data"); $xml_BODY = $xml->createElement("BODY", " "); $xml_BODY_IMPORTDATA = $xml->createElement("IMPORTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDESC = $xml->createElement("REQUESTDESC", " "); $xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME = $xml->createElement("REPORTNAME", " Vouchers "); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES = $xml->createElement("STATICVARIABLES", " "); $xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY = $xml->createElement("SVCURRENTCOMPANY", " Star One Web "); $xml_BODY_IMPORTDATA_REQUESTDATA = $xml->createElement("REQUESTDATA", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->setAttribute("xmlns:UDF", "TallyUDF"); $VOUCHER = $xml->createElement("VOUCHER", " "); $VOUCHER->setAttribute("REMOTEID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $VOUCHER->setAttribute("VCHKEY", "f25d1891-6db0-4709-9bce-1398c37a0aeb-0000a93e:".$eight_randnum.""); $VOUCHER->setAttribute("VCHTYPE", "".$stage.""); $VOUCHER->setAttribute("ACTION", "Create"); $VOUCHER->setAttribute("OBJVIEW", "Accounting Voucher View"); // $adrs_list = $xml->createElement("ADDRESS.LIST", " "); // $adrs_list->setAttribute("TYPE", "String"); // $adrs = $xml->createElement("ADDRESS", "Gujarat, India"); // $basic_buy_list = $xml->createElement("BASICBUYERADDRESS.LIST", " "); // $basic_buy_list->setAttribute("TYPE", "String"); // $basic_buy_adrs = $xml->createElement("BASICBUYERADDRESS", "Gujarat, India"); $OLDAUDITENTRYIDS_list = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_list->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $DATE = $xml->createElement("DATE", "".$m_date.""); $GUID = $xml->createElement("GUID", "f25d1891-6db0-4709-9bce-1398c37a0aeb-".$eight_randnum.""); $STATENAME = $xml->createElement("STATENAME", "Gujarat"); $NARRATION = $xml->createElement("NARRATION", "".$narration.""); $COUNTRYOFRESIDENCE = $xml->createElement("COUNTRYOFRESIDENCE", "India"); //$PARTYNAME = $xml->createElement("PARTYNAME", "".$dr_ledger.""); $VOUCHERTYPENAME = $xml->createElement("VOUCHERTYPENAME", "".$stage.""); $REFERENCE = $xml->createElement("REFERENCE", "".$voucher_no.""); $VOUCHERNUMBER = $xml->createElement("VOUCHERNUMBER", "".$voucher_no.""); $PARTYLEDGERNAME = $xml->createElement("PARTYLEDGERNAME", "".$dr_ledger.""); $BASICBASEPARTYNAME = $xml->createElement("BASICBASEPARTYNAME", "".$dr_ledger.""); $CSTFORMISSUETYPE = $xml->createElement("CSTFORMISSUETYPE", ""); $CSTFORMRECVTYPE = $xml->createElement("CSTFORMRECVTYPE", ""); $FBTPAYMENTTYPE = $xml->createElement("FBTPAYMENTTYPE", "Default"); $PERSISTEDVIEW = $xml->createElement("PERSISTEDVIEW", "Accounting Voucher View"); //$PLACEOFSUPPLY = $xml->createElement("PLACEOFSUPPLY", "Gujarat"); $BASICBUYERNAME = $xml->createElement("BASICBUYERNAME", "".$dr_ledger.""); $BASICDATETIMEOFINVOICE = $xml->createElement("BASICDATETIMEOFINVOICE", "".$basic_date_time.""); $BASICDATETIMEOFREMOVAL = $xml->createElement("BASICDATETIMEOFREMOVAL", "".$basic_date_time.""); $VCHGSTCLASS = $xml->createElement("VCHGSTCLASS", ""); $ENTEREDBY = $xml->createElement("ENTEREDBY", "Admin"); //$CONSIGNEESTATENAME = $xml->createElement("CONSIGNEESTATENAME", "Gujarat"); $DIFFACTUALQTY = $xml->createElement("DIFFACTUALQTY", "No"); $ISMSTFROMSYNC = $xml->createElement("ISMSTFROMSYNC", "No"); $ASORIGINAL = $xml->createElement("ASORIGINAL", "No"); $AUDITED = $xml->createElement("AUDITED", "No"); $FORJOBCOSTING = $xml->createElement("FORJOBCOSTING", "No"); $ISOPTIONAL = $xml->createElement("ISOPTIONAL", "No"); $EFFECTIVEDATE = $xml->createElement("EFFECTIVEDATE", "".$m_date.""); $USEFOREXCISE = $xml->createElement("USEFOREXCISE", "No"); $ISFORJOBWORKIN = $xml->createElement("ISFORJOBWORKIN", "No"); $ALLOWCONSUMPTION = $xml->createElement("ALLOWCONSUMPTION", "No"); $USEFORINTEREST = $xml->createElement("USEFORINTEREST", "No"); $USEFORGAINLOSS = $xml->createElement("USEFORGAINLOSS", "No"); $USEFORGODOWNTRANSFER = $xml->createElement("USEFORGODOWNTRANSFER", "No"); $USEFORCOMPOUND = $xml->createElement("USEFORCOMPOUND", "No"); $USEFORSERVICETAX = $xml->createElement("USEFORSERVICETAX", "No"); $ISEXCISEVOUCHER = $xml->createElement("ISEXCISEVOUCHER", "No"); $EXCISETAXOVERRIDE = $xml->createElement("EXCISETAXOVERRIDE", "No"); $USEFORTAXUNITTRANSFER = $xml->createElement("USEFORTAXUNITTRANSFER", "No"); $IGNOREPOSVALIDATION = $xml->createElement("IGNOREPOSVALIDATION", "No"); $EXCISEOPENING = $xml->createElement("EXCISEOPENING", "No"); $USEFORFINALPRODUCTION = $xml->createElement("USEFORFINALPRODUCTION", "No"); $ISTDSOVERRIDDEN = $xml->createElement("ISTDSOVERRIDDEN", "No"); $ISTCSOVERRIDDEN = $xml->createElement("ISTCSOVERRIDDEN", "No"); $ISTDSTCSCASHVCH = $xml->createElement("ISTDSTCSCASHVCH", "No"); $INCLUDEADVPYMTVCH = $xml->createElement("INCLUDEADVPYMTVCH", "No"); $ISSUBWORKSCONTRACT = $xml->createElement("ISSUBWORKSCONTRACT", "No"); $ISVATOVERRIDDEN = $xml->createElement("ISVATOVERRIDDEN", "No"); $IGNOREORIGVCHDATE = $xml->createElement("IGNOREORIGVCHDATE", "No"); $ISVATPAIDATCUSTOMS = $xml->createElement("ISVATPAIDATCUSTOMS", "No"); $ISDECLAREDTOCUSTOMS = $xml->createElement("ISDECLAREDTOCUSTOMS", "No"); $ISSERVICETAXOVERRIDDEN = $xml->createElement("ISSERVICETAXOVERRIDDEN", "No"); $ISISDVOUCHER = $xml->createElement("ISISDVOUCHER", "No"); $ISEXCISEOVERRIDDEN = $xml->createElement("ISEXCISEOVERRIDDEN", "No"); $ISEXCISESUPPLYVCH = $xml->createElement("ISEXCISESUPPLYVCH", "No"); $ISGSTOVERRIDDEN = $xml->createElement("ISGSTOVERRIDDEN", "No"); $GSTNOTEXPORTED = $xml->createElement("GSTNOTEXPORTED", "No"); $IGNOREGSTINVALIDATION = $xml->createElement("IGNOREGSTINVALIDATION", "No"); $ISVATPRINCIPALACCOUNT = $xml->createElement("ISVATPRINCIPALACCOUNT", "No"); $ISBOENOTAPPLICABLE = $xml->createElement("ISBOENOTAPPLICABLE", "No"); $ISSHIPPINGWITHINSTATE = $xml->createElement("ISSHIPPINGWITHINSTATE", "No"); $ISOVERSEASTOURISTTRANS = $xml->createElement("ISOVERSEASTOURISTTRANS", "No"); $ISDESIGNATEDZONEPARTY = $xml->createElement("ISDESIGNATEDZONEPARTY", "No"); $ISCANCELLED = $xml->createElement("ISCANCELLED", "No"); $HASCASHFLOW = $xml->createElement("HASCASHFLOW", "No"); $ISPOSTDATED = $xml->createElement("ISPOSTDATED", "No"); $USETRACKINGNUMBER = $xml->createElement("USETRACKINGNUMBER", "No"); $ISINVOICE = $xml->createElement("ISINVOICE", "No"); $MFGJOURNAL = $xml->createElement("MFGJOURNAL", "No"); $HASDISCOUNTS = $xml->createElement("HASDISCOUNTS", "No"); $ASPAYSLIP = $xml->createElement("ASPAYSLIP", "No"); $ISCOSTCENTRE = $xml->createElement("ISCOSTCENTRE", "No"); $ISSTXNONREALIZEDVCH = $xml->createElement("ISSTXNONREALIZEDVCH", "No"); $ISEXCISEMANUFACTURERON = $xml->createElement("ISEXCISEMANUFACTURERON", "No"); $ISBLANKCHEQUE = $xml->createElement("ISBLANKCHEQUE", "No"); $ISVOID = $xml->createElement("ISVOID", "No"); $ISONHOLD = $xml->createElement("ISONHOLD", "No"); $ORDERLINESTATUS = $xml->createElement("ORDERLINESTATUS", "No"); $VATISAGNSTCANCSALES = $xml->createElement("VATISAGNSTCANCSALES", "No"); $VATISPURCEXEMPTED = $xml->createElement("VATISPURCEXEMPTED", "No"); $ISVATRESTAXINVOICE = $xml->createElement("ISVATRESTAXINVOICE", "No"); $VATISASSESABLECALCVCH = $xml->createElement("VATISASSESABLECALCVCH", "No"); $ISVATDUTYPAID = $xml->createElement("ISVATDUTYPAID", "Yes"); $ISDELIVERYSAMEASCONSIGNEE = $xml->createElement("ISDELIVERYSAMEASCONSIGNEE", "No"); $ISDISPATCHSAMEASCONSIGNOR = $xml->createElement("ISDISPATCHSAMEASCONSIGNOR", "No"); $ISDELETED = $xml->createElement("ISDELETED", "No"); $CHANGEVCHMODE = $xml->createElement("CHANGEVCHMODE", "No"); $ALTERID = $xml->createElement("ALTERID", "29"); $MASTERID = $xml->createElement("MASTERID", "14"); $VOUCHERKEY = $xml->createElement("VOUCHERKEY", "186083753066560"); $EXCLUDEDTAXATIONS_LIST = $xml->createElement("EXCLUDEDTAXATIONS.LIST", " "); $OLDAUDITENTRIES_LIST = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST = $xml->createElement("AUDITENTRIES.LIST", " "); $DUTYHEADDETAILS_LIST = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $SUPPLEMENTARYDUTYHEADDETAILS_LIST = $xml->createElement("SUPPLEMENTARYDUTYHEADDETAILS.LIST", " "); $EWAYBILLDETAILS_LIST = $xml->createElement("EWAYBILLDETAILS.LIST", " "); $INVOICEDELNOTES_LIST = $xml->createElement("INVOICEDELNOTES.LIST", " "); $INVOICEORDERLIST_LIST = $xml->createElement("INVOICEORDERLIST.LIST", " "); $INVOICEINDENTLIST_LIST = $xml->createElement("INVOICEINDENTLIST.LIST", " "); $ATTENDANCEENTRIES_LIST = $xml->createElement("ATTENDANCEENTRIES.LIST", " "); $ORIGINVOICEDETAILS_LIST = $xml->createElement("ORIGINVOICEDETAILS.LIST", " "); $INVOICEEXPORTLIST_LIST = $xml->createElement("INVOICEEXPORTLIST.LIST", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1->appendChild($VOUCHER); /*$VOUCHER->appendChild($adrs_list); $adrs_list->appendChild($adrs); $VOUCHER->appendChild($basic_buy_list); $basic_buy_list->appendChild($basic_buy_adrs); */ $VOUCHER->appendChild($OLDAUDITENTRYIDS_list); $OLDAUDITENTRYIDS_list->appendChild($OLDAUDITENTRYIDS); $VOUCHER->appendChild($DATE); $VOUCHER->appendChild($GUID); $VOUCHER->appendChild($STATENAME); $VOUCHER->appendChild($NARRATION); $VOUCHER->appendChild($COUNTRYOFRESIDENCE); //$VOUCHER->appendChild($PARTYNAME); $VOUCHER->appendChild($VOUCHERTYPENAME); $VOUCHER->appendChild($REFERENCE); $VOUCHER->appendChild($VOUCHERNUMBER); $VOUCHER->appendChild($PARTYLEDGERNAME); $VOUCHER->appendChild($BASICBASEPARTYNAME); $VOUCHER->appendChild($CSTFORMISSUETYPE); $VOUCHER->appendChild($CSTFORMRECVTYPE); $VOUCHER->appendChild($FBTPAYMENTTYPE); $VOUCHER->appendChild($PERSISTEDVIEW); //$VOUCHER->appendChild($PLACEOFSUPPLY); $VOUCHER->appendChild($BASICBUYERNAME); $VOUCHER->appendChild($BASICDATETIMEOFINVOICE); $VOUCHER->appendChild($BASICDATETIMEOFREMOVAL); $VOUCHER->appendChild($VCHGSTCLASS); $VOUCHER->appendChild($ENTEREDBY); //$VOUCHER->appendChild($CONSIGNEESTATENAME); $VOUCHER->appendChild($DIFFACTUALQTY); $VOUCHER->appendChild($ISMSTFROMSYNC); $VOUCHER->appendChild($ASORIGINAL); $VOUCHER->appendChild($AUDITED); $VOUCHER->appendChild($FORJOBCOSTING); $VOUCHER->appendChild($ISOPTIONAL); $VOUCHER->appendChild($EFFECTIVEDATE); $VOUCHER->appendChild($USEFOREXCISE); $VOUCHER->appendChild($ISFORJOBWORKIN); $VOUCHER->appendChild($ALLOWCONSUMPTION); $VOUCHER->appendChild($USEFORINTEREST); $VOUCHER->appendChild($USEFORGAINLOSS); $VOUCHER->appendChild($USEFORGODOWNTRANSFER); $VOUCHER->appendChild($USEFORCOMPOUND); $VOUCHER->appendChild($USEFORSERVICETAX); $VOUCHER->appendChild($ISEXCISEVOUCHER); $VOUCHER->appendChild($EXCISETAXOVERRIDE); $VOUCHER->appendChild($USEFORTAXUNITTRANSFER); $VOUCHER->appendChild($IGNOREPOSVALIDATION); $VOUCHER->appendChild($EXCISEOPENING); $VOUCHER->appendChild($USEFORFINALPRODUCTION); $VOUCHER->appendChild($ISTDSOVERRIDDEN); $VOUCHER->appendChild($ISTCSOVERRIDDEN); $VOUCHER->appendChild($ISTDSTCSCASHVCH); $VOUCHER->appendChild($INCLUDEADVPYMTVCH); $VOUCHER->appendChild($ISSUBWORKSCONTRACT); $VOUCHER->appendChild($ISVATOVERRIDDEN); $VOUCHER->appendChild($IGNOREORIGVCHDATE); $VOUCHER->appendChild($ISVATPAIDATCUSTOMS); $VOUCHER->appendChild($ISDECLAREDTOCUSTOMS); $VOUCHER->appendChild($ISSERVICETAXOVERRIDDEN); $VOUCHER->appendChild($ISISDVOUCHER); $VOUCHER->appendChild($ISEXCISEOVERRIDDEN); $VOUCHER->appendChild($ISEXCISESUPPLYVCH); $VOUCHER->appendChild($ISGSTOVERRIDDEN); $VOUCHER->appendChild($GSTNOTEXPORTED); $VOUCHER->appendChild($IGNOREGSTINVALIDATION); $VOUCHER->appendChild($ISVATPRINCIPALACCOUNT); $VOUCHER->appendChild($ISBOENOTAPPLICABLE); $VOUCHER->appendChild($ISSHIPPINGWITHINSTATE); $VOUCHER->appendChild($ISOVERSEASTOURISTTRANS); $VOUCHER->appendChild($ISDESIGNATEDZONEPARTY); $VOUCHER->appendChild($ISCANCELLED); $VOUCHER->appendChild($HASCASHFLOW); $VOUCHER->appendChild($ISPOSTDATED); $VOUCHER->appendChild($USETRACKINGNUMBER); $VOUCHER->appendChild($ISINVOICE); $VOUCHER->appendChild($MFGJOURNAL); $VOUCHER->appendChild($HASDISCOUNTS); $VOUCHER->appendChild($ASPAYSLIP); $VOUCHER->appendChild($ISCOSTCENTRE); $VOUCHER->appendChild($ISSTXNONREALIZEDVCH); $VOUCHER->appendChild($ISEXCISEMANUFACTURERON); $VOUCHER->appendChild($ISBLANKCHEQUE); $VOUCHER->appendChild($ISVOID); $VOUCHER->appendChild($ISONHOLD); $VOUCHER->appendChild($ORDERLINESTATUS); $VOUCHER->appendChild($VATISAGNSTCANCSALES); $VOUCHER->appendChild($VATISPURCEXEMPTED); $VOUCHER->appendChild($ISVATRESTAXINVOICE); $VOUCHER->appendChild($VATISASSESABLECALCVCH); $VOUCHER->appendChild($ISVATDUTYPAID); $VOUCHER->appendChild($ISDELIVERYSAMEASCONSIGNEE); $VOUCHER->appendChild($ISDISPATCHSAMEASCONSIGNOR); $VOUCHER->appendChild($ISDELETED); $VOUCHER->appendChild($CHANGEVCHMODE); $VOUCHER->appendChild($ALTERID); $VOUCHER->appendChild($MASTERID); $VOUCHER->appendChild($VOUCHERKEY); $VOUCHER->appendChild($EXCLUDEDTAXATIONS_LIST); $VOUCHER->appendChild($OLDAUDITENTRIES_LIST); $VOUCHER->appendChild($ACCOUNTAUDITENTRIES_LIST); $VOUCHER->appendChild($AUDITENTRIES_LIST); $VOUCHER->appendChild($DUTYHEADDETAILS_LIST); $VOUCHER->appendChild($SUPPLEMENTARYDUTYHEADDETAILS_LIST); $VOUCHER->appendChild($EWAYBILLDETAILS_LIST); $VOUCHER->appendChild($INVOICEDELNOTES_LIST); $VOUCHER->appendChild($INVOICEORDERLIST_LIST); $VOUCHER->appendChild($INVOICEINDENTLIST_LIST); $VOUCHER->appendChild($ATTENDANCEENTRIES_LIST); $VOUCHER->appendChild($ORIGINVOICEDETAILS_LIST); $VOUCHER->appendChild($INVOICEEXPORTLIST_LIST); //star for debit ledger $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$dr_ledger.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "Yes"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "Yes"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "Yes"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "".$amt_gross.""); $VATEXPAMOUNT_DR = $xml->createElement("VATEXPAMOUNT", "".$amt_gross.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $bill_name = $xml->createElement("NAME", "".$voucher_no.""); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "".$amt_gross.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_DR); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for debit ledger //star for credit ledger $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $LEDGERNAME = $xml->createElement("LEDGERNAME", "".$cr_ledger.""); $GSTCLASSdl = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$cr_amount.""); $VATEXPAMOUNT_CR = $xml->createElement("VATEXPAMOUNT", "-".$cr_amount.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); /*$bill_name = $xml->createElement("NAME", "vouchr no"); $bill_type = $xml->createElement("BILLTYPE", "New Ref"); $bill_tds = $xml->createElement("TDSDEDUCTEEISSPECIALRATE", "No"); $bill_amount = $xml->createElement("AMOUNT", "".$cr_amount.""); $bill_interest = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $bill_stcat = $xml->createElement("STBILLCATEGORIES.LIST", " "); $BILLALLOCATIONS_LIST->appendChild($bill_name); $BILLALLOCATIONS_LIST->appendChild($bill_type); $BILLALLOCATIONS_LIST->appendChild($bill_tds); $BILLALLOCATIONS_LIST->appendChild($bill_amount); $BILLALLOCATIONS_LIST->appendChild($bill_interest); $BILLALLOCATIONS_LIST->appendChild($bill_stcat); */ $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASSdl); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_CR); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); //end for credit ledger //star for CGST ledger if($cgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); //$ROUNDTYPE_Ca = $xml->createElement("ROUNDTYPE", ""); $GSTCLASS_c = $xml->createElement("GSTCLASS", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "CGST"); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$c_aot.""); $VATEXPAMOUNT_C = $xml->createElement("VATEXPAMOUNT", "-".$c_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); //$LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_Ca); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_c); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($VATEXPAMOUNT_C); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for CGST ledger //star for SGST ledger if($sgst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); //$ROUNDTYPE_S = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "SGST"); $GSTCLASS_s = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$s_aot.""); $AMOUNT_S = $xml->createElement("VATEXPAMOUNT", "-".$s_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); //$LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_S); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_s); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_S); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for SGST ledger //star for UGST ledger if($ugst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_U = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "UGST"); $GSTCLASS_u = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$u_aot.""); $AMOUNT_U = $xml->createElement("VATEXPAMOUNT", "-".$u_aot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_U); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_u); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_U); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for UGST ledger //star for IGST ledger if($igst != '0'){ $LEDGERENTRIES_LIST = $xml->createElement("ALLLEDGERENTRIES.LIST", " "); $OLDAUDITENTRYIDS_LIST = $xml->createElement("OLDAUDITENTRYIDS.LIST", " "); $OLDAUDITENTRYIDS_LIST->setAttribute("TYPE", "Number"); $OLDAUDITENTRYIDS_ai = $xml->createElement("OLDAUDITENTRYIDS", "-1"); $ROUNDTYPE_I = $xml->createElement("ROUNDTYPE", ""); $LEDGERNAME = $xml->createElement("LEDGERNAME", "IGST"); $GSTCLASS_i = $xml->createElement("GSTCLASS", ""); $ISDEEMEDPOSITIVE = $xml->createElement("ISDEEMEDPOSITIVE", "No"); $LEDGERFROMITEM = $xml->createElement("LEDGERFROMITEM", "No"); $REMOVEZEROENTRIES = $xml->createElement("REMOVEZEROENTRIES", "No"); $ISPARTYLEDGER = $xml->createElement("ISPARTYLEDGER", "No"); $ISLASTDEEMEDPOSITIVE = $xml->createElement("ISLASTDEEMEDPOSITIVE", "No"); $ISCAPVATTAXALTERED = $xml->createElement("ISCAPVATTAXALTERED", "No"); $ISCAPVATNOTCLAIMED = $xml->createElement("ISCAPVATNOTCLAIMED", "No"); $AMOUNT_LE = $xml->createElement("AMOUNT", "-".$taot.""); $AMOUNT_I = $xml->createElement("VATEXPAMOUNT", "-".$taot.""); $SERVICETAXDETAILS_LIST = $xml->createElement("SERVICETAXDETAILS.LIST", " "); $BANKALLOCATIONS_LIST = $xml->createElement("BANKALLOCATIONS.LIST", " "); $BILLALLOCATIONS_LIST = $xml->createElement("BILLALLOCATIONS.LIST", " "); $INTERESTCOLLECTION_LIST = $xml->createElement("INTERESTCOLLECTION.LIST", " "); $OLDAUDITENTRIES_LIST_AA = $xml->createElement("OLDAUDITENTRIES.LIST", " "); $ACCOUNTAUDITENTRIES_LIST_AA = $xml->createElement("ACCOUNTAUDITENTRIES.LIST", " "); $AUDITENTRIES_LIST_AA = $xml->createElement("AUDITENTRIES.LIST", " "); $INPUTCRALLOCS_LIST_AA = $xml->createElement("INPUTCRALLOCS.LIST", " "); $DUTYHEADDETAILS_LIST_LE = $xml->createElement("DUTYHEADDETAILS.LIST", " "); $EXCISEDUTYHEADDETAILS_LIST = $xml->createElement("EXCISEDUTYHEADDETAILS.LIST", " "); $RATEDETAILS_LIST = $xml->createElement("RATEDETAILS.LIST", " "); $SUMMARYALLOCS_LIST = $xml->createElement("SUMMARYALLOCS.LIST", " "); $STPYMTDETAILS_LIST = $xml->createElement("STPYMTDETAILS.LIST", " "); $EXCISEPAYMENTALLOCATIONS_LIST = $xml->createElement("EXCISEPAYMENTALLOCATIONS.LIST", " "); $TAXBILLALLOCATIONS_LIST = $xml->createElement("TAXBILLALLOCATIONS.LIST", " "); $TAXOBJECTALLOCATIONS_LIST = $xml->createElement("TAXOBJECTALLOCATIONS.LIST", " "); $TDSEXPENSEALLOCATIONS_LIST = $xml->createElement("TDSEXPENSEALLOCATIONS.LIST", " "); $VATSTATUTORYDETAILS_LIST = $xml->createElement("VATSTATUTORYDETAILS.LIST", " "); $COSTTRACKALLOCATIONS_LIST = $xml->createElement("COSTTRACKALLOCATIONS.LIST", " "); $REFVOUCHERDETAILS_LIST = $xml->createElement("REFVOUCHERDETAILS.LIST", " "); $INVOICEWISEDETAILS_LIST = $xml->createElement("INVOICEWISEDETAILS.LIST", " "); $VATITCDETAILS_LIST_LE = $xml->createElement("VATITCDETAILS.LIST", " "); $ADVANCETAXDETAILS_LIST = $xml->createElement("ADVANCETAXDETAILS.LIST", " "); $VOUCHER->appendChild($LEDGERENTRIES_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRYIDS_LIST); $OLDAUDITENTRYIDS_LIST->appendChild($OLDAUDITENTRYIDS_ai); $LEDGERENTRIES_LIST->appendChild($ROUNDTYPE_I); $LEDGERENTRIES_LIST->appendChild($LEDGERNAME); $LEDGERENTRIES_LIST->appendChild($GSTCLASS_i); $LEDGERENTRIES_LIST->appendChild($ISDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($LEDGERFROMITEM); $LEDGERENTRIES_LIST->appendChild($REMOVEZEROENTRIES); $LEDGERENTRIES_LIST->appendChild($ISPARTYLEDGER); $LEDGERENTRIES_LIST->appendChild($ISLASTDEEMEDPOSITIVE); $LEDGERENTRIES_LIST->appendChild($ISCAPVATTAXALTERED); $LEDGERENTRIES_LIST->appendChild($ISCAPVATNOTCLAIMED); $LEDGERENTRIES_LIST->appendChild($AMOUNT_LE); $LEDGERENTRIES_LIST->appendChild($AMOUNT_I); $LEDGERENTRIES_LIST->appendChild($SERVICETAXDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($BANKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($BILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($INTERESTCOLLECTION_LIST); $LEDGERENTRIES_LIST->appendChild($OLDAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($ACCOUNTAUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($AUDITENTRIES_LIST_AA); $LEDGERENTRIES_LIST->appendChild($INPUTCRALLOCS_LIST_AA); $LEDGERENTRIES_LIST->appendChild($DUTYHEADDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($EXCISEDUTYHEADDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($RATEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($SUMMARYALLOCS_LIST); $LEDGERENTRIES_LIST->appendChild($STPYMTDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($EXCISEPAYMENTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXBILLALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TAXOBJECTALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($TDSEXPENSEALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($VATSTATUTORYDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($COSTTRACKALLOCATIONS_LIST); $LEDGERENTRIES_LIST->appendChild($REFVOUCHERDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($INVOICEWISEDETAILS_LIST); $LEDGERENTRIES_LIST->appendChild($VATITCDETAILS_LIST_LE); $LEDGERENTRIES_LIST->appendChild($ADVANCETAXDETAILS_LIST); } //end for IGST ledger $PAYROLLMODEOFPAYMENT_LIST_v = $xml->createElement("PAYROLLMODEOFPAYMENT.LIST", " "); $ATTDRECORDS_LIST_v = $xml->createElement("ATTDRECORDS.LIST", " "); $GSTEWAYCONSIGNORADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNORADDRESS.LIST", " "); $GSTEWAYCONSIGNEEADDRESS_LIST_v = $xml->createElement("GSTEWAYCONSIGNEEADDRESS.LIST", " "); $TEMPGSTRATEDETAILS_LIST_v = $xml->createElement("TEMPGSTRATEDETAILS.LIST", " "); $VOUCHER->appendChild($PAYROLLMODEOFPAYMENT_LIST_v); $VOUCHER->appendChild($ATTDRECORDS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNORADDRESS_LIST_v); $VOUCHER->appendChild($GSTEWAYCONSIGNEEADDRESS_LIST_v); $VOUCHER->appendChild($TEMPGSTRATEDETAILS_LIST_v); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY2 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO2 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO2->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME2 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME2 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE2 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_NAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPNAME2); $REMOTECMPINFO2->appendChild($REMOTECMPINFO_REMOTECMPSTATE2); $COMPANY2->appendChild($REMOTECMPINFO2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2->appendChild($COMPANY2); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3 = $xml->createElement("TALLYMESSAGE", " "); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->setAttribute("xmlns:UDF", "TallyUDF"); $COMPANY3 = $xml->createElement("COMPANY", " "); $REMOTECMPINFO3 = $xml->createElement("REMOTECMPINFO.LIST", " "); $REMOTECMPINFO3->setAttribute("MERGE", "yes"); $REMOTECMPINFO_NAME3 = $xml->createElement("NAME", "f25d1891-6db0-4709-9bce-1398c37a0aeb"); $REMOTECMPINFO_REMOTECMPNAME3 = $xml->createElement("REMOTECMPNAME", " SANDIP COMPANY "); $REMOTECMPINFO_REMOTECMPSTATE3 = $xml->createElement("REMOTECMPSTATE", " Gujarat"); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_NAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPNAME3); $REMOTECMPINFO3->appendChild($REMOTECMPINFO_REMOTECMPSTATE3); $COMPANY3->appendChild($REMOTECMPINFO3); $xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3->appendChild($COMPANY3); $test = $xml->createElement("TALLYMESSAGE", " "); $test->setAttribute("xmlns:UDF", "TallyUDF"); //Set the attributes. /*$xml_HEADER->setAttribute("length", "0:01:15"); $xml_HEADER->setAttribute("bitrate", "64kb/s"); $xml_HEADER->setAttribute("channels", "2");*/ $xml_HEADER->appendChild($xml_HEADER_TALLYREQUEST); $xml_ENVELOPE->appendChild($xml_HEADER); $xml_ENVELOPE->appendChild($xml_BODY); $xml_BODY->appendChild($xml_BODY_IMPORTDATA); $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_REPORTNAME); $xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC__SVCURRENTCOMPANY); $xml_BODY_IMPORTDATA_REQUESTDESC->appendChild($xml_BODY_IMPORTDATA_REQUESTDESC_STATICVARIABLES); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE1); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE2); $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA_TALLYMESSAGE3); //for ($i = 1; $i <2; $i++) { // $test = '$name_' . $i; // $test = $xml->createElement("TALLYMESSAGE", " "); // $test->setAttribute("xmlns:UDF", "TallyUDF"); // $xml_BODY_IMPORTDATA_REQUESTDATA->appendChild($test); //} $xml_BODY_IMPORTDATA->appendChild($xml_BODY_IMPORTDATA_REQUESTDATA); $xml->appendChild($xml_ENVELOPE); // Parse the XML. print $xml->saveXML(); die; } public function upNoti(){ $ses = $this->session->get_userdata(); $rid = $ses['reg_info'][0]['rid']; $data = $this->model->custUploads($rid); $ucnt = count($data); $html = ''; foreach($data as $key => $val){ $date = date('d-m-Y h:i:A', strtotime($val['datetime'])); $month = substr($val['month'], strpos($val['month'], "_")+1); $path = $val['year'].'/'.$month.'/'.$val['stage']; $arrayDetail = array( 'code' => $val['folder_code'], 'stage' => $val['stage'], 'year' => $val['year'], 'month' => $val['month'], 'n_id' => $val['n_id'] ); $ad = urlencode(serialize($arrayDetail)); $url = base_url().'webapp/office/file_view_noti/'.$ad; $html .= '<li class="formlink"> <a href="'.$url.'"> <h4 class="text-capitalize text-red"> <strong>'.$val["name"].'</strong> <small><i class="fa fa-clock-o"></i> '.$date.' </small> </h4> <p> '.$val["file_count"].' Document has been Uploaded. </p> <p>'.$path.'</p> </a> </li>'; } $resultArrauy['cnt'] = $ucnt; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } public function accNoti(){ $ses = $this->session->get_userdata(); $rid = $ses['reg_info'][0]['rid']; $notification = $this->model->officeModelNoti($rid); if(!empty($notification)){ } $new = array_filter($notification, function ($var) { return ($var['sts'] == 'unseen'); }); //echo '<pre>'; print_r($new); die; $ncnt = count($new); $html = ''; foreach ($notification as $key => $noti) { $cust_id = $this->model->encryptdata($noti['afrom']); $noti_id = $this->model->encryptdata($noti['id']); $stage = explode('|',trim($noti['given'],'|')); $stage_string = implode(', ',$stage ); $html .='<li class="'.$noti['sts'].'"> <a href="#"> <div class="pull-left"> <i class="fa fa-check-square-o text-green"></i> </div> <h4> '.$noti['name'].' <small><i class="fa fa-clock-o"></i> Avail Access - ' .date("d-m-y, h:i", strtotime($noti['date'])).' </small> </h4> <p class="text-capitalize"> '.$stage_string.' </p> </a> </li>'; } $resultArrauy['cnt'] = $ncnt; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } public function errNoti(){ $ses = $this->session->get_userdata(); $rid = $ses['reg_info'][0]['rid']; $form_noti_office = $this->model->formNotiOffice($rid); $form_count_office = count($form_noti_office); $new2 = array_filter($form_noti_office, function ($var) { return ($var['o_noti'] == 'unseen'); }); $ocnt = count($new2); $html = ''; $count = 0; foreach ($form_noti_office as $frm_noti_ofc) { $enc_fid = $this->model->encryptdata($frm_noti_ofc['fid']); $note = explode('|', $frm_noti_ofc['note']); $note = implode('<br> ',$note ); $stage = $frm_noti_ofc['stage']; if($stage == 'contra'){ $url = base_url().'webapp/office/update_contra/'.$enc_fid; }elseif($stage == 'receipt'){ $url = base_url().'webapp/office/update_receipt/'.$enc_fid; }elseif($stage == 'payment'){ $url = base_url().'webapp/office/update_payment/'.$enc_fid; }elseif($stage == 'journal'){ $url = base_url().'webapp/office/update_journal/'.$enc_fid; }elseif($stage == 'credit'){ $url = base_url().'webapp/office/update_credit/'.$enc_fid; }elseif($stage == 'debit'){ $url = base_url().'webapp/office/update_debit/'.$enc_fid; }elseif($stage == 'cheque_reg'){ $voucher_type = $frm_noti_ofc['voucher_type']; if($voucher_type == 'payment'){ $url = base_url().'webapp/office/update_payment/'.$enc_fid; }else{ $url = base_url().'webapp/office/update_receipt/'.$enc_fid; } }elseif($stage == 'bank'){ $voucher_type = $frm_noti_ofc['voucher_type']; if($voucher_type == 'payment'){ $url = base_url().'webapp/office/update_payment/'.$enc_fid; }elseif($voucher_type == 'receipt'){ $url = base_url().'webapp/office/update_receipt/'.$enc_fid; }else{ $url = base_url().'webapp/office/update_contra/'.$enc_fid; } }else{ $url = base_url().'webapp/office/update_form/'.$enc_fid; } $html .=' <li data-toggle="tooltip" data-html="true" data-placement="left" title="'.$note.'" class="'.$frm_noti_ofc['o_noti'].' formlink"> <a href="'.$url.'"> <h4 class="text-capitalize text-green"> <strong>'.$frm_noti_ofc['cname'].'</strong> <small><i class="fa fa-clock-o"></i> '.date('d-m-y, h:i', strtotime($frm_noti_ofc['date_time'])).' </small> </h4> <p>This form is rejected.</p> <p class="text-capitalize text-red"><strong>'.$frm_noti_ofc['release_status'].'</strong></p> </a> </li> '; $count++; } $resultArrauy['cnt'] = $ocnt; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } public function frmStatus(){ $ses = $this->session->get_userdata(); $rid = $ses['reg_info'][0]['rid']; $form_noti = $this->model->formNoti(); $fscnt = count($form_noti); $html = ''; foreach ($form_noti as $frm_noti) { $enc_fid = $this->model->encryptdata($frm_noti['fid']); $pt = explode('/', $frm_noti['path']); $html .=' <li class="'.$frm_noti['l_noti'].' formlink"> <a href="'.base_url().'webapp/office/viewForm/'.$enc_fid.'"> <h4 class="text-capitalize text-red"> <strong>'.$frm_noti['cname'].'</strong> <small><i class="fa fa-clock-o"></i> '.date('d-m-y, h:i', strtotime($frm_noti['date_time'])).' </small> </h4> <p> '.$pt[4].' form has been released by '.$frm_noti['oname'].' </p> </a> </li> '; } $resultArrauy['cnt'] = $fscnt; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } public function frmStatusTwo(){ $ses = $this->session->get_userdata(); $rid = $ses['reg_info'][0]['rid']; $form_noti = $this->model->formNotiTwo(); $fscnt = count($form_noti); $html = ''; foreach ($form_noti as $frm_noti) { $enc_fid = $this->model->encryptdata($frm_noti['fid']); $pt = explode('/', $frm_noti['path']); $html .=' <li class="'.$frm_noti['l_noti'].' formlink"> <a href="'.base_url().'webapp/office/viewForm/'.$enc_fid.'"> <h4 class="text-capitalize text-red"> <strong>'.$frm_noti['cname'].'</strong> <small><i class="fa fa-clock-o"></i> '.date('d-m-y, h:i', strtotime($frm_noti['date_time'])).' </small> </h4> <p> '.$pt[4].' form has been released again by '.$frm_noti['oname'].' </p> </a> </li> '; } $resultArrauy['cnt'] = $fscnt; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } public function getRejectId($id){ $html = ''; $html.=' <input type="hidden" name="fid" value="'.$id.'"> '; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } public function checkForm($id){ //$id = $this->model->decryptdata($encrypted_id); $where = array('fid' => $id); $data['form'] = $this->model->DetailData('tbl_form', $where); $stage = $data['form'][0]['stage']; $voucher_type = $data['form'][0]['voucher_type']; //echo "<pre>"; print_r($data['form']); die; $noti = array('l_noti' => 'seen'); $this->model->UpdateData('tbl_form', $noti, $where); if($stage == 'contra'){ $frm = $this->model->office_form_contra($id); $html = ''; $html .=' <table class="table table-bordered"> <tr> <th>Date</th> <th>Voucher No</th> <th>Party Ledger Name (Cr)</th> <th>Ledger Name(Dr)</th> <th>Amount</th> <th>Cheque No</th> <th>Cheque Date</th> </tr> <tr> <td>'.$frm[0]['m_date'].'</td> <td>'.$frm[0]['voucher_no'].'</td> <td>'.$frm[0]['party_ledger'].'</td> <td>'.$frm[0]['sun_ledger'].'</td> <td>'.$frm[0]['amt_gross'].'</td> <td>'.$frm[0]['check_no'].'</td> <td>'.$frm[0]['check_date'].'</td> </tr> </table> '; if($frm[0]['stage'] == 'bank' || $frm[0]['stage'] == 'cheque_reg'){ $vt = " - ".$frm[0]['voucher_type']; }else{ $vt = ''; } $path = explode('|-|',$frm[0]['path']); $usedFIles = ''; $f = 1; foreach ($path as $pth => $p) { $usedFIles.=' <a data-toggle="tooltip" data-placement="top" title="Used files" class="label label-primary" target="_blank" href="'.base_url().$p.'">File '.$f.'</a> '; $f++; } $head = ''; $head.=' customer : '.$frm[0]['cname'].' ('.$frm[0]['stage'].$vt.') <br> narration : '.$frm[0]['narration'].'<br> '.$usedFIles.' '; $resultArrauy['head'] = $head; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); }elseif($stage == 'receipt'){ $frm = $this->model->office_form_receipt($id); //echo "<pre>"; print_r($data['frm']); die; $html = ''; $html .=' <table class="table table-bordered"> <th>Date</th> <th>Voucher No</th> <th>Party Ledger Name</th> <th>Ledger Name (Cr.)</th> <th>Ledger Name (Dr.)</th> <th>Amount</th> <th>Cheque No</th> <th>Cheque Date</th> </tr> <tr> <td>'.$frm[0]['m_date'].'</td> <td>'.$frm[0]['voucher_no'].'</td> <td>'.$frm[0]['party_ledger'].'</td> <td>'.$frm[0]['cr_ledger'].'</td> <td>'.$frm[0]['dr_ledger'].'</td> <td>'.$frm[0]['amt_gross'].'</td> <td>'.$frm[0]['check_no'].'</td> <td>'.$frm[0]['check_date'].'</td> </tr> </table> '; if($frm[0]['stage'] == 'bank' || $frm[0]['stage'] == 'cheque_reg'){ $vt = " - ".$frm[0]['voucher_type']; }else{ $vt = ''; } $path = explode('|-|',$frm[0]['path']); $usedFIles = ''; $f = 1; foreach ($path as $pth => $p) { $usedFIles.=' <a data-toggle="tooltip" data-placement="top" title="Used files" class="label label-primary" target="_blank" href="'.base_url().$p.'">File '.$f.'</a> '; $f++; } $head = ''; $head.=' customer : '.$frm[0]['cname'].' ('.$frm[0]['stage'].$vt.') <br> narration : '.$frm[0]['narration'].'<br> '.$usedFIles.' '; $resultArrauy['head'] = $head; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); }elseif($stage == 'payment'){ //$data['frm'] = $this->model->office_form_paymet($id); //echo "<pre>"; print_r($data['frm']); die; $frm = $this->model->office_form_paymet($id); //echo "<pre>"; print_r($data['frm']); die; $html = ''; $html .=' <table class="table table-bordered"> <th>Date</th> <th>Voucher No</th> <th>Party Ledger Name</th> <th>Ledger Name (Cr.)</th> <th>Ledger Name (Dr.)</th> <th>Amount</th> <th>Cheque No</th> <th>Cheque Date</th> </tr> <tr> <td>'.$frm[0]['m_date'].'</td> <td>'.$frm[0]['voucher_no'].'</td> <td>'.$frm[0]['party_ledger'].'</td> <td>'.$frm[0]['credit_ledger'].'</td> <td>'.$frm[0]['debit_ledger'].'</td> <td>'.$frm[0]['amt_gross'].'</td> <td>'.$frm[0]['check_no'].'</td> <td>'.$frm[0]['check_date'].'</td> </tr> </table> '; if($frm[0]['stage'] == 'bank' || $frm[0]['stage'] == 'cheque_reg'){ $vt = " - ".$frm[0]['voucher_type']; }else{ $vt = ''; } $path = explode('|-|',$frm[0]['path']); $usedFIles = ''; $f = 1; foreach ($path as $pth => $p) { $usedFIles.=' <a data-toggle="tooltip" data-placement="top" title="Used files" class="label label-primary" target="_blank" href="'.base_url().$p.'">File '.$f.'</a> '; $f++; } $head = ''; $head.=' customer : '.$frm[0]['cname'].' ('.$frm[0]['stage'].$vt.') <br> narration : '.$frm[0]['narration'].'<br> '.$usedFIles.' '; $resultArrauy['head'] = $head; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); }elseif($stage == 'journal'){ //$data['frm'] = $this->model->office_form_journal($id); //echo "<pre>"; print_r($data['frm']); die; $frm = $this->model->office_form_receipt($id); //echo "<pre>"; print_r($data['frm']); die; $html = ''; $html .=' <table class="table table-bordered"> <th>Date</th> <th>Voucher No</th> <th>Party Ledger Name</th> <th>Ledger Name (Dr.)</th> <th>Ledger Name (Cr.)</th> <th>Amount</th> </tr> <tr> <td>'.$frm[0]['m_date'].'</td> <td>'.$frm[0]['voucher_no'].'</td> <td>'.$frm[0]['party_ledger'].'</td> <td>'.$frm[0]['cr_ledger'].'</td> <td>'.$frm[0]['dr_ledger'].'</td> <td>'.$frm[0]['amt_gross'].'</td> </tr> </table> '; $path = explode('|-|',$frm[0]['path']); $usedFIles = ''; $f = 1; foreach ($path as $pth => $p) { $usedFIles.=' <a data-toggle="tooltip" data-placement="top" title="Used files" class="label label-primary" target="_blank" href="'.base_url().$p.'">File '.$f.'</a> '; $f++; } $head = ''; $head.=' customer : '.$frm[0]['cname'].' ('.$frm[0]['stage'].') <br> narration : '.$frm[0]['narration'].'<br> '.$usedFIles.' '; $resultArrauy['head'] = $head; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); }elseif($stage == 'credit'){ $frm = $this->model->of_cr($id); //echo "<pre>"; print_r($frm); die; $html = ''; $html .=' <table class="table table-bordered"> <th>Date</th> <th>Voucher No</th> <th>Party Ledger Name</th> <th>Ledger Name (Cr.)</th> <th>Amount</th> <th>Cheque No</th> <th>Cheque Date</th> </tr> <tr> <td>'.$frm[0]['m_date'].'</td> <td>'.$frm[0]['voucher_no'].'</td> <td>'.$frm[0]['party_ledger'].'</td> <td>'.$frm[0]['master_ledger'].'</td> <td>'.$frm[0]['amt_gross'].'</td> <td>'.$frm[0]['check_no'].'</td> <td>'.$frm[0]['check_date'].'</td> </tr> </table> '; if($frm[0]['stage'] == 'bank' || $frm[0]['stage'] == 'cheque_reg'){ $vt = " - ".$frm[0]['voucher_type']; }else{ $vt = ''; } $path = explode('|-|',$frm[0]['path']); $usedFIles = ''; $f = 1; foreach ($path as $pth => $p) { $usedFIles.=' <a data-toggle="tooltip" data-placement="top" title="Used files" class="label label-primary" target="_blank" href="'.base_url().$p.'">File '.$f.'</a> '; $f++; } $head = ''; $head.=' customer : '.$frm[0]['cname'].' ('.$frm[0]['stage'].$vt.') <br> narration : '.$frm[0]['narration'].'<br> '.$usedFIles.' '; $info = $frm[0]['info']; //echo "<pre>"; print_r($info); $sub = ''; foreach ($info as $i) { $sub.=' <p><strong>Dr.</strong> '.$i['sub_ledger'].' : '.$i['amt_taxable'].'</p> '; } $resultArrauy['head'] = $head; $resultArrauy['html'] = $html; $resultArrauy['sub'] = $sub; echo json_encode($resultArrauy); }elseif($stage == 'debit'){ $frm = $this->model->of_cr($id); $html = ''; $html .=' <table class="table table-bordered"> <th>Date</th> <th>Voucher No</th> <th>Party Ledger Name</th> <th>Ledger Name (Dr.)</th> <th>Amount</th> <th>Cheque No</th> <th>Cheque Date</th> </tr> <tr> <td>'.$frm[0]['m_date'].'</td> <td>'.$frm[0]['voucher_no'].'</td> <td>'.$frm[0]['party_ledger'].'</td> <td>'.$frm[0]['master_ledger'].'</td> <td>'.$frm[0]['amt_gross'].'</td> <td>'.$frm[0]['check_no'].'</td> <td>'.$frm[0]['check_date'].'</td> </tr> </table> '; if($frm[0]['stage'] == 'bank' || $frm[0]['stage'] == 'cheque_reg'){ $vt = " - ".$frm[0]['voucher_type']; }else{ $vt = ''; } $path = explode('|-|',$frm[0]['path']); $usedFIles = ''; $f = 1; foreach ($path as $pth => $p) { $usedFIles.=' <a data-toggle="tooltip" data-placement="top" title="Used files" class="label label-primary" target="_blank" href="'.base_url().$p.'">File '.$f.'</a> '; $f++; } $head = ''; $head.=' customer : '.$frm[0]['cname'].' ('.$frm[0]['stage'].$vt.') <br> narration : '.$frm[0]['narration'].'<br> '.$usedFIles.' '; $info = $frm[0]['info']; //echo "<pre>"; print_r($info); $sub = ''; foreach ($info as $i) { $sub.=' <p><strong>Cr.</strong> '.$i['sub_ledger'].' : '.$i['amt_taxable'].'</p> '; } $resultArrauy['head'] = $head; $resultArrauy['html'] = $html; $resultArrauy['sub'] = $sub; echo json_encode($resultArrauy); }elseif($stage == 'cheque_reg'){ $data['voucher_type'] = $voucher_type; if($voucher_type == 'payment'){ $frm = $this->model->office_form_paymet($id); //echo "<pre>"; print_r($data['frm']); die; $html = ''; $html .=' <table class="table table-bordered"> <th>Date</th> <th>Voucher No</th> <th>Party Ledger Name</th> <th>Ledger Name (Cr.)</th> <th>Ledger Name (Dr.)</th> <th>Amount</th> <th>Cheque No</th> <th>Cheque Date</th> </tr> <tr> <td>'.$frm[0]['m_date'].'</td> <td>'.$frm[0]['voucher_no'].'</td> <td>'.$frm[0]['party_ledger'].'</td> <td>'.$frm[0]['credit_ledger'].'</td> <td>'.$frm[0]['debit_ledger'].'</td> <td>'.$frm[0]['amt_gross'].'</td> <td>'.$frm[0]['check_no'].'</td> <td>'.$frm[0]['check_date'].'</td> </tr> </table> '; if($frm[0]['stage'] == 'bank' || $frm[0]['stage'] == 'cheque_reg'){ $vt = " - ".$frm[0]['voucher_type']; }else{ $vt = ''; } $path = explode('|-|',$frm[0]['path']); $usedFIles = ''; $f = 1; foreach ($path as $pth => $p) { $usedFIles.=' <a data-toggle="tooltip" data-placement="top" title="Used files" class="label label-primary" target="_blank" href="'.base_url().$p.'">File '.$f.'</a> '; $f++; } $head = ''; $head.=' customer : '.$frm[0]['cname'].' ('.$frm[0]['stage'].$vt.') <br> narration : '.$frm[0]['narration'].'<br> '.$usedFIles.' '; $resultArrauy['head'] = $head; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); }else{ $frm = $this->model->office_form_receipt($id); //echo "<pre>"; print_r($data['frm']); die; $html = ''; $html .=' <table class="table table-bordered"> <th>Date</th> <th>Voucher No</th> <th>Party Ledger Name</th> <th>Ledger Name (Cr.)</th> <th>Amount</th> <th>Cheque No</th> <th>Cheque Date</th> </tr> <tr> <td>'.$frm[0]['m_date'].'</td> <td>'.$frm[0]['voucher_no'].'</td> <td>'.$frm[0]['party_ledger'].'</td> <td>'.$frm[0]['cr_ledger'].'</td> <td>'.$frm[0]['amt_gross'].'</td> <td>'.$frm[0]['check_no'].'</td> <td>'.$frm[0]['check_date'].'</td> </tr> </table> '; if($frm[0]['stage'] == 'bank' || $frm[0]['stage'] == 'cheque_reg'){ $vt = " - ".$frm[0]['voucher_type']; }else{ $vt = ''; } $path = explode('|-|',$frm[0]['path']); $usedFIles = ''; $f = 1; foreach ($path as $pth => $p) { $usedFIles.=' <a data-toggle="tooltip" data-placement="top" title="Used files" class="label label-primary" target="_blank" href="'.base_url().$p.'">File '.$f.'</a> '; $f++; } $head = ''; $head.=' customer : '.$frm[0]['cname'].' ('.$frm[0]['stage'].$vt.') <br> narration : '.$frm[0]['narration'].'<br> '.$usedFIles.' '; $resultArrauy['head'] = $head; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } }elseif($stage == 'bank'){ $data['voucher_type'] = $voucher_type; if($voucher_type == 'payment'){ $frm = $this->model->office_form_paymet($id); //echo "<pre>"; print_r($data['frm']); die; $html = ''; $html .=' <table class="table table-bordered"> <th>Date</th> <th>Voucher No</th> <th>Party Ledger Name</th> <th>Ledger Name (Cr.)</th> <th>Ledger Name (Dr.)</th> <th>Amount</th> <th>Cheque No</th> <th>Cheque Date</th> </tr> <tr> <td>'.$frm[0]['m_date'].'</td> <td>'.$frm[0]['voucher_no'].'</td> <td>'.$frm[0]['party_ledger'].'</td> <td>'.$frm[0]['credit_ledger'].'</td> <td>'.$frm[0]['debit_ledger'].'</td> <td>'.$frm[0]['amt_gross'].'</td> <td>'.$frm[0]['check_no'].'</td> <td>'.$frm[0]['check_date'].'</td> </tr> </table> '; if($frm[0]['stage'] == 'bank' || $frm[0]['stage'] == 'cheque_reg'){ $vt = " - ".$frm[0]['voucher_type']; }else{ $vt = ''; } $path = explode('|-|',$frm[0]['path']); $usedFIles = ''; $f = 1; foreach ($path as $pth => $p) { $usedFIles.=' <a data-toggle="tooltip" data-placement="top" title="Used files" class="label label-primary" target="_blank" href="'.base_url().$p.'">File '.$f.'</a> '; $f++; } $head = ''; $head.=' customer : '.$frm[0]['cname'].' ('.$frm[0]['stage'].$vt.') <br> narration : '.$frm[0]['narration'].'<br> '.$usedFIles.' '; $resultArrauy['head'] = $head; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); }elseif($voucher_type == 'receipt'){ $frm = $this->model->office_form_receipt($id); //echo "<pre>"; print_r($data['frm']); die; $html = ''; $html .=' <table class="table table-bordered"> <th>Date</th> <th>Voucher No</th> <th>Party Ledger Name</th> <th>Ledger Name (Cr.)</th> <th>Amount</th> <th>Cheque No</th> <th>Cheque Date</th> </tr> <tr> <td>'.$frm[0]['m_date'].'</td> <td>'.$frm[0]['voucher_no'].'</td> <td>'.$frm[0]['party_ledger'].'</td> <td>'.$frm[0]['cr_ledger'].'</td> <td>'.$frm[0]['amt_gross'].'</td> <td>'.$frm[0]['check_no'].'</td> <td>'.$frm[0]['check_date'].'</td> </tr> </table> '; if($frm[0]['stage'] == 'bank' || $frm[0]['stage'] == 'cheque_reg'){ $vt = " - ".$frm[0]['voucher_type']; }else{ $vt = ''; } $path = explode('|-|',$frm[0]['path']); $usedFIles = ''; $f = 1; foreach ($path as $pth => $p) { $usedFIles.=' <a data-toggle="tooltip" data-placement="top" title="Used files" class="label label-primary" target="_blank" href="'.base_url().$p.'">File '.$f.'</a> '; $f++; } $head = ''; $head.=' customer : '.$frm[0]['cname'].' ('.$frm[0]['stage'].$vt.') <br> narration : '.$frm[0]['narration'].'<br> '.$usedFIles.' '; $resultArrauy['head'] = $head; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); }else{ $frm = $this->model->office_form_contra($id); $html = ''; $html .=' <table class="table table-bordered"> <tr> <th>Date</th> <th>Voucher No</th> <th>Party Ledger Name (Cr)</th> <th>Ledger Name(Dr)</th> <th>Amount</th> <th>Cheque No</th> <th>Cheque Date</th> </tr> <tr> <td>'.$frm[0]['m_date'].'</td> <td>'.$frm[0]['voucher_no'].'</td> <td>'.$frm[0]['party_ledger'].'</td> <td>'.$frm[0]['sun_ledger'].'</td> <td>'.$frm[0]['amt_gross'].'</td> <td>'.$frm[0]['check_no'].'</td> <td>'.$frm[0]['check_date'].'</td> </tr> </table> '; if($frm[0]['stage'] == 'bank' || $frm[0]['stage'] == 'cheque_reg'){ $vt = " - ".$frm[0]['voucher_type']; }else{ $vt = ''; } $path = explode('|-|',$frm[0]['path']); $usedFIles = ''; $f = 1; foreach ($path as $pth => $p) { $usedFIles.=' <a data-toggle="tooltip" data-placement="top" title="Used files" class="label label-primary" target="_blank" href="'.base_url().$p.'">File '.$f.'</a> '; $f++; } $head = ''; $head.=' customer : '.$frm[0]['cname'].' ('.$frm[0]['stage'].$vt.') <br> narration : '.$frm[0]['narration'].'<br> '.$usedFIles.' '; $resultArrauy['head'] = $head; $resultArrauy['html'] = $html; echo json_encode($resultArrauy); } }else{ $frm = $this->model->sales_form_data($id); $amt_gross = $frm[0]['amt_gross']; //echo "<pre>"; print_r($frm); if($frm[0]['note_two'] == 'form_two'){ $totcredit = $frm[0]['amt_taxable']+$frm[0]['s_aot']+$frm[0]['c_aot']+$frm[0]['u_aot']+$frm[0]['i_aot']; }else{ $form2 = $this->model->salesModel($id); $info_cnt = count($form2); $form3 = $this->model->salesExpenseModel($id); //echo "<pre>"; print_r($form3); $info_cnt2 = count($form3); $tot_g_sgst = 0; $tot_g_cgst = 0; $tot_g_ugst = 0; $tot_g_igst = 0; for ($g=0; $g < $info_cnt2; $g++) { //foreach ($form3 as $gst => $g) { $gamt = $form3[$g]['ex_amount']; $g_sgst = $form3[$g]['sgst']; $g_cgst = $form3[$g]['cgst']; $g_ugst = $form3[$g]['ugst']; $g_igst = $form3[$g]['igst']; if($g_sgst != '0.00'){ $g_sgst_payble = $gamt*$g_sgst/100; //echo "--payble sgst<br>"; $tot_g_sgst += $g_sgst_payble; } if($g_cgst != '0.00'){ $g_cgst_payble = $gamt*$g_cgst/100; //echo "--payble cgst<br>"; $tot_g_cgst += $g_cgst_payble; } if($g_ugst != '0.00'){ $g_ugst_payble = $gamt*$g_ugst/100; //echo "--payble ugst<br>"; $tot_g_ugst += $g_ugst_payble; } if($g_igst != '0.00'){ $g_igst_payble = $gamt*$g_igst/100; //echo "--payble cgst<br>"; $tot_g_igst += $g_igst_payble; } } $tot_g_sgst; $tot_g_cgst; $tot_g_ugst; $tot_g_igst; $tsgst = 0; $tcgst = 0; $tugst = 0; $tigst = 0; foreach ($form2 as $total => $tot) { $sgst = $tot['s_aot']; $cgst = $tot['c_aot']; $ugst = $tot['u_aot']; $igst = $tot['i_aot']; $tsgst+=$sgst; $tcgst+=$cgst; $tugst+=$ugst; $tigst+=$igst; } $tsgst; $tcgst; $tugst; $tigst; $tsgst = $tsgst+$tot_g_sgst; $tcgst = $tcgst+$tot_g_cgst; $tugst = $tugst+$tot_g_ugst; $tigst = $tigst+$tot_g_igst; $new_tot_expns = 0; $amt_tax = 0; foreach ($frm as $key => $tot) { $expns = $tot['expenses']; $amt_taxable = $tot['amt_taxable']; $tot_expns = 0; foreach ($expns as $tt => $t) { $newtt = $t['ex_amount']; $tot_expns+=$newtt; } $new_tot_expns+=$tot_expns; $amt_tax+=$amt_taxable; } $new_tot_expns; $amt_tax; $tot_tax = $tsgst+$tcgst+$tugst+$tigst; $totcredit = $new_tot_expns+$tot_tax+$amt_tax; } if($frm[0]['stage'] == 'sales'){ $left = 'Debit'; $right = 'Credit'; }else{ $left = 'Credit'; $right = 'Debit'; } $diff_amt = round(abs($amt_gross - $totcredit),2); $html = ''; $html.=' <table class="table table-bordered"> <tr> <th>Total '.$left.' Amount</th> <th>Total '.$right.' Amount</th> </tr> <tr> <td>'.$amt_gross.'</td> <td>'.$totcredit.'</td> </tr> </table> '; $resultArrauy['html'] = $html; $path = explode('|-|',$frm[0]['path']); $usedFIles = ''; $f = 1; foreach ($path as $pth => $p) { $usedFIles.=' <a data-toggle="tooltip" data-placement="top" title="Used files" class="label label-primary" target="_blank" href="'.base_url().$p.'">File '.$f.'</a> '; $f++; } $head = ''; if($frm[0]['note_two'] == 'form_two'){ $head.=' customer : '.$frm[0]['cname'].' ('.$frm[0]['stage'].' Without Inventory) <br> narration : '.$frm[0]['narration'].'<br> Different Amount : '.$diff_amt.'<br> '.$usedFIles.' '; }else{ $head.=' customer : '.$frm[0]['cname'].' ('.$frm[0]['stage'].') <br> narration : '.$frm[0]['narration'].'<br> Different Amount : '.$diff_amt.'<br> '.$usedFIles.' '; } $resultArrauy['head'] = $head; echo json_encode($resultArrauy); //$data['frm'] = $this->model->sales_form_data($id); //echo "<pre>"; print_r($data['frm']); die; //$this->load->view("webapp/office_user/view_form",$data); } } public function getUnit($id){ $data = $this->model->get_unit($id); $name = $data[0]['name']; echo json_encode($name); } public function listView() { $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $data['code'] = $this->input->post('code'); $data['year'] = $this->input->post('year'); $data['month'] = $this->input->post('month'); $where = array('code' => $this->input->post('code'), 'year' => $this->input->post('year')); $data['struct'] = $this->db2->get_where('cust_upload_structure', $where)->row_array(); $reg=$this->db2->get_where('tbl_registration', array('folder_code'=>$this->input->post('code')))->row_array(); $cust_id=$reg['rid']; $access=$this->db2->get_where('tbl_access', array( 'afrom'=>$cust_id, 'ato'=>$rid ))->row_array(); $data['wise'] = $access['wise']; $folder = $access['folder']; $data['avail_voucher'] = array_filter(explode('|', $folder));//use this only if office user has voucher wise acccess $data['cust_id']=$cust_id; //echo'<pre>'; print_r($data); die; $data['all_struct'] = $this->db2->get_where('cust_upload_structure', array('code' => $this->input->post('code')))->result_array(); $this->load->view("webapp/office_user/list_view", $data); } public function file_view($arrayDetail) { $str_arr = unserialize(urldecode($arrayDetail)); //echo'<pre>'; print_r($str_arr); die; $where = array( 'code'=>$str_arr['code'], 'year'=>$str_arr['year'], 'month'=>$str_arr['month'], 'stage'=>$str_arr['stage'], 'trash'=>'0' ); $data['count']=$this->db2->get_where('cust_upload', $where)->num_rows(); $data['str_arr'] = $str_arr; $data['all_struct'] = $this->db2->get_where('cust_upload_structure', array('code' => $str_arr['code']))->result_array(); $this->load->view("webapp/office_user/file_view", $data); } public function file_view_noti($arrayDetail) { $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $str_arr = unserialize(urldecode($arrayDetail)); //echo'<pre>'; print_r($str_arr); die; $where = array( 'code'=>$str_arr['code'], 'year'=>$str_arr['year'], 'month'=>$str_arr['month'], 'stage'=>$str_arr['stage'], 'trash'=>'0' ); $data['count']=$this->db2->get_where('cust_upload', $where)->num_rows(); $data['str_arr'] = $str_arr; $where_noti = array('n_id'=>$str_arr['n_id']); $data_noti = array('status'=>'1'); $this->model->UpdateData('cust_upload_notify', $data_noti, $where_noti); $data['all_struct'] = $this->db2->get_where('cust_upload_structure', array('code' => $str_arr['code']))->result_array(); $this->load->view("webapp/office_user/file_view", $data); } public function loadRecord_file($start=0){ $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $user_type=$userdata[0]['type']; $this->load->library('pagination'); // Pagging $where = array( 'code'=>$this->input->post('code'), 'year'=>$this->input->post('year'), 'month'=>$this->input->post('month'), 'stage'=>$this->input->post('stage'), 'trash'=>'0' ); $cnt=$this->db2->get_where('cust_upload', $where)->num_rows(); $rowperpage = 25; if($start != 0){ $start = ($start-1) * $rowperpage; } $ad = urlencode(serialize($where)); $config['base_url'] = base_url()."webapp/customer/view_files/".$ad; $config['use_page_numbers'] = TRUE; $config['total_rows'] = $cnt; $config['per_page'] = $rowperpage; $this->pagination->initialize($config); $userdata['pagination'] = $this->pagination->create_links(); $userdata['row'] = $start; $userdata['result']= array(); $getData=$this->model->get_cust_data('cust_upload', $where, $config["per_page"], $start); if(count($getData)>0){ foreach ($getData as $key){ //$id=$this->model->encryptdata($key["station_id"]); $cu_id = $key['cu_id']; $exp = explode('/', $key["path"]); $file = array_pop($exp); if($key["file_status"] == 0){ $status='<span class="badge bg-yellow">Pending</span>'; $action = ' <button data-id="'.$cu_id.'" data-status="1" onclick="changeStatus($(this))" type="button" class="btn bg-blue btn-xs">Receive</button> <button data-id="'.$cu_id.'" data-status="3" onclick="changeStatus($(this))" type="button" class="btn bg-red btn-xs">Reject</button> '; }elseif($key["file_status"] == 1){ $status='<span class="badge bg-blue">Received</span>'; $action = ' <button data-id="'.$cu_id.'" data-status="2" onclick="changeStatus($(this))" type="button" class="btn bg-green btn-xs">Complete</button> '; }elseif($key["file_status"] == 2){ $status='<span class="badge bg-green">Completed</span>'; $action = ''; }else{ $status='<span class="badge bg-red">Rejected</span>'; $action = ''; } if($user_type == 'office_user'){ $action_td = '<td class="act'.$cu_id.'">'.$action.'</td>'; }else{ $action_td =''; } if($user_type == 'team_leader' || $user_type == 'admin'){ if($key["file_status"] == 3){ $trash = '<button data-id="'.$cu_id.'" onclick="trashFile($(this))" class="btn bg-red btn-xs"><i class="fa fa-trash"></i></button>'; }else{ $trash = ''; } if($key['rec_datetime']!=''){ $rec_log = 'Receive : '.date('d-m-Y h:i A', strtotime($key['rec_datetime'])); }else{ $rec_log = 'Receive : '.'NA'; } if($key['comp_datetime']!=''){ $comp_log = 'Complete : '.date('d-m-Y h:i A', strtotime($key['comp_datetime'])); }else{ $comp_log = 'Complete : '.'NA'; } if($key['rej_datetime']!=''){ $rej_log = 'Reject : '.date('d-m-Y h:i A', strtotime($key['rej_datetime'])); }else{ $rej_log = 'Reject : '.'NA'; } $logs = $rec_log.' | '.$comp_log.' | '.$rej_log; $log_td='<td title="'.$logs.'"><i class="fa fa-clock-o" aria-hidden="true"></i></td>'; }else{ $trash = ''; $log_td=''; } if($this->input->post('stage') != 'reports'){ $other_td = ' <td class="sts'.$cu_id.'">'.$status.'</td> <td class="rem'.$cu_id.'">'.$key["remarks"].'</td> '.$action_td.' '.$log_td.' '; }else{ $other_td = ''; } $path = $key["path"]; $link = "https://paperpushbucket.s3.ap-south-1.amazonaws.com/".$path; $result1='<tr class="mytr'.$cu_id.'"> <td>'.$trash.' <a target="_blank" href="'.$link.'">'.$key["file_name"].'</a></td> '.$other_td.' </tr>'; $userdata['result'][] = $result1; } }else{ $result1='<tr><td colspan="7" class="text-center">No data available.</td></tr>'; $userdata['result'][] = $result1; } echo json_encode($userdata); } public function search_file($start=0){ $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $user_type=$userdata[0]['type']; $this->load->library('pagination'); $where = array( 'code'=>$this->input->post('code'), 'year'=>$this->input->post('year'), 'month'=>$this->input->post('month'), 'stage'=>$this->input->post('stage'), 'search'=>$this->input->post('search'), 'status'=>$this->input->post('status') ); $cnt=count($this->model->search_cust_file2($where,NULL,NULL)); $rowperpage = 25; if($start != 0){ $start = ($start-1) * $rowperpage; } $ad = urlencode(serialize($where)); $config['base_url'] = base_url()."webapp/customer/view_files/".$ad; $config['use_page_numbers'] = TRUE; $config['total_rows'] = $cnt; $config['per_page'] = $rowperpage; $this->pagination->initialize($config); $userdata['pagination'] = $this->pagination->create_links(); $userdata['row'] = $start; $getData=$this->model->search_cust_file2($where,$config["per_page"], $start); $userdata['result']= array(); if(count($getData)>0){ foreach ($getData as $key){ //$id=$this->model->encryptdata($key["station_id"]); $cu_id = $key['cu_id']; $exp = explode('/', $key["path"]); $file = array_pop($exp); if($key["file_status"] == 0){ $status='<span class="badge bg-yellow">Pending</span>'; $action = ' <button data-id="'.$cu_id.'" data-status="1" onclick="changeStatus($(this))" type="button" class="btn bg-blue btn-xs">Receive</button> <button data-id="'.$cu_id.'" data-status="3" onclick="changeStatus($(this))" type="button" class="btn bg-red btn-xs">Reject</button> '; }elseif($key["file_status"] == 1){ $status='<span class="badge bg-blue">Received</span>'; $action = ' <button data-id="'.$cu_id.'" data-status="2" onclick="changeStatus($(this))" type="button" class="btn bg-green btn-xs">Complete</button> '; }elseif($key["file_status"] == 2){ $status='<span class="badge bg-green">Completed</span>'; $action = ''; }else{ $status='<span class="badge bg-red">Rejected</span>'; $action = ''; } if($user_type == 'office_user'){ $action_td = '<td class="act'.$cu_id.'">'.$action.'</td>'; }else{ $action_td =''; } if($user_type == 'team_leader' || $user_type == 'admin'){ if($key["file_status"] == 3){ $trash = '<button class="btn bg-red btn-xs"><i class="fa fa-trash"></i></button>'; }else{ $trash = ''; } if($key['rec_datetime']!=''){ $rec_log = 'Receive : '.date('d-m-Y h:i A', strtotime($key['rec_datetime'])); }else{ $rec_log = 'Receive : '.'NA'; } if($key['comp_datetime']!=''){ $comp_log = 'Complete : '.date('d-m-Y h:i A', strtotime($key['comp_datetime'])); }else{ $comp_log = 'Complete : '.'NA'; } if($key['rej_datetime']!=''){ $rej_log = 'Reject : '.date('d-m-Y h:i A', strtotime($key['rej_datetime'])); }else{ $rej_log = 'Reject : '.'NA'; } $logs = $rec_log.' | '.$comp_log.' | '.$rej_log; $log_td='<td title="'.$logs.'"><i class="fa fa-clock-o" aria-hidden="true"></i></td>'; }else{ $trash = ''; $log_td=''; } if($this->input->post('stage') != 'reports'){ $other_td = ' <td class="sts'.$cu_id.'">'.$status.'</td> <td class="rem'.$cu_id.'">'.$key["remarks"].'</td> '.$action_td.' '.$log_td.' '; }else{ $other_td = ''; } $path = $key["path"]; $link = "https://paperpushbucket.s3.ap-south-1.amazonaws.com/".$path; $result1='<tr> <td>'.$trash.' <a href="'.$link.'">'.$key["file_name"].'</a></td> '.$other_td.' </tr>'; $userdata['result'][] = $result1; } }else{ $result1='<tr><td colspan="7" class="text-center">No matching records found</td></tr>'; $userdata['result'][] = $result1; } echo json_encode($userdata); } public function changeStatus(){ $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $name = $userdata[0]['name']; $sts = $this->input->post('sts'); $cu_id = $this->input->post('id'); $data = $this->db2->get_where('cust_upload', array('cu_id' => $cu_id))->row_array(); $rec_from = $data['rec_from']; $fs = $data['file_status']; $remarks = $data['remarks']; $where = array('cu_id' => $cu_id); $cust = $this->db2->get_where('tbl_registration', array('rid' => $data['cu_from']))->row_array(); $cust_name = $cust['name']; $year = $data['year']; $month = $this->getMonth($data['month']); $stage = $data['stage']; $file_name = $data['file_name']; $path = $year.'/'.$month.'/'.$stage.'/'.$file_name; if($rec_from == 0){ //echo 'fresh'; if($sts == 1){ //echo 'rec'; $upd = array('rec_from' => $rid, 'file_status' => '1', 'rec_datetime' => date('Y-m-d H:i')); $btn = '<button data-id="'.$cu_id.'" data-status="2" onclick="changeStatus($(this))" type="button" class="btn bg-green btn-xs">Complete</button>'; $msg = 'File have been received'; $status='<span class="badge bg-blue">Received</span>'; $noti = 'suc'; $rem = ''; }else{ //echo 'rej'; $rej_msg = $this->input->post('rej_msg'); $upd = array('rec_from' => $rid, 'file_status' => '3', 'remarks' => $rej_msg, 'rej_datetime' => date('Y-m-d H:i')); $btn = ''; $msg = 'File have been rejected'; $status='<span class="badge bg-red">Rejected</span>'; $noti = 'suc'; $rem = $rej_msg; $msg_admin = ' <!DOCTYPE html> <html> <head> <title>File Rejected</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg, #CF212A 0%, #003865 100%); padding: 10px; text-align: center;"> <h3>File Rejected</h3> </div> <div style="padding: 1rem;"> <p><strong>Hello,</strong></p> <p><strong>File have been rejected by '.$name.'.</strong></p> <p><strong>Reject Note: </strong>'.$rem.'</p> <p><strong>Customet Name: </strong>'.$cust_name.'</p> <p><strong>Details: </strong>'.$path.'</p> </div> </div> </body> </html>'; $to_admin='cjrajpara@gmail.com'; $sub_admin = "File Rejected"; //$this->model->emailsend_reject($to_admin, $sub_admin, $msg_admin); } $this->model->UpdateData('cust_upload',$upd,$where); }else{ //echo 'updated'; if($rid == $rec_from){ //echo 'complete'; $upd = array('rec_from' => $rid, 'file_status' => '2', 'comp_datetime' => date('Y-m-d H:i')); $this->model->UpdateData('cust_upload',$upd,$where); $msg = 'File have been completed'; $btn = ''; $status='<span class="badge bg-green">Completed</span>'; $noti = 'suc'; $rem = ''; }else{ //echo 'updated by other user'; if($fs == 1){ $msg = 'Sorry, Already received'; $btn = '<button type="button" class="btn bg-green btn-xs">Complete</button>'; $status='<span class="badge bg-blue">Received</span>'; $noti = 'err'; $rem = ''; }elseif($fs == 2){ $msg = 'Sorry, Already completed'; $btn = ''; $status='<span class="badge bg-green">Completed</span>'; $noti = 'err'; $rem = ''; }else{ $msg = 'Sorry, Already rejected'; $btn = ''; $status='<span class="badge bg-red">Rejected</span>'; $noti = 'err'; $rem = $remarks; } } } $array['btn'] = $btn; $array['msg'] = $msg; $array['status'] = $status; $array['noti'] = $noti; $array['rem'] = $rem; echo json_encode($array); } public function trashFile(){ $id = $this->input->post('id'); $this->model->UpdateData('cust_upload', array('trash' => '1'), array('cu_id' => $id)); $array['status'] = 'success'; echo json_encode($array); } public function upload(){ //echo "<pre>"; print_r($_FILES); echo "<pre>"; print_r($_POST); $bucketname = 'paperpushbucket'; $dash_url = $this->input->post('dash_url'); $code = $this->input->post('code'); $stage = $this->input->post('stage'); $year = $this->input->post('year'); $month = $this->input->post('month'); $cust_id = $this->input->post('cust_id'); $cust_data = $this->db2->get_where('tbl_registration',array('rid' => $cust_id))->row_array(); $cust_email = $cust_data['email']; $userdata = $this->session->userdata('reg_info'); $rid = $userdata[0]['rid']; $path = $code.'/'.$year.'/'.$month.'/'.$stage; $path_in = $year.'/'.$month.'/'.$stage; $count = count($_FILES['doc']['size']); for($i = 0; $i < $count; $i++){ $filename = $_FILES['doc']['name'][$i]; $ext = pathinfo($filename, PATHINFO_EXTENSION); $ext = strtolower($ext); if(!empty($ext)){ if($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png' || $ext == 'pdf' || $ext == 'csv' || $ext == 'xls' || $ext == 'xlsb' || $ext == 'xlsx'){ //echo "<pre>"; print_r($_FILES); die; $rand =rand(10,100); $target_file = preg_replace("/[^a-z0-9\_\-\.]/i", '', $_FILES['doc']['name'][$i]); $new_file = $rand.'_'.$target_file; $file_name = $_FILES['doc']['name'][$i]; $temp_file_location = $_FILES['doc']['tmp_name'][$i]; //$ct = ['image/jpg', 'image/jpeg', 'image/png', 'application/csv']; if($ext == 'pdf' || $ext == 'PDF'){ $this->s3->putObject([ 'Bucket' => $bucketname, 'Key' => $path.'/'.$new_file, 'SourceFile' => $temp_file_location, 'ContentType' => 'application/pdf', //'Body' => fopen($temp_file_location, 'rb'), 'ACL' => 'public-read', ]); }else{ $this->s3->putObject([ 'Bucket' => $bucketname, 'Key' => $path.'/'.$new_file, 'SourceFile' => $temp_file_location, //'Body' => fopen($temp_file_location, 'rb'), 'ACL' => 'public-read', ]); } //insert in table $data = array( 'cu_from' => $cust_id, 'code' => $code, 'year' => $year, 'month' => $month, 'stage' => $stage, 'file_name' => $new_file, 'path' => $path.'/'.$new_file, 'rec_from' => $rid, 'date_time' => date('Y-m-d H:i:s'), ); $this->model->insertData('cust_upload', $data); } } } /*$to = 'vishal.panara@staroneweb.co.in'; $cust_email $sub = 'New files Uploaded'; $msg = ' <!DOCTYPE html> <html> <head> <title>New files Uploaded</title> </head> <body style="font-family: sans-serif;"> <div class="container" style="width:50%; margin: 0 auto; background-color: #eee; box-shadow: 1px 1px 1px 1px #a09191; margin-top: 5rem; margin-bottom: 5rem;"> <div style="color:#fff; background-image: linear-gradient(-20deg, #CF212A 0%, #003865 100%); padding: 10px; text-align: center;"> <h3>New files Uploaded</h3> </div> <div style="padding: 1rem;"> <p><strong>Hello,</strong></p> <p><strong>New file have been uploaded from in report '.$path_in.'.</strong></p> </div> </div> </body> </html>'; $this->model->emailsend($to, $sub, $msg);*/ } public function getMonth($month){ if($month == 'april'){return 'a_april';}elseif($month == 'may'){return 'b_may';}elseif($month == 'june'){return 'c_june';} elseif($month == 'july'){return 'd_july';}elseif($month == 'august'){return 'e_august';}elseif($month == 'september'){return 'f_september';}elseif($month == 'october'){return 'g_october';} elseif($month == 'november'){return 'h_november';}elseif($month == 'december'){return 'i_december';}elseif($month == 'january'){return 'j_january';}elseif($month == 'february'){return 'k_february';} elseif($month == 'march'){return 'l_march';} } } //end of controller
Copyright ©2021 || Defacer Indonesia