From e844533b53966dcdd62c36c1fa8db01210d0e44d Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Thu, 7 Dec 2017 17:05:43 +0530 Subject: [PATCH] cashbook report changes --- .../controllers/emergencypurchaseorder.php | 486 ++++++++- application/controllers/report.php | 111 +- application/models/dahsboard_model.php | 215 ++-- application/models/purchaseorder_model.php | 34 +- application/views/alterpurchaseorder.php | 919 +++++++++++++++-- application/views/cashbookmonthlydep.php | 268 ++--- application/views/cashbookmonthlyexpenses.php | 273 +++-- application/views/cashbookmonthmenu.php | 166 +-- application/views/cashbooktoday.php | 164 +-- application/views/cashbookyearlyexpenses.php | 240 ++--- application/views/cashbookyearmonthwise.php | 249 +++-- ...{Reportcashbook.php => reportcashbook.php} | 961 +++++++++--------- 12 files changed, 2695 insertions(+), 1391 deletions(-) mode change 100644 => 100755 application/models/purchaseorder_model.php rename application/views/{Reportcashbook.php => reportcashbook.php} (84%) diff --git a/application/controllers/emergencypurchaseorder.php b/application/controllers/emergencypurchaseorder.php index b9129210..9ec8df3d 100644 --- a/application/controllers/emergencypurchaseorder.php +++ b/application/controllers/emergencypurchaseorder.php @@ -22,6 +22,8 @@ class emergencypurchaseorder extends BaseController $this->load->library('session'); $this->load->library('form_validation'); $this->load->model('requistion_model'); + $this->load->model('inwardgateregister_model'); + $this->load->model('mrir_model'); $this->isLoggedIn(); } @@ -68,8 +70,19 @@ class emergencypurchaseorder extends BaseController $data['WorkStatus']=$this->purchaseorder_model->getStatus(7); $data['ServiceOption'] = $this->requistion_model->getConfigValue('C022'); $data['PoTypeOptions'] = $this->purchaseorder_model->getConfigValue('C026'); + + + if($this->DEPCode == PURCHASE ) + { $this->loadViews("alterpurchaseorder", $this->global, $data, Null); + } + + else + { + $this->loadViews("access", $this->global, $data, Null); + } + } /** * this function used for get all material code using request type @@ -91,11 +104,104 @@ class emergencypurchaseorder extends BaseController } + + function addfile() + { + + $file = ''; + //Check whether user upload picture + if(!empty($_FILES['images']['name'])) + { + //echo 'true'; + $config['upload_path'] = 'uploads/BillFiles/'; + $config['allowed_types'] = 'docx|pdf|doc|png|jpg'; + $config['file_name'] = $_FILES['images']['name']; + // print_r($config);die; + //Load upload library and initialize configuration + $this->load->library('upload',$config); + $this->upload->initialize($config); + + if($this->upload->do_upload('images')) + { + $uploadData = $this->upload->data(); + //print_r($uploadData); + $file = $uploadData['file_name']; + } + else + { + $error = array('error' => $this->upload->display_errors()); + //print_r($error); + $file = ''; + } + } + else + { + //echo 'false'; + $file = ''; + } + + return $file ; + } + + + + + + + +function addfile1() + { + + $file = ''; + //Check whether user upload picture + if(!empty($_FILES['images1']['name'])) + { + //echo 'true'; + $config['upload_path'] = 'uploads/BillFiles/'; + $config['allowed_types'] = 'docx|pdf|doc|png|jpg'; + $config['file_name'] = $_FILES['images1']['name']; + // print_r($config);die; + //Load upload library and initialize configuration + $this->load->library('upload',$config); + $this->upload->initialize($config); + + if($this->upload->do_upload('images1')) + { + $uploadData = $this->upload->data(); + //print_r($uploadData); + $file = $uploadData['file_name']; + } + else + { + $error = array('error' => $this->upload->display_errors()); + //print_r($error); + $file = ''; + } + } + else + { + //echo 'false'; + $file = ''; + } + + return $file ; + } + + + + + //This used to Create Service Purchase Order function addNewServicePurchaseOrder() { - + //echo "t54"; + + + //die(); + + $txtRowCount=$this->input->post('txtRowCount'); + $POdt =$this->input->post('PODate'); $PODate = $this->getDateformat($POdt); $SupplierID = $this->input->post('drpSupplier'); @@ -105,35 +211,74 @@ class emergencypurchaseorder extends BaseController $DeliveryOption = $this->input->post('DateRange'); $DeliverySchedule=''; $Deliverydt = $this->getDateformat($POdt); - - - + + $txtsplservice=$this->input->post('txtSpecialservice'); + + if($txtsplservice=='1') + { + + $POStatus=SPECIAL_PO; + } + else + { + $POStatus=REQITEM_Emergency_PO_CREATED; + } + + + //echo $POStatus; + //die(); + $POType = $this->input->post('POType'); $SpcialInstruction = $this->input->post('ScopeOfWork'); $RequistionComments = "Created Emergency Service PO"; - $TotalOrderValueSummary = $this->input->post('TextTotalOrderValueSummaryService'); + // $TotalOrderValueSummary = $this->input->post('TextTotalOrderValueSummaryService'); - $POStatus = $this->input->post('TextStatus'); + $TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummaryService'); + + //$POStatus = $this->input->post('TextStatus'); $CreateBy = $this->session->userdata ('userId'); $RequestedBy = $this->input->post('drpDepartment'); $ReqStatus = REQITEM_Emergency_PO_CREATED; - $RowCount = $this->input->post('TextRowCount'); + // $RowCount = $this->input->post('TextRowCount'); - $DeletedRow = $this->input->post('TextDeletedRowCount'); + $RowCount = $this->input->post('txtRowCount'); + + //$DeletedRow = $this->input->post('TextDeletedRowCount'); + + $DeletedRow = $this->input->post('txtDeletedRow1'); $comma_separated = explode(':', $DeletedRow); $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $createddt = $dt->format('Y-m-d H:i:s'); - $PaymentTerms=$this->input->post('PaymentMethod'); + //$PaymentTerms=$this->input->post('PaymentMethod'); + + $PaymentTerms=$this->input->post('PaymentMethod'); $OtherPayment=$this->input->post('Otherpayment'); - $ServiceWorkStatus=$this->input->post('workStatus'); + if($POStatus==SPECIAL_PO) + { + $ServiceWorkStatus=SERVICE_COMPLETED; + } + + else + { + $ServiceWorkStatus=$this->input->post('txtworkstatus'); + + //$ServiceWorkStatus=$this->input->post('workstatusValue'); + } + + + //echo $ServiceWorkStatus; + + // echo "fveg"; + + //die(); $ServiceScheduleType = $this->input->post('ScheduleType'); $ServiceScheduleOptions = $this->input->post('ScheduleType'); //$ServiceServiceNo = $this->input->post('ServiceNo'); @@ -250,16 +395,34 @@ class emergencypurchaseorder extends BaseController } + +if($POStatus==SPECIAL_PO){ + + $file =$this->addfile1(); + + $myfile = array('FilePath'=>$file,'MaterialCode'=>$MaterialCode,'PONO'=>$PONO); + $result= $this->purchaseorder_model->fileupload($myfile); + } + } + + if($POStatus == REQ_DRAFT) { - echo 'Emergency Service Purchase Order Saved Successfully!The PO NO Is: '.$PONO; + // echo 'Emergency Service Purchase Order Saved Successfully!The PO NO Is: '.$PONO; + + + echo ""; + redirect('purchaseorder/PurchaseOrderList','refresh'); } else { - echo 'Emergency Service Purchase Order Created Successfully!The PO NO Is: '.$PONO; + // echo 'Emergency Service Purchase Order Created Successfully!The PO NO Is: '.$PONO; + + echo ""; + redirect('purchaseorder/PurchaseOrderList','refresh'); } @@ -271,6 +434,9 @@ class emergencypurchaseorder extends BaseController //This used to Create Revenue Emergency Purchase Order function addNewRevenuePurchaseOrder() { + + + $txtspl=$this->input->post('txtSpecial'); //echo "Emergency Revenue PO"; $POdt =$this->input->post('PODate'); @@ -307,12 +473,33 @@ class emergencypurchaseorder extends BaseController $SpcialInstruction = $this->input->post('txtSpcialInstruction'); $RequistionComments = "Created Emergency Revenue PO"; $TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary'); - $POStatus = $this->input->post('TextStatus'); + + if($txtspl==0) + { + $POStatus=REQITEM_Emergency_PO_CREATED; + } + else + { + $POStatus=SPECIAL_PO; + } + + //$POStatus = $this->input->post('TextStatus'); $RequestedBy = $this->input->post('drpDepartment'); $CreateBy = $this->session->userdata ( 'userId' ); - $RowCount = $this->input->post('TextRowCount'); + // $RowCount = $this->input->post('TextRowCount'); + + $RowCount=$this->input->post('txtRowCount1'); + //echo $RowCount; - $DeletedRow = $this->input->post('TextDeletedRowCount'); + // $DeletedRow = $this->input->post('TextDeletedRowCount'); + + $DeletedRow = $this->input->post('txtDeletedRow1'); + + + + $splRow = $this->input->post('splrow'); + + // echo $DeletedRow; $ReqStatus = REQITEM_Emergency_PO_CREATED; $Local_Interstate=$this->input->post('Range'); @@ -322,8 +509,19 @@ $RequestedBy = $this->input->post('drpDepartment'); $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $createddt = $dt->format('Y-m-d H:i:s'); $PaymentTerms=$this->input->post('PaymentMethod'); - $OtherPayment=$this->input->post('Otherpayment'); - + $OtherPayment=$this->input->post('Otherpayment'); + + if($POStatus==SPECIAL_PO) + { + $Qualitycheck=$this->input->post('txtQuality'); + } + + else + { + $Qualitycheck=1; + } + + //add requistion $Request = array('ReqType'=>$POType, 'RequestedDept'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$RequistionComments,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy); @@ -336,7 +534,7 @@ $RequestedBy = $this->input->post('drpDepartment'); $RegNo = $Req[0]['ReqNo']; } // PO Master - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Supplier_Reference'=>$supplierreference,'Other_Reference'=>$otherreference,'InsuranceNumber'=>$insuranceno,'InsuranceStatus'=>$insurancestatus,'Fincap'=>$fincap,'POSubType'=>$revenuetype); + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Supplier_Reference'=>$supplierreference,'Other_Reference'=>$otherreference,'InsuranceNumber'=>$insuranceno,'InsuranceStatus'=>$insurancestatus,'Fincap'=>$fincap,'POSubType'=>$revenuetype,'IsQualityChkReqired'=>$Qualitycheck); //print_r($POList); $POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$revenuetype); @@ -375,12 +573,12 @@ $RequestedBy = $this->input->post('drpDepartment'); $TotalOrderValue = $this->input->post('TotalOrderValue'.$i); $revenuedescription = $this->input->post('service_description'.$i); $CostCenter = $this->input->post('costCode'.$i); - $Cgst = $this->input->post('RevenueCgst'.$i); - $Sgst = $this->input->post('RevenueSgst'.$i); - $Igst = $this->input->post('RevenueIgst'.$i); - $AfterCgst = $this->input->post('RevenueAfterCgst'.$i); - $AfterSgst = $this->input->post('RevenueAfterSgst'.$i); - $AfterIgst = $this->input->post('RevenueAfterIgst'.$i); + $Cgst = $this->input->post('RevenueCgst'.$i); + $Sgst = $this->input->post('RevenueSgst'.$i); + $Igst = $this->input->post('RevenueIgst'.$i); + $AfterCgst = $this->input->post('RevenueAfterCgst'.$i); + $AfterSgst = $this->input->post('RevenueAfterSgst'.$i); + $AfterIgst = $this->input->post('RevenueAfterIgst'.$i); $SkipInsert = "False"; if( count($comma_separated) > 0) { @@ -425,8 +623,231 @@ $RequestedBy = $this->input->post('drpDepartment'); } } - } - echo 'Purchase Order Created Successfully! PO Number Is: '.$PONO ; + } + + + if($txtspl==1 || $txtspl==2) + { + + //secho "cwwe"; + //die(); + + $PONOigr = $PONO; + + //echo $PONOigr; + //die(); + //IGR Data Entry + //$DeliveryChellanOrInvoiceNo = $this->input->post('ChallanInvNo'); + + $DeliveryChellanInvoiceNo=$this->input->post('ChallanInvNo'); + + $DeliveryChellan = $this->input->post('ChallanInvDate'); + $DeliveryChellanDate = $this->getDateformat($DeliveryChellan); + + $Vehicle = $this->input->post('VehicleNo'); + $Courier = $this->input->post('CourierNo'); + + + $CreatedBy = $this->session->userdata('userId'); + + $Remarksmrir='Emergency PO without Quality Check'; + //$Remarks = $this->input->post('Remarks'); + //$RowCount = $this->input->post('TextRowCount'); + //echo $RowCount; + $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); + $createddt = $dt->format('Y-m-d H:i:s'); + + $IGRStatus = IGR_CREATED; + + + + $igr = array(); + + $igr = array('PONO'=>$PONO,'VehicleNo'=>$Vehicle,'DeliveryChellanOrInvoiceNo'=>$DeliveryChellanInvoiceNo,'DeliveryChellanDate'=>$DeliveryChellanDate,'CourierNo'=>$Courier,'IGRStatus'=>$IGRStatus,'CreatedBy'=>$CreatedBy,'CreatedDate' =>$createddt); + + //print_r($igr); + + $igrM = $this->inwardgateregister_model->addigrM($igr); + + + + + $IGRNO = ''; + if(count($igrM)>0) + { + foreach ($igrM as $key ) + { + $IGRNO=$key->IGRNO; + } + } + // echo $IGRNO; + + + if($Qualitycheck==0) + { + + + $mrirmastervalues = array('MRIRStatus'=>MRIR_APPROVED,'IGRNO'=>$IGRNO,'PONO'=>$PONO,'CreatedBy'=>$CreatedBy,'Createdon'=>$createddt,'Remarks'=>$Remarksmrir); + + $mrirmaster = $this->mrir_model->master_mrir($mrirmastervalues); + + + $MRIRNO = ''; + + + if(count($mrirmaster)>0) + + { + foreach ($mrirmaster as $key ) { + + $MRIRNO=$key->MRIRNo; } + } + + + for ($i = 1; $i <= $RowCount; $i++) + { + + + $MaterialCode = $this->input->post('materialCode'.$i); + $Quantity = $this->input->post('quantity'.$i); + + $Remarked = "Special PO Without Quality Check"; + + $MRIRStatus=MRIR_APPROVED; + + + + //this array to store the value in child table.. + $mrirdetailvalues = array('MRIRNO'=>$MRIRNO,'MaterialCode'=>$MaterialCode,'ActualQuantityReceived'=>$Quantity,'Remarks'=>$Remarked,'MRIRStatus'=>$MRIRStatus); + + + //print_r($mrirdetailvalues); + //die(); + + $mrirdetails = $this->mrir_model->detail_mrir($mrirdetailvalues); + + + + + + $getAvailableqty = $this->mrir_model->getItemQuantityFromStock(trim($MaterialCode)); + + if(count($getAvailableqty)>0) + { + $avlQty = $getAvailableqty[0]['Quantity']; + } + + $updatStock = array('Quantity'=>($Quantity+$avlQty),'Status'=>'0','UpdatedOn'=>$createddt,'UpdatedBy'=>$CreatedBy,'Remarks'=>'Stock added for '. $MRIRNO); + + $this->mrir_model->UpdateStock($updatStock,trim($MaterialCode)); + + } + + } + + + + + $IGRItemStatus = REQITEM_NEW; + + + for ($i = 1; $i <= $RowCount; $i++) + { + + $MaterialCode = trim($this->input->post('materialCode'.$i)); + + $QuantityAsPerInvoice = $this->input->post('quantity'.$i); + + $OrderedQuantity = $this->input->post('quantity'.$i); + + $ReceivedQty = $this->input->post('AQuantity'.$i); + + $emergencyitemcode = $this->input->post('emergencyitemcode'); + + $PendingQty = 0; + //echo $QuantityAsPerInvoice; + //echo $PendingQty.'ReceivedQty'.$ReceivedQty; + //echo ' '; + + if(strlen($QuantityAsPerInvoice)>0 && $QuantityAsPerInvoice != '0') + { + $Remarks = "Special PO Created"; + $ItemStatus = ''; + //if($QuantityAsPerInvoice == $OrderedQuantity) + + if($PendingQty == 0.00 ) + + { + $ItemStatus = IGR_CREATED; + } + else + { + $ItemStatus = POLINEITEM_IGRPARTIAL_CREATED; + } + + $CreatedBy = $this->session->userdata('userId'); + + + $igrDetails = array('IGRNO'=>$IGRNO,'MaterialCode'=>$MaterialCode,'QuantityAsPerInvoice'=>$QuantityAsPerInvoice,'Remarks'=>$Remarks,'IGRItemStatus'=>$IGRItemStatus,'CreatedBy'=>$CreatedBy,'CreatedDate'=>$createddt); + + + //print_r($igrDetails); + + + + $igrD = $this->inwardgateregister_model->addigrD($igrDetails); + + $Recqty = $this->inwardgateregister_model->getPOLineItemReceivedQty($PONO,$MaterialCode); + $ReceivedQuantity = 0.00; + if(count($Recqty)>0) + { + foreach ($Recqty as $key ) { + $ReceivedQuantity=$key->ReceivedQuantity; + } + } + $totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice; + + //echo ''; + + $POLineItem = array('ReceivedQuantity'=>$totalReceivedqty,'Status'=>$ItemStatus,'UpdateBY'=>$CreatedBy,'UpdatedOn'=>$createddt ); + + $this->inwardgateregister_model->UpdatePOLineItem($POLineItem,$PONO,$MaterialCode); + } + + + // $file =$this->addfile(); + // $emergencyitemcode = $this->input->post('emergencyitemcode'.$i); + // ($this->input->post('materialCode'.$i)); + // $myfile = array('FilePath'=>$file,'MaterialCode'=>$emergencyitemcode,'PONO'=>$PONO,'IGRNO'=>$IGRNO); + // // print_r($myfile); + // $result= $this->purchaseorder_model->fileupload($myfile); + + + + + + + } + + + + $file =$this->addfile(); + $emergencyitemcode = $this->input->post('materialCode'.$i); + $myfile = array('FilePath'=>$file,'MaterialCode'=>$emergencyitemcode,'PONO'=>$PONO,'IGRNO'=>$IGRNO); + $result= $this->purchaseorder_model->fileupload($myfile); + + + + + } + + //if($result > 0) + // { + + + echo ""; + redirect('purchaseorder/PurchaseOrderList','refresh'); + // } } @@ -449,8 +870,18 @@ $RequestedBy = $this->input->post('drpDepartment'); $this->global['pageTitle'] = 'Resico : Purchase Orders'; + if($this->DEPCode == PURCHASE ) + { + $this->loadViews("POlist", $this->global, $data, NULL); + } + + else + { + $this->loadViews("access", $this->global, $data, NULL); + + } } function Req_validate($selectValue) { @@ -1137,6 +1568,3 @@ $RequestedBy = $this->input->post('drpDepartment'); } ?> - - - diff --git a/application/controllers/report.php b/application/controllers/report.php index 6f304d3a..852617c3 100755 --- a/application/controllers/report.php +++ b/application/controllers/report.php @@ -758,14 +758,12 @@ class report extends BaseController $this->global['pageTitle'] = 'Cashbook - Cashbook Reports - '; - + $data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal(); $data['getTotalServicePoCount'] = $this->dahsboard_Model->getTotalServicePoCount(); $data['getTotalimportPoCount'] = $this->dahsboard_Model->getTotalimportPoCount(); $data['getTotalcapitalPoCount'] = $this->dahsboard_Model->getTotalcapitalPoCount(); $data['getTotalrevenuePoCount'] = $this->dahsboard_Model->getTotalrevenuePoCount(); - $data['cashbook']=$this->dahsboard_Model->cashbook(); - $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - + $data['cashbook']=$this->dahsboard_Model->cashbook(); $income="INCOME"; $expense="EXPENSE"; @@ -775,16 +773,26 @@ class report extends BaseController $data['todayexpense']=$this->dahsboard_Model->today_data($expense); $data['yearincome']=$this->dahsboard_Model->yearwise_data($income); $data['yearexpense']=$this->dahsboard_Model->yearwise_data($expense); - + $data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal(); + $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + //print_r($data['gettoptotal1']); + // $data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data_income(); + // $data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data_expense(); + // $data['todayincome']=$this->dahsboard_Model->today_data_income(); + // $data['todayexpense']=$this->dahsboard_Model->today_data_expense(); + if($this->DEPCode == MANAGEMENT) - { - $this->loadviews("Reportcashbook",$this->global,$data, NULL); - } - else{ - $this->loadViews("access", $this->global, $data, NULL); - } + { + $this->loadviews("reportcashbook",$this->global,$data, NULL); + } + + else + { + $this->loadViews("access", $this->global, $data, NULL); + } } + public function monthexpenses() { @@ -795,13 +803,17 @@ class report extends BaseController $data['monthlyreport']=$this->dahsboard_Model->monthexpensereport(); // $data['monthlyincreport']=$this->dahsboard_Model->monthincomereport(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - if($this->DEPCode == MANAGEMENT) + + if($this->DEPCode == MANAGEMENT) { $this->loadviews("cashbookmonthlyexpenses",$this->global,$data, NULL); - } - else{ - $this->loadViews("access", $this->global, $data, NULL); - } + } + + else + { + $this->loadViews("access", $this->global, $data, NULL); + } + } public function yearexpenses() @@ -813,19 +825,21 @@ class report extends BaseController //$data['yearlyincreport']=$this->dahsboard_Model->yearincomereport(); $data['yearlyreport']=$this->dahsboard_Model->yearexpensereport(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - if($this->DEPCode == MANAGEMENT) - { - + + if($this->DEPCode == MANAGEMENT) + { $this->loadviews("cashbookyearlyexpenses",$this->global,$data, NULL); - } - else{ - $this->loadViews("access", $this->global, $data, NULL); - } + } + + else + { + $this->loadViews("access", $this->global, $data, NULL); + } } public function cashbookdepartment() { - $sid=$_GET['sid']; + $sid=$_GET['sid']; $d=$_GET['d']; $this->global['pageTitle'] = 'Cashbook - department - '; $data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d); @@ -833,29 +847,31 @@ class report extends BaseController //print_r($data['departmentwise']); if($this->DEPCode == MANAGEMENT) { + $this->loadviews("cashbookmonthlydep",$this->global,$data, NULL); +} - $this->loadviews("cashbookmonthlydep",$this->global,$data, NULL); -} -else{ - $this->loadViews("access", $this->global, $data, NULL); -} + else + { + $this->loadViews("access", $this->global, $data, NULL); + } } //for cashbook menu link// public function cashbookmonthmenu() { - $this->global['pageTitle'] = 'Cashbook - department - '; - $data['monthlymenupayments']=$this->dahsboard_Model->monthlypayments(); + $this->global['pageTitle'] = 'Cashbook monthly '; + $data['yearmonthwise']=$this->dahsboard_Model->yearmonthwise(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); //print_r($data['departmentwise']); if($this->DEPCode == MANAGEMENT) { + $this->loadviews("cashbookyearmonthwise",$this->global,$data, NULL); +} - $this->loadviews("cashbookmonthmenu",$this->global,$data, NULL); -} -else{ - $this->loadViews("access", $this->global, $data, NULL); -} + else + { + $this->loadViews("access", $this->global, $data, NULL); + } } public function yearmonthwise() { @@ -866,27 +882,30 @@ else{ //print_r($data['departmentwise']); if($this->DEPCode == MANAGEMENT) { - $this->loadviews("cashbookyearmonthwise",$this->global,$data, NULL); } -else{ - $this->loadViews("access", $this->global, $data, NULL); -} + + else + { + $this->loadViews("access", $this->global, $data, NULL); + } } public function Viewtoday() { $this->global['pageTitle'] = 'Cashbook - viewtoday '; $data['tdy']=$this->dahsboard_Model->today(); - $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); if($this->DEPCode == MANAGEMENT) { - $this->loadviews("cashbooktoday",$this->global,$data, NULL); } -else{ - $this->loadViews("access", $this->global, $data, NULL); -} + + else + { + $this->loadViews("access", $this->global, $data, NULL); + } } } -?> \ No newline at end of file +?> + diff --git a/application/models/dahsboard_model.php b/application/models/dahsboard_model.php index 368af01f..0511bd55 100755 --- a/application/models/dahsboard_model.php +++ b/application/models/dahsboard_model.php @@ -1380,116 +1380,117 @@ group by supplier_name,material_name"; $query = $this->db->query($sql); return $query->result(); } - function cashbook() - { - $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,tinc.description,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code "; - $query = $this->db->query($sql); - return $query->result(); - } - - function monthexpensereport() - { - $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,sum(tinc.total)as total,monthname(tinc.date)as month,tinc.towhom,tinc.description,tinc.account_code, ac.name FROM t_income_expense as tinc join t_accountcode ac on ac.code=tinc.account_code where tinc.type='EXPENSE' and month(tinc.date)= month(current_date()) group by account_code order by total desc limit 10 "; - $query = $this->db->query($sql); - return $query->result(); - - } - - function yearexpensereport() - { - $sql="SELECT date_format(date,'%d-%m-%Y')as date,type,sum(total)as total,towhom,description,account_code,monthname(date)as month FROM t_income_expense where type='EXPENSE' and year(date)= year(current_date()) group by month order by total desc limit 10 "; - $query = $this->db->query($sql); - return $query->result(); - - } - function today_data($value='') - { - $sql="SELECT type,Sum(total) as todaydata FROM t_income_expense WHERE type = ? AND DATE(date) = CURRENT_DATE"; - $query = $this->db->query($sql,array($value)); - return $query->result(); - - } - - function monthwise_data($value='') - { - $sql="SELECT type,Sum(total) as monthlydata FROM t_income_expense WHERE type = ? AND MONTH(date) = MONTH(curdate())"; - $query = $this->db->query($sql,array($value)); - return $query->result(); - - } - function yearwise_data($value='') - { - - $sql="SELECT type,sum(total) as yearlydata from t_income_expense - where - type = ? and ((YEAR(date) = YEAR(CURRENT_DATE) and MONTH(date) >= 4) or (YEAR(date) = YEAR(CURRENT_DATE)+1 and MONTH(date) <= 3))"; - $query = $this->db->query($sql,array($value)); - return $query->result(); - - } - function departmentwise($sid='',$d='') - { - $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,.tinc.description, ac.name FROM - t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code - WHERE account_code = '$sid' and monthname(date)='$d'"; - $query = $this->db->query($sql,array($sid)); - //print_r($this->db->last_query()); - return $query->result(); - - } - function yearmonthwise($sid='') - { - $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,sum(tinc.total)as total,tinc.description,tinc.towhom,tinc.account_code,ac.name FROM t_income_expense tinc - join t_accountcode ac on ac.code=tinc.account_code - WHERE monthname(date) = ? group by account_code"; - $query = $this->db->query($sql,array($sid)); - //print_r($this->db->last_query()); - return $query->result(); - - } - //for dashboard graph in cashbook// - function gettoptotal(){ - $i=1; - - while($i<=12){ - $sql="SELECT sum(total) as tot FROM t_income_expense where month(date)= $i"; - // $sql="SELECT sum(total)as ttl,concat(sum(total),'-',account_code)as atotal FROM t_income_expense where month(date)= $i - // group by account_code order by ttl desc limit 4"; - - $query = $this->db->query($sql); - //print_r($this->db->last_query()); - //return $query->result(); - $array_result[]=$query->result(); - $i++; - + function cashbook() + { + $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,tinc.description,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code where tinc.type='EXPENSE'"; + $query = $this->db->query($sql); + return $query->result(); } - - return $array_result; - + + function monthexpensereport() + { + $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,sum(tinc.total)as total,tinc.towhom,tinc.description,tinc.account_code,monthname(tinc.date)as month,ac.name FROM t_income_expense as tinc join t_accountcode ac on ac.code=tinc.account_code where tinc.type='EXPENSE' and month(tinc.date)= month(current_date()) group by account_code order by total desc limit 10 "; + $query = $this->db->query($sql); + return $query->result(); + + } + + function yearexpensereport() + { + $sql="SELECT date_format(date,'%d-%m-%Y')as date,type,sum(total)as total,towhom,description,account_code,monthname(date)as month FROM t_income_expense where type='EXPENSE' and year(date)= year(current_date()) group by month order by total desc limit 10 "; + $query = $this->db->query($sql); + return $query->result(); + + } + function today_data($value='') + { + $sql="SELECT type,Sum(total) as todaydata FROM t_income_expense WHERE type = ? AND DATE(date) = CURRENT_DATE"; + $query = $this->db->query($sql,array($value)); + return $query->result(); + + } + + function monthwise_data($value='') + { + $sql="SELECT type,Sum(total) as monthlydata FROM t_income_expense WHERE type = ? AND MONTH(date) = MONTH(curdate())"; + $query = $this->db->query($sql,array($value)); + return $query->result(); + + } + function yearwise_data($value='') + { + + $sql="SELECT type,sum(total) as yearlydata from t_income_expense + where + type = ? and ((YEAR(date) = YEAR(CURRENT_DATE) and MONTH(date) >= 4) or (YEAR(date) = YEAR(CURRENT_DATE)+1 and MONTH(date) <= 3))"; + $query = $this->db->query($sql,array($value)); + return $query->result(); + + } + function departmentwise($sid='',$d='') + { + $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,.tinc.description, ac.name FROM + t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code + WHERE tinc.type='EXPENSE' and account_code = '$sid' and monthname(date)='$d'"; + $query = $this->db->query($sql); + //print_r($this->db->last_query()); + //echo $sql; + return $query->result(); + + } + function yearmonthwise($sid='') + { + $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,sum(tinc.total)as total,monthname(tinc.date)as month,tinc.description,tinc.towhom,tinc.account_code,ac.name FROM t_income_expense tinc + join t_accountcode ac on ac.code=tinc.account_code + WHERE tinc.type='EXPENSE' and monthname(date) = ? group by account_code"; + $query = $this->db->query($sql,array($sid)); + //print_r($this->db->last_query()); + return $query->result(); + + } + //for dashboard graph in cashbook// + function gettoptotal(){ + $i=1; + + while($i<=12){ + $sql="SELECT sum(total) as tot FROM t_income_expense where month(date)= $i"; +// $sql="SELECT sum(total)as ttl,concat(sum(total),'-',account_code)as atotal FROM t_income_expense where month(date)= $i +// group by account_code order by ttl desc limit 4"; + + $query = $this->db->query($sql); + //print_r($this->db->last_query()); + //return $query->result(); + $array_result[]=$query->result(); + $i++; + + } + + return $array_result; + } function INRSymbol() - { - $sql='select FontCode2000 from T_Currency_Details where Currency_Code="INR"'; - $query=$this->db->query($sql); - return $query->result(); - } - function today() - { - $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,tinc.description,tinc.account_code,tac.name FROM t_income_expense tinc - LEFT JOIN t_accountcode tac ON tac.code = tinc.account_code - WHERE DATE(date) = CURRENT_DATE"; + { + $sql='select FontCode2000 from T_Currency_Details where Currency_Code="INR"'; + $query=$this->db->query($sql); + return $query->result(); + } + function today() + { + $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,tinc.description,tinc.account_code,tac.name FROM t_income_expense tinc + LEFT JOIN t_accountcode tac ON tac.code = tinc.account_code + WHERE DATE(date) = CURRENT_DATE"; + $query = $this->db->query($sql); + return $query->result(); + } + //for menu link in monthly payments// + function monthlypayments() + { + $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,.tinc.description, ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code WHERE MONTH(date) = MONTH(curdate()) group by account_code"; $query = $this->db->query($sql); - return $query->result(); - } - //for menu link in monthly payments// - function monthlypayments() - { - $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,.tinc.description, ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code WHERE MONTH(date) = MONTH(curdate()) group by account_code"; - $query = $this->db->query($sql); - //print_r($this->db->last_query()); - return $query->result(); - - } - + //print_r($this->db->last_query()); + return $query->result(); + + } + } ?> \ No newline at end of file diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php old mode 100644 new mode 100755 index bc3bb205..cb0cb48a --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -20,6 +20,38 @@ class purchaseorder_model extends CI_Model return $query->result(); } + + + + function fileupload($myfile) + { + $this->db->insert('T_PurchaseOrder_BillUpload',$myfile); + $myfile=$this->db->affected_rows(); + return $myfile; + } + + + + function getfunction($pono) + { + $this->db->distinct(); + $this->db->select('bill.PONO,mstr.IGRNO,bill.BillNo,,bill.FilePath,mstr.DeliveryChellanOrInvoiceNo,mstr.DeliveryChellanDate,mstr.VehicleNo,mstr.CourierNo,dtl.QuantityAsPerInvoice,pom.POType'); + $this->db->from('T_PurchaseOrder_BillUpload bill'); + $this->db->join('T_IGR_Master mstr','bill.PONO = mstr.PONO','left'); + $this->db->join('T_IGR_Details dtl','mstr.IGRNO = dtl.IGRNO','left'); + // $this->db->join('T_MaterialMaster mm','mm.MaterialCode = bill.MaterialCode'); + $this->db->join('T_PurchaseOrder_Master pom','pom.PONO = bill.PONO'); + $this->db->where('bill.PONO',$pono); + //$this->db->or_where('pom.status',SPECIAL_PO); + //$this->db->group_by('bill.BillNo'); + + $query = $this->db->get(); + + return $query->result(); + } + + + function GetPODetailforBillingServicePO($PONO) { @@ -45,7 +77,7 @@ class purchaseorder_model extends CI_Model function GetServicePOListforBilling() { - $subQuery ='select POMast.PONO,supp.SupplierName,PODate,POMast.PaymentTerms,POMast.ServiceWorkStatusRemarks, + $subQuery ='select POMast.PONO,supp.SupplierName,PODate,POMast.PaymentTerms,POMast.ServiceWorkStatusRemarks,StatusName,POMast.CapitalRange,POType, LineItem.*,mat.MaterialName,mat.UOM,emp.FirstName,emp.LastName,Tax.TotalValue,Cost.CostCenterName,AdvanceAmount ,Dept.DepartmentName from T_PurchaseOrder_Master POMast join T_PurchaseOrder_LineItem LineItem on LineItem.PONO = POMast.PONO diff --git a/application/views/alterpurchaseorder.php b/application/views/alterpurchaseorder.php index ba0e67b3..3cdaa362 100644 --- a/application/views/alterpurchaseorder.php +++ b/application/views/alterpurchaseorder.php @@ -31,12 +31,19 @@ if(!empty($INRSYMBOL)) } } + ?> + + + + + + + function dropdownselect(){ + + var itemvalue = new Array(); + var itemname = new Array(); + var servalue = new Array(); + var sername = new Array(); + var reqType = $('#purpose').val(); + var x = 0; + var y = 0; + var z = $('#RevenueAppend tr').length; + var zz = $('#ServiceAppend tr').length; + var options=''; +// alert(z); +// var values = array(0,15,30,45); +// var name =array(zero,five,three,four); +// for(var j=1;j' + itemvalue[j] + '-' + itemname[j] + ''; + +// } + if( reqType == 'REVENUE') + { + $("#serviceTax tr:gt(0) td:nth-child(3)").each(function(){ + var temp=$(this).html(); + if($.inArray(temp, itemvalue) < 0) + { + itemvalue[x]=temp; + x++; + + } + }); + + $("#serviceTax tr:gt(0) td:nth-child(4)").each(function(){ + var temp2=$(this).html(); + if($.inArray(temp2, itemname) < 0) + { + itemname[y]=temp2; + y++; + + } + }); + + //alert(x); + + for(var i=0;i' + itemvalue[i] + ' - ' + itemname[i] + ''; + } + + //$("#emergency_itemcode").append( $('').val(options).html(option)); + $("#emergencyitemcode").html(options); +} + else if(reqType == 'SERVICE') + { + + $("#serviceTax tr:gt(0) td:nth-child(3)").each(function(){ + var temp3=$(this).html(); + if($.inArray(temp3, itemvalue) < 0) + { + itemvalue[x]=temp3; + x++; + + } + }); + + for(var j=0;j' + itemvalue[j] + ''; + } + + $("#serviceitemcode").html(options); + + } + else{ + } +} + + + + + + + \ No newline at end of file diff --git a/application/views/cashbookmonthlydep.php b/application/views/cashbookmonthlydep.php index 856437d4..5df8f493 100644 --- a/application/views/cashbookmonthlydep.php +++ b/application/views/cashbookmonthlydep.php @@ -1,135 +1,135 @@ - - -FontCode2000; - }} - ?> - - - - -
- - -
-
-
-
-
Department Monthly Payments
-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DateAccount NamePaid Type Amount Description
date?>name?>type?>total,2,'.','');?>description?>
-
-
-
-
-
-
- - - - - - - - - - - - + + +FontCode2000; + }} + ?> + + + + +
+ + +
+
+
+
+
Monthly(Department Wise) Payments
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateAccount NamePaid Type Amount Description
date?>name?>type?>total,2,'.','');?>description?>
+
+
+
+
+
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/cashbookmonthlyexpenses.php b/application/views/cashbookmonthlyexpenses.php index adf3005f..d1abc7a7 100644 --- a/application/views/cashbookmonthlyexpenses.php +++ b/application/views/cashbookmonthlyexpenses.php @@ -1,138 +1,137 @@ -FontCode2000; - }} - - -if(!empty($monthlyreport)) -{ - -} -if(!empty($monthlyincreport)) -{ - -} -?> - - - -
- - -
-
-
-
-
Monthly Payments
-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DatePaid ToPaid Type Amount
date?>name?>type?>total,2,'.','');?>
-
-
-
-
-
-
- - - - - - - - - - - - +FontCode2000; + }} + + +if(!empty($monthlyreport)) +{ + +} +if(!empty($monthlyincreport)) +{ + +} +?> + + + +
+ + +
+
+
+
+
Monthly Payments
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DatePaid ToPaid Type Amount
date?>name?>type?>total,2,'.','');?>
+
+
+
+
+
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/cashbookmonthmenu.php b/application/views/cashbookmonthmenu.php index d5675a6d..5114d0bb 100644 --- a/application/views/cashbookmonthmenu.php +++ b/application/views/cashbookmonthmenu.php @@ -1,83 +1,83 @@ -FontCode2000; - }} -?> - -
-
-
-
-

Caskbook - "Monthly Payments"

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

Caskbook - "Monthly Payments"

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DatePaid ToPaid Type Amount
date?>name ?>type?>total,2,'.','');?>
+ +
+
+
+
+
+
+ + diff --git a/application/views/cashbooktoday.php b/application/views/cashbooktoday.php index 26ceec68..8323cf9c 100644 --- a/application/views/cashbooktoday.php +++ b/application/views/cashbooktoday.php @@ -1,82 +1,82 @@ - -FontCode2000; - }} -?> -
-
-
-
-

Caskbook - "Today's Payments"

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

Today's Payment

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DatePaid ToPaid Type Amount Description
date?>name ?>type?>total,2,'.','');?>description?>
+ +
+
+
+
+
+
+ + diff --git a/application/views/cashbookyearlyexpenses.php b/application/views/cashbookyearlyexpenses.php index ee9b1a4a..d47907a4 100644 --- a/application/views/cashbookyearlyexpenses.php +++ b/application/views/cashbookyearlyexpenses.php @@ -1,121 +1,121 @@ -FontCode2000; - }} -?> - - - - - -
-
-
-
-
Yearly Payments
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MonthPaid Type Amount
month?>type?>total,2,'.','');?>
- -
-
-
-
- - - - - - - - - - - +FontCode2000; + }} +?> + + + + + +
+
+
+
+
Yearly Payments
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MonthPaid Type Amount
month?>type?>total,2,'.','');?>
+ +
+
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/cashbookyearmonthwise.php b/application/views/cashbookyearmonthwise.php index c34aaa3e..0b4edb39 100644 --- a/application/views/cashbookyearmonthwise.php +++ b/application/views/cashbookyearmonthwise.php @@ -1,126 +1,125 @@ - -FontCode2000; - }} - ?> - - - - -
-
-
-
-
Yearly Payments
-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DateAccount NamePaid Type Amount
date?>name?>type?>total,2,'.','');?>
-
-
-
-
- - -
- - - - - - - - - + +FontCode2000; + }} + ?> + + + + +
+
+
+
+
Monthly Payments
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account NamePaid Type Amount
name?>type?>total,2,'.','');?>
+
+
+
+
+ + +
+ + + + + + + + + \ No newline at end of file diff --git a/application/views/Reportcashbook.php b/application/views/reportcashbook.php similarity index 84% rename from application/views/Reportcashbook.php rename to application/views/reportcashbook.php index 8cda20a8..359dfa66 100644 --- a/application/views/Reportcashbook.php +++ b/application/views/reportcashbook.php @@ -1,462 +1,499 @@ - - -todaydata; - }} - - if(!empty($todayexpense)) - { - foreach ($todayexpense as $te) - { - $today_ex=$te->todaydata; - }} - - if(!empty($monthlywiseincome)) - { - foreach ($monthlywiseincome as $mi) - { - $month_in = $mi->monthlydata; - }} - - if(!empty($monthlywiseexpense)) - { - foreach ($monthlywiseexpense as $me) - { - $month_ex = $me->monthlydata; - }} - if(!empty($yearexpense)) - { - foreach ($yearexpense as $ye) - { - $year_ex=$ye->yearlydata; - }} - - if(!empty($yearincome)) - { - foreach ($yearincome as $yi) - { - $year_in = $yi->yearlydata; - }} - - $inrsymbol=''; - if(!empty($Indiancurrency)) - { - foreach ($Indiancurrency as $inr) - { - $inrsymbol = $inr->FontCode2000; - }} - - -?> - - - - - - - - -
- - - - -
- -
-
- - -
-
-
- -
- - - - - -
-
-
- - -
-
-
- -
- - - -
-
-
- - -
-
-
- -
- - - -
-
-
-
-
- -
- - - - - - - - -
- -
- - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DateAccount NamePaid ToPaid Type Amount Description
date?>name?>towhom?>type?>total,2,'.','');?>description?>
- -
-
-
- -
- - - - - - - - - - - - - - - - - - - - - - + + +todaydata; + }} + + if(!empty($todayexpense)) + { + foreach ($todayexpense as $te) + { + $today_ex=$te->todaydata; + }} + + if(!empty($monthlywiseincome)) + { + foreach ($monthlywiseincome as $mi) + { + $month_in = $mi->monthlydata; + }} + + if(!empty($monthlywiseexpense)) + { + foreach ($monthlywiseexpense as $me) + { + $month_ex = $me->monthlydata; + }} + if(!empty($yearexpense)) + { + foreach ($yearexpense as $ye) + { + $year_ex=$ye->yearlydata; + }} + + if(!empty($yearincome)) + { + foreach ($yearincome as $yi) + { + $year_in = $yi->yearlydata; + }} + + $inrsymbol=''; + if(!empty($Indiancurrency)) + { + foreach ($Indiancurrency as $inr) + { + $inrsymbol = $inr->FontCode2000; + }} + + +?> + + + + + + + + +
+
+ + + +
+ +
+
+ + +
+
+
+ +
+ + + Receipt : + Payments : + +
+
+
+ + +
+
+
+ +
+ + Receipt : + Payments : +
+
+
+ + +
+
+
+ +
+ + Receipt : + Payments : +
+
+
+
+
+ +
+ + + + + + + + + +
+ +
+ + + + + + + +

Day Wise Payments

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateAccount NamePaid ToPaid Type Amount Description
date?>name?>towhom?>type?>total,2,'.',''); + echo number_format($cash->total,2,'.','');?>description?>
Total    + + +  
+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +