From b28151d83a5f6b70a90addccd92c425f8ac8fa99 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Thu, 15 Feb 2018 11:37:50 +0530 Subject: [PATCH] cashbook payment changes and bank report cheque date and no --- application/config/routes.php | 2 +- application/controllers/cashbook.php | 637 ++++++++-- application/controllers/payslip.php | 28 +- application/controllers/report.php | 144 ++- application/models/cashbook_model.php | 250 +++- application/models/dahsboard_model.php | 11 +- application/models/payroll_model.php | 21 +- application/views/addnewIncomeExpense.php | 1003 ++++++++++----- application/views/bankreport.php | 137 +- application/views/bankreportprint.php | 16 +- application/views/cashbookall.php | 323 +++++ application/views/cashbookdepday.php | 0 application/views/cashbookdepmenu.php | 22 +- application/views/cashbooklisting.php | 19 +- application/views/cashbookmonthlydep.php | 336 +++-- application/views/cashbookmonthlyexp.php | 208 ++++ application/views/cashbookmonthlyexpenses.php | 339 +++-- application/views/cashbookmonthmenu.php | 166 +-- application/views/cashbookpdf.php | 41 +- application/views/cashbooktoday.php | 270 ++-- application/views/cashbookyearlyexpenses.php | 337 +++-- application/views/cashbookyearmonthwise.php | 297 +++-- application/views/editincomeexpenses.php | 1106 +++++++++++++++++ application/views/income_expense_list.php | 198 ++- application/views/reportcashbook.php | 858 +++++-------- application/views/viewIGRDetails.php | 2 +- application/views/viewIndIncomeExpense.php | 90 +- application/views/viewinwardgateregister.php | 5 +- 28 files changed, 5036 insertions(+), 1830 deletions(-) create mode 100755 application/views/cashbookall.php mode change 100644 => 100755 application/views/cashbookdepday.php mode change 100644 => 100755 application/views/cashbookdepmenu.php mode change 100644 => 100755 application/views/cashbookmonthlydep.php create mode 100755 application/views/cashbookmonthlyexp.php mode change 100644 => 100755 application/views/cashbookmonthlyexpenses.php mode change 100644 => 100755 application/views/cashbookmonthmenu.php mode change 100644 => 100755 application/views/cashbooktoday.php mode change 100644 => 100755 application/views/cashbookyearlyexpenses.php mode change 100644 => 100755 application/views/cashbookyearmonthwise.php create mode 100755 application/views/editincomeexpenses.php mode change 100644 => 100755 application/views/reportcashbook.php diff --git a/application/config/routes.php b/application/config/routes.php index ad3bfe77..cf9d9df0 100644 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -210,7 +210,7 @@ $route['ServicePOBilling'] = "servicepurchaseorder/viewServicePOReportForBilling //<------------Cash book Routes--------------------> $route['ViewIncomeExpense'] = "cashbook/incomeExpenseList"; -$route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad"; +//$route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad"; $route['addIncomeExpense'] = "cashbook/addIncomeExpense"; // permission slip// diff --git a/application/controllers/cashbook.php b/application/controllers/cashbook.php index a7ee166a..bf61f154 100755 --- a/application/controllers/cashbook.php +++ b/application/controllers/cashbook.php @@ -32,46 +32,46 @@ class cashbook extends BaseController $aid = $this->uri->segment(3); $str = $this->uri->segment(4); - if(!empty($aid)){ + if(!empty($aid)){ - if(!empty($str)) - { - - $data['company'] = $this->cashbook_model->getCompany(); - - $data['data'] = $this->cashbook_model->getIncomeExpenseList($aid); - $totalamt = $data['data'][0]->total; - $data['amtinwords'] = $this->convertNumber($totalamt); - $mpdf=new mPDF('utf-8','A4-P',7, 10,10, 10, 3, 0, 0, 0); - $mpdf->SetHTMLHeader($HtmlHeading); - $html = $this->load->view('cashbookpdf',$data,true); - $mpdf->SetDisplayMode('fullpage'); - $mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}"); - $mpdf->list_indent_first_level = 1; - $mpdf->setAutoTopMargin = 'stretch'; - $mpdf->setAutoBottomMargin = 'stretch'; - $mpdf->WriteHTML($html); - $filename = "cashbook.pdf"; - $mpdf->Output($filename,I); + if(!empty($str)) + { + + $data['company'] = $this->cashbook_model->getCompany(); + $data['data'] = $this->cashbook_model->getIncomeExpenseList($aid); + $data['PaymentDetails'] = $this->cashbook_model->viewpaymentdetails($aid); + $totalamt = $data['data'][0]->total; + $data['amtinwords'] = $this->convertNumber($totalamt); + $mpdf=new mPDF('utf-8','A4-P',7, 10,10, 10, 3, 0, 0, 0); + $mpdf->SetHTMLHeader($HtmlHeading); + $html = $this->load->view('cashbookpdf',$data,true); + $mpdf->SetDisplayMode('fullpage'); + $mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}"); + $mpdf->list_indent_first_level = 1; + $mpdf->setAutoTopMargin = 'stretch'; + $mpdf->setAutoBottomMargin = 'stretch'; + $mpdf->WriteHTML($html); + $filename = "cashbook.pdf"; + $mpdf->Output($filename,I); } - else - { + else + { $data['data'] = $this->cashbook_model->getIncomeExpenseList($aid); + $data['PaymentDetails'] = $this->cashbook_model->viewpaymentdetails($aid); $this->global['pageTitle'] = 'Resico : Cash Book: View Income Expense '; $this->loadViews("viewIndIncomeExpense", $this->global, $data , NULL); - - } - + } - else - { - $data['list'] = $this->cashbook_model->getIncomeExpenseList(); - $this->global['pageTitle'] = 'Resico : Cash Book: Listing'; + + } + else{ + //$data['list'] = $this->cashbook_model->getIncomeExpenseList(); + $data['list'] = $this->cashbook_model->getreceiptpaymentlist(); + $this->global['pageTitle'] = 'Resico : Cash Book: Listing'; $this->loadViews("income_expense_list", $this->global, $data , NULL); - } - - + } + } /** @@ -88,17 +88,18 @@ class cashbook extends BaseController /** * To store added incomeexpense datas */ - function addIncomeExpense() + //function addIncomeExpense() + function addReceipt() { $accounttype = $this->input->post('myradio'); - if($accounttype == 1) - { + //if($accounttype == 1) + //{ $accounttype = 'RECEIPT'; - } - else - { - $accounttype = 'PAYMENT'; - } + //} + //else + //{ + //$accounttype = 'PAYMENT'; + //} $accountcode = $this->input->post('accode'); $date = $this->input->post('Date'); $date = date_create($date);//,'Y-m-d'); @@ -114,6 +115,7 @@ class cashbook extends BaseController $sgst = null; $cgst = null; $igst = null; + $subdescription = null; if(!empty($gsttoggle)) { $invoiceno = $this->input->post('Invoiceno'); @@ -135,7 +137,7 @@ class cashbook extends BaseController $fs = 0; if(!empty($_FILES['myfile']['name'])) { - + $config['file_name'] = $_FILES['myfile']['name']; $config['upload_path'] = 'uploads/cashbook/'; $path = $config['upload_path']; @@ -145,13 +147,165 @@ class cashbook extends BaseController } $created_by = $this->session->userdata('userId'); - $addincomexpense = array('type'=>$accounttype,'account_code'=>$accountcode,'date'=>$date,'towhom'=>$towhome,'invoice_no'=>$invoiceno,'merchant'=>$merchantname,'merchant_gst'=>$mergstno,'HSN'=>$hsn ,'value_before_gst'=>$beforegst,'sgst'=>$sgst,'cgst'=>$cgst,'igst'=>$igst,'total'=>$totalamount,'description'=>$description,'document'=>$document,'Created_By'=>$created_by); + $addincomexpense = array('type'=>$accounttype,'account_code'=>$accountcode,'date'=>$date,'towhom'=>$towhome,'invoice_no'=>$invoiceno,'merchant'=>$merchantname,'merchant_gst'=>$mergstno,'HSN'=>$hsn ,'value_before_gst'=>$beforegst,'sgst'=>$sgst,'cgst'=>$cgst,'igst'=>$igst,'total'=>$totalamount,'description'=>$description,'document'=>$document,'Created_By'=>$created_by,'subdescription'=>$subdescription); $res = $this->cashbook_model->saveIncomeExpense($addincomexpense); - if( $res == 1 ){ - echo ""; + if( $res >= 1 ){ + echo ""; } } + + /** + * To store added Cashbook's Payment datas + */ + function addPayment() + { + $count = $this->input->post('hidecounter'); + $constantcount = $this->input->post('hideconstant'); + + $accounttype = 'PAYMENT'; + $date = $this->input->post('PaymentDate'); + $date = date_create($date);//,'Y-m-d'); + $date = date_format($date,'Y-m-d'); + $paidto = $this->input->post('PaymentPaidto'); + $vouchercode = $this->input->post('Paymentvouchercode'); + //echo $count.$consantcount; + //$gsttoggle = $this->input->post('gsttoggle'); + //$invoiceno = null; + $merchantname = null; + $mergstno = null; + $hsn = null; + $beforegst = null; + $sgst = null; + $cgst = null; + $igst = null; + + $merchantname = $this->input->post('Paymentmerchant'); + $mergstno = $this->input->post('PaymentMerchantgst'); + $hsn = $this->input->post('Paymenthsn'); + $beforegst = $this->input->post('PaymentvaluebeforegST'); + $sgst = $this->input->post('PaymentSGST'); + $cgst = $this->input->post('PaymentCGST'); + $igst = $this->input->post('PaymentIGST'); + + + $totalamount = $this->input->post('Paymenttotalamount'); + $description = $this->input->post('Paymentdescription'); + + + if(empty($description)){$description = 'NA';} + + $document = null; + + $fs = 0; + + if(!empty($_FILES['myfile']['name'])) + { + + $config['file_name'] = $_FILES['myfile']['name']; + $config['upload_path'] = 'uploads/cashbook/'; + $path = $config['upload_path']; + $document = $path.$filename; + $fs = $this->uploadFile(); + $document = $path.$fs; + + } + $created_by = $this->session->userdata('userId'); + + + if($count == 1) + { + + $array = $this->input->post('mydata1'); + if(!empty($array)){ + $array[] = $this->input->post($varname); + $index = 0; + foreach($array as $key=>$value){ + $index++; + if($index == 1){ + $Paymentaccode = $value; + } + if($index == 2){ + $subdescription = $value; + } + }} + + $addPayments = array('type'=>$accounttype,'account_code'=>$Paymentaccode,'date'=>$date,'towhom'=>$paidto,'invoice_no'=>$vouchercode,'merchant'=>$merchantname,'merchant_gst'=>$mergstno,'HSN'=>$hsn ,'value_before_gst'=>$beforegst,'sgst'=>$sgst,'cgst'=>$cgst,'igst'=>$igst,'total'=>$totalamount,'description'=>$description,'document'=>$document,'Created_By'=>$created_by,'paymentsubdesc'=>$subdescription); + $res = $this->cashbook_model->saveIncomeExpense($addPayments); + + } + else + { + + $accountcode = '999'; + $subdescription = 'Multiple'; + $addPayments = array('type'=>$accounttype,'account_code'=>$accountcode,'date'=>$date,'towhom'=>$paidto,'invoice_no'=>$vouchercode,'merchant'=>$merchantname,'merchant_gst'=>$mergstno,'HSN'=>$hsn ,'value_before_gst'=>$beforegst,'sgst'=>$sgst,'cgst'=>$cgst,'igst'=>$igst,'total'=>$totalamount,'description'=>$description,'document'=>$document,'Created_By'=>$created_by,'paymentsubdesc'=>$subdescription); + $res = $this->cashbook_model->saveIncomeExpense($addPayments); + + $Paymentaccode = ''; + $subdescription = ''; + $Paymentamount = ''; + + + for($i=1;$i<=$constantcount;$i++){ + + $varname = 'mydata'.$i; + //alert($varname); + $temp = $this->input->post($varname); + if(!empty($temp)){ + $g[] = $this->input->post($varname); + //echo "sd"; + //print_r($g); + //die(); + } + else{} + } + + foreach($g as $arr){ + // $Paymentaccode = $arr->Paymentaccode; + // $subdescription = $arr->subdescription; + // $Paymentamount = $arr->Paymentamount; + + $index = 0; + foreach($arr as $key=>$value){ + $index++; + // echo "*************"; + // echo $key; + // echo $value; + // echo "*************"; + if($index == 1){ + $Paymentaccode = $value; + } + if($index == 2){ + $subdescription = $value; + } + if($index == 3){ + $Paymentamount = $value; + + } + + } + //insert; + $addPaymentDetails = array('Payment_id'=>$res,'Account_code'=>$Paymentaccode,'Account_description'=>$subdescription,'Amount'=>$Paymentamount); + //print_r($addPaymentschild); + + //$child = $this->cashbook_model->paymentdetails($addPaymentschild); + $child = $this->cashbook_model->addpaymentdetails($addPaymentDetails); + //addupdatepaymentdetails($addPaymentschild,$res); + //echo $child; + //echo $paymentcode; + } + + }//new else + if( $res >= 1 ){ + echo ""; + } + + } + + /** * To store Cashbook revalant file and images @@ -163,10 +317,10 @@ class cashbook extends BaseController $config['upload_path'] = 'uploads/cashbook/'; $config['allowed_types'] = 'png|jpg|jpeg'; $config['file_name'] = $_FILES['myfile']['name']; - - $this->load->library('upload',$config); - $this->upload->initialize($config); + //Load upload library and initialize configuration + $this->load->library('upload',$config); + $this->upload->initialize($config); if($this->upload->do_upload('myfile')) { @@ -249,51 +403,327 @@ class cashbook extends BaseController $acc_createddt = $dt->format('Y-m-d H:i:s'); $cashbookdatas = array('type'=>$acc_type,'code'=>$acc_code,'name'=>$acc_name,'description'=>$acc_desc,'status'=>$acc_status,'created_on'=>$acc_createddt); - $result = $this->cashbook_model->Cashbook($cashbookdatas); + $result = $this->cashbook_model->Cashbook($cashbookdatas); } } echo "Successfully Saved!"; - } + } /** * For edit cashbook screen */ - public function editcashbook() - { - - $this->load->model('cashbook_model'); - $this->loadViews("editincomeexpenses", $this->global, NULL); + public function editcashbook($sid) + { + + if($sid == '') + { + $cash = $_GET['sid']; + } + else + { + $cash = $sid; + } + + + $this->load->model('cashbook_model'); + /** this array for single entry both recepit and payment datas*/ + $data['RecepitPayment'] = $this->cashbook_model->viewdepartment($cash); + /** this array for paymentmaster mutilpe datas */ + $data['PaymentMultiple'] = $this->cashbook_model->viewpaymentmaster($cash); + /** this array for paymentchild datas */ + $data['PaymentDetails'] = $this->cashbook_model->viewpaymentdetails($cash); + /** this array for dropdown value(account name)*/ + $data['dropdownvalues'] = $this->cashbook_model->getAccounTypes(); + $this->global['pageTitle'] = 'Resico : Edit Cashbook'; + $this->loadViews("editincomeexpenses", $this->global,$data, NULL); + } + public function deletefile() + { + $cashfile = $this->input->post('id'); + $cashid = $this->input->post('ide'); + $filedata= $this->cashbook_model->deletefile($cashid); + echo $filedata; + } + function Removepaymentdetails(){ + + $id = $this->input->post('id'); + $deletedata = $this->cashbook_model->deletepaymentdetails($id); + echo $deletedata; + } + function updateReceipt() + { + $id1=$this->input->post('id1'); + // $myradio1= $this->input->post('myradio'); + // $option=''; + // if($myradio1==1) + // { + $option=RECEIPT; + // } + // else + // { + // $option=PAYMENT; + // } + + $ans1 = $this->input->post('ans'); + $Date1 = $this->input->post('Date'); + + $date = date_create($Date1);//,'Y-m-d'); + $date = date_format($date,'Y-m-d'); + $accountcode1 = $this->input->post('accode'); + + $towhome1 = $this->input->post('towhome'); + $Invoiceno1 = $this->input->post('Invoiceno'); + $merchant1 = $this->input->post('merchant'); + $Merchantgst1 = $this->input->post('Merchantgst'); + $hsn1 = $this->input->post('hsn'); + $valuebeforegST1 = $this->input->post('valuebeforegST'); + $SGST1 = $this->input->post('SGST'); + $CGST1 = $this->input->post('CGST'); + $IGST1 = $this->input->post('IGST'); + $totalamount1 = $this->input->post('totalamount'); + $description1 = $this->input->post('description'); + $deleteflag = $this->input->post('deleteflag'); + $oldfile = $this->input->post('oldfile'); + $document =null; + + + $fs = 0; + if(!empty($_FILES['myfile']['name'])) + { + + $config['file_name'] = $_FILES['myfile']['name']; + $config['upload_path'] = 'uploads/cashbook/'; + $path = $config['upload_path']; + $fs = $this->uploadFile(); + $document = $path.$fs; + + + } + else + { + if($deleteflag == 0) + { + $document = $oldfile; + } + else if($deleteflag == 1) + { + $document = null; + } + } + $updateaccount = array('type'=>$option,'account_code'=>$accountcode1,'date'=>$date,'towhom'=>$towhome1,'invoice_no'=>$Invoiceno1,'merchant'=>$merchant1,'merchant_gst'=>$Merchantgst1,'HSN'=>$hsn1,'value_before_gst'=>$valuebeforegST1,'sgst'=>$SGST1,'cgst'=>$CGST1,'igst'=>$IGST1,'total'=>$totalamount1,'description'=>$description1,'document'=>$document); + + $res = $this->cashbook_model->updatedepartment($updateaccount,$id1); + + + echo ""; + + } + + + function updatePayment() + { + $id1=$this->input->post('id1'); + $count = $this->input->post('hidecounter');//hide value + $constantcount = $this->input->post('hideconstant');//hide value + $option=PAYMENT; + $ans1 = $this->input->post('ans'); + $Date1 = $this->input->post('PaymentDate'); + $date = date_create($Date1);//,'Y-m-d'); + $date = date_format($date,'Y-m-d'); + + $towhome1 = $this->input->post('PaymentPaidto'); + $Invoiceno1 = $this->input->post('Paymentvouchercode'); + $merchant1 = $this->input->post('Paymentmerchant'); + $Merchantgst1 = $this->input->post('PaymentMerchantgst'); + $hsn1 = $this->input->post('Paymenthsn'); + $valuebeforegST1 = $this->input->post('PaymentvaluebeforegST'); + $SGST1 = $this->input->post('PaymentSGST'); + $CGST1 = $this->input->post('PaymentCGST'); + $IGST1 = $this->input->post('PaymentIGST'); + $totalamount1 = $this->input->post('Paymenttotalamount'); + $description1 = $this->input->post('Paymentdescription'); + $deleteflag = $this->input->post('deleteflag'); + $oldfile = $this->input->post('oldfile'); + $document =null; + + + $fs = 0; + if(!empty($_FILES['myfile']['name'])) + { + + $config['file_name'] = $_FILES['myfile']['name']; + $config['upload_path'] = 'uploads/cashbook/'; + $path = $config['upload_path']; + $fs = $this->uploadFile(); + $document = $path.$fs; + + + } + else + { + if($deleteflag == 0) + { + $document = $oldfile; + } + else if($deleteflag == 1) + { + $document = null; + } + } + + if($count == 1) + { + + $array = $this->input->post('mydata1'); + if(!empty($array)){ + $array[] = $this->input->post($varname); + $index = 0; + foreach($array as $key=>$value){ + $index++; + if($index == 1){ + $Paymentaccode = $value; + } + if($index == 2){ + $subdescription = $value; + } + }} + + + $UpdatePayment = array('type'=>$option,'account_code'=>$Paymentaccode,'date'=>$date,'towhom'=>$towhome1,'invoice_no'=>$Invoiceno1,'merchant'=>$merchant1,'merchant_gst'=>$Merchantgst1,'HSN'=>$hsn1,'value_before_gst'=>$valuebeforegST1,'sgst'=>$SGST1,'cgst'=>$CGST1,'igst'=>$IGST1,'total'=>$totalamount1,'description'=>$description1,'document'=>$document,'paymentsubdesc'=>$subdescription); + $res = $this->cashbook_model->updatepaymentmaster($UpdatePayment,$id1); + + + } + else + { + + $accountcode = '999'; + $subdescription0 = 'Multiple'; + $UpdatePayment = array('type'=>$option,'account_code'=>$accountcode,'date'=>$date,'towhom'=>$towhome1,'invoice_no'=>$Invoiceno1,'merchant'=>$merchant1,'merchant_gst'=>$Merchantgst1,'HSN'=>$hsn1,'value_before_gst'=>$valuebeforegST1,'sgst'=>$SGST1,'cgst'=>$CGST1,'igst'=>$IGST1,'total'=>$totalamount1,'description'=>$description1,'document'=>$document,'paymentsubdesc'=>$subdescription0); + $res = $this->cashbook_model->updatepaymentmaster($UpdatePayment,$id1); + + for($i=1;$i<=$constantcount;$i++){ + + $varname = 'mydata'.$i; + $temp = $this->input->post($varname); + if(!empty($temp)){ + $g[] = $this->input->post($varname); + } + else{} + + } + + //print_r($g); echo "
****************************"; + + foreach($g as $arr){ + + $insert = count($arr); + //echo $insert; + + if($insert == 3){ + + //print_r($arr); echo "
*********THREE insert************"; + $index = 0; + foreach($arr as $key=>$value){ + $index++; + // echo "*************"; + // echo $key; + // echo $value; + // echo "*************"; + + if($index == 1){ + $Payment_accode = $value; + } + if($index == 2){ + $sub_description = $value; + } + if($index == 3){ + $Payment_amount = $value; + } + + + } + if($Payment_accode != -1) + { + + $addPaymentsdetails = array('Payment_id'=>$id1,'Account_code'=>$Payment_accode,'Account_description'=>$sub_description,'Amount'=>$Payment_amount); + + + $child = $this->cashbook_model->addpaymentdetails($addPaymentsdetails); + + } + + } + else if($insert == 4){ + // print_r($arr); echo "
*********FOUR update************"; + $index = 0; + foreach($arr as $key=>$value){ + $index++; + + if($index == 1){ + $Paymentaccode = $value; + } + if($index == 2){ + $subdescription = $value; + } + if($index == 3){ + $Paymentamount = $value; + } + if($index == 4){ + $hidekey = $value; + } + + } + + $UpdatePaymentsdetails = array('Payment_id'=>$id1,'Account_code'=>$Paymentaccode,'Account_description'=>$subdescription,'Amount'=>$Paymentamount); + + $child = $this->cashbook_model->updatepaymentdetails($UpdatePaymentsdetails,$hidekey); + + + + } + + } + + } + + echo ""; + + } + /** * To covert number into words */ public function convertNumber($amt){ - + $ShowPaise='0'; $totalAmt=explode(".",$amt); $number = $totalAmt[0]; - $no = $number; + $no = $number; if(!empty($totalAmt[1]) && $totalAmt[1]!=0){ - $point = $totalAmt[1]; $ShowPaise='1'; } - else{ - + else{ $point=0; - $ShowPaise='0'; + $ShowPaise='0'; } - $hundred = null; - $digits_1 = strlen($no); + $hundred = null; + $digits_1 = strlen($no); - $i = 0; - $str = array(); - $words = array('0' => '', '1' => 'One', '2' => 'Two', + $i = 0; + $str = array(); + $words = array('0' => '', '1' => 'One', '2' => 'Two', '3' => 'three', '4' => 'Four', '5' => 'Five', '6' => 'Six', '7' => 'seven', '8' => 'eight', '9' => 'nine', '10' => 'ten', '11' => 'eleven', '12' => 'twelve', @@ -305,39 +735,36 @@ class cashbook extends BaseController '80' => 'eighty', '90' => 'ninety','06'=>'Zero Six','01'=>'Zero One','02'=>'Zero Two' ,'03'=>'Zero Three','04'=>'Zero Four','05'=>'Zero Five','07'=>'Zero Seven','08'=>'Zero Eight','09'=>'Zero Nine'); - $words1 = array('2' => 'twenty', + $words1 = array('2' => 'twenty', '3' => 'thirty', '4' => 'fourty', '5' => 'fifty', '6' => 'sixty', '7' => 'seventy', '8' => 'eighty', '9' =>'ninety'); - $words12 = array('11' => 'eleven', + $words12 = array('11' => 'eleven', '12' => 'twelve', '13' => 'thirteen', '14' => 'fourteen', '15' => 'fifteen', '16' => 'sixteen', '17' => 'seventeen', '18' => 'eighteen', '19' =>'nineteen', '20' => 'twenty',); - $digits = array('', 'hundred', 'thousand', 'lakh', 'crore'); + $digits = array('', 'hundred', 'thousand', 'lakh', 'crore'); - while ($i < $digits_1) { - - $divider = ($i == 2) ? 10 : 100; - $number = floor($no % $divider); - $no = floor($no / $divider); - $i += ($divider == 10) ? 1 : 2; - - if ($number) { - $plural = (($counter = count($str)) && $number > 1) ? 's' : null; - $hundred = ($counter == 1 && $str[0]) ? ' and ' : null; - $str [] = ($number < 21) ? - $words[$number] . " " . $digits[$counter] . $plural . " " . $hundred: - $words[floor($number / 10) * 10]. " " . $words[$number % 10] . " ". $digits[$counter] . $plural . " " . $hundred; - } - else $str[] = null; - + while ($i < $digits_1) { + $divider = ($i == 2) ? 10 : 100; + $number = floor($no % $divider); + $no = floor($no / $divider); + $i += ($divider == 10) ? 1 : 2; + if ($number) { + $plural = (($counter = count($str)) && $number > 1) ? 's' : null; + $hundred = ($counter == 1 && $str[0]) ? ' and ' : null; + $str [] = ($number < 21) ? + $words[$number] . " " . $digits[$counter] . $plural . " " . $hundred: + $words[floor($number / 10) * 10]. " " . $words[$number % 10] . " ". $digits[$counter] . $plural . " " . $hundred; } - - $str = array_reverse($str); - $result = implode('', $str); - if($point>=1 && $point<=10) + else $str[] = null; + + } + $str = array_reverse($str); + $result = implode('', $str); + if($point>=1 && $point<=10) { $points = ($point) ? " " . $words[$point] : " "; } @@ -350,18 +777,30 @@ class cashbook extends BaseController $points = ($point) ? " " . $words1[$point / 10] . " " . $words[$point = $point % 10] : ''; } - if($ShowPaise=='0'){ - - $amountInWords = "Rupees " . $result." Only"; - } - else{ - - $amountInWords = "Rupees " . $result ." Paise ". $points." Only"; - } - - - return $amountInWords; + if($ShowPaise=='0'){ + $amountInWords = "Rupees " . $result." Only"; } + else{ + + $amountInWords = "Rupees " . $result ." Paise ". $points." Only"; + } + + return $amountInWords; + } + + /** + *To get Payment Datas form ajax + */ + function ViewPaymentDetails() + { + + $paymentid= $this->input->post('id'); + $data = $this->cashbook_model->viewpaymentdetails($paymentid); + echo json_encode($data); + + } + + } ?> \ No newline at end of file diff --git a/application/controllers/payslip.php b/application/controllers/payslip.php index 0b9aef0f..a84f41e2 100755 --- a/application/controllers/payslip.php +++ b/application/controllers/payslip.php @@ -66,6 +66,9 @@ class payslip extends BaseController { $bank = $this->input->post('bank'); $payon = $this->input->post('month'); + $chequeno = $this->input->post('chequeno'); + $chequedate = date("Y-m-d", strtotime($this->input->post('chequedate'))); + $createdby = $this->session->userdata ( 'userId' ); $monthsoptions = array("01" => "Jan", "02" => "Feb","03" => "Mar","04" => "Apr","05" => "May","06" => "June","07"=> "July","08"=> "Aug","09" => "Sep","10"=> "Oct","11" => "Nov","12"=>"Dec"); $m = substr($payon,0,2); $y = substr($payon,3); @@ -76,7 +79,14 @@ class payslip extends BaseController $filename = ''; if($this->input->post('Bank_Report')) { - $data['result'] = $this->payroll_model->getReportforBank($bank,$payon); + + $data['result'] = $this->payroll_model->getReportforBank($bank,$payon); + if($chequeno != '' && $chequedate != '') + { + $empcount=count($data['result']); + $cheque = array('ChequeNO'=>$chequeno, 'ChequeDate'=>$chequedate, 'BankName'=>$bank, 'Monthyear'=>$payon, 'Empcount'=>$empcount, 'CreatedBy'=>$createdby); + $data['insertcheque'] = $this->payroll_model->ChequeDetails($cheque); + } $totamtwords = ''; $totalamt=0.00; if(!empty($data['result'])){ @@ -87,12 +97,13 @@ class payslip extends BaseController } $totamtwords = $this->convertNumber($totalamt); $data['bankdetails']=$this->payroll_model->getBankInfo($bank); - + $data['chequedetails']=$this->payroll_model->getChequeInfo($bank,$payon); $data['Totalamount']=$totalamt; $data['Totalamtwords']=$totamtwords; $data['PayMonth']=$month; $filename = 'Bank Report for'.$payon ; $HTML = $this->load->view("bankreportprint",$data,true); + } if($this->input->post('PF_Report')) { @@ -1162,6 +1173,19 @@ class payslip extends BaseController return $amountInWords; } + function ValidationCheque(){ + + $bank = $this->input->post("id1"); + $payon = $this->input->post("id2"); + + $result = $this->payroll_model->getChequeInfo($bank,$payon); + + $count = count($result); + + echo $count; + +} + } ?> \ No newline at end of file diff --git a/application/controllers/report.php b/application/controllers/report.php index 81ff5b37..c915d0fb 100755 --- a/application/controllers/report.php +++ b/application/controllers/report.php @@ -1004,40 +1004,35 @@ class report extends BaseController } - public function cashbook() - { - - $this->global['pageTitle'] = 'Cashbook - Cashbook Reports - '; - - $data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal(); - $data['getTotalServicePoCount'] = $this->dahsboard_Model->getTotalServicePoCount(); - $data['getTotalimportPoCount'] = $this->dahsboard_Model->getTotalimportPoCount(); - $data['getTotalcapitalPoCount'] = $this->dahsboard_Model->getTotalcapitalPoCount(); - $data['getTotalrevenuePoCount'] = $this->dahsboard_Model->getTotalrevenuePoCount(); - $data['cashbook']=$this->dahsboard_Model->cashbook(); - - $income="RECEIPT"; - $expense="PAYMENT"; - $data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data($income); - $data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data($expense); - $data['todayincome']=$this->dahsboard_Model->today_data($income); - $data['todayexpense']=$this->dahsboard_Model->today_data($expense); - $data['yearincome']=$this->dahsboard_Model->yearwise_data($income); - $data['yearexpense']=$this->dahsboard_Model->yearwise_data($expense); - $data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal(); - $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - //print_r($data['gettoptotal1']); - // $data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data_income(); - // $data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data_expense(); - // $data['todayincome']=$this->dahsboard_Model->today_data_income(); - // $data['todayexpense']=$this->dahsboard_Model->today_data_expense(); + public function cashbook() + { + + $this->global['pageTitle'] = 'Cashbook - Cashbook Reports - '; + + $data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal(); + $data['getTotalServicePoCount'] = $this->dahsboard_Model->getTotalServicePoCount(); + $data['getTotalimportPoCount'] = $this->dahsboard_Model->getTotalimportPoCount(); + $data['getTotalcapitalPoCount'] = $this->dahsboard_Model->getTotalcapitalPoCount(); + $data['getTotalrevenuePoCount'] = $this->dahsboard_Model->getTotalrevenuePoCount(); + $data['cashbook']=$this->dahsboard_Model->cashbook(); + + $income="RECEIPT"; + $expense="PAYMENT"; + $data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data($income); + $data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data($expense); + $data['todayincome']=$this->dahsboard_Model->today_data($income); + $data['todayexpense']=$this->dahsboard_Model->today_data($expense); + $data['yearincome']=$this->dahsboard_Model->yearwise_data($income); + $data['yearexpense']=$this->dahsboard_Model->yearwise_data($expense); + $data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal(); + $data['tdy']=$this->dahsboard_Model->today(); + $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + + $this->loadviews("reportcashbook",$this->global,$data, NULL); - $this->loadviews("reportcashbook",$this->global,$data, NULL); - - } - - public function monthexpenses() + } + public function monthexpenses() { $this->global['pageTitle'] = 'Cashbook - monthly expenses Reports - '; @@ -1045,12 +1040,13 @@ class report extends BaseController $data['monthlyreport']=$this->dahsboard_Model->monthexpensereport(); - + // $data['monthlyincreport']=$this->dahsboard_Model->monthincomereport(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - + $this->loadviews("cashbookmonthlyexpenses",$this->global,$data, NULL); - + + } public function yearexpenses() @@ -1058,59 +1054,94 @@ class report extends BaseController $this->global['pageTitle'] = 'Cashbook - yearly expenses Reports - '; - - - $data['yearlyreport']=$this->dahsboard_Model->yearexpensereport(); + $fyear = $this->input->post('financialyear'); + + $fa=substr( $fyear,0,-5); + $aa=substr( $fyear,5,5); + //echo $fyear; + //$data['yearlyincreport']=$this->dahsboard_Model->yearincomereport(); + $data['yearlyreport']=$this->dahsboard_Model->yearexpensereport($fa,$aa); + $data['financialyear']=$this->dahsboard_Model->cashbookfinyear(); + //print_r($data['finyear']); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - + $this->loadviews("cashbookyearlyexpenses",$this->global,$data, NULL); + } public function cashbookdepartment() { + $this->global['pageTitle'] = 'Cashbook - department - '; $sid=$_GET['sid']; + $d=$_GET['d']; - $this->global['pageTitle'] = 'Cashbook - department - '; - $data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d); + $c=$_GET['c']; + if ($c=='PAYMENT') + { + + $data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d,$c); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - - $this->loadviews("cashbookmonthlydep",$this->global,$data, NULL); + $this->loadviews("cashbookmonthlydep",$this->global,$data, NULL); } - //for cashbook menu link// - public function cashbookmonthmenu() + else{ + $data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d,$c); + $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + $this->loadviews("cashbookmonthlyexp",$this->global,$data, NULL); + } + } + public function cashbookdepartmentexp() { - - $this->global['pageTitle'] = 'Cashbook monthly '; - $data['yearmonthwise']=$this->dahsboard_Model->yearmonthwise(); + $sid=$_GET['sid']; + $d=$_GET['d']; + $c=$_GET['c']; + $this->global['pageTitle'] = 'Cashbook - department - '; + $data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d,$c); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); //print_r($data['departmentwise']); - $this->loadviews("cashbookyearmonthwise",$this->global,$data, NULL); + $this->loadviews("cashbookmonthlyexp",$this->global,$data, NULL); } + //for cashbook menu link// + // public function cashbookmonthmenu() + // { + + // $this->global['pageTitle'] = 'Cashbook monthly '; + // $data['yearmonthwise']=$this->dahsboard_Model->yearmonthwise(); + // $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + // //print_r($data['departmentwise']); + // $this->loadviews("cashbookyearmonthwise",$this->global,$data, NULL); + // } public function yearmonthwise() { $sid=$_GET['sid']; $this->global['pageTitle'] = 'Cashbook - yearmonthwise - '; $data['yearmonthwise']=$this->dahsboard_Model->yearmonthwise($sid); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - //print_r($data['departmentwise']); + $this->loadviews("cashbookyearmonthwise",$this->global,$data, NULL); } -public function Viewtoday() + + //this function used to today menu option// + public function Viewtoday() { $this->global['pageTitle'] = 'Cashbook - viewtoday '; $data['tdy']=$this->dahsboard_Model->today(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); $this->loadviews("cashbooktoday",$this->global,$data, NULL); } - public function depmenu() { - $this->global['pageTitle'] = 'Cashbook - viewtoday '; - $data['depmenu']=$this->dahsboard_Model->departmentmenu(); + $this->global['pageTitle'] = 'Cashbook - AllReport '; + $fdate = $this->input->post('from_date'); + $tdate = $this->input->post('to_date'); + $finyear = $this->input->post('financialyear'); + $fa=substr( $finyear,0,-5); + $aa=substr( $finyear,5,5); + $data['depmenu']=$this->dahsboard_Model->departmentmenu($fdate,$tdate,$fa,$aa); + $data['financialyear']=$this->dahsboard_Model->cashbookfinyear(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - $this->loadviews("cashbookdepmenu",$this->global,$data, NULL); + $this->loadviews("cashbookall",$this->global,$data, NULL); } public function cashbookmenudepartment() { @@ -1119,10 +1150,7 @@ public function Viewtoday() $this->global['pageTitle'] = 'Cashbook - department - '; $data['menudepartmentwise']=$this->dahsboard_Model->menudepartmentwise($sid); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - //print_r($data['departmentwise']); $this->loadviews("cashbookdepday",$this->global,$data, NULL); } - } ?> - diff --git a/application/models/cashbook_model.php b/application/models/cashbook_model.php index 68e829f4..5d3e0119 100755 --- a/application/models/cashbook_model.php +++ b/application/models/cashbook_model.php @@ -2,10 +2,7 @@ class cashbook_model extends CI_Model { - /** - * To get Account Type - * @return array $r->result() : result of the query (returns active account code) - */ + function getAccounTypes() { $this->db->where('status',1); @@ -13,24 +10,20 @@ class cashbook_model extends CI_Model return $r->result(); } - /** - * To get Account status - * @param number $data : This will have all the income and expense information. - * @return array $r : This will return how many value are inserted (return as number/count) - */ - function saveIncomeExpense($data) + * To Save Recepit and Payment datas + * array $data - Recepit/Payment array datas + * return $last_id - last inserted id + */ + function saveIncomeExpense($data) { $this->db->insert('t_income_expense',$data); - $r = $this->db->affected_rows(); - return $r; + //$r = $this->db->affected_rows(); + //return $r; + $last_id = $this->db->insert_id(); + return $last_id; } - /** - * To get Income and expense List - * @param number $i : Optional : This is incomeandexpense's id - * @return array $r->result() : result of the query (returns account information) - */ function getIncomeExpenseList($i="") { $this->db->select('t_accountcode.name,T_Employee_Details.FirstName,T_Employee_Details.LastName,t_income_expense.*'); @@ -39,43 +32,66 @@ class cashbook_model extends CI_Model $this->db->join('tbl_users','t_income_expense.Created_By=tbl_users.userId'); $this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID'); - if(!empty($i)) + if(!empty($i)) { $this->db->where('t_income_expense.id',$i); } - $r = $this->db->get(); - return $r->result(); + $r = $this->db->get(); + return $r->result(); } - - /** - * To get Company details - * @return array $r->result() : result of the query (returns company information) +// function getIncomeExpenseList($i="",$type) +// { +// $sql="SELECT `t_accountcode`.`name`, `T_Employee_Details`.`FirstName`, +// `T_Employee_Details`.`LastName`, `t_income_expense`.* +// FROM (`t_income_expense`) +// JOIN `t_accountcode` ON `t_income_expense`.`account_code`=`t_accountcode`.`code` or `t_income_expense`.`account_code` = '999' +// JOIN `tbl_users` ON `t_income_expense`.`Created_By`=`tbl_users`.`userId` +// JOIN `T_Employee_Details` ON `tbl_users`.`EmpID`=`T_Employee_Details`.`EmpID` +// WHERE `t_income_expense`.`id` = ".$i." +// and t_income_expense.type = '".$type."' +// group by t_income_expense.id"; +// $query = $this->db->query($sql); +// $result = $query->result(); +// return $result; +// } + + /** + * To Get Recepit and Payment datas for list + * string $aid - Recepit/Payment id + * return $query->result() - Recepit/Payment datas based on id */ + function getreceiptpaymentlist($aid = '') + { + $sql="SELECT `t_accountcode`.`name`, `T_Employee_Details`.`FirstName`,`T_Employee_Details`.`LastName`, `t_income_expense`.* + FROM (`t_income_expense`) + JOIN `t_accountcode` ON `t_income_expense`.`account_code`=`t_accountcode`.`code` or `t_income_expense`.`account_code` = '999' + JOIN `tbl_users` ON `t_income_expense`.`Created_By`=`tbl_users`.`userId` + JOIN `T_Employee_Details` ON `tbl_users`.`EmpID`=`T_Employee_Details`.`EmpID` + group by t_income_expense.id"; + $query = $this->db->query($sql); + return $query->result(); + } + + + function getCompany() { $r = $this->db->get('T_Company_Details'); - return $r->result(); + return $r->result(); + } - /** - * To get Account Information - * @param number $i - * @return array $r->result() : result of the query (returns account name and incomeandexpense information) - */ function getAccounutInfo($i) { $this->db->select('t_accountcode.name,t_income_expense.*'); $this->db->from('t_income_expense'); $this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code'); + //$this->db->where('t_income_expense.id') $r = $this->db->get(); return $r->result(); } - /** - * To get Account Information - * @return array $result : result of the query (returns account information) - */ function Selectcash() { $this->db->select('*'); @@ -85,14 +101,170 @@ class cashbook_model extends CI_Model return $result; } + + function viewdepartment($sid='') + { + $sql="SELECT ie.*,ac.name,date_format(ie.date,'%d-%m-%Y')as date FROM t_income_expense ie + JOIN t_accountcode ac on ac.code=ie.account_code + WHERE ie.id = ?"; + $query = $this->db->query($sql,array($sid)); + //print_r($this->db->last_query()); + //echo $sql; + return $query->result(); + } + + + function deletefile($cashid) + { + $sql="UPDATE t_income_expense SET document = NULL + WHERE id = ?"; + $query = $this->db->query($sql,array($cashid)); + //print_r($this->db->last_query()); + //echo $sql; + $r = $this->db->affected_rows(); + return $r; + } + + + function updatedepartment($updateaccount,$id1) + { + $this->db->where('id', $id1); + $this->db->update('t_income_expense',$updateaccount); + $r = $this->db->affected_rows(); + return $r; + + } + + /** + * To Update Payment Master datas + * array $updateaccount - Payment Master datas + * string $id1 - Payment's id + * return $ar - it return how many rows will affected + */ + function updatepaymentmaster($updateaccount,$id1) + { + $this->db->where('id', $id1); + $this->db->update('t_income_expense',$updateaccount); + //$ar = $this->db->affected_rows(); + //return $ar; + $last_id = $this->db->insert_id(); + return $last_id; + + } + /** - * To store cashbook Information (its insertion and updation operation) - * @param array $cashbookdatas : this will have all cashbook details - * @var number $res : gets count - * @return array $cbi : result of the query (for insertion) - * @return array $cbu : result of the query (for updation) + * To Get Payment Master for edit + * string $sid - Payment id + * return $query->result() - Payment datas based on id return as an array */ + function viewpaymentmaster($sid='') + { + $sql="SELECT ie.*,ac.name,date_format(ie.date,'%d-%m-%Y')as date + FROM T_Paymentdetails pd + JOIN t_income_expense ie ON ie.id = pd.Payment_id + JOIN t_accountcode ac ON ac.code = pd.account_code + WHERE ie.id = ? + group by pd.Payment_id"; + $query = $this->db->query($sql,array($sid)); + return $query->result(); + } + + /** + * To Get Payment lineitem Details for list (list dialog box) + * string $paymentid - Payment id + * return $result - Payment lineitem datas based on id return as an array + */ + function viewpaymentdetails($paymentid) + { + $sql="SELECT ac.name,pd.*,ie.* + FROM T_Paymentdetails pd + JOIN t_income_expense ie ON ie.id = pd.Payment_id + JOIN t_accountcode ac ON ac.code = pd.account_code + WHERE pd.Payment_id = ".$paymentid ; + $query = $this->db->query($sql); + $result = $query->result(); + return $result; + } + + + + /** + * To Add and Update Payment Lineitem datas + * array $PaymentDetails - Payment lineitem datas + * return $i - To insert Payment datas based on id if new data means + * return $u - To update Payment datas based on id if already have means + */ + function addpaymentdetails($addPaymentDetails){ + $this->db->insert('T_Paymentdetails',$addPaymentDetails); + $r = $this->db->affected_rows(); + return $r; + // $this->db->set($addPaymentDetails); + // $this->db->insert($this->db->dbprefix . 'T_Paymentdetails'); + } + + + function updatepaymentdetails($UpdatePaymentsdetails,$hidekey){ + + $this->db->where('ID', $hidekey); + $this->db->update('T_Paymentdetails',$UpdatePaymentsdetails); + $ar = $this->db->affected_rows(); + return $ar; + + + } + //function addupdatepaymentdetails($PaymentDetails,$hidekey=''){ + + // $paymentid = $PaymentDetails['Payment_id']; + // //$key = $PaymentDetails['ID']; + + // $count=0; + + // $this->db->select('count(*) as count'); + // $this->db->from('T_Paymentdetails'); + // $this->db->where('Payment_id',$paymentid); + // $this->db->where('ID',$hidekey); + + // $isExits = $this->db->get(); + // $res = $isExits->result_array(); + + + // if(!empty($res)) + // { + // $count = $res[0]['count']; + // } + + // if($count == 0 )//for insert + // { + // $i = $this->db->insert('T_Paymentdetails',$PaymentDetails); + // return $i; + // } + + // elseif($count == 1)//for update + // { + // $this->db->where('Payment_id', $paymentid); + // $this->db->where('ID', $hidekey); + // $u = $this->db->update('T_Paymentdetails',$PaymentDetails); + // return $u; + // } + + // } + + + /** + * To Delete Payment Lineitem datas + * string $acc - Payment's accountcode + * string $id - Payment's id + * return $ar - It returns how many rows will affetected + */ + function deletepaymentdetails($id){ + $sql = "DELETE FROM T_Paymentdetails WHERE ID =".$id; + $query = $this->db->query($sql); + $ar = $this->db->affected_rows(); + return $ar; + } + + function Cashbook($cashbookdatas) { $code=$cashbookdatas['code']; diff --git a/application/models/dahsboard_model.php b/application/models/dahsboard_model.php index c45e185e..fc9225c6 100755 --- a/application/models/dahsboard_model.php +++ b/application/models/dahsboard_model.php @@ -1,8 +1,7 @@ - \ No newline at end of file +?> + diff --git a/application/models/payroll_model.php b/application/models/payroll_model.php index 607e2547..22da7e9e 100755 --- a/application/models/payroll_model.php +++ b/application/models/payroll_model.php @@ -440,6 +440,25 @@ class Payroll_model extends CI_Model //print_r($query->result());die(); return $query->result(); - } + } + + function ChequeDetails($cheque){ + $this->db->insert('T_ChequeDetails', $cheque); + } + + function getChequeInfo($bank,$payon) + { + + $sql = "SELECT Cheque.* + FROM T_ChequeDetails Cheque + WHERE Cheque.BankName = ? + AND Cheque.MonthYear = ? "; + + $query = $this->db->query($sql,array($bank,$payon)); + //$query_count = $query->num_rows(); + + //return $query_count; + return $query->result(); + } } ?> \ No newline at end of file diff --git a/application/views/addnewIncomeExpense.php b/application/views/addnewIncomeExpense.php index 6fc14a5d..5af6c133 100755 --- a/application/views/addnewIncomeExpense.php +++ b/application/views/addnewIncomeExpense.php @@ -1,5 +1,365 @@ + + +
+ +
+

+
Resico Industries - Add New Receipt and Payment
+

+
+ +
+
+ Back +


+ +
+
+ + +
+
+ +
+
+
+
+
+

Add New Receipt

+
+ + +
+ +
+
+
+ +
+ Account Name Select: *

+ +
+
+ Date:*

+ +
+
+ Received From:*

+ +
+
+
+
+
+
+ GST +
+
+
+ +
+
+
+ Total Amount: + + +
+
+
+
+
+
+ Description: + + +
+
+ File Upload: + your image
+ +
+
+
+
+ + + +
+
+
+
+
+ + +
+
+
+ +
+
+

Add New Payment

+
+ +
+
+
+
+
+ Date:*

+ +
+ +
+ Paid To*

+ +
+ +
+ Merchant Name:

+ +
+ +
+ Merchant GST No:

+ +
+ +
+ + +
+ +
+ Voucher Code*

+ +
+ +
+ HSN/SAC Code:

+ +
+ +
+ Value before GST:

+ +
+ +
+ SGST:*

+ +
+
+ + + +
+
+ CGST:*

+ +
+ + +
+ IGST:

+ +
+
+ +
+ +
+
+
+ Account Name Select:* + +
+ +
+ Account Description:* + +
+ +
+ Amount:* + +
+ + +
+ + +
+
+
+ +
+ + + + +
+
+ Total Amount: + +
+
+ +
+
+
+ Description: + +
+
+ File Upload: + your image
+ +
+
+
+
+ + + + +
+
+
+
+
+
+ -
- -
-

-
Resico Industries - Add New Income and Expense
- -

-
- -
-
- Back -
-
-
- -
- - -
- - - -
- -
-
- - -
- -
-
- Select Account type:

- RECEIPT         - PAYMENT - - -
-
-
-
- Account Name Select: *

- -
-
- - -
-
- - Date:*

- - -
- -
- -
-
- - AAA*

- - -
- -
-
-
-
-
-
- GST -
-
-
- -
-
-
- Total Amount:* - - -
-
-
-
-
-
- Description: - - -
-
- File Upload: - your image
- -
-
-
- - - - - - -
-
-
-
- load->helper('form'); - $error = $this->session->flashdata('error'); - if($error) - { - ?> -
- - session->flashdata('error'); ?> -
- - session->flashdata('success'); - if($success) - { - ?> -
- - session->flashdata('success'); ?> -
- - -
-
- ', '
'); ?> -
-
-
-
-
- - - \ No newline at end of file diff --git a/application/views/bankreport.php b/application/views/bankreport.php index efc03d27..ce6f4ca1 100644 --- a/application/views/bankreport.php +++ b/application/views/bankreport.php @@ -1,4 +1,3 @@ - "Jan", "02" => "Feb","03" => "Mar","04" => "Apr","05" => "May","06" => "June","07"=> "July","08"=> "Aug","09" => "Sep","10"=> "Oct","11" => "Nov","12"=>"Dec"); @@ -9,34 +8,38 @@ $(function() { $(".select2").select2(); -$("#bankreport").click(function(){ + $( "#chequedate" ).datepicker({ + maxDate :'now', + dateFormat :'dd-mm-yy' + }); + $("#bankreport").click(function(){ var bank = $('#bank').val(); var payon = $('#month').val(); + var chequeno = $('#chequeno').val(); + var chequedate = $('#chequedate').val(); var excel = $('#excel').is(":checked"); - // alert(excel); - - + + if(excel == true) { alert('Excel Report Not Available for Bank Report..!'); return false; } if(bank != '-1' && payon !='-1') - { + { $('#content').loader('show'); $('#BankReportGenerator').attr('action', 'payslip/getBankReport'); $('form#BankReportGenerator').submit(); $('#content').loader('hide'); - } - else - { + } + else + { alert('Select Bank Name and Pay Date'); - return false; } - + }); $("#pfreport").click(function(){ @@ -96,16 +99,15 @@ $("#esireport").click(function(){

Resico Industries - Bank Report Generator
-

-
-
-
-
- - Select Bank +
+ +
+
+ + Select Bank -
+ +
-
+
Month @@ -147,29 +149,92 @@ $("#esireport").click(function(){ } ?> - + -
-
+
+
Excel -
+
+
+
+
+ Cheque No +
+
+ Cheque Date +

- - - + + + + +
+
+
+ + \ No newline at end of file diff --git a/application/views/bankreportprint.php b/application/views/bankreportprint.php index ed830b55..586f0c57 100644 --- a/application/views/bankreportprint.php +++ b/application/views/bankreportprint.php @@ -21,9 +21,10 @@ Bank_name ; $bankaddress = $b->Address; } + } + + if(!empty($chequedetails)) + { + foreach($chequedetails as $cheque) + { + $ChequeNO = $cheque->ChequeNO ; + $ChequeDate = $cheque->ChequeDate; + } } ?>
@@ -43,7 +53,7 @@

Dear Sir,

Sub: Salary transfer of respective SB a/c through Account Transfer.

-

Please find herewith enclosed a Cheque bearing No: _________________ dated ________________ for /- () Kindly transfer the same to the respective account holders mentioned below

+

Please find herewith enclosed a Cheque bearing No: dated for /- () Kindly transfer the same to the respective account holders mentioned below

diff --git a/application/views/cashbookall.php b/application/views/cashbookall.php new file mode 100755 index 00000000..48186804 --- /dev/null +++ b/application/views/cashbookall.php @@ -0,0 +1,323 @@ + + +FontCode2000; + }} + foreach($financialyear as $item) + + { + $finyear = $item->financial_year; + + } ?> + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +

Cashbook Report

+
+ +
+
+ +
+ + + + +
+
+ + +
+ +
+ + + + +
+
+
+ +
+
+ + +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateAccount NameTypeReceived FromPaid To Receipt Payment DescriptionAction
date?>name?>type?>receiptname?>paymentname?>income,2,'.',''); + echo number_format($t->income,2,'.','');?>expense,2,'.',''); + echo number_format($t->expense,2,'.','');?>description?> + document)) + { + ?> + + + +
Total     + + + + + +   
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/cashbookdepday.php b/application/views/cashbookdepday.php old mode 100644 new mode 100755 diff --git a/application/views/cashbookdepmenu.php b/application/views/cashbookdepmenu.php old mode 100644 new mode 100755 index 3fc17fdd..c89c1061 --- a/application/views/cashbookdepmenu.php +++ b/application/views/cashbookdepmenu.php @@ -101,14 +101,20 @@ $(document).ready(function() { "dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" + "<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", - buttons: [ - { - extend: 'collection', - text: 'Export Cashbook Reports', - buttons: [ - 'excel' - ] - } + buttons: [ + + { + extend: 'excelHtml5', + footer: 'true', + //messageTop: $('h3').text(), + title: $('h3').text(), + exportOptions: { + columns: ':visible' + + } + }, + + 'colvis' ] } ); } ); diff --git a/application/views/cashbooklisting.php b/application/views/cashbooklisting.php index 2bd40e50..7ead6e4c 100755 --- a/application/views/cashbooklisting.php +++ b/application/views/cashbooklisting.php @@ -1,3 +1,6 @@ + + +
@@ -12,24 +15,24 @@
-
+
Cash book / Account details
-
Account Type :  *
- RECEPIT
+
Account Type :  *
+ RECEIPT
PAYMENT

-
Account Code :  * +
Account Code :  *

-
Account Name :  * +
Account Name :  *

-
Description : +
Description :
@@ -100,6 +103,9 @@
+ + + - - - - - - + + +name; + //echo $department; + break;//echo $department; + // echo $department; +} + +} + + + $inrsymbol=''; +if(!empty($Indiancurrency)) + { + foreach ($Indiancurrency as $inr) + { + $inrsymbol = $inr->FontCode2000; + }} + ?> + + + + + +
+ + +
+
+
+
+

Report(DEP:)

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateAccount NameTypePaid To Payment DescriptionAction
date?>name?>type?>paymentname?>expense,2,'.',''); + echo number_format($dw->expense,2,'.','');?>description?> + document)) + { + ?> + + + +
Total    + + +   
+
+
+
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/cashbookmonthlyexp.php b/application/views/cashbookmonthlyexp.php new file mode 100755 index 00000000..efe5df7d --- /dev/null +++ b/application/views/cashbookmonthlyexp.php @@ -0,0 +1,208 @@ + + +name; + //echo $department; + break;//echo $department; + // echo $department; +} + } + + + $inrsymbol=''; +if(!empty($Indiancurrency)) + { + foreach ($Indiancurrency as $inr) + { + $inrsymbol = $inr->FontCode2000; + }} + ?> + + + + + + + + +
+ + +
+
+
+
+ +

Report (DEP:)

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateAccount NameTypeReceived From Receipt DescriptionFile
date?>name?>type?>receiptname?>income,2,'.',''); + echo number_format($dw->income,2,'.','');?>description?> + document)) + { + ?> + + + +
Total    + + +   
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/cashbookmonthlyexpenses.php b/application/views/cashbookmonthlyexpenses.php old mode 100644 new mode 100755 index 32a0d3f1..9b7f43f5 --- a/application/views/cashbookmonthlyexpenses.php +++ b/application/views/cashbookmonthlyexpenses.php @@ -1,138 +1,203 @@ -FontCode2000; - }} - - -if(!empty($monthlyreport)) -{ - -} -if(!empty($monthlyincreport)) -{ - -} -?> - - -
- - -

- -
- - - -
-
-
-
Monthly Payments
-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Paid ToPaid Type Amount
name?>type?>total,2,'.','');?>
-
-
-
-
-
-
- -
- - - - - - - - - - - - +FontCode2000; + }} + + +if(!empty($monthlyreport)) +{ + +} +if(!empty($monthlyincreport)) +{ + +} +?> + + + + + + + +
+
+
+
+
+

Month Report()

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account NameType Receipt Payment
name?>type?>income,2,'.',''); + echo number_format($mr->income,2,'.','');?>expense,2,'.',''); + echo number_format($mr->expense,2,'.','');?>
Total  + + + + + +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/cashbookmonthmenu.php b/application/views/cashbookmonthmenu.php old mode 100644 new mode 100755 index 5114d0bb..149789e8 --- a/application/views/cashbookmonthmenu.php +++ b/application/views/cashbookmonthmenu.php @@ -1,83 +1,83 @@ -FontCode2000; - }} -?> - -
-
-
-
-

Caskbook - "Monthly Payments"

-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DatePaid ToPaid Type Amount
date?>name ?>type?>total,2,'.','');?>
- -
-
-
-
-
-
- - +FontCode2000; + }} +?> + +
+
+
+
+

Caskbook - "Monthly Payments"

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DatePaid ToPaid Type Amount
date?>name ?>type?>total,2,'.','');?>
+ +
+
+
+
+
+
+ + diff --git a/application/views/cashbookpdf.php b/application/views/cashbookpdf.php index d2634cbd..8a4d67d9 100755 --- a/application/views/cashbookpdf.php +++ b/application/views/cashbookpdf.php @@ -14,7 +14,7 @@ $pic = base_url().'uploads/images/'.$company[0]->ProfilePic; -

CompanyName;?>


Address;?>
Mobile AlternateContactNumber;?>
E-mail EmailAddress;?>
GSTIN : GSTNO;?> +

CompanyName;?>


Address;?>
Mobile AlternateContactNumber;?>
E-mail EmailAddress;?>
GSTIN : GSTNO;?>
@@ -24,7 +24,7 @@ $pic = base_url().'uploads/images/'.$company[0]->ProfilePic;  Voucher Number -id;?> +type) == 'EXPENSE'){echo $data[0]->invoice_no;}else{echo $data[0]->id;}?>

Rs total;?>

Amount         @@ -44,6 +44,37 @@ $pic = base_url().'uploads/images/'.$company[0]->ProfilePic;  Amount (In Words) +name) == 'multiple'){ ?> + + Tax +SGST :sgst;?> +CGST :cgst;?> +IGST :igst;?> + + + + Multiple Payment + + + + + + + + + + + + + + +
Account NameAccount DescriptionAccount Amount
name; ?> Account_description; ?> Amount; ?> 
+ + +

 Remarks

@@ -54,10 +85,10 @@ $pic = base_url().'uploads/images/'.$company[0]->ProfilePic;     -  -  +  +  Prepared By   -FirstName.' '.$data[0]->LastName;?> +FirstName.' '.$data[0]->LastName;?>
diff --git a/application/views/cashbooktoday.php b/application/views/cashbooktoday.php old mode 100644 new mode 100755 index 8323cf9c..017bf681 --- a/application/views/cashbooktoday.php +++ b/application/views/cashbooktoday.php @@ -1,82 +1,188 @@ - -FontCode2000; - }} -?> -
-
-
-
-

Today's Payment

-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DatePaid ToPaid Type Amount Description
date?>name ?>type?>total,2,'.','');?>description?>
- -
-
-
-
-
-
- - + +FontCode2000; + }} +?> + + + +
+
+
+
+

Today Report

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateAccount NameTypeReceived FromPaid To Receipt Payment DescriptionAction
date?>name?>type?>receiptname?>paymentname?>income,2,'.',''); + echo number_format($t->income,2,'.','');?>expense,2,'.',''); + echo number_format($t->expense,2,'.','');?>description?> + document)) + { + ?> + + + +
Total     + + + + + +   
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/application/views/cashbookyearlyexpenses.php b/application/views/cashbookyearlyexpenses.php old mode 100644 new mode 100755 index a2040354..65b45460 --- a/application/views/cashbookyearlyexpenses.php +++ b/application/views/cashbookyearlyexpenses.php @@ -1,126 +1,213 @@ -FontCode2000; - }} -?> - - - -
- - -

- - -
-
-
-
Yearly Payments
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MonthPaid Type Amount
month?>type?>total,2,'.','');?>
- -
-
-
-
- -
- - - - - - - - - - - +FontCode2000; + }} + + +foreach($financialyear as $item) + + { + $finyear = $item->financial_year; + + } ?> + + + + + + +
+
+
+
+
+
+

YEAR REPORTS()

+
+
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Month Receipt Payment
month?>inc,2,'.',''); + echo number_format($yr->inc,2,'.','');?>exp,2,'.',''); + echo number_format($yr->exp,2,'.','');?>
Total + + + + + +  
+ +
+
+
+
+
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/cashbookyearmonthwise.php b/application/views/cashbookyearmonthwise.php old mode 100644 new mode 100755 index 0b4edb39..ff43f6ee --- a/application/views/cashbookyearmonthwise.php +++ b/application/views/cashbookyearmonthwise.php @@ -1,125 +1,174 @@ - -FontCode2000; - }} - ?> - - - - -
-
-
-
-
Monthly Payments
-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Account NamePaid Type Amount
name?>type?>total,2,'.','');?>
-
-
-
-
- - -
- - - - - - - - - + +FontCode2000; + }} + ?> + + + + + +
+
+
+
+
+
+

Month Report()

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account NamePaid Type Receipt Payment
name?>type?>income,2,'.',''); + echo number_format($ym->income,2,'.','');?>expense,2,'.',''); + echo number_format($ym->expense,2,'.','');?>
Total  + + + + + +
+
+
+
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/editincomeexpenses.php b/application/views/editincomeexpenses.php new file mode 100755 index 00000000..8f855442 --- /dev/null +++ b/application/views/editincomeexpenses.php @@ -0,0 +1,1106 @@ + +document; + $final = base_url().$document; + $accountcode1=$rd->account_code; + $id=$rd->id; + $type1=$rd->type; + $viewdep=$rd->total; + $dropdown=$rd->name; + $date1=$rd->date; + $invoiceno1=$rd->invoice_no; + $Merchant1=$rd->merchant; + $MerchantGST1=$rd->merchant_gst; + $HSNSAC1=$rd->HSN; + $valuebeforegst1=$rd->value_before_gst; + $SGST1=$rd->sgst; + $CGST1=$rd->cgst; + $IGST1=$rd->igst; + $Description1=$rd->description; + $towhom1=$rd->towhom; + $subdesc = $rd->paymentsubdesc; + }} + + +if(!empty($PaymentMultiple)) +{ + foreach ($PaymentMultiple as $pm) + { + $document =$pm->document; + $final = base_url().$document; + $accountcode1=$pm->account_code; + $id=$pm->id; + $type1=$pm->type; + $viewdep=$pm->total; + $dropdown=$pm->name; + $date1=$pm->date; + $invoiceno1=$pm->invoice_no; + $Merchant1=$pm->merchant; + $MerchantGST1=$pm->merchant_gst; + $HSNSAC1=$pm->HSN; + $valuebeforegst1=$pm->value_before_gst; + $SGST1=$pm->sgst; + $CGST1=$pm->cgst; + $IGST1=$pm->igst; + $Description1=$pm->description; + $towhom1=$pm->towhom; + $subdesc = $pm->paymentsubdesc; + }} + +?> + +
+ +
+

+ +
Resico Industries - Edit Details
+ +

+
+ +
+
+ Back +
+
+ + +
+
+
+
+ + + +
+ +
+
+
+ +
+ Account Name Select: *

+ +
+ +
+ Date:*

+ +
+ +
+ Recevied From*

+ +
+
+
+
+
+ GST +
+
+ + + +
+
+
+ Total Amount:* + + +
+
+
+
+
+
+ Description: + + +
+
+ + No Receipt Available
+ + + File Upload: + + + +
+
+ + + + +
+ +
+
+ +
+ + +
+
+ + +
+
+
+
+
+ + +
+
+
+
+ +
+
+
+
+ +
+ Date:*

+ +
+ +
+ Paid To:*

+ +
+ +
+ Merchant Name:

+ +
+ +
+ Merchant GST No:

+ +
+ +
+ + +
+
+ Voucher Code*

+ +
+ +
+ HSN/SAC Code:

+ +
+ +
+ Value before GST:

+ +
+ +
+ SGST:*

+ +
+
+ + + +
+
+ CGST:*

+ +
+ + +
+ IGST:

+ +
+
+ +
+ +
+
+
+ Account Name Select:* + +
+ +
+ Account Description: + +
+ +
+ Amount: + +
+ + +
+ +
+
+
+ + + + + +
+
+
+ Account Name Select:* + + +
+ +
+ Account Description: + +
+ +
+ Amount: + +
+ + + + + + +
+ +
+
+
+ + + + +
+ +
+
+ Total Amount: + +
+
+ +
+
+
+ Description: + +
+
+ + No Receipt Available
+ + File Upload: + + +
+
+ + + + +
+ + +
+
+
+ + + + + + +
+
+ + + + +
+
+
+
+ +
+
+ + + + + + \ No newline at end of file diff --git a/application/views/income_expense_list.php b/application/views/income_expense_list.php index 89e06ac4..4f8b31ae 100755 --- a/application/views/income_expense_list.php +++ b/application/views/income_expense_list.php @@ -1,72 +1,116 @@ - -

Resico Industries - Income & Expense List

-
- + + +
+ +
+

+
Resico Industries - Receipt and Payment List
+

+
- -
- -
- -
- Add New -
- -
- - - - -
-
-
+
+
+
- - - - - - - - - - + + + + + + + + + + + - + - + + + + + + + + + - - - - - -
Account TypeDATEAccount NameAmountDetails
Account TypeDATEAccount NameAmountDetailsAction
id.'">'.$l->type.'';?> date),'d-m-Y');?> name;?> total,2,'.','');?> description;?>
id.'">'.$l->type.'';?>date),'d-m-Y');?>type == 'PAYMENT' && $l->account_code == '999') { echo " "; } else {echo $l->name;}?>total;?>description;?> +     + + type == 'PAYMENT' && $l->account_code == '999') { ?> + + + +
- + + + +
+
+ + +
-
-
+ -
-
- +
+ +
+ + +function inex(input){ + + $.ajax({ + data:{id:input}, + type:"POST", + //dataType: 'json', + url:"cashbook/ViewPaymentDetails", + success:function(data) { + $('#myModal').modal('show'); + var trHTML = ''; + + $.each(JSON.parse(data), function (i, item) { + if(input == item.Payment_id) + { + var tax = (+item.sgst+ +item.cgst+ +item.igst); + + trHTML += '' + + '' + item.type + '' + + '' + item.name + '' + + '' + item.Account_description + '' + + ''+ item.Amount+ '' + + ''+ tax +'' + + ''+item.total+'' + + ''; + + } + + }); + $("#tbleAppend").empty(); + $('#paymentdetails > tbody').append(trHTML); + +} + }); +} + + diff --git a/application/views/reportcashbook.php b/application/views/reportcashbook.php old mode 100644 new mode 100755 index 7e75049f..12da95dd --- a/application/views/reportcashbook.php +++ b/application/views/reportcashbook.php @@ -1,520 +1,338 @@ -todaydata; - }} - - if(!empty($todayexpense)) - { - foreach ($todayexpense as $te) - { - $today_ex=$te->todaydata; - }} - - if(!empty($monthlywiseincome)) - { - foreach ($monthlywiseincome as $mi) - { - $month_in = $mi->monthlydata; - }} - - if(!empty($monthlywiseexpense)) - { - foreach ($monthlywiseexpense as $me) - { - $month_ex = $me->monthlydata; - }} - if(!empty($yearexpense)) - { - foreach ($yearexpense as $ye) - { - $year_ex=$ye->yearlydata; - }} - - if(!empty($yearincome)) - { - foreach ($yearincome as $yi) - { - $year_in = $yi->yearlydata; - }} - - $inrsymbol=''; - if(!empty($Indiancurrency)) - { - foreach ($Indiancurrency as $inr) - { - $inrsymbol = $inr->FontCode2000; - }} - - -?> - - - - - - - - -
-

 

- - - -
- -
-
- - -
-
-
- -
- - - Receipt : - Payment : - -
-
-
- - -
-
-
- -
- - Receipt : - Payment : -
-
-
- - -
-
-
- -
- - Receipt : - Payment : -
-
-
- -
-
-
- -
- - Receipt : - Payment : -
-
-
-
-
-
- - - - - - - - - - - -
- -
- - - - - - - -

Day Wise Payment

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Account NameTypeReceived FromPaid To Receipt Payment Description
date?>name?>type?>receiptname?>paymentname?>income,2,'.',''); - echo number_format($cash->income,2,'.','');?>expense,2,'.',''); - echo number_format($cash->expense,2,'.','');?>description?>
Total     - - - - - -  
- -
-
-
- -
- - -
- - - - - - - - - - - - - - - - - - - - + + +todaydata; + }} + + if(!empty($todayexpense)) + { + foreach ($todayexpense as $te) + { + $today_ex=$te->todaydata; + }} + + if(!empty($monthlywiseincome)) + { + foreach ($monthlywiseincome as $mi) + { + $month_in = $mi->monthlydata; + }} + + if(!empty($monthlywiseexpense)) + { + foreach ($monthlywiseexpense as $me) + { + $month_ex = $me->monthlydata; + }} + if(!empty($yearexpense)) + { + foreach ($yearexpense as $ye) + { + $year_ex=$ye->yearlydata; + }} + + if(!empty($yearincome)) + { + foreach ($yearincome as $yi) + { + $year_in = $yi->yearlydata; + }} + + $inrsymbol=''; + if(!empty($Indiancurrency)) + { + foreach ($Indiancurrency as $inr) + { + $inrsymbol = $inr->FontCode2000; + }} + + +?> + + + + + + + +
+
+ + + +
+ +
+
+ + +
+
+
+ +
+ + + Receipt : + Payment : + +
+
+
+ + +
+
+
+ +
+ + Receipt : + Payment : +
+
+
+ + +
+
+
+ +
+ + Receipt : + Payment : +
+
+
+ +
+
+ +
+ + + + + + + + + +
+ +
+ + + + + + + +

Day Wise Report

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateAccount NameTypeReceived FromPaid To Receipt Payment DescriptionFile
date?>name?>type?>receiptname?>paymentname?>income,2,'.',''); + echo number_format($t->income,2,'.','');?>expense,2,'.',''); + echo number_format($t->expense,2,'.','');?>description?> + document)) + { + ?> + + + +
Total     + + + + + +    
+ +
+
+
+ +
+ + + + + + + + + + + + + + + + diff --git a/application/views/viewIGRDetails.php b/application/views/viewIGRDetails.php index b3e56255..43993c56 100644 --- a/application/views/viewIGRDetails.php +++ b/application/views/viewIGRDetails.php @@ -308,7 +308,7 @@ $("#Igrshow").on("shown.bs.modal", function(e) { var igr_nos = $(e.relatedTarget).data('id'); var igr = igr_nos.split(','); igr = igr[1]; - alert(igr_nos+igr); + //alert(igr_nos+igr); $('#content').loader('show'); $.ajax({ data:{id:igr}, diff --git a/application/views/viewIndIncomeExpense.php b/application/views/viewIndIncomeExpense.php index efc49324..c831a088 100755 --- a/application/views/viewIndIncomeExpense.php +++ b/application/views/viewIndIncomeExpense.php @@ -1,4 +1,4 @@ -
- + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Date :
    date)){echo date_format(date_create($data[0]->date),'d-m-Y');}?>
Merchant Name :
merchant)){echo $data[0]->merchant;}?>
    towhom)){echo $data[0]->towhom;}?>
Merchant GST No :
merchant_gst)){echo $data[0]->merchant_gst;}?>
Invoice No :
     invoice_no)){echo $data[0]->invoice_no;}?>
HSN/SAC No :
  HSN)){echo $data[0]->HSN;}?>
Value Before GST :
    value_before_gst)){echo $data[0]->value_before_gst;}?>  
SGST :
    sgst)){echo $data[0]->sgst;}?>  
CGST :
     cgst)){echo $data[0]->cgst;}?>  
IGST :
     igst)){echo $data[0]->igst;}?>  
+ + + + + + + + + + + + + +
Account Name   Account Description   Account Amount  
name; ?> Account_description; ?> Amount; ?> 
Total Amount
    total)){echo $data[0]->total;}?>
Description :
    description)){echo $data[0]->description;}?>
+
+ - - + + - - - - - - - - - - - + + + + + + + + + + + + +

Date

     : date)){echo date_format(date_create($data[0]->date),'d-m-Y');}?>

     :towhom)){echo $data[0]->towhom;}?>

Date :

    date)){echo date_format(date_create($data[0]->date),'d-m-Y');}?>

    towhom)){echo $data[0]->towhom;}?>

Invoice No

     : invoice_no)){echo $data[0]->invoice_no;}?>

Merchant Name

     : merchant)){echo $data[0]->merchant;}?>

Merchant GST No

    : merchant_gst)){echo $data[0]->merchant_gst;}?>

HSN/SAC No

     : HSN)){echo $data[0]->HSN;}?>

Value Before GST

    : value_before_gst)){echo $data[0]->value_before_gst;}?>

SGST

    : sgst)){echo $data[0]->sgst;}?>

CGST

     : cgst)){echo $data[0]->cgst;}?>

IGST

     : igst)){echo $data[0]->igst;}?>

Total Amount

     : total)){echo number_format($data[0]->total,2,'.','');}?>

Description

    : description)){echo $data[0]->description;}?>

Invoice No :

     invoice_no)){echo $data[0]->invoice_no;}?>

Merchant Name :

     merchant)){echo $data[0]->merchant;}?>

Merchant GST No :

    merchant_gst)){echo $data[0]->merchant_gst;}?>

HSN/SAC No :

     HSN)){echo $data[0]->HSN;}?>

Value Before GST :

    value_before_gst)){echo $data[0]->value_before_gst;}?>

SGST :

    sgst)){echo $data[0]->sgst;}?>

CGST :

     cgst)){echo $data[0]->cgst;}?>

IGST :

     igst)){echo $data[0]->igst;}?>

Total Amount :

     total)){echo $data[0]->total;}?>

Description :

    description)){echo $data[0]->description;}?>
+
diff --git a/application/views/viewinwardgateregister.php b/application/views/viewinwardgateregister.php index 30479491..b8f6ff1e 100644 --- a/application/views/viewinwardgateregister.php +++ b/application/views/viewinwardgateregister.php @@ -283,7 +283,7 @@