cashbook payment changes and bank report cheque date and no

This commit is contained in:
venbatechnologies@gmail.com 2018-02-15 11:37:50 +05:30
parent dbc8ec6c45
commit b28151d83a
28 changed files with 5036 additions and 1830 deletions

View File

@ -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//

View File

@ -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 "<script>alert('Saved Successfully!');window.location.href='ViewIncomeExpense';</script>";
if( $res >= 1 ){
echo "<script>alert('Saved Successfully!');
window.location.href='incomeExpenseList';</script>";
}
}
/**
* 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 "<script>alert('Saved Successfully!');
window.location.href='incomeExpenseList';</script>";
}
}
/**
* 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 "<script>alert('Saved Successfully!');
window.location.href='incomeExpenseList';
</script>";
}
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 "<br>****************************";
foreach($g as $arr){
$insert = count($arr);
//echo $insert;
if($insert == 3){
//print_r($arr); echo "<br>*********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 "<br>*********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 "<script>alert('Saved Successfully!');
window.location.href='incomeExpenseList';
</script>";
}
/**
* 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);
}
}
?>

View File

@ -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;
}
}
?>

View File

@ -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);
}
}
?>

View File

@ -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'];

View File

@ -1,8 +1,7 @@
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
class dahsboard_Model extends CI_Model
{
function getUserCount()
{
@ -12,6 +11,7 @@ class dahsboard_Model extends CI_Model
}
/* HR DASHBOART Model START*/
function totemp()
{
@ -1400,7 +1400,7 @@ group by supplier_name,material_name";
function ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat){
$sql="select im.IGRNO as igrn,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(distinct id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,sum(distinct id.QuantityAsPerInvoice) * pl.Rate as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(distinct pm.ExchangeRate),0) as exchange_rate,
$sql="select im.IGRNO as igrn,im.PONO as pono,pm.POType as potype,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(distinct id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,sum(distinct id.QuantityAsPerInvoice) * pl.Rate as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(distinct pm.ExchangeRate),0) as exchange_rate,
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0) as sgst,
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),0) as cgst,
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0) as igst,
@ -1476,7 +1476,7 @@ $sql.="group by pono,material_name,category,supplier_name";
function ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat){
$sql="select im.IGRNO as igrn,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(distinct id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,sum(distinct id.QuantityAsPerInvoice) * pl.Rate as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(distinct pm.ExchangeRate),0) as exchange_rate,
$sql="select im.IGRNO as igrn,im.PONO as pono,pm.POType as potype,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(distinct id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,sum(distinct id.QuantityAsPerInvoice) * pl.Rate as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(distinct pm.ExchangeRate),0) as exchange_rate,
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0) as sgst,
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),0) as cgst,
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0) as igst,
@ -2344,4 +2344,5 @@ function INRSymbol()
}
}
?>
?>

View File

@ -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();
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,3 @@
<?php
$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");
@ -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', '<?php echo base_url() ?>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(){
<section class="content-header">
<h1>
<center>Resico Industries - Bank Report Generator</center>
</h1>
</section>
<section class="content">
<div class="row" style="border:2px dotted; padding:5%">
<form id="BankReportGenerator" action="" method="post" role="form" >
<div class="row" >
<div class="col-md-4">
<span for="selectmonth">Select Bank</span>
<div class="row" style="border:2px dotted; padding:5%">
<form id="BankReportGenerator" action="" method="post" role="form" >
<div class="row" >
<div class="col-md-4">
<span for="selectmonth">Select Bank</span>
<select id="bank" name="bank" class="form-control select2" style="width: 100%;">
<option value="-1">Select Bank</option>
<?php
@ -126,10 +128,10 @@ $("#esireport").click(function(){
}
}
?>
</select>
</div>
</select>
</div><!-- col-md-4 -->
<div id="content"></div>
<div class="col-md-4 col-md-offset-2">
<div class="col-md-4 col-md-offset-2">
<span>Month</span>
@ -147,29 +149,92 @@ $("#esireport").click(function(){
}
?>
</select>
</select>
</div>
<div class="col-md-4 col-md-offset-6">
</div><!-- col-md-4 col-md-offset-2-->
<div class="col-md-4 col-md-offset-6">
<input type="checkbox" class="" id="excel" name="excel" value="excel" /><span>Excel</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-2">
<span>Cheque No</span><input type="text" class="form-control" id="chequeno" name="chequeno" readonly/>
</div>
<div class="col-md-2">
<span>Cheque Date</span><input type="text" class="form-control" id="chequedate" name="chequedate" readonly/>
</div>
</div>
<br/>
<div class="col-md-4 col-md-offset-6" align = "right">
<input type="submit" class="btn btn-info" id="bankreport" name="Bank_Report" value="Bank Report" />
<input type="submit" class="btn btn-info" id="pfreport" name="PF_Report" value="PF Report" />
<input type="submit" class="btn btn-info" id="esireport" name="ESI_Report" value="ESI Report" />
<input type="submit" class="btn btn-info" id="bankreport" target = "_blank" name="Bank_Report" value="Bank Report" />
<input type="submit" class="btn btn-info" id="pfreport" name="PF_Report" value="PF Report" />
<input type="submit" class="btn btn-info" id="esireport" name="ESI_Report" value="ESI Report" />
</div><!-- // col-md-4 col-md-offset-6 button -->
</div><!-- // row first-->
</section><!-- // section content-->
</div><!--wrapper div-->
<script>
$("#bank").change(function(){
chequeajaxcall();
} );
$("#month").change(function(){
chequeajaxcall();
} );
function chequeajaxcall()
{
var bank = $('#bank').val();
var payon = $('#month').val();
var chequeno = $('#chequeno').val();
var chequedate = $('#chequedate').val();
$('#content').loader('show');
if(bank != '-1' && payon !='-1')
{
$.ajax({
data:{id1:bank,id2:payon},
type:"POST",
url:"<?php echo base_url();?>payslip/ValidationCheque",
success:function(data) {
$('#content').loader('hide');
if(data != 0){
swal('Value already exists ! ..');
$("#chequeno").val();
$("#chequeno").prop("readonly", true);
$("#chequedate").val('');
$("#chequedate").prop("readonly", true);
}else{
$("#chequeno").val('');
$("#chequeno").prop("readonly", false);
$("#chequedate").val('');
$("#chequedate").prop("readonly", false);
}
}//success
})//ajax
}
else
{
</div>
</div>
$('#content').loader('hide');
</section>
</div>
}
}
$(window).bind("pageshow", function() {
$('#bank').val('-1');
$('#month').val('-1');
$('#chequeno').val('');
$('#chequedate').val('');
});
</script>

View File

@ -21,9 +21,10 @@
</div>
<?php
$bankname = '';
$bankname = '';
$bankaddress = '';
$ChequeNO ='';
$ChequeDate ='';
if(!empty($bankdetails))
{
foreach($bankdetails as $b)
@ -31,6 +32,15 @@
$bankname = $b->Bank_name ;
$bankaddress = $b->Address;
}
}
if(!empty($chequedetails))
{
foreach($chequedetails as $cheque)
{
$ChequeNO = $cheque->ChequeNO ;
$ChequeDate = $cheque->ChequeDate;
}
}
?>
<div class="page" style="font-size:12px;">
@ -43,7 +53,7 @@
<div>
<p>Dear Sir,</p>
<p>Sub: Salary transfer of respective SB a/c through Account Transfer.</p>
<p>Please find herewith enclosed a Cheque bearing No: _________________ dated ________________ for <b><?php echo number_format($Totalamount,2,'.','');?></b> /- (<b><?php echo $Totalamtwords;?></b>) Kindly transfer the same to the respective account holders mentioned below</p>
<p>Please find herewith enclosed a Cheque bearing No: <u><?php echo $ChequeNO ?></u> dated <u><?php echo $ChequeDate ?></u> for <b><?php echo number_format($Totalamount,2,'.','');?></b> /- (<b><?php echo $Totalamtwords;?></b>) Kindly transfer the same to the respective account holders mentioned below</p>
</div>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>

323
application/views/cashbookall.php Executable file
View File

@ -0,0 +1,323 @@
<?php
if(!empty($cashbook))
{
}
if(!empty($depmenu))
{
}
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<!--<div class="row">
<div class="col-md-12">
<div id="container"></div>
</div>
</div>-->
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<!--<div class="box-header with-border">-->
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Report</b></p></h3></center>
<div class="box-body">
<div class="row">
<div class="col-md-3">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3" style="margin-top:24px;">
<select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option>
<?php
foreach($financialyear as $item):
{?>
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
<?php } endforeach; ?>
</select>
</div>
<div class="col-md-3" style="margin-top:24px;">
<input type="submit" class="btn btn-success" name="btn_submit"
value="View Report">
</div>
</div>
</form>
<br>
<br>
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Date</th>
<!--<th>Account Code</th>-->
<th>Account Name</th>
<th>Type</th>
<th>Received From</th>
<th>Paid To</th>
<!--<th>Paid Type(RECEIPT)</th>-->
<!--<th>Paid Type(PAYMENTS)</th>-->
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
<th>Description</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$ti=0.00;
$tvt=0.00;
if(!empty($depmenu)){
foreach($depmenu as $t)
{
?>
<tr>
<td><span><?php echo $t->date?></span></td>
<td align="left"><span><?php echo $t->name?></span></td>
<td align="left"><span><?php echo $t->type?></span></td>
<td align="left"><span><?php echo $t->receiptname?></span></td>
<td align="left"><span><?php echo $t->paymentname?></span></td>
<!--<td align="left"><span><?php echo $cash->expense?></span></td>-->
<td align="right"><span><?php
$ti= $ti + number_format($t->income,2,'.','');
echo number_format($t->income,2,'.','');?></span></td>
<td align="right"><span><?php
$tvt= $tvt + number_format($t->expense,2,'.','');
echo number_format($t->expense,2,'.','');?></span></td>
<td align="left"><span><?php echo $t->description?></span></td>
<td>
<?php
if(!empty($t->document))
{
?>
<a target="_blank" href="<?php echo base_url().$t->document ?>"><i class="fa fa-download" ></i></a>
<?php
}
else
{
echo "NO FILE";
}
?>
</td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
$( function() {
//var dateFormat = "mm/dd/yy",
from = $( "#min-date" )
.datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
to.datepicker("option", "minDate", getDate( this ) );
}),
to = $( "#max-date" ).datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
from.datepicker( "option", "maxDate", getDate( this ) );
});
function getDate( element ) {
var date;
try {
date = $.datepicker.parseDate( dateFormat, element.value );
} catch( error ) {
date = null;
}
return date;
}
} );
</script>

0
application/views/cashbookdepday.php Normal file → Executable file
View File

22
application/views/cashbookdepmenu.php Normal file → Executable file
View File

@ -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'
]
} );
} );

View File

@ -1,3 +1,6 @@
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
<div class="content-wrapper">
@ -12,24 +15,24 @@
<form role="form" id="cashbookform" action="<?php echo base_url()?>" method="post" enctype="multipart/form-data">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-md-12" style="font-size:14px;">
<div class="col-xs-12 col-md-12">
<legend>Cash book / Account details</legend>
<div class="col-md-12">
<div class="col-md-3"><strong>Account Type :</strong>&nbsp;&nbsp;<strong style="color:#ff6347;">*</strong><br>
<input type="radio" name="accounttype" id="accounttype" value="RECEPIT" checked> RECEPIT<br>
<div class="col-md-3"><span>Account Type :</span>&nbsp;&nbsp;<span style="color:#ff6347;">*</span><br>
<input type="radio" name="accounttype" id="accounttype" value="RECEIPT" checked> RECEIPT<br>
<input type="radio" name="accounttype" id="accounttype" value="PAYMENT"> PAYMENT<br>
</div><p style="color:red"></p>
<div class="col-md-3 pad"><strong>Account Code :</strong>&nbsp;&nbsp;<strong style="color:#ff6347;">*</strong>
<div class="col-md-3 pad"><span>Account Code :</span>&nbsp;&nbsp;<span style="color:#ff6347;">*</span>
<input type="text" name="accountcode" id="accountcode" onchange="validateACCODE();" class="form-control" requried placeholder="Account Code" title="Account Code is requried">
</div><p style="color:red"></p>
<div class="col-md-3 pad"><strong>Account Name :</strong>&nbsp;&nbsp;<sapn style="color:#ff6347;">*</strong>
<div class="col-md-3 pad"><span>Account Name :</span>&nbsp;&nbsp;<sapn style="color:#ff6347;">*</span>
<input type="text" name="accountname" id="accountname" class="form-control" placeholder="Account Name" title="Account Name is requried" class="tooltip" onfocus="theFocus(this);" onblur="theBlur(this);">
</div><p style="color:red"></p>
<div class="col-md-3 pad"><strong>Description :</strong>
<div class="col-md-3 pad"><span>Description :</span>
<input type="email" name="description" id="description" class="form-control" placeholder="Account Description">
</div>
<input type="hidden" id="accountstate" name="accountstate" class="form-control" value="Yes" >
@ -100,6 +103,9 @@
</div>
</section>
</div>
<script type="text/html" id="addList">
<tr id="<%=index%>">
<td align="left"><%=AccountCodeType%></td>
@ -110,6 +116,7 @@
</tr>
</script>
<script>
var index = '1';
var localcodes =[];
$('#Add').click(function(){

336
application/views/cashbookmonthlydep.php Normal file → Executable file
View File

@ -1,135 +1,203 @@
<?php
if(!empty($departmentwise))
{
}
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
<style>
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<div class="row" style="min-height: 600px;">
<div class="content-wrapper">
<div class="col-md-10 col-md-offset-1">
<div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading">
<center><b> Monthly(Department Wise) Payments</b></center>
</div>
<div class="btn-group btn-group-justified no-margin">
<div>
<table class="table table-bordered table-hover" id="req" style="font-size:13px;">
<thead>
<tr>
<th>Date</th>
<!--<th>Account Code</th>-->
<th>Account Name</th>
<th>Paid Type</th>
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
<th>Description</th>
</tr>
</thead>
<tbody>
<?php if(!empty($departmentwise)){
foreach($departmentwise as $dw)
{
?>
<tr>
<td><span><?php echo $dw->date?></span></td>
<!--<td align="left"><span><?php echo $dw->account_code?></span></td>-->
<td align="left"><span><?php echo $dw->name?></span></td>
<td align="left"><span><?php echo $dw->type?></span></td>
<td align="right"><span><?php echo number_format($dw->total,2,'.','');?></span></td>
<td align="left"><span><?php echo $dw->description?></span></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#req').DataTable( {
"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'
]
}
]
} );
} );
</script>
<?php
$department='';
if(!empty($departmentwise))
{
foreach($departmentwise as $dw)
{
$department=$dw->name;
//echo $department;
break;//echo $department;
// echo $department;
}
}
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<div class="row" style="min-height: 600px;">
<div class="content-wrapper">
<div class="col-md-10 col-md-offset-1">
<div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b><?php $d=$_GET['d'] ;echo $d;?> Report(DEP:<?php echo $department; ?>)</b></p></h3></center>
</div>
<div class="btn-group btn-group-justified no-margin">
<div>
<table class="table table-bordered table-hover" id="req" style="font-size:13px;">
<thead>
<tr>
<th>Date</th>
<th>Account Name</th>
<th>Type</th>
<th>Paid To</th>
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
<th>Description</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$tvt=0.00;
if(!empty($departmentwise)){
foreach($departmentwise as $dw)
{
?>
<tr>
<td><span><?php echo $dw->date?></span></td>
<td align="left"><span><?php echo $dw->name?></span></td>
<td align="left"><span><?php echo $dw->type?></span></td>
<td align="left"><span><?php echo $dw->paymentname?></span></td>
<td align="right"><span><?php
$tvt= $tvt + number_format($dw->expense,2,'.','');
echo number_format($dw->expense,2,'.','');?></span></td>
<td align="left"><span><?php echo $dw->description?></span></td>
<td>
<?php
if(!empty($dw->document))
{
?>
<a target="_blank" href="<?php echo base_url().$dw->document ?>"><i class="fa fa-download" ></i></a>
<?php
}
else
{
echo "NO FILE";
}
?>
</td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#req').DataTable( {
"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: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

View File

@ -0,0 +1,208 @@
<?php
$department='';
if(!empty($departmentwise))
{
foreach($departmentwise as $dw)
{
$department=$dw->name;
//echo $department;
break;//echo $department;
// echo $department;
}
}
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<div class="content-wrapper">
<!-- Main content -->
<section class="content">
<div class="col-md-12">
<div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b><?php $d=$_GET['d'] ;echo $d;?> Report (DEP:<?php echo $department;?>)</b></p></h3></center>
</div>
<div class="btn-group btn-group-justified no-margin">
<div>
<table class="table table-bordered table-hover" id="req" style="font-size:13px;">
<thead>
<tr>
<th>Date</th>
<th>Account Name</th>
<th>Type</th>
<th>Received From</th>
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
<th>Description</th>
<th>File</th>
</tr>
</thead>
<tbody>
<?php
$ti=0.00;
if(!empty($departmentwise)){
foreach($departmentwise as $dw)
{
?>
<tr>
<td><span><?php echo $dw->date?></span></td>
<td align="left"><span><?php echo $dw->name?></span></td>
<td align="left"><span><?php echo $dw->type?></span></td>
<td align="left"><span><?php echo $dw->receiptname?></span></td>
<td align="right"><span><?php
$ti= $ti + number_format($dw->income,2,'.','');
echo number_format($dw->income,2,'.','');?></span></td>
<td align="left"><span><?php echo $dw->description?></span></td>
<td>
<?php
if(!empty($dw->document))
{
?>
<a target="_blank" href="<?php echo base_url().$dw->document ?>"><i class="fa fa-download" ></i></a>
<?php
}
else
{
echo "NO FILE";
}
?>
</td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#req').DataTable( {
"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: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

339
application/views/cashbookmonthlyexpenses.php Normal file → Executable file
View File

@ -1,138 +1,203 @@
<?php
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
if(!empty($monthlyreport))
{
}
if(!empty($monthlyincreport))
{
}
?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
<style>
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content"><br/>
<div class="row" style="min-height: 600px;">
<div class="col-md-10 col-md-offset-1">
<div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading">
<center><b>Monthly Payments </b></center>
</div>
<div class="btn-group btn-group-justified no-margin">
<div>
<table class="table table-bordered table-hover" id="req">
<thead>
<tr>
<th>Paid To</th>
<th>Paid Type</th>
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php if(!empty($monthlyreport)){
foreach($monthlyreport as $mr)
{
?>
<tr>
<!--<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $mr->account_code;?>"><span><?php echo $mr->account_code?></span></a></td>-->
<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $mr->account_code;?>&d=<?php echo $mr->month?>"><span><?php echo $mr->name?></span></a></td>
<td align="left"><span><?php echo $mr->type?></span></td>
<td align="right"><span><?php echo number_format($mr->total,2,'.','');?></span></td>
<!--<td align="left"><span><?php echo $mr->account_code?></span></td>-->
<!--<td align="left"><span><?php echo $mr->description?></span></td>-->
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#req').DataTable( {
"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'
]
}
]
} );
} );
</script>
<?php
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
if(!empty($monthlyreport))
{
}
if(!empty($monthlyincreport))
{
}
?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
.btn-success {
background-color: #3c8dbc;
border-color: #3c8dbc;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="col-md-12">
<div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Month Report(<?php $month=date('F');echo $month;?>)</b></p></h3></center>
</div>
<div class="btn-group btn-group-justified no-margin">
<div>
<table class="table table-bordered table-hover" id="req" style="font-size:13px;">
<thead>
<tr>
<th>Account Name</th>
<th>Type</th>
<!--<th>Received From</th>
<th>Paid To</th>-->
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php
$ti=0.00;
$tvt=0.00;
if(!empty($monthlyreport)){
foreach($monthlyreport as $mr)
{
?>
<tr>
<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $mr->account_code;?>&d=<?php echo $mr->month?>&c=<?php echo $mr->type?>"><span><?php echo $mr->name?></span></a></td>
<td align="left"><span><?php echo $mr->type?></span></td>
<!--<td align="left"><span><?php echo $mr->receiptname?></span></td>
<td align="left"><span><?php echo $mr->paymentname?></span></td>-->
<!--<td align="left"><span><?php echo $cash->expense?></span></td>-->
<td align="right"><span><?php
$ti= $ti + number_format($mr->income,2,'.','');
echo number_format($mr->income,2,'.','');?></span></td>
<td align="right"><span><?php
$tvt= $tvt + number_format($mr->expense,2,'.','');
echo number_format($mr->expense,2,'.','');?></span></td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#req').DataTable( {
"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: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

166
application/views/cashbookmonthmenu.php Normal file → Executable file
View File

@ -1,83 +1,83 @@
<?php
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
?>
<div class="content-wrapper">
<section class="content">
<div class="box">
<div class="box-header">
<CENTER><h3 class="box-title"><strong>Caskbook - "Monthly Payments"</strong></h3></CENTER>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:11px;" >
<thead style="background-color:#ddf">
<tr>
<th>Date</th>
<th>Paid To</th>
<th>Paid Type</th>
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php if(!empty($monthlymenupayments)){
foreach($monthlymenupayments as $t)
{
?>
<tr>
<td><span><?php echo $t->date?></span></td>
<td align="left"><span><?php echo $t->name ?></span></td>
<td align="left"><span><?php echo $t->type?></span></td>
<td align="right"><span><?php echo number_format($t->total,2,'.','');?></span></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
$(function () {
$('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": true
});
});
</script>
<?php
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
?>
<div class="content-wrapper">
<section class="content">
<div class="box">
<div class="box-header">
<CENTER><h3 class="box-title"><strong>Caskbook - "Monthly Payments"</strong></h3></CENTER>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:11px;" >
<thead style="background-color:#ddf">
<tr>
<th>Date</th>
<th>Paid To</th>
<th>Paid Type</th>
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php if(!empty($monthlymenupayments)){
foreach($monthlymenupayments as $t)
{
?>
<tr>
<td><span><?php echo $t->date?></span></td>
<td align="left"><span><?php echo $t->name ?></span></td>
<td align="left"><span><?php echo $t->type?></span></td>
<td align="right"><span><?php echo number_format($t->total,2,'.','');?></span></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
$(function () {
$('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": true
});
});
</script>

View File

@ -14,7 +14,7 @@ $pic = base_url().'uploads/images/'.$company[0]->ProfilePic;
<tr style="height: 57px;">
<td style="width: 89px; height: 57px;"><img src='<?php echo $pic;?>' ></td>
<td style="width: 89px; height: 57px;" colspan="5">
<h1><?php echo $company[0]->CompanyName;?></h1><br /><?php echo $company[0]->Address;?><br />Mobile <?php echo $company[0]->AlternateContactNumber;?> <br> E-mail <?php echo $company[0]->EmailAddress;?></a><br>GSTIN : <?php echo $company[0]->GSTNO;?>
<h1><?php $company[0]->CompanyName;?></h1><br /><?php echo $company[0]->Address;?><br />Mobile <?php echo $company[0]->AlternateContactNumber;?> <br> E-mail <?php echo $company[0]->EmailAddress;?></a><br>GSTIN : <?php echo $company[0]->GSTNO;?>
</td>
</tr>
<hr>
@ -24,7 +24,7 @@ $pic = base_url().'uploads/images/'.$company[0]->ProfilePic;
</tr>
<tr style="height: 26px;">
<td style="width: 100px; height: 26px;">&nbsp;Voucher Number </td>
<td style="width: 89px; height: 26px;" colspan="3"><?php echo $data[0]->id;?></td>
<td style="width: 89px; height: 26px;" colspan="3"><?php if(($data[0]->type) == 'EXPENSE'){echo $data[0]->invoice_no;}else{echo $data[0]->id;}?></td>
<hr>
<td style="width: 90px; height: 197px;text-align: center;" colspan="2" rowspan="5"><p> <h1>Rs <?php echo $data[0]->total;?></h1></p>Amount &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
@ -44,6 +44,37 @@ $pic = base_url().'uploads/images/'.$company[0]->ProfilePic;
<td style="width: 100px; height: 46px;">&nbsp;Amount (In Words)</td>
<td style="width: 89px; height: 46px;" colspan="3"><b><?php echo $amtinwords;?></b></td>
</tr>
<?php if(($data[0]->name) == 'multiple'){ ?>
<tr style="height: 46px;">
<td style="width: 100px; height: 46px;">&nbsp;Tax</td>
<td>SGST :<b><?php echo $data[0]->sgst;?></b></td>
<td>CGST :<b><?php echo $data[0]->cgst;?></b></td>
<td>IGST :<b><?php echo $data[0]->igst;?></b></td>
</tr>
<tr style="height: 46px;">
<td style="width: 100px; height: 46px;">&nbsp;Multiple Payment</td>
<td colspan="3">
<table style="border: 1px solid black; border-collapse: collapse;">
<tr style="border: 1px solid black; border-collapse: collapse;">
<td style="border: 1px solid black; border-collapse: collapse;">Account Name</td>
<td style="border: 1px solid black; border-collapse: collapse;">Account Description</td>
<td style="border: 1px solid black; border-collapse: collapse;">Account Amount</td></tr>
<?php if(!empty($PaymentDetails) ) {
foreach($PaymentDetails as $paydtl)
{
?>
<tr>
<td style="border: 1px solid black; border-collapse: collapse;"><?php echo $paydtl->name; ?>&nbsp;</td>
<td style="border: 1px solid black; border-collapse: collapse;"><?php echo $paydtl->Account_description; ?>&nbsp;</td>
<td style="border: 1px solid black; border-collapse: collapse;"><?php echo $paydtl->Amount; ?>&nbsp;</td>
</tr>
<?php } } ?>
</table>
</td>
</tr>
<?php }?>
<tr style="height: 73px;">
<td style="width: 89px; height: 73px;">
<p>&nbsp;Remarks </p>
@ -54,10 +85,10 @@ $pic = base_url().'uploads/images/'.$company[0]->ProfilePic;
<tr style="height: 26px;">
<td style="width: 89px; height: 26px;">&nbsp;</td>
<td style="width: 89px; height: 26px;">&nbsp;</td>
<td style=" height: 26px;">&nbsp;</td>
<td style=" height: 26px;">&nbsp;</td>
<td style="width: 89px; height: 26px;">&nbsp;</td>
<td style="width: 90px; height: 26px;">&nbsp;</td>
<td style="width: 90px; height: 26px;">Prepared By &nbsp;</td>
<td style="width: 200px; height: 26px;"><?php echo $data[0]->FirstName.'&nbsp;'.$data[0]->LastName;?></td>
<td style="width: 90px; height: 26px;"><?php echo $data[0]->FirstName.'&nbsp;'.$data[0]->LastName;?></td>
<hr>
</tr>
<tr style="height: 26px;">

270
application/views/cashbooktoday.php Normal file → Executable file
View File

@ -1,82 +1,188 @@
<?php
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
?>
<div class="content-wrapper">
<section class="content">
<div class="box">
<div class="box-header">
<CENTER><h3 class="box-title">Today's Payment</h3></CENTER>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:11px;" >
<thead style="background-color:#ddf">
<tr>
<th>Date</th>
<!-- <th>Account Code</th>-->
<th>Paid To</th>
<th>Paid Type</th>
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
<th>Description</th>
</tr>
</thead>
<tbody>
<?php if(!empty($tdy)){
foreach($tdy as $t)
{
?>
<tr>
<td><span><?php echo $t->date?></span></td>
<!--<td align="left"><span><?php echo $t->account_code?></span></td>-->
<td align="left"><span><?php echo $t->name ?></span></td>
<!--<td align="left"><span><?php echo $t->towhom?></span></td>-->
<td align="left"><span><?php echo $t->type?></span></td>
<td align="left"><span><?php echo number_format($t->total,2,'.','');?></span></td>
<td align="left"><span><?php echo $t->description?></span></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
$(function () {
$('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": true
});
});
</script>
<?php
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="box">
<div class="box-header">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Today Report</b></p></h3></center>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<table class="table table-bordered table-hover" id="req" style="background-color:#fff;font-size:11px;" >
<thead style="background-color:#ddf">
<tr>
<th>Date</th>
<th>Account Name</th>
<th>Type</th>
<th>Received From</th>
<th>Paid To</th>
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
<th>Description</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$ti=0.00;
$tvt=0.00;
if(!empty($tdy)){
foreach($tdy as $t)
{
?>
<tr>
<td><span><?php echo $t->date?></span></td>
<td align="left"><span><?php echo $t->name?></span></td>
<td align="left"><span><?php echo $t->type?></span></td>
<td align="left"><span><?php echo $t->receiptname?></span></td>
<td align="left"><span><?php echo $t->paymentname?></span></td>
<td align="right"><span><?php
$ti= $ti + number_format($t->income,2,'.','');
echo number_format($t->income,2,'.','');?></span></td>
<td align="right"><span><?php
$tvt= $tvt + number_format($t->expense,2,'.','');
echo number_format($t->expense,2,'.','');?></span></td>
<td align="left"><span><?php echo $t->description?></span></td>
<td>
<?php
if(!empty($t->document))
{
?>
<a target="_blank" href="<?php echo base_url().$t->document ?>"><i class="fa fa-download" ></i></a>
<?php
}
else
{
echo "NO FILE";
}
?>
</td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
table = $('#req').DataTable( {
"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: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

337
application/views/cashbookyearlyexpenses.php Normal file → Executable file
View File

@ -1,126 +1,213 @@
<?php
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
<style>
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content"><br/>
<div class="col-md-10 col-md-offset-1">
<div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading">
<center><b>Yearly Payments</b></center>
</div>
<div class="btn-group btn-group-justified no-margin">
<table class="table table-bordered table-hover" id="req"style="font-size:13px;">
<thead>
<tr>
<!--<th>Date</th>-->
<th>Month</th>
<!-- <th>Paid To</th>-->
<th>Paid Type</th>
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
<!--<th>Account Code</th>-->
<!--<th>Description</th>-->
</tr>
</thead>
<tbody>
<?php if(!empty($yearlyreport)){
foreach($yearlyreport as $yr)
{
?>
<tr>
<!--<td><span><?php echo $yr->date?></span></td>-->
<td align="left"><a href="<?= base_url() ?>report/yearmonthwise?sid=<?php echo $yr->month;?>"><span><?php echo $yr->month?></span></a></td>
<!--<td align="right"><span><?php echo $yr->towhom?></span></td>-->
<td align="left"><span><?php echo $yr->type?></span></td>
<td align="right"><span><?php echo number_format($yr->total,2,'.','');?></span></td>
<!--<td align="right"><span><?php echo $yr->account_code?></span></td>
<td align="right"><span><?php echo $yr->description?></span></td>-->
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#req').DataTable( {
"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'
]
}
]
} );
} );
</script>
<?php
$inrsymbol='';
$finyear ='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
.btn-success {
background-color: #3c8dbc;
border-color: #3c8dbc;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="container-fluid">
<div class="col-md-12">
<div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>YEAR REPORTS(<?php echo $finyear?>)</b></p></h3></center>
</div>
<div class="col-xs-12 col-md-6 col-md-offset-6">
<center>
<div class="panel-body">
<form method="post" action=" ">
<div class="col-md-8">
<select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option>
<?php
foreach($financialyear as $item):
{?>
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
<?php } endforeach; ?>
</select>
</div>
<div class="col-md-2">
<input type="submit" class="btn btn-success" id="year" name="btn_submit" value="View Report">
</div>
</form>
</div>
</center>
</div>
<div class="btn-group btn-group-justified no-margin">
<table class="table table-bordered table-hover" id="req"style="font-size:13px;">
<thead>
<tr>
<th>Month</th>
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php
$ti=0.00;
$tvt=0.00;
if(!empty($yearlyreport)){
foreach($yearlyreport as $yr)
{
?>
<tr>
<!--<td><span><?php echo $yr->date?></span></td>-->
<td align="left"><a href="<?= base_url() ?>report/yearmonthwise?sid=<?php echo $yr->month;?>"><span><?php echo $yr->month?></span></a></td>
<!--<td align="left"><span><?php echo $yr->type?></span></td>-->
<td align="right"><span><?php
$ti= $ti + number_format($yr->inc,2,'.','');
echo number_format($yr->inc,2,'.','');?></span></td>
<td align="right"><span><?php
$tvt= $tvt + number_format($yr->exp,2,'.','');
echo number_format($yr->exp,2,'.','');?></span></td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#req').DataTable( {
"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: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

297
application/views/cashbookyearmonthwise.php Normal file → Executable file
View File

@ -1,125 +1,174 @@
<?php
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
<style>
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<div class="content-wrapper">
<div class="col-md-10 col-md-offset-1">
<div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading">
<center><b>Monthly Payments</b></center>
</div>
<div class="btn-group btn-group-justified no-margin">
<div>
<table class="table table-bordered table-hover" id="req" style="font-size:13px;">
<thead>
<tr>
<!--<th>Date</th>-->
<th>Account Name</th>
<!--<th>month</th>-->
<!--<th>Paid To</th>-->
<th>Paid Type</th>
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
<!--<th>Description</th>-->
</tr>
</thead>
<tbody>
<?php if(!empty($yearmonthwise)){
foreach($yearmonthwise as $ym)
{
?>
<tr>
<!--<td><span><?php echo $ym->date?></span></td>-->
<!--<td align="right"><span><a href="<?= base_url() ?>report/yearmonthwise"><?php echo $ym->month?></a></span></td>-->
<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $ym->account_code;?>&d=<?php echo $ym->month?>"><span><?php echo $ym->name?></span></a></td>
<!--<td align="right"><span><?php echo $ym->towhom?></span></td>-->
<td align="left"><span><?php echo $ym->type?></span></td>
<td align="right"><span><?php echo number_format($ym->total,2,'.','');?></span></td>
<!--<td align="right"><span><?php echo $ym->description?></span></td>-->
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#req').DataTable( {
"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'
]
}
]
} );
} );
</script>
<?php
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="container-fluid">
<div class="col-md-10 col-md-offset-1">
<div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Month Report(<?php $month=$_GET['sid'];echo $month;?>)</b></p></h3></center>
</div>
<table class="table table-bordered table-hover" id="req">
<thead>
<tr>
<!--<th>Date</th>-->
<th>Account Name</th>
<!--<th>month</th>-->
<!--<th>Paid To</th>-->
<th>Paid Type</th>
<!--<th>Received From</th>
<th>Paid To</th>-->
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
<!--<th>Description</th>-->
</tr>
</thead>
<tbody>
<?php
$ti=0.00;
$tvt=0.00;
if(!empty($yearmonthwise)){
foreach($yearmonthwise as $ym)
{
?>
<tr>
<!--<td align="right"><span><a href="<?= base_url() ?>report/yearmonthwise"><?php echo $ym->month?></a></span></td>-->
<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $ym->account_code;?>&d=<?php echo $ym->month?>&c=<?php echo $ym->type?>"><span><?php echo $ym->name?></span></a></td>
<!--<td align="right"><span><?php echo $ym->towhom?></span></td>-->
<td align="left"><span><?php echo $ym->type?></span></td>
<!--<td align="left"><span><?php echo $ym->receiptname?></span></td>
<td align="left"><span><?php echo $ym->paymentname?></span></td>-->
<!--<td align="left"><span><?php echo $cash->expense?></span></td>-->
<td align="right"><span><?php
$ti= $ti + number_format($ym->income,2,'.','');
echo number_format($ym->income,2,'.','');?></span></td>
<td align="right"><span><?php
$tvt= $tvt + number_format($ym->expense,2,'.','');
echo number_format($ym->expense,2,'.','');?></span></td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</section>
</div>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-5'l><'col-md-7'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

File diff suppressed because it is too large Load Diff

View File

@ -1,72 +1,116 @@
<CENTER><strong><h3 class="box-title">Resico Industries - Income & Expense List</h3></strong></CENTER>
<div class="content-wrapper">
<?php//print_r($list); ?>
<div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center> Resico Industries - Receipt and Payment List </center>
</h1>
</section>
<section class="content">
<div class="box">
<div class="box-header">
<div align="right" style="padding-right:10px">
<a href="addNewIncomeExpense" class="btn btn-primary" align="right"style="padding-right:10px" >Add New</a>
</div>
</div>
<table id="inexlist" class="table table-bordered table-hover" style="background-color:#fff;">
<div align="right" style="padding-right:10px">
<div id="content" > </div>
<div class="modal fade" role="dialog">
<div class="box">
<div class="box-header">
<div align="right" style="padding-right:10px">
<a href="cashbook/addNewIncomeExpenseLoad" class="btn btn-primary" align="right"style="padding-right:10px" >Add New</a>
<!-- <a href="<?php echo base_url(); ?>addNewIncomeExpenseLoad" class="btn btn-primary" align="right"style="padding-right:10px" >Add New</a> -->
</div>
</div>
<table id="inexlist" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<div align="right" style="padding-right:10px">
<div id="content" > </div>
<div class="modal fade" role="dialog">
<thead style="background-color:#ddf">
<tr>
<th>Account Type</th>
<th>DATE</th>
<th>Account Name</th>
<th>Amount</th>
<th>Details</th>
</tr>
</thead>
<tbody id="inexlistbody">
<thead style="background-color:#ddf">
<tr>
<th>Account Type</th>
<th>DATE</th>
<th>Account Name</th>
<th>Amount</th>
<th>Details</th>
<th>Action</th>
</tr>
</thead>
<tbody id="inexlistbody">
<?php if(!empty($list))
{
$base = base_url();
foreach($list as $l)
{
?>
<?php if(!empty($list))
{
$base = base_url();
foreach($list as $l)
{
?>
<tr> <td><?php echo '<a href="'.$base.'cashbook/incomeExpenseList/'.$l->id.'">'.$l->type.'</a>';?></td> <td style="text-align:right;"><?php echo date_format(date_create($l->date),'d-m-Y');?></td> <td><?php echo $l->name;?></td> <td style="text-align:right;"><?php echo number_format($l->total,2,'.','');?></td> <td><?php echo $l->description;?></td></tr>
<tr>
<td><?php echo '<a href="'.$base.'cashbook/incomeExpenseList/'.$l->id.'">'.$l->type.'</a>';?></td>
<td style="text-align:right;"><?php echo date_format(date_create($l->date),'d-m-Y');?></td>
<td><?php if($l->type == 'PAYMENT' && $l->account_code == '999') { echo " "; } else {echo $l->name;}?></td>
<td style="text-align:right;"><?php echo $l->total;?></td>
<td><?php echo $l->description;?></td>
<td>
<a href="<?php echo base_url(); ?>cashbook/editcashbook?sid=<?php echo $l->id;?>"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the RECEIPT OR PAYMENT"></i>&nbsp;&nbsp;&nbsp;</a>
<!-- <span data-toggle="modal" data-target="#myModal" data-id="<?php echo $l->id; ?>" >
<a data-toggle="tooltip" title="Click here to view multiple payment details"><i class="fa fa-clone"></i></a></span> -->
<?php if($l->type == 'PAYMENT' && $l->account_code == '999') { ?>
<span data-toggle="tooltip" title="Click here to view multiple payment details">
<a data-toggle="modal" onclick="inex(<?php echo $l->id; ?>)" data-id="<?php echo $l->id; ?>"><i class="fa fa-clone"></i></a></span>
<?php } ?>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<?php
}
}
?>
</tbody>
</div>
</div>
</table>
<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Multiple Payment List</h4>
</div>
<div class="modal-body">
<div>
<table class="table table-bordered table-hover" id="paymentdetails">
<thead>
<th>Account Type</th>
<th>Account Name</th>
<th>Sub Description</th>
<th>Amount</th>
<th>Tax value (sgst+cgst+igst)</th>
<th>Total amount</th>
</thead>
<tbody id="tbleAppend"></tbody>
</table>
</div>
</div>
<div class="modal-footer" style="background-color: #5d0411;">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<!-- </div>
</div> -->
</div>
</div> </section>
</div>
</section>
</div>
<script>
$(function () {
@ -74,11 +118,47 @@ $(function () {
"paging": true,
"lengthChange": true,
"searching": true,
"aaSorting": [[ 0, "desc" ]],
"aaSorting": [[ 0, "desc" ]],
"ordering": true,
"info": true,
"autoWidth": true
});
});
</script>
function inex(input){
$.ajax({
data:{id:input},
type:"POST",
//dataType: 'json',
url:"<?php echo base_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 += '<tr>' +
'<td>' + item.type + '</td>' +
'<td>' + item.name + '</td>' +
'<td align="right" >' + item.Account_description + '</td>' +
'<td>'+ item.Amount+ '</td>' +
'<td align="right" >'+ tax +'</td>' +
'<td align="right" >'+item.total+'</td>' +
'</tr>';
}
});
$("#tbleAppend").empty();
$('#paymentdetails > tbody').append(trHTML);
}
});
}
</script>

858
application/views/reportcashbook.php Normal file → Executable file
View File

@ -1,520 +1,338 @@
<?php
$today_in='';
$today_ex='';
$month_in='';
$month_ex='';
$year_in='';
$year_ex='';
if(!empty($cashbook))
{
}
if(!empty($monthlyreport))
{
}
if(!empty($todayincome))
{
foreach ($todayincome as $ti)
{
$today_in=$ti->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;
}}
?>
<head>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
<link href="<?php echo base_url();?>assets/plugins/morris/morris.css" rel="stylesheet" type="text/css" />
</head>
<script>
/*!
*/
(function(l,q){var e=function(b,c){b.extend(!0,c.defaults,{dom:"<'row'<'col-sm-9'l><'col-sm-3'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-9'i><'col-sm-3'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});c.ext.renderer.pageButton.bootstrap=function(g,e,r,s,i,m){var t=new c.Api(g),u=g.oClasses,j=g.oLanguage.oPaginate,d,f,n=0,p=function(c,e){var k,h,o,a,l=function(a){a.preventDefault();
b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw(!1)};k=0;for(h=e.length;k<h;k++)if(a=e[k],b.isArray(a))p(c,a);else{f=d="";switch(a){case "ellipsis":d="&hellip;";f="disabled";break;case "first":d=j.sFirst;f=a+(0<i?"":" disabled");break;case "previous":d=j.sPrevious;f=a+(0<i?"":" disabled");break;case "next":d=j.sNext;f=a+(i<m-1?"":" disabled");break;case "last":d=j.sLast;f=a+(i<m-1?"":" disabled");break;default:d=a+1,f=i===a?"active":""}d&&(o=b("<li>",{"class":u.sPageButton+" "+
f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("<a>",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('<ul class="pagination"/>').children("ul"),s);h&&b(e).find("[data-dt-idx="+h+"]").focus()};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},
collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,c.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"===typeof define&&define.amd?define(["jquery","datatables"],e):"object"===typeof exports?e(require("jquery"),require("datatables")):jQuery&&e(jQuery,jQuery.fn.dataTable)})(window,document);
</script>
<style>
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
table{
margin: 0 auto;
width: 100%;
clear: both;
border-collapse: collapse;
table-layout: fixed;
word-wrap:break-word;
}
th, td { white-space: nowrap; }
div.dataTables_wrapper {
margin: 0 auto;
}
div.container {
width: 100%;
}
.dataTables_paginate {
margin-top: -25px;
position: absolute;
text-align: right;
left: -20%;
}
#container {
min-width: 310px;
max-width: 800px;
height: 400px;
margin: 0 auto
}
</style>
<div class="content-wrapper">
<p>&nbsp;</p>
<!-- Main content -->
<section>
<!-- Info boxes -->
<center>
<div class="col-md-12">
<!-- fix for small devices only -->
<div class="clearfix visible-sm-block"></div>
<div class="col-md-3">
<div class="info-box">
<span class="info-box-icon bg-red" style="height: 90px;padding:25px;"><i class="fa fa-hourglass-end"></i></span>
<div class="info-box-content">
<span class="info-box-number"><a href="<?php echo base_url().'report/Viewtoday' ?>" data-toggle="tooltip" title="Click here to View Today's Payment"><?php echo "Today's Payment" ?></a></span>
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol.number_format($today_in,2,'.',''); ?> </span>
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($today_ex,2,'.',''); ?> </span>
</div>
</div>
</div>
<!-- fix for small devices only -->
<div class="clearfix visible-sm-block"></div>
<div class="col-md-3">
<div class="info-box">
<span class="info-box-icon bg-aqua" style="height: 90px;padding:25px;"><i<i class="fa fa-spinner"></span>
<div class="info-box-content">
<span class="info-box-number"><a href="<?php echo base_url().'report/monthexpenses' ?>" data-toggle="tooltip" title="Click here to View Monthly Payment"><?php echo "Monthly Payment" ?></a></span>
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol.number_format($month_in,2,'.',''); ?></span>
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($month_ex,2,'.',''); ?></span>
</div>
</div>
</div>
<!-- fix for small devices only -->
<div class="clearfix visible-sm-block"></div>
<div class="col-md-3">
<div class="info-box">
<span class="info-box-icon bg-green" style="height: 90px;padding:25;"><i class="fa fa-industry" style="padding: 5px;"></i></span>
<div class="info-box-content">
<span class="info-box-number"><a href="<?php echo base_url().'report/yearexpenses' ?>" data-toggle="tooltip" title="Click here to View Yearly Payment"><?php echo "Year Payment" ?></a></span>
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol. number_format($year_in,2,'.',''); ?></span>
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($year_ex,2,'.',''); ?></span>
</div>
</div>
</div>
<div class="clearfix visible-sm-block"></div>
<div class="col-md-3">
<div class="info-box">
<span class="info-box-icon bg-green" style="height: 90px;padding:25;"><i class="fa fa-hourglass-1 " style="padding: 5px; background-color:orange;"></i></span>
<div class="info-box-content">
<span class="info-box-number"><a href="<?php echo base_url().'report/depmenu' ?>" data-toggle="tooltip" title="Click here to View Department Payment"><?php echo "Dep Payment" ?></a></span>
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol. number_format($year_in,2,'.',''); ?></span>
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($year_ex,2,'.',''); ?></span>
</div>
</div>
</div>
</div>
</center>
</section>
<!-- Main content -->
<!--<div class="row">
<div class="col-md-12">
<div id="container"></div>
</div>
</div>-->
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<!--<div class="box-header with-border">-->
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<CENTER><h3 class="box-title"><strong>Day Wise Payment</strong></h3></CENTER>
<div class="box-body">
<div>
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Account Name</th>
<th>Type</th>
<th>Received From</th>
<th>Paid To</th>
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
<th>Description</th>
</tr>
</thead>
<tbody>
<?php
$ti=0.00;
$tvt=0.00;
if(!empty($cashbook)){
foreach($cashbook as $cash)
{
?>
<tr>
<td><span><?php echo $cash->date?></span></td>
<td align="left"><span><?php echo $cash->name?></span></td>
<td align="left"><span><?php echo $cash->type?></span></td>
<td align="left"><span><?php echo $cash->receiptname?></span></td>
<td align="left"><span><?php echo $cash->paymentname?></span></td>
<td align="right"><span><?php
$ti= $ti + number_format($cash->income,2,'.','');
echo number_format($cash->income,2,'.','');?></span></td>
<td align="right"><span><?php
$tvt= $tvt + number_format($cash->expense,2,'.','');
echo number_format($cash->expense,2,'.','');?></span></td>
<td align="left"><span><?php echo $cash->description?></span></td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script>
$(document).ready(function() {
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'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'
]
}
]
} );
} );
</script>
<script src="<?php echo base_url();?>assets/plugins/chartjs/Chart.min.js"></script>
<script src="<?php echo base_url(); ?>assets/plugins/knob/jquery.knob.js"></script>
<script>
/* ChartJS
* -------
* Here we will create a few charts using ChartJS
*/
//-----------------------
//- MONTHLY SALES CHART -
//-----------------------
// Get context with jQuery - using jQuery's .get() method.
/* ChartJS
* -------
* Here we will create a few charts using ChartJS
*/
//-----------------------
//- MONTHLY SALES CHART -
//-----------------------
// Get context with jQuery - using jQuery's .get() method.
var salesChartCanvas = $("#salesChart").get(0).getContext("2d");
// This will get the first returned node in the jQuery collection.
var salesChart = new Chart(salesChartCanvas);
var service = <?php echo JSON_encode($gettoptotal1)?>;
//var service = <?php echo JSON_encode($getTotalServicePoCount)?>;
// alert(service+'hai');
//print_r($gettoptotal1);
var Import = <?php echo JSON_encode($getTotalimportPoCount)?>;
var capital = <?php echo JSON_encode($getTotalcapitalPoCount)?>;
var revenue = <?php echo JSON_encode($getTotalrevenuePoCount)?>;
//alert(service.PONO);
var serviceValues = [];
// var arr = new Array();
$.each (service,function(idx,obj){
serviceValues.push(obj[0].tot);
});
var ImportValues = [];
// var arr = new Array();
$.each (Import,function(idx,obj){
ImportValues.push(obj[0].totalImport);
});
var capitalValues = [];
// var arr = new Array();
$.each (capital,function(idx,obj){
capitalValues.push(obj[0].totalcapital);
});
var revenueValues = [];
// var arr = new Array();
$.each (revenue,function(idx,obj){
revenueValues.push(obj[0].totalrevenue);
});
//alert(arr.total2);
var salesChartData = {
labels: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
datasets: [
{
label: "Electronics",
fillColor: "rgba(0, 192, 239, 0.2)",
strokeColor: "rgba(0, 192, 239,0.6)",
pointColor: "#00c0ef ",
pointStrokeColor: "rgba(60,141,188,1)",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(60,141,188,1)",
data:serviceValues
},
{
label: "Digital Goods",
fillColor: "rgba(221, 75, 57,0.2)",
strokeColor: "rgba(221, 75, 57,0.8)",
pointColor: "#dd4b39 ",
pointStrokeColor: "rgba(60,141,188,1)",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(60,141,188,1)",
data:revenueValues
},
{
label: "Food",
fillColor: "rgba(0, 166, 90, 0.2)",
strokeColor: "rgba(0, 166, 90,0.8)",
pointColor: "#00a65a ",
pointStrokeColor: "rgba(60,141,188,1)",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(60,141,188,1",
data:ImportValues
},
{
label: "Food",
fillColor: "rgba(243, 156, 18, 0.2)",
strokeColor: "rgba(243, 156, 18,0.8)",
pointColor: "#f39c12 ",
pointStrokeColor: "rgba(60,141,188,1)",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(60,141,188,1",
data:capitalValues
}
]
};
var salesChartOptions = {
//Boolean - If we should show the scale at all
showScale: true,
//Boolean - Whether grid lines are shown across the chart
scaleShowGridLines: false,
//String - Colour of the grid lines
scaleGridLineColor: "rgba(0,0,0,.05)",
//Number - Width of the grid lines
scaleGridLineWidth: 1,
//Boolean - Whether to show horizontal lines (except X axis)
scaleShowHorizontalLines: true,
//Boolean - Whether to show vertical lines (except Y axis)
scaleShowVerticalLines: true,
//Boolean - Whether the line is curved between points
bezierCurve: true,
//Number - Tension of the bezier curve between points
bezierCurveTension: 0.3,
//Boolean - Whether to show a dot for each point
pointDot: true,
//Number - Radius of each point dot in pixels
pointDotRadius: 4,
//Number - Pixel width of point dot stroke
pointDotStrokeWidth: 1,
//Number - amount extra to add to the radius to cater for hit detection outside the drawn point
pointHitDetectionRadius: 20,
//Boolean - Whether to show a stroke for datasets
datasetStroke: true,
//Number - Pixel width of dataset stroke
datasetStrokeWidth: 5,
//Boolean - Whether to fill the dataset with a color
datasetFill: true,
//String - A legend template
legendTemplate: "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].lineColor%>\"></span><%=datasets[i].label%></li><%}%></ul>",
//Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
maintainAspectRatio: false,
//Boolean - whether to make the chart responsive to window resizing
responsive: true
};
// alert(salesChartData);
//Create the line chart
salesChart.Line(salesChartData, salesChartOptions);
//---------------------------
//- END MONTHLY SALES CHART -
//- PIE CHART -
//-------------
// Get context with jQuery - using jQuery's .get() method.
</script>
<?php
$today_in='';
$today_ex='';
$month_in='';
$month_ex='';
$year_in='';
$year_ex='';
if(!empty($cashbook))
{
}
if(!empty($monthlyreport))
{
}
if(!empty($todayincome))
{
foreach ($todayincome as $ti)
{
$today_in=$ti->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;
}}
?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
.btn-success {
background-color: #3c8dbc;
border-color: #3c8dbc;
}
</style>
</style>
<div>
<section class="content-header">
<!-- Main content -->
<section>
<!-- Info boxes -->
<center>
<div class="col-md-12">
<!-- fix for small devices only -->
<div class="clearfix visible-sm-block"></div>
<div class="col-md-4">
<div class="info-box">
<span class="info-box-icon bg-red" style="height: 90px;padding:25px;"><i class="fa fa-hourglass-end"></i></span>
<div class="info-box-content">
<span class="info-box-number" ><a href="<?php echo base_url().'report/Viewtoday' ?>" data-toggle="tooltip" title="Click here to View Today's payments" ><?php echo "Today" ?></a></span>
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol.number_format($today_in,2,'.',''); ?> </span>
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($today_ex,2,'.',''); ?> </span>
</div>
</div>
</div>
<!-- fix for small devices only -->
<div class="clearfix visible-sm-block"></div>
<div class="col-md-4">
<div class="info-box">
<span class="info-box-icon bg-aqua" style="height: 90px;padding:25px;"><i<i class="fa fa-spinner"></span>
<div class="info-box-content">
<span class="info-box-number"><a href="<?php echo base_url().'report/monthexpenses' ?>" data-toggle="tooltip" title="Click here to View Monthly payments"><?php echo "This Month" ?></a></span>
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol.number_format($month_in,2,'.',''); ?></span>
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($month_ex,2,'.',''); ?></span>
</div>
</div>
</div>
<!-- fix for small devices only -->
<div class="clearfix visible-sm-block"></div>
<div class="col-md-4">
<div class="info-box">
<span class="info-box-icon bg-green" style="height: 90px;padding:25;"><i class="fa fa-industry" style="padding: 5px;"></i></span>
<div class="info-box-content">
<span class="info-box-number"><a href="<?php echo base_url().'report/yearexpenses' ?>" data-toggle="tooltip" title="Click here to View Yearly payments"><?php echo "This Year" ?></a></span>
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol. number_format($year_in,2,'.',''); ?></span>
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($year_ex,2,'.',''); ?></span>
</div>
</div>
</div>
</div>
</center>
</div>
<!--<div class="row">
<div class="col-md-12">
<div id="container"></div>
</div>
</div>-->
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<!--<div class="box-header with-border">-->
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Day Wise Report</b></p></h3></center>
<div class="box-body">
<div>
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Date</th>
<!--<th>Account Code</th>-->
<th>Account Name</th>
<th>Type</th>
<th>Received From</th>
<th>Paid To</th>
<!--<th>Paid Type(RECEIPT)</th>-->
<!--<th>Paid Type(PAYMENTS)</th>-->
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
<th>Description</th>
<th>File</th>
</tr>
</thead>
<tbody>
<?php
$ti=0.00;
$tvt=0.00;
if(!empty($tdy)){
foreach($tdy as $t)
{
?>
<tr>
<td><span><?php echo $t->date?></span></td>
<td align="left"><span><?php echo $t->name?></span></td>
<td align="left"><span><?php echo $t->type?></span></td>
<td align="left"><span><?php echo $t->receiptname?></span></td>
<td align="left"><span><?php echo $t->paymentname?></span></td>
<!--<td align="left"><span><?php echo $cash->expense?></span></td>-->
<td align="right"><span><?php
$ti= $ti + number_format($t->income,2,'.','');
echo number_format($t->income,2,'.','');?></span></td>
<td align="right"><span><?php
$tvt= $tvt + number_format($t->expense,2,'.','');
echo number_format($t->expense,2,'.','');?></span></td>
<td align="left"><span><?php echo $t->description?></span></td>
<td>
<?php
if(!empty($t->document))
{
?>
<a target="_blank" href="<?php echo base_url().$t->document ?>"><i class="fa fa-download" ></i></a>
<?php
}
else
{
echo "NO FILE";
}
?>
</td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title:$('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

View File

@ -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},

View File

@ -1,4 +1,4 @@
<?php //print_r($data);
<?php print_r($data);
$extype= '';
$exname = '';
$flag = 0;
@ -22,11 +22,11 @@ if(!empty($data))
if($extype == 'RECEIPT')
{
$label = 'Received From';
$label = 'Received From :';
}
else
{
$label = 'Paid To';
$label = 'Paid To :';
}
$final = base_url().$document;
//echo $final;
@ -55,27 +55,83 @@ if(!empty($data))
<div class="col-md-12">
<div class="col-md-7">
<?php if($exname == 'multiple') { ?>
<div class="col-md-12">
<table id="multiplepayment">
<thead></thead>
<tbody>
<tr> <td style="text-align:right; font-size:20px;"><h5>Date :</h5></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->date)){echo date_format(date_create($data[0]->date),'d-m-Y');}?></td>
<?php if($flag == 1){?><td style="text-align:right;"><h5>Merchant Name :</h5></td><td></td><td><?php if(!empty($data[0]->merchant)){echo $data[0]->merchant;}?></td><?php } ?>
</tr>
<tr> <td style="text-align:right;"><h5><?php echo $label;?></h5></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->towhom)){echo $data[0]->towhom;}?></td>
<?php if($flag == 1){?>
<td style="text-align:right;"><h5>Merchant GST No :</h5></td><td></td><td><?php if(!empty($data[0]->merchant_gst)){echo $data[0]->merchant_gst;}?></td>
</tr>
<tr> <td style="text-align:right;"><h5>Invoice No :</h5></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->invoice_no)){echo $data[0]->invoice_no;}?></td>
<td style="text-align:right;"><h5>HSN/SAC No :</h5></td><td>&nbsp;</td> <td><?php if(!empty($data[0]->HSN)){echo $data[0]->HSN;}?></td>
</tr>
<tr> <td style="text-align:right;"><h5>Value Before GST :</h5></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->value_before_gst)){echo $data[0]->value_before_gst;}?></td>
<td>&nbsp;</td><td>&nbsp;</td>
</tr>
<tr> <td style="text-align:right;"><h5>SGST :</h5></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->sgst)){echo $data[0]->sgst;}?></td>
<td>&nbsp;</td><td>&nbsp;</td>
</tr>
<tr> <td style="text-align:right;"><h5>CGST :</h5></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->cgst)){echo $data[0]->cgst;}?></td>
<td>&nbsp;</td><td>&nbsp;</td>
</tr>
<tr> <td style="text-align:right;"><h5>IGST :</h5></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->igst)){echo $data[0]->igst;}?></td>
<td>&nbsp;</td><td>&nbsp;</td>
</tr>
<?php } ?>
<tr><td colspan="12" >
<table width="100%" style="border: 1px solid black; border-collapse: collapse;">
<tr style="border: 1px solid black; border-collapse: collapse;">
<td style="text-align:left; border: 1px solid black; border-collapse: collapse;" size="10"> Account Name &nbsp;</td>
<td style="text-align:right; border: 1px solid black; border-collapse: collapse;" size="6"> Account Description &nbsp;</td>
<td style="text-align:right; border: 1px solid black; border-collapse: collapse;" size="6"> Account Amount &nbsp;</td>
</tr>
<?php if(!empty($PaymentDetails)) {
foreach($PaymentDetails as $paydtl) {
?>
<tr>
<td style="text-align:left; border: 1px solid black; border-collapse: collapse;"><?php echo $paydtl->name; ?>&nbsp;</td>
<td style="text-align:right; border: 1px solid black; border-collapse: collapse;"><?php echo $paydtl->Account_description; ?>&nbsp;</td>
<td style="text-align:right; border: 1px solid black; border-collapse: collapse;"><?php echo $paydtl->Amount; ?>&nbsp;</td>
</tr>
<?php } } ?>
</table></td></tr>
<tr style="border-bottom: 1px solid #000;"><td style="text-align:left; "><h5>Total Amount </h5></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td></td><td></td><td style="text-align:right;"><?php if(!empty($data[0]->total)){echo $data[0]->total;}?></td></tr>
<tr> <td style="text-align:right;"><h5>Description :</h5></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->description)){echo $data[0]->description;}?></td></tr>
</tbody>
</table>
</div>
<?php } else{ ?>
<table id="viewIS">
<thead></thead>
<tbody>
<tr> <td ><h4>Date </h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td > : <?php if(!empty($data[0]->date)){echo date_format(date_create($data[0]->date),'d-m-Y');}?></td></tr>
<tr> <td ><h4><?php echo $label;?></h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td > :<?php if(!empty($data[0]->towhom)){echo $data[0]->towhom;}?></td></tr>
<tr> <td style="text-align:right;"><h4>Date :</h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->date)){echo date_format(date_create($data[0]->date),'d-m-Y');}?></td></tr>
<tr> <td style="text-align:right;"><h4><?php echo $label;?></h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->towhom)){echo $data[0]->towhom;}?></td></tr>
<?php if($flag == 1){?>
<tr> <td ><h4>Invoice No </h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>: <?php if(!empty($data[0]->invoice_no)){echo $data[0]->invoice_no;}?></td></tr>
<tr> <td ><h4>Merchant Name </h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td >: <?php if(!empty($data[0]->merchant)){echo $data[0]->merchant;}?></td></tr>
<tr> <td ><h4>Merchant GST No </h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td >: <?php if(!empty($data[0]->merchant_gst)){echo $data[0]->merchant_gst;}?></td></tr>
<tr> <td ><h4>HSN/SAC No </h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td >: <?php if(!empty($data[0]->HSN)){echo $data[0]->HSN;}?></td></tr>
<tr> <td ><h4>Value Before GST </h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td >: <?php if(!empty($data[0]->value_before_gst)){echo $data[0]->value_before_gst;}?></td></tr>
<tr> <td ><h4>SGST </h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td >: <?php if(!empty($data[0]->sgst)){echo $data[0]->sgst;}?></td></tr>
<tr> <td ><h4>CGST </h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>: <?php if(!empty($data[0]->cgst)){echo $data[0]->cgst;}?></td></tr>
<tr> <td ><h4>IGST </h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td >: <?php if(!empty($data[0]->igst)){echo $data[0]->igst;}?></td></tr>
<?php }?>
<tr> <td ><h4>Total Amount </h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td >: <?php if(!empty($data[0]->total)){echo number_format($data[0]->total,2,'.','');}?></td></tr>
<tr> <td ><h4>Description </h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td >: <?php if(!empty($data[0]->description)){echo $data[0]->description;}?></td></tr>
<tr> <td style="text-align:right;"><h4>Invoice No :</h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->invoice_no)){echo $data[0]->invoice_no;}?></td></tr>
<tr> <td style="text-align:right;"><h4>Merchant Name :</h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->merchant)){echo $data[0]->merchant;}?></td></tr>
<tr> <td style="text-align:right;"><h4>Merchant GST No :</h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->merchant_gst)){echo $data[0]->merchant_gst;}?></td></tr>
<tr> <td style="text-align:right;"><h4>HSN/SAC No :</h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->HSN)){echo $data[0]->HSN;}?></td></tr>
<tr> <td style="text-align:right;"><h4>Value Before GST :</h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->value_before_gst)){echo $data[0]->value_before_gst;}?></td></tr>
<tr> <td style="text-align:right;"><h4>SGST :</h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->sgst)){echo $data[0]->sgst;}?></td></tr>
<tr> <td style="text-align:right;"><h4>CGST :</h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->cgst)){echo $data[0]->cgst;}?></td></tr>
<tr> <td style="text-align:right;"><h4>IGST :</h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->igst)){echo $data[0]->igst;}?></td></tr>
<?php } ?>
<tr> <td style="text-align:right;"><h4>Total Amount :</h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><?php if(!empty($data[0]->total)){echo $data[0]->total;}?></td></tr>
<tr> <td style="text-align:right;"><h4>Description :</h4></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php if(!empty($data[0]->description)){echo $data[0]->description;}?></td></tr>
</tbody>
</table>
<?php } ?>
</div>
<div class="col-md-5" style="border:0px solid;">

View File

@ -283,7 +283,7 @@
<script>
$("#Igrshow").on("shown.bs.modal", function(e) {
//var igr = $(e.relatedTarget).data('userid');
var igr_nos = $(e.relatedTarget).data('userid');
var igr_nos = $(e.relatedTarget).data('id');
var igr = igr_nos.split(',');
igr = igr[1];
@ -299,7 +299,8 @@ $("#Igrshow").on("shown.bs.modal", function(e) {
var trHTML = '';
$.each(JSON.parse(data), function (i, item) {
if(igr == item.IGRNO)
//if(igr == item.IGRNO)
if(igr == item.IGRItemNo)
{
$("#IGRNO1").val(item.IGRNO);