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--------------------> //<------------Cash book Routes-------------------->
$route['ViewIncomeExpense'] = "cashbook/incomeExpenseList"; $route['ViewIncomeExpense'] = "cashbook/incomeExpenseList";
$route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad"; //$route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad";
$route['addIncomeExpense'] = "cashbook/addIncomeExpense"; $route['addIncomeExpense'] = "cashbook/addIncomeExpense";
// permission slip// // permission slip//

View File

@ -32,46 +32,46 @@ class cashbook extends BaseController
$aid = $this->uri->segment(3); $aid = $this->uri->segment(3);
$str = $this->uri->segment(4); $str = $this->uri->segment(4);
if(!empty($aid)){ if(!empty($aid)){
if(!empty($str)) if(!empty($str))
{ {
$data['company'] = $this->cashbook_model->getCompany(); $data['company'] = $this->cashbook_model->getCompany();
$data['data'] = $this->cashbook_model->getIncomeExpenseList($aid);
$data['data'] = $this->cashbook_model->getIncomeExpenseList($aid); $data['PaymentDetails'] = $this->cashbook_model->viewpaymentdetails($aid);
$totalamt = $data['data'][0]->total; $totalamt = $data['data'][0]->total;
$data['amtinwords'] = $this->convertNumber($totalamt); $data['amtinwords'] = $this->convertNumber($totalamt);
$mpdf=new mPDF('utf-8','A4-P',7, 10,10, 10, 3, 0, 0, 0); $mpdf=new mPDF('utf-8','A4-P',7, 10,10, 10, 3, 0, 0, 0);
$mpdf->SetHTMLHeader($HtmlHeading); $mpdf->SetHTMLHeader($HtmlHeading);
$html = $this->load->view('cashbookpdf',$data,true); $html = $this->load->view('cashbookpdf',$data,true);
$mpdf->SetDisplayMode('fullpage'); $mpdf->SetDisplayMode('fullpage');
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}"); $mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
$mpdf->list_indent_first_level = 1; $mpdf->list_indent_first_level = 1;
$mpdf->setAutoTopMargin = 'stretch'; $mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch'; $mpdf->setAutoBottomMargin = 'stretch';
$mpdf->WriteHTML($html); $mpdf->WriteHTML($html);
$filename = "cashbook.pdf"; $filename = "cashbook.pdf";
$mpdf->Output($filename,I); $mpdf->Output($filename,I);
} }
else else
{ {
$data['data'] = $this->cashbook_model->getIncomeExpenseList($aid); $data['data'] = $this->cashbook_model->getIncomeExpenseList($aid);
$data['PaymentDetails'] = $this->cashbook_model->viewpaymentdetails($aid);
$this->global['pageTitle'] = 'Resico : Cash Book: View Income Expense '; $this->global['pageTitle'] = 'Resico : Cash Book: View Income Expense ';
$this->loadViews("viewIndIncomeExpense", $this->global, $data , NULL); $this->loadViews("viewIndIncomeExpense", $this->global, $data , NULL);
}
} }
else
{ }
$data['list'] = $this->cashbook_model->getIncomeExpenseList(); else{
$this->global['pageTitle'] = 'Resico : Cash Book: Listing'; //$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); $this->loadViews("income_expense_list", $this->global, $data , NULL);
} }
} }
/** /**
@ -88,17 +88,18 @@ class cashbook extends BaseController
/** /**
* To store added incomeexpense datas * To store added incomeexpense datas
*/ */
function addIncomeExpense() //function addIncomeExpense()
function addReceipt()
{ {
$accounttype = $this->input->post('myradio'); $accounttype = $this->input->post('myradio');
if($accounttype == 1) //if($accounttype == 1)
{ //{
$accounttype = 'RECEIPT'; $accounttype = 'RECEIPT';
} //}
else //else
{ //{
$accounttype = 'PAYMENT'; //$accounttype = 'PAYMENT';
} //}
$accountcode = $this->input->post('accode'); $accountcode = $this->input->post('accode');
$date = $this->input->post('Date'); $date = $this->input->post('Date');
$date = date_create($date);//,'Y-m-d'); $date = date_create($date);//,'Y-m-d');
@ -114,6 +115,7 @@ class cashbook extends BaseController
$sgst = null; $sgst = null;
$cgst = null; $cgst = null;
$igst = null; $igst = null;
$subdescription = null;
if(!empty($gsttoggle)) if(!empty($gsttoggle))
{ {
$invoiceno = $this->input->post('Invoiceno'); $invoiceno = $this->input->post('Invoiceno');
@ -135,7 +137,7 @@ class cashbook extends BaseController
$fs = 0; $fs = 0;
if(!empty($_FILES['myfile']['name'])) if(!empty($_FILES['myfile']['name']))
{ {
$config['file_name'] = $_FILES['myfile']['name']; $config['file_name'] = $_FILES['myfile']['name'];
$config['upload_path'] = 'uploads/cashbook/'; $config['upload_path'] = 'uploads/cashbook/';
$path = $config['upload_path']; $path = $config['upload_path'];
@ -145,13 +147,165 @@ class cashbook extends BaseController
} }
$created_by = $this->session->userdata('userId'); $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); $res = $this->cashbook_model->saveIncomeExpense($addincomexpense);
if( $res == 1 ){ if( $res >= 1 ){
echo "<script>alert('Saved Successfully!');window.location.href='ViewIncomeExpense';</script>"; 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 * To store Cashbook revalant file and images
@ -163,10 +317,10 @@ class cashbook extends BaseController
$config['upload_path'] = 'uploads/cashbook/'; $config['upload_path'] = 'uploads/cashbook/';
$config['allowed_types'] = 'png|jpg|jpeg'; $config['allowed_types'] = 'png|jpg|jpeg';
$config['file_name'] = $_FILES['myfile']['name']; $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')) if($this->upload->do_upload('myfile'))
{ {
@ -249,51 +403,327 @@ class cashbook extends BaseController
$acc_createddt = $dt->format('Y-m-d H:i:s'); $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); $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!"; echo "Successfully Saved!";
} }
/** /**
* For edit cashbook screen * For edit cashbook screen
*/ */
public function editcashbook() public function editcashbook($sid)
{ {
$this->load->model('cashbook_model'); if($sid == '')
$this->loadViews("editincomeexpenses", $this->global, NULL); {
$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 * To covert number into words
*/ */
public function convertNumber($amt){ public function convertNumber($amt){
$ShowPaise='0'; $ShowPaise='0';
$totalAmt=explode(".",$amt); $totalAmt=explode(".",$amt);
$number = $totalAmt[0]; $number = $totalAmt[0];
$no = $number; $no = $number;
if(!empty($totalAmt[1]) && $totalAmt[1]!=0){ if(!empty($totalAmt[1]) && $totalAmt[1]!=0){
$point = $totalAmt[1]; $point = $totalAmt[1];
$ShowPaise='1'; $ShowPaise='1';
} }
else{ else{
$point=0; $point=0;
$ShowPaise='0'; $ShowPaise='0';
} }
$hundred = null; $hundred = null;
$digits_1 = strlen($no); $digits_1 = strlen($no);
$i = 0; $i = 0;
$str = array(); $str = array();
$words = array('0' => '', '1' => 'One', '2' => 'Two', $words = array('0' => '', '1' => 'One', '2' => 'Two',
'3' => 'three', '4' => 'Four', '5' => 'Five', '6' => 'Six', '3' => 'three', '4' => 'Four', '5' => 'Five', '6' => 'Six',
'7' => 'seven', '8' => 'eight', '9' => 'nine', '7' => 'seven', '8' => 'eight', '9' => 'nine',
'10' => 'ten', '11' => 'eleven', '12' => 'twelve', '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' '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'); ,'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', '3' => 'thirty', '4' => 'fourty',
'5' => 'fifty', '6' => 'sixty', '7' => 'seventy', '5' => 'fifty', '6' => 'sixty', '7' => 'seventy',
'8' => 'eighty', '9' =>'ninety'); '8' => 'eighty', '9' =>'ninety');
$words12 = array('11' => 'eleven', $words12 = array('11' => 'eleven',
'12' => 'twelve', '13' => 'thirteen', '14' => 'fourteen', '12' => 'twelve', '13' => 'thirteen', '14' => 'fourteen',
'15' => 'fifteen', '16' => 'sixteen', '17' => 'seventeen', '15' => 'fifteen', '16' => 'sixteen', '17' => 'seventeen',
'18' => 'eighteen', '19' =>'nineteen', '20' => 'twenty',); '18' => 'eighteen', '19' =>'nineteen', '20' => 'twenty',);
$digits = array('', 'hundred', 'thousand', 'lakh', 'crore'); $digits = array('', 'hundred', 'thousand', 'lakh', 'crore');
while ($i < $digits_1) { while ($i < $digits_1) {
$divider = ($i == 2) ? 10 : 100;
$divider = ($i == 2) ? 10 : 100; $number = floor($no % $divider);
$number = floor($no % $divider); $no = floor($no / $divider);
$no = floor($no / $divider); $i += ($divider == 10) ? 1 : 2;
$i += ($divider == 10) ? 1 : 2; if ($number) {
$plural = (($counter = count($str)) && $number > 1) ? 's' : null;
if ($number) { $hundred = ($counter == 1 && $str[0]) ? ' and ' : null;
$plural = (($counter = count($str)) && $number > 1) ? 's' : null; $str [] = ($number < 21) ?
$hundred = ($counter == 1 && $str[0]) ? ' and ' : null; $words[$number] . " " . $digits[$counter] . $plural . " " . $hundred:
$str [] = ($number < 21) ? $words[floor($number / 10) * 10]. " " . $words[$number % 10] . " ". $digits[$counter] . $plural . " " . $hundred;
$words[$number] . " " . $digits[$counter] . $plural . " " . $hundred:
$words[floor($number / 10) * 10]. " " . $words[$number % 10] . " ". $digits[$counter] . $plural . " " . $hundred;
}
else $str[] = null;
} }
else $str[] = null;
$str = array_reverse($str);
$result = implode('', $str); }
if($point>=1 && $point<=10) $str = array_reverse($str);
$result = implode('', $str);
if($point>=1 && $point<=10)
{ {
$points = ($point) ? " " . $words[$point] : " "; $points = ($point) ? " " . $words[$point] : " ";
} }
@ -350,18 +777,30 @@ class cashbook extends BaseController
$points = ($point) ? " " . $words1[$point / 10] . " " . $words[$point = $point % 10] : ''; $points = ($point) ? " " . $words1[$point / 10] . " " . $words[$point = $point % 10] : '';
} }
if($ShowPaise=='0'){ if($ShowPaise=='0'){
$amountInWords = "Rupees " . $result." Only";
$amountInWords = "Rupees " . $result." Only";
}
else{
$amountInWords = "Rupees " . $result ." Paise ". $points." Only";
}
return $amountInWords;
} }
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'); $bank = $this->input->post('bank');
$payon = $this->input->post('month'); $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"); $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); $m = substr($payon,0,2);
$y = substr($payon,3); $y = substr($payon,3);
@ -76,7 +79,14 @@ class payslip extends BaseController
$filename = ''; $filename = '';
if($this->input->post('Bank_Report')) 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 = ''; $totamtwords = '';
$totalamt=0.00; $totalamt=0.00;
if(!empty($data['result'])){ if(!empty($data['result'])){
@ -87,12 +97,13 @@ class payslip extends BaseController
} }
$totamtwords = $this->convertNumber($totalamt); $totamtwords = $this->convertNumber($totalamt);
$data['bankdetails']=$this->payroll_model->getBankInfo($bank); $data['bankdetails']=$this->payroll_model->getBankInfo($bank);
$data['chequedetails']=$this->payroll_model->getChequeInfo($bank,$payon);
$data['Totalamount']=$totalamt; $data['Totalamount']=$totalamt;
$data['Totalamtwords']=$totamtwords; $data['Totalamtwords']=$totamtwords;
$data['PayMonth']=$month; $data['PayMonth']=$month;
$filename = 'Bank Report for'.$payon ; $filename = 'Bank Report for'.$payon ;
$HTML = $this->load->view("bankreportprint",$data,true); $HTML = $this->load->view("bankreportprint",$data,true);
} }
if($this->input->post('PF_Report')) if($this->input->post('PF_Report'))
{ {
@ -1162,6 +1173,19 @@ class payslip extends BaseController
return $amountInWords; 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() public function cashbook()
{ {
$this->global['pageTitle'] = 'Cashbook - Cashbook Reports - '; $this->global['pageTitle'] = 'Cashbook - Cashbook Reports - ';
$data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal(); $data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal();
$data['getTotalServicePoCount'] = $this->dahsboard_Model->getTotalServicePoCount(); $data['getTotalServicePoCount'] = $this->dahsboard_Model->getTotalServicePoCount();
$data['getTotalimportPoCount'] = $this->dahsboard_Model->getTotalimportPoCount(); $data['getTotalimportPoCount'] = $this->dahsboard_Model->getTotalimportPoCount();
$data['getTotalcapitalPoCount'] = $this->dahsboard_Model->getTotalcapitalPoCount(); $data['getTotalcapitalPoCount'] = $this->dahsboard_Model->getTotalcapitalPoCount();
$data['getTotalrevenuePoCount'] = $this->dahsboard_Model->getTotalrevenuePoCount(); $data['getTotalrevenuePoCount'] = $this->dahsboard_Model->getTotalrevenuePoCount();
$data['cashbook']=$this->dahsboard_Model->cashbook(); $data['cashbook']=$this->dahsboard_Model->cashbook();
$income="RECEIPT"; $income="RECEIPT";
$expense="PAYMENT"; $expense="PAYMENT";
$data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data($income); $data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data($income);
$data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data($expense); $data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data($expense);
$data['todayincome']=$this->dahsboard_Model->today_data($income); $data['todayincome']=$this->dahsboard_Model->today_data($income);
$data['todayexpense']=$this->dahsboard_Model->today_data($expense); $data['todayexpense']=$this->dahsboard_Model->today_data($expense);
$data['yearincome']=$this->dahsboard_Model->yearwise_data($income); $data['yearincome']=$this->dahsboard_Model->yearwise_data($income);
$data['yearexpense']=$this->dahsboard_Model->yearwise_data($expense); $data['yearexpense']=$this->dahsboard_Model->yearwise_data($expense);
$data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal(); $data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal();
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); $data['tdy']=$this->dahsboard_Model->today();
//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();
$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 - '; $this->global['pageTitle'] = 'Cashbook - monthly expenses Reports - ';
@ -1045,12 +1040,13 @@ class report extends BaseController
$data['monthlyreport']=$this->dahsboard_Model->monthexpensereport(); $data['monthlyreport']=$this->dahsboard_Model->monthexpensereport();
// $data['monthlyincreport']=$this->dahsboard_Model->monthincomereport();
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
$this->loadviews("cashbookmonthlyexpenses",$this->global,$data, NULL); $this->loadviews("cashbookmonthlyexpenses",$this->global,$data, NULL);
} }
public function yearexpenses() public function yearexpenses()
@ -1058,59 +1054,94 @@ class report extends BaseController
$this->global['pageTitle'] = 'Cashbook - yearly expenses Reports - '; $this->global['pageTitle'] = 'Cashbook - yearly expenses Reports - ';
$fyear = $this->input->post('financialyear');
$data['yearlyreport']=$this->dahsboard_Model->yearexpensereport(); $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(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
$this->loadviews("cashbookyearlyexpenses",$this->global,$data, NULL); $this->loadviews("cashbookyearlyexpenses",$this->global,$data, NULL);
} }
public function cashbookdepartment() public function cashbookdepartment()
{ {
$this->global['pageTitle'] = 'Cashbook - department - ';
$sid=$_GET['sid']; $sid=$_GET['sid'];
$d=$_GET['d']; $d=$_GET['d'];
$this->global['pageTitle'] = 'Cashbook - department - '; $c=$_GET['c'];
$data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d); if ($c=='PAYMENT')
{
$data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d,$c);
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
$this->loadviews("cashbookmonthlydep",$this->global,$data, NULL);
$this->loadviews("cashbookmonthlydep",$this->global,$data, NULL);
} }
//for cashbook menu link// else{
public function cashbookmonthmenu() $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()
{ {
$sid=$_GET['sid'];
$this->global['pageTitle'] = 'Cashbook monthly '; $d=$_GET['d'];
$data['yearmonthwise']=$this->dahsboard_Model->yearmonthwise(); $c=$_GET['c'];
$this->global['pageTitle'] = 'Cashbook - department - ';
$data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d,$c);
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
//print_r($data['departmentwise']); //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() public function yearmonthwise()
{ {
$sid=$_GET['sid']; $sid=$_GET['sid'];
$this->global['pageTitle'] = 'Cashbook - yearmonthwise - '; $this->global['pageTitle'] = 'Cashbook - yearmonthwise - ';
$data['yearmonthwise']=$this->dahsboard_Model->yearmonthwise($sid); $data['yearmonthwise']=$this->dahsboard_Model->yearmonthwise($sid);
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
//print_r($data['departmentwise']);
$this->loadviews("cashbookyearmonthwise",$this->global,$data, NULL); $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 '; $this->global['pageTitle'] = 'Cashbook - viewtoday ';
$data['tdy']=$this->dahsboard_Model->today(); $data['tdy']=$this->dahsboard_Model->today();
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
$this->loadviews("cashbooktoday",$this->global,$data, NULL); $this->loadviews("cashbooktoday",$this->global,$data, NULL);
} }
public function depmenu() public function depmenu()
{ {
$this->global['pageTitle'] = 'Cashbook - viewtoday '; $this->global['pageTitle'] = 'Cashbook - AllReport ';
$data['depmenu']=$this->dahsboard_Model->departmentmenu(); $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(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
$this->loadviews("cashbookdepmenu",$this->global,$data, NULL); $this->loadviews("cashbookall",$this->global,$data, NULL);
} }
public function cashbookmenudepartment() public function cashbookmenudepartment()
{ {
@ -1119,10 +1150,7 @@ public function Viewtoday()
$this->global['pageTitle'] = 'Cashbook - department - '; $this->global['pageTitle'] = 'Cashbook - department - ';
$data['menudepartmentwise']=$this->dahsboard_Model->menudepartmentwise($sid); $data['menudepartmentwise']=$this->dahsboard_Model->menudepartmentwise($sid);
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
//print_r($data['departmentwise']);
$this->loadviews("cashbookdepday",$this->global,$data, NULL); $this->loadviews("cashbookdepday",$this->global,$data, NULL);
} }
} }
?> ?>

View File

@ -2,10 +2,7 @@
class cashbook_model extends CI_Model class cashbook_model extends CI_Model
{ {
/**
* To get Account Type
* @return array $r->result() : result of the query (returns active account code)
*/
function getAccounTypes() function getAccounTypes()
{ {
$this->db->where('status',1); $this->db->where('status',1);
@ -13,24 +10,20 @@ class cashbook_model extends CI_Model
return $r->result(); return $r->result();
} }
/** /**
* To get Account status * To Save Recepit and Payment datas
* @param number $data : This will have all the income and expense information. * array $data - Recepit/Payment array datas
* @return array $r : This will return how many value are inserted (return as number/count) * return $last_id - last inserted id
*/ */
function saveIncomeExpense($data) function saveIncomeExpense($data)
{ {
$this->db->insert('t_income_expense',$data); $this->db->insert('t_income_expense',$data);
$r = $this->db->affected_rows(); //$r = $this->db->affected_rows();
return $r; //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="") function getIncomeExpenseList($i="")
{ {
$this->db->select('t_accountcode.name,T_Employee_Details.FirstName,T_Employee_Details.LastName,t_income_expense.*'); $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('tbl_users','t_income_expense.Created_By=tbl_users.userId');
$this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID'); $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); $this->db->where('t_income_expense.id',$i);
} }
$r = $this->db->get(); $r = $this->db->get();
return $r->result(); return $r->result();
} }
// function getIncomeExpenseList($i="",$type)
/** // {
* To get Company details // $sql="SELECT `t_accountcode`.`name`, `T_Employee_Details`.`FirstName`,
* @return array $r->result() : result of the query (returns company information) // `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() function getCompany()
{ {
$r = $this->db->get('T_Company_Details'); $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) function getAccounutInfo($i)
{ {
$this->db->select('t_accountcode.name,t_income_expense.*'); $this->db->select('t_accountcode.name,t_income_expense.*');
$this->db->from('t_income_expense'); $this->db->from('t_income_expense');
$this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code'); $this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code');
//$this->db->where('t_income_expense.id')
$r = $this->db->get(); $r = $this->db->get();
return $r->result(); return $r->result();
} }
/**
* To get Account Information
* @return array $result : result of the query (returns account information)
*/
function Selectcash() function Selectcash()
{ {
$this->db->select('*'); $this->db->select('*');
@ -85,14 +101,170 @@ class cashbook_model extends CI_Model
return $result; 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) * To Get Payment Master for edit
* @param array $cashbookdatas : this will have all cashbook details * string $sid - Payment id
* @var number $res : gets count * return $query->result() - Payment datas based on id return as an array
* @return array $cbi : result of the query (for insertion)
* @return array $cbu : result of the query (for updation)
*/ */
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) function Cashbook($cashbookdatas)
{ {
$code=$cashbookdatas['code']; $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 class dahsboard_Model extends CI_Model
{ {
function getUserCount() function getUserCount()
{ {
@ -12,6 +11,7 @@ class dahsboard_Model extends CI_Model
} }
/* HR DASHBOART Model START*/ /* HR DASHBOART Model START*/
function totemp() function totemp()
{ {
@ -1400,7 +1400,7 @@ group by supplier_name,material_name";
function ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat){ 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.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.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, 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){ 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.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.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, 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(); //print_r($query->result());die();
return $query->result(); 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 <?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"); $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() { $(function() {
$(".select2").select2(); $(".select2").select2();
$("#bankreport").click(function(){ $( "#chequedate" ).datepicker({
maxDate :'now',
dateFormat :'dd-mm-yy'
});
$("#bankreport").click(function(){
var bank = $('#bank').val(); var bank = $('#bank').val();
var payon = $('#month').val(); var payon = $('#month').val();
var chequeno = $('#chequeno').val();
var chequedate = $('#chequedate').val();
var excel = $('#excel').is(":checked"); var excel = $('#excel').is(":checked");
// alert(excel);
if(excel == true) if(excel == true)
{ {
alert('Excel Report Not Available for Bank Report..!'); alert('Excel Report Not Available for Bank Report..!');
return false; return false;
} }
if(bank != '-1' && payon !='-1') if(bank != '-1' && payon !='-1')
{ {
$('#content').loader('show'); $('#content').loader('show');
$('#BankReportGenerator').attr('action', '<?php echo base_url() ?>payslip/getBankReport'); $('#BankReportGenerator').attr('action', '<?php echo base_url() ?>payslip/getBankReport');
$('form#BankReportGenerator').submit(); $('form#BankReportGenerator').submit();
$('#content').loader('hide'); $('#content').loader('hide');
} }
else else
{ {
alert('Select Bank Name and Pay Date'); alert('Select Bank Name and Pay Date');
return false; return false;
} }
}); });
$("#pfreport").click(function(){ $("#pfreport").click(function(){
@ -96,16 +99,15 @@ $("#esireport").click(function(){
<section class="content-header"> <section class="content-header">
<h1> <h1>
<center>Resico Industries - Bank Report Generator</center> <center>Resico Industries - Bank Report Generator</center>
</h1> </h1>
</section> </section>
<section class="content"> <section class="content">
<div class="row" style="border:2px dotted; padding:5%"> <div class="row" style="border:2px dotted; padding:5%">
<form id="BankReportGenerator" action="" method="post" role="form" > <form id="BankReportGenerator" action="" method="post" role="form" >
<div class="row" > <div class="row" >
<div class="col-md-4"> <div class="col-md-4">
<span for="selectmonth">Select Bank</span> <span for="selectmonth">Select Bank</span>
<select id="bank" name="bank" class="form-control select2" style="width: 100%;"> <select id="bank" name="bank" class="form-control select2" style="width: 100%;">
<option value="-1">Select Bank</option> <option value="-1">Select Bank</option>
<?php <?php
@ -126,10 +128,10 @@ $("#esireport").click(function(){
} }
} }
?> ?>
</select> </select>
</div> </div><!-- col-md-4 -->
<div id="content"></div> <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> <span>Month</span>
@ -147,29 +149,92 @@ $("#esireport").click(function(){
} }
?> ?>
</select> </select>
</div> </div><!-- col-md-4 col-md-offset-2-->
<div class="col-md-4 col-md-offset-6"> <div class="col-md-4 col-md-offset-6">
<input type="checkbox" class="" id="excel" name="excel" value="excel" /><span>Excel</span> <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> </div>
<br/> <br/>
<div class="col-md-4 col-md-offset-6" align = "right"> <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="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="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="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
{
$('#content').loader('hide');
</div>
</div>
}
</section> }
</div>
$(window).bind("pageshow", function() {
$('#bank').val('-1');
$('#month').val('-1');
$('#chequeno').val('');
$('#chequedate').val('');
});
</script>

View File

@ -21,9 +21,10 @@
</div> </div>
<?php <?php
$bankname = ''; $bankname = '';
$bankaddress = ''; $bankaddress = '';
$ChequeNO ='';
$ChequeDate ='';
if(!empty($bankdetails)) if(!empty($bankdetails))
{ {
foreach($bankdetails as $b) foreach($bankdetails as $b)
@ -31,6 +32,15 @@
$bankname = $b->Bank_name ; $bankname = $b->Bank_name ;
$bankaddress = $b->Address; $bankaddress = $b->Address;
} }
}
if(!empty($chequedetails))
{
foreach($chequedetails as $cheque)
{
$ChequeNO = $cheque->ChequeNO ;
$ChequeDate = $cheque->ChequeDate;
}
} }
?> ?>
<div class="page" style="font-size:12px;"> <div class="page" style="font-size:12px;">
@ -43,7 +53,7 @@
<div> <div>
<p>Dear Sir,</p> <p>Dear Sir,</p>
<p>Sub: Salary transfer of respective SB a/c through Account Transfer.</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> </div>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0"> <table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody> <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>>" + "dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [ buttons: [
{
extend: 'collection', {
text: 'Export Cashbook Reports', extend: 'excelHtml5',
buttons: [ footer: 'true',
'excel' //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.js"></script>
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script> <script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
<div class="content-wrapper"> <div class="content-wrapper">
@ -12,24 +15,24 @@
<form role="form" id="cashbookform" action="<?php echo base_url()?>" method="post" enctype="multipart/form-data"> <form role="form" id="cashbookform" action="<?php echo base_url()?>" method="post" enctype="multipart/form-data">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <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> <legend>Cash book / Account details</legend>
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-3"><strong>Account Type :</strong>&nbsp;&nbsp;<strong style="color:#ff6347;">*</strong><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="RECEPIT" checked> RECEPIT<br> <input type="radio" name="accounttype" id="accounttype" value="RECEIPT" checked> RECEIPT<br>
<input type="radio" name="accounttype" id="accounttype" value="PAYMENT"> PAYMENT<br> <input type="radio" name="accounttype" id="accounttype" value="PAYMENT"> PAYMENT<br>
</div><p style="color:red"></p> </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"> <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><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);"> <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><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"> <input type="email" name="description" id="description" class="form-control" placeholder="Account Description">
</div> </div>
<input type="hidden" id="accountstate" name="accountstate" class="form-control" value="Yes" > <input type="hidden" id="accountstate" name="accountstate" class="form-control" value="Yes" >
@ -100,6 +103,9 @@
</div> </div>
</section> </section>
</div> </div>
<script type="text/html" id="addList"> <script type="text/html" id="addList">
<tr id="<%=index%>"> <tr id="<%=index%>">
<td align="left"><%=AccountCodeType%></td> <td align="left"><%=AccountCodeType%></td>
@ -110,6 +116,7 @@
</tr> </tr>
</script> </script>
<script> <script>
var index = '1'; var index = '1';
var localcodes =[]; var localcodes =[];
$('#Add').click(function(){ $('#Add').click(function(){

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

@ -1,135 +1,203 @@
<?php <?php
$department='';
if(!empty($departmentwise)) if(!empty($departmentwise))
{ {
foreach($departmentwise as $dw)
} {
$department=$dw->name;
//echo $department;
$inrsymbol=''; break;//echo $department;
if(!empty($Indiancurrency)) // echo $department;
{ }
foreach ($Indiancurrency as $inr)
{ }
$inrsymbol = $inr->FontCode2000;
}}
?> $inrsymbol='';
if(!empty($Indiancurrency))
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css"> {
<style> foreach ($Indiancurrency as $inr)
{
.dataTables_filter { $inrsymbol = $inr->FontCode2000;
width: 50%; }}
float: right; ?>
text-align: right;
} <link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
.dataTables_paginate { <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
width: 50%; <style>
float: right;
text-align: right; .dataTables_filter {
} width: 50%;
div.dt-buttons { float: right;
position: relative; text-align: right;
float: right; }
.dataTables_paginate {
} width: 50%;
float: right;
text-align: right;
</style> }
div.dt-buttons {
<div class="row" style="min-height: 600px;"> position: relative;
float: right;
<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"> </style>
<center><b> Monthly(Department Wise) Payments</b></center>
</div> <div class="row" style="min-height: 600px;">
<div class="btn-group btn-group-justified no-margin">
<div> <div class="content-wrapper">
<table class="table table-bordered table-hover" id="req" style="font-size:13px;"> <div class="col-md-10 col-md-offset-1">
<thead> <div id="panel-quick-actions" class="panel panel-default quick-actions">
<tr> <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>
<th>Date</th> </div>
<!--<th>Account Code</th>--> <div class="btn-group btn-group-justified no-margin">
<th>Account Name</th>
<th>Paid Type</th> <div>
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th> <table class="table table-bordered table-hover" id="req" style="font-size:13px;">
<thead>
<th>Description</th> <tr>
<th>Date</th>
</tr>
</thead> <th>Account Name</th>
<tbody> <th>Type</th>
<?php if(!empty($departmentwise)){
foreach($departmentwise as $dw) <th>Paid To</th>
{
?> <th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
<tr> <th>Description</th>
<th>Action</th>
<td><span><?php echo $dw->date?></span></td>
<!--<td align="left"><span><?php echo $dw->account_code?></span></td>--> </tr>
<td align="left"><span><?php echo $dw->name?></span></td> </thead>
<td align="left"><span><?php echo $dw->type?></span></td> <tbody>
<td align="right"><span><?php echo number_format($dw->total,2,'.','');?></span></td> <?php
<td align="left"><span><?php echo $dw->description?></span></td> $tvt=0.00;
if(!empty($departmentwise)){
foreach($departmentwise as $dw)
{
</tr> ?>
<?php <tr>
}
<td><span><?php echo $dw->date?></span></td>
}
?> <td align="left"><span><?php echo $dw->name?></span></td>
</tbody> <td align="left"><span><?php echo $dw->type?></span></td>
</table>
</div> <td align="left"><span><?php echo $dw->paymentname?></span></td>
</div>
</div> <td align="right"><span><?php
</div> $tvt= $tvt + number_format($dw->expense,2,'.','');
</div> echo number_format($dw->expense,2,'.','');?></span></td>
</div>
<td align="left"><span><?php echo $dw->description?></span></td>
<td>
<?php
if(!empty($dw->document))
{
<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> <a target="_blank" href="<?php echo base_url().$dw->document ?>"><i class="fa fa-download" ></i></a>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script> <?php
<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> else
{
echo "NO FILE";
// Bootstrap datepicker }
// Set up your table ?>
$(document).ready(function() {
table = $('#req').DataTable( { </td>
"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>>", </tr>
buttons: [ <?php
{ }
extend: 'collection',
text: 'Export Cashbook Reports', }
buttons: [ ?>
'excel' </tbody>
] <tfoot width="100%">
} <tr>
] <td style="text-align:left;"><strong>Total</strong></td>
} );
} ); <td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</script>
<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 <?php
$inrsymbol=''; $inrsymbol='';
if(!empty($Indiancurrency)) if(!empty($Indiancurrency))
{ {
foreach ($Indiancurrency as $inr) foreach ($Indiancurrency as $inr)
{ {
$inrsymbol = $inr->FontCode2000; $inrsymbol = $inr->FontCode2000;
}} }}
if(!empty($monthlyreport)) if(!empty($monthlyreport))
{ {
} }
if(!empty($monthlyincreport)) if(!empty($monthlyincreport))
{ {
} }
?> ?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<style> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter { .dataTables_filter input {padding: 4px;}
width: 50%;
float: right; .dataTables_filter {
text-align: right; width: 50%;
} float: right;
.dataTables_paginate { text-align: right;
width: 50%; }
float: right;
text-align: right; .dataTables_paginate {
} width: 50%;
div.dt-buttons { float: right;
position: relative; text-align: right;
float: right; }
div.dt-buttons {
} position: relative;
float: right;
</style> }
<div class="content-wrapper"> .btn-success {
<!-- Content Header (Page header) --> background-color: #3c8dbc;
border-color: #3c8dbc;
<section class="content"><br/> }
<div class="row" style="min-height: 600px;">
</style>
<div class="col-md-10 col-md-offset-1">
<div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading"> <div class="content-wrapper">
<center><b>Monthly Payments </b></center> <section class="content">
</div> <div class="col-md-12">
<div class="btn-group btn-group-justified no-margin"> <div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading">
<div> <center><h3 class="box-title"><p style="color:#3c8dbc"><b>Month Report(<?php $month=date('F');echo $month;?>)</b></p></h3></center>
<table class="table table-bordered table-hover" id="req"> </div>
<thead> <div class="btn-group btn-group-justified no-margin">
<tr>
<th>Paid To</th> <div>
<th>Paid Type</th> <table class="table table-bordered table-hover" id="req" style="font-size:13px;">
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th> <thead>
<tr>
</tr>
</thead> <th>Account Name</th>
<tbody> <th>Type</th>
<?php if(!empty($monthlyreport)){ <!--<th>Received From</th>
foreach($monthlyreport as $mr) <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>
<!--<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> </tr>
<td align="right"><span><?php echo number_format($mr->total,2,'.','');?></span></td> </thead>
<!--<td align="left"><span><?php echo $mr->account_code?></span></td>--> <tbody>
<!--<td align="left"><span><?php echo $mr->description?></span></td>--> <?php
$ti=0.00;
$tvt=0.00;
if(!empty($monthlyreport)){
</tr> foreach($monthlyreport as $mr)
<?php {
} ?>
<tr>
}
?>
</tbody> <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>
</table> <td align="left"><span><?php echo $mr->type?></span></td>
</div> <!--<td align="left"><span><?php echo $mr->receiptname?></span></td>
</div> <td align="left"><span><?php echo $mr->paymentname?></span></td>-->
</div>
</div> <!--<td align="left"><span><?php echo $cash->expense?></span></td>-->
</div> <td align="right"><span><?php
</div> $ti= $ti + number_format($mr->income,2,'.','');
</section> echo number_format($mr->income,2,'.','');?></span></td>
</div> <td align="right"><span><?php
$tvt= $tvt + number_format($mr->expense,2,'.','');
echo number_format($mr->expense,2,'.','');?></span></td>
<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> </tr>
<?php
<script> }
}
// Bootstrap datepicker ?>
// Set up your table </tbody>
$(document).ready(function() { <tfoot width="100%">
table = $('#req').DataTable( { <tr>
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" + <td style="text-align:left;"><strong>Total</strong></td>
"<'row'<'col-md-6'><'col-md-6'>>" + <td>&nbsp;</td>
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{ <td style="text-align:right"><strong>
extend: 'collection', <?php
text: 'Export Cashbook Reports', {
buttons: [ echo number_format($ti,2,'.','');
'excel'
] }
} ?>
] </strong>
} ); </td>
} ); <td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
</script>
}
?>
</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 <?php
$inrsymbol=''; $inrsymbol='';
if(!empty($Indiancurrency)) if(!empty($Indiancurrency))
{ {
foreach ($Indiancurrency as $inr) foreach ($Indiancurrency as $inr)
{ {
$inrsymbol = $inr->FontCode2000; $inrsymbol = $inr->FontCode2000;
}} }}
?> ?>
<div class="content-wrapper"> <div class="content-wrapper">
<section class="content"> <section class="content">
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<CENTER><h3 class="box-title"><strong>Caskbook - "Monthly Payments"</strong></h3></CENTER> <CENTER><h3 class="box-title"><strong>Caskbook - "Monthly Payments"</strong></h3></CENTER>
</div> </div>
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-md-10 col-md-offset-1"> <div class="col-md-12">
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:11px;" > <table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:11px;" >
<thead style="background-color:#ddf"> <thead style="background-color:#ddf">
<tr> <tr>
<th>Date</th> <th>Date</th>
<th>Paid To</th> <th>Paid To</th>
<th>Paid Type</th> <th>Paid Type</th>
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th> <th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php if(!empty($monthlymenupayments)){ <?php if(!empty($monthlymenupayments)){
foreach($monthlymenupayments as $t) foreach($monthlymenupayments as $t)
{ {
?> ?>
<tr> <tr>
<td><span><?php echo $t->date?></span></td> <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->name ?></span></td>
<td align="left"><span><?php echo $t->type?></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> <td align="right"><span><?php echo number_format($t->total,2,'.','');?></span></td>
</tr> </tr>
<?php <?php
} }
} }
?> ?>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
</div> </div>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script> <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function () { $(function () {
$('#datatable').DataTable({ $('#datatable').DataTable({
"paging": true, "paging": true,
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"info": true, "info": true,
"autoWidth": true "autoWidth": true
}); });
}); });
</script> </script>

View File

@ -14,7 +14,7 @@ $pic = base_url().'uploads/images/'.$company[0]->ProfilePic;
<tr style="height: 57px;"> <tr style="height: 57px;">
<td style="width: 89px; height: 57px;"><img src='<?php echo $pic;?>' ></td> <td style="width: 89px; height: 57px;"><img src='<?php echo $pic;?>' ></td>
<td style="width: 89px; height: 57px;" colspan="5"> <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> </td>
</tr> </tr>
<hr> <hr>
@ -24,7 +24,7 @@ $pic = base_url().'uploads/images/'.$company[0]->ProfilePic;
</tr> </tr>
<tr style="height: 26px;"> <tr style="height: 26px;">
<td style="width: 100px; height: 26px;">&nbsp;Voucher Number </td> <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> <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> <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: 100px; height: 46px;">&nbsp;Amount (In Words)</td>
<td style="width: 89px; height: 46px;" colspan="3"><b><?php echo $amtinwords;?></b></td> <td style="width: 89px; height: 46px;" colspan="3"><b><?php echo $amtinwords;?></b></td>
</tr> </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;"> <tr style="height: 73px;">
<td style="width: 89px; height: 73px;"> <td style="width: 89px; height: 73px;">
<p>&nbsp;Remarks </p> <p>&nbsp;Remarks </p>
@ -54,10 +85,10 @@ $pic = base_url().'uploads/images/'.$company[0]->ProfilePic;
<tr style="height: 26px;"> <tr style="height: 26px;">
<td style="width: 89px; height: 26px;">&nbsp;</td> <td style="width: 89px; height: 26px;">&nbsp;</td>
<td style="width: 89px; height: 26px;">&nbsp;</td> <td style="width: 89px; height: 26px;">&nbsp;</td>
<td style=" height: 26px;">&nbsp;</td> <td style="width: 89px; height: 26px;">&nbsp;</td>
<td style=" 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: 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> <hr>
</tr> </tr>
<tr style="height: 26px;"> <tr style="height: 26px;">

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

@ -1,82 +1,188 @@
<?php <?php
$inrsymbol=''; $inrsymbol='';
if(!empty($Indiancurrency)) if(!empty($Indiancurrency))
{ {
foreach ($Indiancurrency as $inr) foreach ($Indiancurrency as $inr)
{ {
$inrsymbol = $inr->FontCode2000; $inrsymbol = $inr->FontCode2000;
}} }}
?> ?>
<div class="content-wrapper"> <link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<section class="content"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<div class="box"> <style>
<div class="box-header"> .dataTables_filter input {padding: 4px;}
<CENTER><h3 class="box-title">Today's Payment</h3></CENTER>
</div> .dataTables_filter {
<div class="container-fluid"> width: 50%;
float: right;
<div class="row"> text-align: right;
<div class="col-md-10 col-md-offset-1"> }
.dataTables_paginate {
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:11px;" > width: 50%;
<thead style="background-color:#ddf"> float: right;
<tr> text-align: right;
<th>Date</th> }
<!-- <th>Account Code</th>--> div.dt-buttons {
<th>Paid To</th> position: relative;
<th>Paid Type</th> float: right;
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
<th>Description</th> }
</tr>
</thead> </style>
<tbody> <div class="content-wrapper">
<?php if(!empty($tdy)){ <section class="content">
foreach($tdy as $t) <div class="box">
{ <div class="box-header">
?> <center><h3 class="box-title"><p style="color:#3c8dbc"><b>Today Report</b></p></h3></center>
<tr> </div>
<div class="container-fluid">
<td><span><?php echo $t->date?></span></td>
<!--<td align="left"><span><?php echo $t->account_code?></span></td>--> <div class="row">
<td align="left"><span><?php echo $t->name ?></span></td> <div class="col-md-12">
<!--<td align="left"><span><?php echo $t->towhom?></span></td>-->
<td align="left"><span><?php echo $t->type?></span></td> <table class="table table-bordered table-hover" id="req" style="background-color:#fff;font-size:11px;" >
<td align="left"><span><?php echo number_format($t->total,2,'.','');?></span></td> <thead style="background-color:#ddf">
<td align="left"><span><?php echo $t->description?></span></td> <tr>
<th>Date</th>
<th>Account Name</th>
<th>Type</th>
</tr> <th>Received From</th>
<?php <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>
</tbody> <th>Action</th>
</table> </tr>
</thead>
</div> <tbody>
</div> <?php
</div> $ti=0.00;
</div> $tvt=0.00;
</section> if(!empty($tdy)){
</div> foreach($tdy as $t)
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script> {
<script type="text/javascript"> ?>
<tr>
$(function () {
<td><span><?php echo $t->date?></span></td>
$('#datatable').DataTable({ <td align="left"><span><?php echo $t->name?></span></td>
"paging": true, <td align="left"><span><?php echo $t->type?></span></td>
"lengthChange": true, <td align="left"><span><?php echo $t->receiptname?></span></td>
"searching": true, <td align="left"><span><?php echo $t->paymentname?></span></td>
"ordering": true,
"info": true,
"autoWidth": true <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,'.','');
</script> 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 <?php
$inrsymbol=''; $inrsymbol='';
if(!empty($Indiancurrency)) $finyear ='';
{ if(!empty($Indiancurrency))
foreach ($Indiancurrency as $inr) {
{ foreach ($Indiancurrency as $inr)
$inrsymbol = $inr->FontCode2000; {
}} $inrsymbol = $inr->FontCode2000;
?> }}
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
<style>
foreach($financialyear as $item)
.dataTables_filter {
width: 50%; {
float: right; $finyear = $item->financial_year;
text-align: right;
} } ?>
.dataTables_paginate { <link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
width: 50%; <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
float: right; <style>
text-align: right; .dataTables_filter input {padding: 4px;}
} .dataTables_filter {
div.dt-buttons { width: 50%;
position: relative; float: right;
float: right; text-align: right;
}
}
.dataTables_paginate {
width: 50%;
</style> float: right;
text-align: right;
<div class="content-wrapper"> }
<!-- Content Header (Page header) --> div.dt-buttons {
position: relative;
<section class="content"><br/> float: right;
}
<div class="col-md-10 col-md-offset-1"> .btn-success {
<div id="panel-quick-actions" class="panel panel-default quick-actions"> background-color: #3c8dbc;
<div class="panel-heading"> border-color: #3c8dbc;
<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;"> </style>
<thead>
<tr>
<!--<th>Date</th>--> <div class="content-wrapper">
<th>Month</th> <section class="content">
<!-- <th>Paid To</th>--> <div class="container-fluid">
<th>Paid Type</th> <div class="col-md-12">
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th> <div id="panel-quick-actions" class="panel panel-default quick-actions">
<!--<th>Account Code</th>--> <div class="panel-heading">
<!--<th>Description</th>--> <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">
</tr>
</thead> <center>
<tbody> <div class="panel-body">
<?php if(!empty($yearlyreport)){ <form method="post" action=" ">
foreach($yearlyreport as $yr) <div class="col-md-8">
{ <select class="form-control" id="financialyear" name="financialyear">
?> <option value="">Select Year</option>
<tr> <?php
foreach($financialyear as $item):
<!--<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> <option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
<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>--> <?php } endforeach; ?>
</select>
</div>
</tr> <div class="col-md-2">
<?php <input type="submit" class="btn btn-success" id="year" name="btn_submit" value="View Report">
} </div>
</form>
} </div>
?> </center>
</tbody>
</table> </div>
<div class="btn-group btn-group-justified no-margin">
</div> <table class="table table-bordered table-hover" id="req"style="font-size:13px;">
</div> <thead>
</div> <tr>
</div>
</section>
</div> <th>Month</th>
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
<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> </tr>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> </thead>
<tbody>
<script> <?php
$ti=0.00;
$tvt=0.00;
// Bootstrap datepicker if(!empty($yearlyreport)){
// Set up your table foreach($yearlyreport as $yr)
$(document).ready(function() { {
table = $('#req').DataTable( { ?>
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" + <tr>
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", <!--<td><span><?php echo $yr->date?></span></td>-->
buttons: [ <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>-->
extend: 'collection', <td align="right"><span><?php
text: 'Export Cashbook Reports', $ti= $ti + number_format($yr->inc,2,'.','');
buttons: [ echo number_format($yr->inc,2,'.','');?></span></td>
'excel' <td align="right"><span><?php
] $tvt= $tvt + number_format($yr->exp,2,'.','');
} echo number_format($yr->exp,2,'.','');?></span></td>
]
} );
} );
</tr>
</script> <?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 <?php
$inrsymbol=''; $inrsymbol='';
if(!empty($Indiancurrency)) if(!empty($Indiancurrency))
{ {
foreach ($Indiancurrency as $inr) foreach ($Indiancurrency as $inr)
{ {
$inrsymbol = $inr->FontCode2000; $inrsymbol = $inr->FontCode2000;
}} }}
?> ?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<style> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter { .dataTables_filter input {padding: 4px;}
width: 50%;
float: right; .dataTables_filter {
text-align: right; width: 50%;
} float: right;
.dataTables_paginate { text-align: right;
width: 50%; }
float: right; .dataTables_paginate {
text-align: right; width: 50%;
} float: right;
div.dt-buttons { text-align: right;
position: relative; }
float: right; div.dt-buttons {
position: relative;
} float: right;
}
</style>
</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="content-wrapper">
<div class="panel-heading"> <section class="content">
<center><b>Monthly Payments</b></center> <div class="container-fluid">
</div> <div class="col-md-10 col-md-offset-1">
<div class="btn-group btn-group-justified no-margin"> <div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading">
<div> <center><h3 class="box-title"><p style="color:#3c8dbc"><b>Month Report(<?php $month=$_GET['sid'];echo $month;?>)</b></p></h3></center>
<table class="table table-bordered table-hover" id="req" style="font-size:13px;"> </div>
<thead> <table class="table table-bordered table-hover" id="req">
<tr> <thead>
<tr>
<!--<th>Date</th>-->
<th>Account Name</th> <!--<th>Date</th>-->
<!--<th>month</th>--> <th>Account Name</th>
<!--<th>Paid To</th>--> <!--<th>month</th>-->
<th>Paid Type</th> <!--<th>Paid To</th>-->
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th> <th>Paid Type</th>
<!--<th>Received From</th>
<!--<th>Description</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> <!--<th>Description</th>-->
<tbody>
<?php if(!empty($yearmonthwise)){
foreach($yearmonthwise as $ym) </tr>
{ </thead>
?> <tbody>
<tr> <?php
$ti=0.00;
<!--<td><span><?php echo $ym->date?></span></td>--> $tvt=0.00;
<!--<td align="right"><span><a href="<?= base_url() ?>report/yearmonthwise"><?php echo $ym->month?></a></span></td>--> if(!empty($yearmonthwise)){
<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> foreach($yearmonthwise as $ym)
<!--<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> <tr>
<!--<td align="right"><span><?php echo $ym->description?></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?>&c=<?php echo $ym->type?>"><span><?php echo $ym->name?></span></a></td>
</tr> <!--<td align="right"><span><?php echo $ym->towhom?></span></td>-->
<?php <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>-->
</tbody> <td align="right"><span><?php
</table> $ti= $ti + number_format($ym->income,2,'.','');
</div> echo number_format($ym->income,2,'.','');?></span></td>
</div> <td align="right"><span><?php
</div> $tvt= $tvt + number_format($ym->expense,2,'.','');
</div> echo number_format($ym->expense,2,'.','');?></span></td>
</div>
</tr>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script> <?php
<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> ?>
</tbody>
<script> <tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
// Bootstrap datepicker <td>&nbsp;</td>
// Set up your table
$(document).ready(function() {
table = $('#req').DataTable( { <td style="text-align:right"><strong>
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" + <?php
"<'row'<'col-md-6'><'col-md-6'>>" + {
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", echo number_format($ti,2,'.','');
buttons: [
{ }
extend: 'collection', ?>
text: 'Export Cashbook Reports', </strong>
buttons: [ </td>
'excel' <td style="text-align:right"><strong>
] <?php
} {
] echo number_format($tvt,2,'.','');
} );
} ); }
?>
</strong>
</td>
</script> </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 @@
<?php//print_r($list); ?>
<CENTER><strong><h3 class="box-title">Resico Industries - Income & Expense List</h3></strong></CENTER>
<div class="content-wrapper"> <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"> <section class="content">
<div class="box">
<div class="box"> <div class="box-header">
<div align="right" style="padding-right:10px">
<div class="box-header"> <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 align="right" style="padding-right:10px"> </div>
<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;font-size:12px;">
<div align="right" style="padding-right:10px">
</div> <div id="content" > </div>
<div class="modal fade" role="dialog">
<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">
<thead style="background-color:#ddf"> <thead style="background-color:#ddf">
<tr> <tr>
<th>Account Type</th> <th>Account Type</th>
<th>DATE</th> <th>DATE</th>
<th>Account Name</th> <th>Account Name</th>
<th>Amount</th> <th>Amount</th>
<th>Details</th> <th>Details</th>
<th>Action</th>
</tr> </tr>
</thead> </thead>
<tbody id="inexlistbody"> <tbody id="inexlistbody">
<?php if(!empty($list)) <?php if(!empty($list))
{ {
$base = base_url(); $base = base_url();
foreach($list as $l) 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 <?php
} }
} }
?> ?>
</tbody>
</tbody> </div>
</div>
</table> </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> <br>
</div> <!-- </div>
</div> </div> -->
</div> </div>
</div> </section> </section>
</div>
<script> <script>
$(function () { $(function () {
@ -74,11 +118,47 @@ $(function () {
"paging": true, "paging": true,
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"aaSorting": [[ 0, "desc" ]], "aaSorting": [[ 0, "desc" ]],
"ordering": true, "ordering": true,
"info": true, "info": true,
"autoWidth": 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=''; <?php
$month_in=''; $today_in='';
$month_ex=''; $today_ex='';
$year_in=''; $month_in='';
$year_ex=''; $month_ex='';
if(!empty($cashbook)) $year_in='';
{ $year_ex='';
if(!empty($cashbook))
} {
if(!empty($monthlyreport))
{ }
if(!empty($monthlyreport))
} {
if(!empty($todayincome)) }
{
foreach ($todayincome as $ti) if(!empty($todayincome))
{ {
$today_in=$ti->todaydata; foreach ($todayincome as $ti)
}} {
$today_in=$ti->todaydata;
if(!empty($todayexpense)) }}
{
foreach ($todayexpense as $te) if(!empty($todayexpense))
{ {
$today_ex=$te->todaydata; foreach ($todayexpense as $te)
}} {
$today_ex=$te->todaydata;
if(!empty($monthlywiseincome)) }}
{
foreach ($monthlywiseincome as $mi) if(!empty($monthlywiseincome))
{ {
$month_in = $mi->monthlydata; foreach ($monthlywiseincome as $mi)
}} {
$month_in = $mi->monthlydata;
if(!empty($monthlywiseexpense)) }}
{
foreach ($monthlywiseexpense as $me) if(!empty($monthlywiseexpense))
{ {
$month_ex = $me->monthlydata; foreach ($monthlywiseexpense as $me)
}} {
if(!empty($yearexpense)) $month_ex = $me->monthlydata;
{ }}
foreach ($yearexpense as $ye) if(!empty($yearexpense))
{ {
$year_ex=$ye->yearlydata; foreach ($yearexpense as $ye)
}} {
$year_ex=$ye->yearlydata;
if(!empty($yearincome)) }}
{
foreach ($yearincome as $yi) if(!empty($yearincome))
{ {
$year_in = $yi->yearlydata; foreach ($yearincome as $yi)
}} {
$year_in = $yi->yearlydata;
$inrsymbol=''; }}
if(!empty($Indiancurrency))
{ $inrsymbol='';
foreach ($Indiancurrency as $inr) if(!empty($Indiancurrency))
{ {
$inrsymbol = $inr->FontCode2000; 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> <link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<script> <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 {
(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(); width: 50%;
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+" "+ float: right;
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"}, text-align: right;
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> .dataTables_paginate {
<style> width: 50%;
float: right;
.dataTables_filter { text-align: right;
width: 50%; }
float: right; div.dt-buttons {
text-align: right; position: relative;
} float: right;
.dataTables_paginate {
width: 50%; }
float: right; .btn-success {
text-align: right; background-color: #3c8dbc;
} border-color: #3c8dbc;
div.dt-buttons { }
position: relative;
float: right;
</style>
} </style>
table{ <div>
margin: 0 auto; <section class="content-header">
width: 100%;
clear: both;
border-collapse: collapse; <!-- Main content -->
table-layout: fixed; <section>
word-wrap:break-word; <!-- Info boxes -->
<center>
} <div class="col-md-12">
th, td { white-space: nowrap; } <!-- fix for small devices only -->
div.dataTables_wrapper { <div class="clearfix visible-sm-block"></div>
margin: 0 auto; <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">
div.container { <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>
width: 100%;
} <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>
.dataTables_paginate {
margin-top: -25px; </div>
position: absolute; </div>
text-align: right; </div>
left: -20%;
} <!-- fix for small devices only -->
<div class="clearfix visible-sm-block"></div>
#container { <div class="col-md-4">
min-width: 310px; <div class="info-box">
max-width: 800px; <span class="info-box-icon bg-aqua" style="height: 90px;padding:25px;"><i<i class="fa fa-spinner"></span>
height: 400px; <div class="info-box-content">
margin: 0 auto <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>
</style> </div>
<div class="content-wrapper"> </div>
<p>&nbsp;</p> </div>
<!-- fix for small devices only -->
<!-- Main content --> <div class="clearfix visible-sm-block"></div>
<section> <div class="col-md-4">
<!-- Info boxes --> <div class="info-box">
<center> <span class="info-box-icon bg-green" style="height: 90px;padding:25;"><i class="fa fa-industry" style="padding: 5px;"></i></span>
<div class="col-md-12"> <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>
<!-- fix for small devices only --> <span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol. number_format($year_in,2,'.',''); ?></span>
<div class="clearfix visible-sm-block"></div> <span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($year_ex,2,'.',''); ?></span>
<div class="col-md-3"> </div>
<div class="info-box"> </div>
<span class="info-box-icon bg-red" style="height: 90px;padding:25px;"><i class="fa fa-hourglass-end"></i></span> </div>
<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> </div>
</center>
<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> <!--<div class="row">
</div> <div class="col-md-12">
<div id="container"></div>
<!-- fix for small devices only -->
<div class="clearfix visible-sm-block"></div> </div>
<div class="col-md-3"> </div>-->
<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> <!-- Left col -->
</div> <div class="col-md-12">
</div> <!-- TABLE: LATEST ORDERS -->
</div> <div class="box box-info">
<!--<div class="box-header with-border">-->
<!-- fix for small devices only --> <!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<div class="clearfix visible-sm-block"></div> <!--</div>-->
<div class="col-md-3"> <!-- /.box-header -->
<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> <center><h3 class="box-title"><p style="color:#3c8dbc"><b>Day Wise Report</b></p></h3></center>
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol. number_format($year_in,2,'.',''); ?></span> <div class="box-body">
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($year_ex,2,'.',''); ?></span> <div>
</div> <table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
</div> <thead>
</div> <tr>
<div class="clearfix visible-sm-block"></div> <th>Date</th>
<div class="col-md-3"> <!--<th>Account Code</th>-->
<div class="info-box"> <th>Account Name</th>
<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> <th>Type</th>
<div class="info-box-content"> <th>Received From</th>
<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> <th>Paid To</th>
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol. number_format($year_in,2,'.',''); ?></span> <!--<th>Paid Type(RECEIPT)</th>-->
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($year_ex,2,'.',''); ?></span> <!--<th>Paid Type(PAYMENTS)</th>-->
</div> <th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
</div> <th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
</div> <th>Description</th>
</div> <th>File</th>
</center>
</section>
<!-- Main content --> </tr>
</thead>
<tbody>
<?php
<!--<div class="row"> $ti=0.00;
<div class="col-md-12"> $tvt=0.00;
<div id="container"></div> if(!empty($tdy)){
foreach($tdy as $t)
</div> {
</div>--> ?>
<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>
<!-- Left col --> <td align="left"><span><?php echo $t->receiptname?></span></td>
<div class="col-md-12"> <td align="left"><span><?php echo $t->paymentname?></span></td>
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info"> <!--<td align="left"><span><?php echo $cash->expense?></span></td>-->
<!--<div class="box-header with-border">--> <td align="right"><span><?php
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>--> $ti= $ti + number_format($t->income,2,'.','');
<!--</div>--> echo number_format($t->income,2,'.','');?></span></td>
<!-- /.box-header --> <td align="right"><span><?php
$tvt= $tvt + number_format($t->expense,2,'.','');
echo number_format($t->expense,2,'.','');?></span></td>
<CENTER><h3 class="box-title"><strong>Day Wise Payment</strong></h3></CENTER> <td align="left"><span><?php echo $t->description?></span></td>
<div class="box-body"> <td>
<div> <?php
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;"> if(!empty($t->document))
<thead> {
<tr> ?>
<a target="_blank" href="<?php echo base_url().$t->document ?>"><i class="fa fa-download" ></i></a>
<th>Account Name</th> <?php
<th>Type</th>
<th>Received From</th> }
<th>Paid To</th>
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th> else
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th> {
<th>Description</th> echo "NO FILE";
}
?>
</tr>
</thead> </td>
<tbody>
<?php
$ti=0.00;
$tvt=0.00;
if(!empty($cashbook)){
foreach($cashbook as $cash)
{ </tr>
?> <?php
<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> </tbody>
<td align="left"><span><?php echo $cash->receiptname?></span></td> <tfoot width="100%">
<td align="left"><span><?php echo $cash->paymentname?></span></td> <tr>
<td align="right"><span><?php <td style="text-align:left;"><strong>Total</strong></td>
$ti= $ti + number_format($cash->income,2,'.',''); <td>&nbsp;</td>
echo number_format($cash->income,2,'.','');?></span></td> <td>&nbsp;</td>
<td align="right"><span><?php <td>&nbsp;</td>
$tvt= $tvt + number_format($cash->expense,2,'.',''); <td>&nbsp;</td>
echo number_format($cash->expense,2,'.','');?></span></td> <td style="text-align:right"><strong>
<td align="left"><span><?php echo $cash->description?></span></td> <?php
{
</tr> echo number_format($ti,2,'.','');
<?php
} }
?>
} </strong>
?> </td>
</tbody> <td style="text-align:right"><strong>
<tfoot width="100%"> <?php
<tr> {
<td style="text-align:left;"><strong>Total</strong></td> echo number_format($tvt,2,'.','');
<td>&nbsp;</td>
<td>&nbsp;</td> }
<td>&nbsp;</td> ?>
<td>&nbsp;</td> </strong>
<td style="text-align:right"><strong> </td>
<?php
{ <td>&nbsp;</td>
echo number_format($ti,2,'.',''); <td>&nbsp;</td>
<td>&nbsp;</td>
}
?>
</strong> </tr>
</td>
<td style="text-align:right"><strong> </tfoot>
<?php </table>
{
echo number_format($tvt,2,'.',''); </div>
</div>
} </div>
?> <!-- /.box -->
</strong> </div>
</td> <!-- /.col -->
<td>&nbsp;</td>
</tr>
</tfoot> <script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
</table> <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>
</div> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
</div> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
</div> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<!-- /.box --> <script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
</div>
<!-- /.col --> <script>
$(document).ready(function() {
</div> 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: [
<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> extend: 'excelHtml5',
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script> footer: 'true',
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script> //messageTop: $('h3').text(),
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> title:$('h3').text(),
<script src="https://code.highcharts.com/highcharts.js"></script> exportOptions: {
<script src="https://code.highcharts.com/modules/series-label.js"></script> columns: ':visible'
<script src="https://code.highcharts.com/modules/exporting.js"></script>
}
<script> },
$(document).ready(function() {
table = $('#req').DataTable( { 'colvis'
"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: [ </script>
{
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>

View File

@ -308,7 +308,7 @@ $("#Igrshow").on("shown.bs.modal", function(e) {
var igr_nos = $(e.relatedTarget).data('id'); var igr_nos = $(e.relatedTarget).data('id');
var igr = igr_nos.split(','); var igr = igr_nos.split(',');
igr = igr[1]; igr = igr[1];
alert(igr_nos+igr); //alert(igr_nos+igr);
$('#content').loader('show'); $('#content').loader('show');
$.ajax({ $.ajax({
data:{id:igr}, data:{id:igr},

View File

@ -1,4 +1,4 @@
<?php //print_r($data); <?php print_r($data);
$extype= ''; $extype= '';
$exname = ''; $exname = '';
$flag = 0; $flag = 0;
@ -22,11 +22,11 @@ if(!empty($data))
if($extype == 'RECEIPT') if($extype == 'RECEIPT')
{ {
$label = 'Received From'; $label = 'Received From :';
} }
else else
{ {
$label = 'Paid To'; $label = 'Paid To :';
} }
$final = base_url().$document; $final = base_url().$document;
//echo $final; //echo $final;
@ -55,27 +55,83 @@ if(!empty($data))
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-7"> <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"> <table id="viewIS">
<thead></thead> <thead></thead>
<tbody> <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 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 ><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><?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){?> <?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 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 ><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 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 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 ><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>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 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 ><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>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 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 ><h4>IGST </h4></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td >: <?php if(!empty($data[0]->igst)){echo $data[0]->igst;}?></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 ><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> <?php } ?>
<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>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> </tbody>
</table> </table>
<?php } ?>
</div> </div>
<div class="col-md-5" style="border:0px solid;"> <div class="col-md-5" style="border:0px solid;">

View File

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