cashbook report changes

This commit is contained in:
venbatechnologies@gmail.com 2017-12-07 17:05:43 +05:30
parent 0575d918e2
commit e844533b53
12 changed files with 2695 additions and 1391 deletions

View File

@ -22,6 +22,8 @@ class emergencypurchaseorder extends BaseController
$this->load->library('session'); $this->load->library('session');
$this->load->library('form_validation'); $this->load->library('form_validation');
$this->load->model('requistion_model'); $this->load->model('requistion_model');
$this->load->model('inwardgateregister_model');
$this->load->model('mrir_model');
$this->isLoggedIn(); $this->isLoggedIn();
} }
@ -68,8 +70,19 @@ class emergencypurchaseorder extends BaseController
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7); $data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
$data['ServiceOption'] = $this->requistion_model->getConfigValue('C022'); $data['ServiceOption'] = $this->requistion_model->getConfigValue('C022');
$data['PoTypeOptions'] = $this->purchaseorder_model->getConfigValue('C026'); $data['PoTypeOptions'] = $this->purchaseorder_model->getConfigValue('C026');
if($this->DEPCode == PURCHASE )
{
$this->loadViews("alterpurchaseorder", $this->global, $data, Null); $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 * 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 //This used to Create Service Purchase Order
function addNewServicePurchaseOrder() function addNewServicePurchaseOrder()
{ {
//echo "t54";
//die();
$txtRowCount=$this->input->post('txtRowCount');
$POdt =$this->input->post('PODate'); $POdt =$this->input->post('PODate');
$PODate = $this->getDateformat($POdt); $PODate = $this->getDateformat($POdt);
$SupplierID = $this->input->post('drpSupplier'); $SupplierID = $this->input->post('drpSupplier');
@ -105,35 +211,74 @@ class emergencypurchaseorder extends BaseController
$DeliveryOption = $this->input->post('DateRange'); $DeliveryOption = $this->input->post('DateRange');
$DeliverySchedule=''; $DeliverySchedule='';
$Deliverydt = $this->getDateformat($POdt); $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'); $POType = $this->input->post('POType');
$SpcialInstruction = $this->input->post('ScopeOfWork'); $SpcialInstruction = $this->input->post('ScopeOfWork');
$RequistionComments = "Created Emergency Service PO"; $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'); $CreateBy = $this->session->userdata ('userId');
$RequestedBy = $this->input->post('drpDepartment'); $RequestedBy = $this->input->post('drpDepartment');
$ReqStatus = REQITEM_Emergency_PO_CREATED; $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); $comma_separated = explode(':', $DeletedRow);
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s'); $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'); $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'); $ServiceScheduleType = $this->input->post('ScheduleType');
$ServiceScheduleOptions = $this->input->post('ScheduleType'); $ServiceScheduleOptions = $this->input->post('ScheduleType');
//$ServiceServiceNo = $this->input->post('ServiceNo'); //$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) 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 "<script>alert('You Have Successfully Saved the Purchase order! $PONO');</script>";
redirect('purchaseorder/PurchaseOrderList','refresh');
} }
else 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 "<script>alert('You Have Successfully created the Purchase order! $PONO');</script>";
redirect('purchaseorder/PurchaseOrderList','refresh');
} }
@ -271,6 +434,9 @@ class emergencypurchaseorder extends BaseController
//This used to Create Revenue Emergency Purchase Order //This used to Create Revenue Emergency Purchase Order
function addNewRevenuePurchaseOrder() function addNewRevenuePurchaseOrder()
{ {
$txtspl=$this->input->post('txtSpecial');
//echo "Emergency Revenue PO"; //echo "Emergency Revenue PO";
$POdt =$this->input->post('PODate'); $POdt =$this->input->post('PODate');
@ -307,12 +473,33 @@ class emergencypurchaseorder extends BaseController
$SpcialInstruction = $this->input->post('txtSpcialInstruction'); $SpcialInstruction = $this->input->post('txtSpcialInstruction');
$RequistionComments = "Created Emergency Revenue PO"; $RequistionComments = "Created Emergency Revenue PO";
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary'); $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'); $RequestedBy = $this->input->post('drpDepartment');
$CreateBy = $this->session->userdata ( 'userId' ); $CreateBy = $this->session->userdata ( 'userId' );
$RowCount = $this->input->post('TextRowCount'); // $RowCount = $this->input->post('TextRowCount');
$RowCount=$this->input->post('txtRowCount1');
//echo $RowCount; //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; $ReqStatus = REQITEM_Emergency_PO_CREATED;
$Local_Interstate=$this->input->post('Range'); $Local_Interstate=$this->input->post('Range');
@ -322,8 +509,19 @@ $RequestedBy = $this->input->post('drpDepartment');
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s'); $createddt = $dt->format('Y-m-d H:i:s');
$PaymentTerms=$this->input->post('PaymentMethod'); $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 //add requistion
$Request = array('ReqType'=>$POType, 'RequestedDept'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$RequistionComments,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy); $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']; $RegNo = $Req[0]['ReqNo'];
} }
// PO Master // 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); //print_r($POList);
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$revenuetype); $POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$revenuetype);
@ -375,12 +573,12 @@ $RequestedBy = $this->input->post('drpDepartment');
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i); $TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
$revenuedescription = $this->input->post('service_description'.$i); $revenuedescription = $this->input->post('service_description'.$i);
$CostCenter = $this->input->post('costCode'.$i); $CostCenter = $this->input->post('costCode'.$i);
$Cgst = $this->input->post('RevenueCgst'.$i); $Cgst = $this->input->post('RevenueCgst'.$i);
$Sgst = $this->input->post('RevenueSgst'.$i); $Sgst = $this->input->post('RevenueSgst'.$i);
$Igst = $this->input->post('RevenueIgst'.$i); $Igst = $this->input->post('RevenueIgst'.$i);
$AfterCgst = $this->input->post('RevenueAfterCgst'.$i); $AfterCgst = $this->input->post('RevenueAfterCgst'.$i);
$AfterSgst = $this->input->post('RevenueAfterSgst'.$i); $AfterSgst = $this->input->post('RevenueAfterSgst'.$i);
$AfterIgst = $this->input->post('RevenueAfterIgst'.$i); $AfterIgst = $this->input->post('RevenueAfterIgst'.$i);
$SkipInsert = "False"; $SkipInsert = "False";
if( count($comma_separated) > 0) 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 "<script>alert('You Have Successfully created the Purchase order! $PONO');</script>";
redirect('purchaseorder/PurchaseOrderList','refresh');
// }
} }
@ -449,8 +870,18 @@ $RequestedBy = $this->input->post('drpDepartment');
$this->global['pageTitle'] = 'Resico : Purchase Orders'; $this->global['pageTitle'] = 'Resico : Purchase Orders';
if($this->DEPCode == PURCHASE )
{
$this->loadViews("POlist", $this->global, $data, NULL); $this->loadViews("POlist", $this->global, $data, NULL);
}
else
{
$this->loadViews("access", $this->global, $data, NULL);
}
} }
function Req_validate($selectValue) function Req_validate($selectValue)
{ {
@ -1137,6 +1568,3 @@ $RequestedBy = $this->input->post('drpDepartment');
} }
?> ?>

View File

@ -758,14 +758,12 @@ class report extends BaseController
$this->global['pageTitle'] = 'Cashbook - Cashbook Reports - '; $this->global['pageTitle'] = 'Cashbook - Cashbook Reports - ';
$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();
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
$income="INCOME"; $income="INCOME";
$expense="EXPENSE"; $expense="EXPENSE";
@ -775,16 +773,26 @@ class report extends BaseController
$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['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) if($this->DEPCode == MANAGEMENT)
{ {
$this->loadviews("Reportcashbook",$this->global,$data, NULL); $this->loadviews("reportcashbook",$this->global,$data, NULL);
} }
else{
$this->loadViews("access", $this->global, $data, NULL); else
} {
$this->loadViews("access", $this->global, $data, NULL);
}
} }
public function monthexpenses() public function monthexpenses()
{ {
@ -795,13 +803,17 @@ class report extends BaseController
$data['monthlyreport']=$this->dahsboard_Model->monthexpensereport(); $data['monthlyreport']=$this->dahsboard_Model->monthexpensereport();
// $data['monthlyincreport']=$this->dahsboard_Model->monthincomereport(); // $data['monthlyincreport']=$this->dahsboard_Model->monthincomereport();
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
if($this->DEPCode == MANAGEMENT)
if($this->DEPCode == MANAGEMENT)
{ {
$this->loadviews("cashbookmonthlyexpenses",$this->global,$data, NULL); $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() public function yearexpenses()
@ -813,19 +825,21 @@ class report extends BaseController
//$data['yearlyincreport']=$this->dahsboard_Model->yearincomereport(); //$data['yearlyincreport']=$this->dahsboard_Model->yearincomereport();
$data['yearlyreport']=$this->dahsboard_Model->yearexpensereport(); $data['yearlyreport']=$this->dahsboard_Model->yearexpensereport();
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
if($this->DEPCode == MANAGEMENT)
{ if($this->DEPCode == MANAGEMENT)
{
$this->loadviews("cashbookyearlyexpenses",$this->global,$data, NULL); $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() public function cashbookdepartment()
{ {
$sid=$_GET['sid']; $sid=$_GET['sid'];
$d=$_GET['d']; $d=$_GET['d'];
$this->global['pageTitle'] = 'Cashbook - department - '; $this->global['pageTitle'] = 'Cashbook - department - ';
$data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d); $data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d);
@ -833,29 +847,31 @@ class report extends BaseController
//print_r($data['departmentwise']); //print_r($data['departmentwise']);
if($this->DEPCode == MANAGEMENT) if($this->DEPCode == MANAGEMENT)
{ {
$this->loadviews("cashbookmonthlydep",$this->global,$data, NULL);
}
$this->loadviews("cashbookmonthlydep",$this->global,$data, NULL); else
} {
else{ $this->loadViews("access", $this->global, $data, NULL);
$this->loadViews("access", $this->global, $data, NULL); }
}
} }
//for cashbook menu link// //for cashbook menu link//
public function cashbookmonthmenu() public function cashbookmonthmenu()
{ {
$this->global['pageTitle'] = 'Cashbook - department - '; $this->global['pageTitle'] = 'Cashbook monthly ';
$data['monthlymenupayments']=$this->dahsboard_Model->monthlypayments(); $data['yearmonthwise']=$this->dahsboard_Model->yearmonthwise();
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
//print_r($data['departmentwise']); //print_r($data['departmentwise']);
if($this->DEPCode == MANAGEMENT) if($this->DEPCode == MANAGEMENT)
{ {
$this->loadviews("cashbookyearmonthwise",$this->global,$data, NULL);
}
$this->loadviews("cashbookmonthmenu",$this->global,$data, NULL); else
} {
else{ $this->loadViews("access", $this->global, $data, NULL);
$this->loadViews("access", $this->global, $data, NULL); }
}
} }
public function yearmonthwise() public function yearmonthwise()
{ {
@ -866,27 +882,30 @@ else{
//print_r($data['departmentwise']); //print_r($data['departmentwise']);
if($this->DEPCode == MANAGEMENT) if($this->DEPCode == MANAGEMENT)
{ {
$this->loadviews("cashbookyearmonthwise",$this->global,$data, NULL); $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() 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();
if($this->DEPCode == MANAGEMENT) if($this->DEPCode == MANAGEMENT)
{ {
$this->loadviews("cashbooktoday",$this->global,$data, NULL); $this->loadviews("cashbooktoday",$this->global,$data, NULL);
} }
else{
$this->loadViews("access", $this->global, $data, NULL); else
} {
$this->loadViews("access", $this->global, $data, NULL);
}
} }
} }
?> ?>

View File

@ -1380,116 +1380,117 @@ group by supplier_name,material_name";
$query = $this->db->query($sql); $query = $this->db->query($sql);
return $query->result(); return $query->result();
} }
function cashbook() 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 "; $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); $query = $this->db->query($sql);
return $query->result(); 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++;
} }
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() function INRSymbol()
{ {
$sql='select FontCode2000 from T_Currency_Details where Currency_Code="INR"'; $sql='select FontCode2000 from T_Currency_Details where Currency_Code="INR"';
$query=$this->db->query($sql); $query=$this->db->query($sql);
return $query->result(); return $query->result();
} }
function today() 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 $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 LEFT JOIN t_accountcode tac ON tac.code = tinc.account_code
WHERE DATE(date) = CURRENT_DATE"; 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); $query = $this->db->query($sql);
return $query->result(); //print_r($this->db->last_query());
} 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();
}
} }
?> ?>

34
application/models/purchaseorder_model.php Normal file → Executable file
View File

@ -20,6 +20,38 @@ class purchaseorder_model extends CI_Model
return $query->result(); 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) function GetPODetailforBillingServicePO($PONO)
{ {
@ -45,7 +77,7 @@ class purchaseorder_model extends CI_Model
function GetServicePOListforBilling() 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 LineItem.*,mat.MaterialName,mat.UOM,emp.FirstName,emp.LastName,Tax.TotalValue,Cost.CostCenterName,AdvanceAmount
,Dept.DepartmentName from T_PurchaseOrder_Master POMast ,Dept.DepartmentName from T_PurchaseOrder_Master POMast
join T_PurchaseOrder_LineItem LineItem on LineItem.PONO = POMast.PONO join T_PurchaseOrder_LineItem LineItem on LineItem.PONO = POMast.PONO

File diff suppressed because it is too large Load Diff

View File

@ -1,135 +1,135 @@
<?php <?php
if(!empty($departmentwise)) if(!empty($departmentwise))
{ {
} }
$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/buttons/1.3.1/css/buttons.dataTables.min.css">
<style> <style>
.dataTables_filter { .dataTables_filter {
width: 50%; width: 50%;
float: right; float: right;
text-align: right; text-align: right;
} }
.dataTables_paginate { .dataTables_paginate {
width: 50%; width: 50%;
float: right; float: right;
text-align: right; text-align: right;
} }
div.dt-buttons { div.dt-buttons {
position: relative; position: relative;
float: right; float: right;
} }
</style> </style>
<div class="row" style="min-height: 600px;"> <div class="row" style="min-height: 600px;">
<div class="content-wrapper"> <div class="content-wrapper">
<div class="col-md-8 col-md-offset-2"> <div class="col-md-10 col-md-offset-1">
<div id="panel-quick-actions" class="panel panel-default quick-actions"> <div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading"> <div class="panel-heading">
<center><b>Department Monthly Payments</b></center> <center><b> Monthly(Department Wise) Payments</b></center>
</div> </div>
<div class="btn-group btn-group-justified no-margin"> <div class="btn-group btn-group-justified no-margin">
<div> <div>
<table class="table table-bordered table-hover" id="req" style="font-size:13px;"> <table class="table table-bordered table-hover" id="req" style="font-size:13px;">
<thead> <thead>
<tr> <tr>
<th>Date</th> <th>Date</th>
<!--<th>Account Code</th>--> <!--<th>Account Code</th>-->
<th>Account Name</th> <th>Account Name</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>
<th>Description</th> <th>Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php if(!empty($departmentwise)){ <?php if(!empty($departmentwise)){
foreach($departmentwise as $dw) foreach($departmentwise as $dw)
{ {
?> ?>
<tr> <tr>
<td><span><?php echo $dw->date?></span></td> <td><span><?php echo $dw->date?></span></td>
<!--<td align="left"><span><?php echo $dw->account_code?></span></td>--> <!--<td align="left"><span><?php echo $dw->account_code?></span></td>-->
<td align="left"><span><?php echo $dw->name?></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->type?></span></td>
<td align="right"><span><?php echo number_format($dw->total,2,'.','');?></span></td>
<td align="right"><span><?php echo number_format($dw->total,2,'.','');?></span></td>
<td align="left"><span><?php echo $dw->description?></span></td> <td align="left"><span><?php echo $dw->description?></span></td>
</tr> </tr>
<?php <?php
} }
} }
?> ?>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.3.1/js/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.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.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script> <script>
// Bootstrap datepicker // Bootstrap datepicker
// Set up your table // Set up your table
$(document).ready(function() { $(document).ready(function() {
table = $('#req').DataTable( { table = $('#req').DataTable( {
"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', extend: 'collection',
text: 'Export Cashbook Reports', text: 'Export Cashbook Reports',
buttons: [ buttons: [
'excel' 'excel'
] ]
} }
] ]
} ); } );
} ); } );
</script> </script>

View File

@ -1,138 +1,137 @@
<?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/buttons/1.3.1/css/buttons.dataTables.min.css">
<style> <style>
.dataTables_filter { .dataTables_filter {
width: 50%; width: 50%;
float: right; float: right;
text-align: right; text-align: right;
} }
.dataTables_paginate { .dataTables_paginate {
width: 50%; width: 50%;
float: right; float: right;
text-align: right; text-align: right;
} }
div.dt-buttons { div.dt-buttons {
position: relative; position: relative;
float: right; float: right;
} }
</style> </style>
<div class="row" style="min-height: 600px;"> <div class="row" style="min-height: 600px;">
<div class="content-wrapper"> <div class="content-wrapper">
<div class="col-md-10 col-md-offset-1"> <div class="col-md-10 col-md-offset-1">
<div id="panel-quick-actions" class="panel panel-default quick-actions"> <div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading"> <div class="panel-heading">
<center><b>Monthly Payments</b></center> <center><b>Monthly Payments </b></center>
</div> </div>
<div class="btn-group btn-group-justified no-margin"> <div class="btn-group btn-group-justified no-margin">
<div> <div>
<table class="table table-bordered table-hover" id="req" style="font-size:13px;"> <table class="table table-bordered table-hover" id="req" style="font-size:13px;">
<thead> <thead>
<tr> <tr>
<th>Date</th> <th>Date</th>
<!--<th>Account Code</th>--> <!--<th>Account Code</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>
<!--<th>Description</th>--> <!--<th>Description</th>-->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php if(!empty($monthlyreport)){ <?php if(!empty($monthlyreport)){
foreach($monthlyreport as $mr) foreach($monthlyreport as $mr)
{ {
?> ?>
<tr> <tr>
<td><span><?php echo $mr->date?></span></td> <td><span><?php echo $mr->date?></span></td>
<!--<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;?>"><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"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $mr->account_code;?>&d=<?php echo $mr->month?>"><span><?php echo $mr->name?></span></a></td>
<td align="left"><span><?php echo $mr->type?></span></td> <td align="left"><span><?php echo $mr->type?></span></td>
<td align="right"><span><?php echo number_format($mr->total,2,'.','');?></span></td>
<td align="right"><span><?php echo number_format($mr->total,2,'.','');?></span></td> <!--<td align="left"><span><?php echo $mr->account_code?></span></td>-->
<!--<td align="left"><span><?php echo $mr->account_code?></span></td>--> <!--<td align="left"><span><?php echo $mr->description?></span></td>-->
<!--<td align="left"><span><?php echo $mr->description?></span></td>-->
</tr>
</tr> <?php
<?php }
}
}
} ?>
?> </tbody>
</tbody> </table>
</table> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/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.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.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script>
<script>
// Bootstrap datepicker
// Bootstrap datepicker // Set up your table
// Set up your table $(document).ready(function() {
$(document).ready(function() { table = $('#req').DataTable( {
table = $('#req').DataTable( { "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',
extend: 'collection', text: 'Export Cashbook Reports',
text: 'Export Cashbook Reports', buttons: [
buttons: [ 'excel'
'excel' ]
] }
} ]
] } );
} ); } );
} );
</script>
</script>

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-8 col-md-offset-2"> <div class="col-md-10 col-md-offset-1">
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:11px;" > <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

@ -1,82 +1,82 @@
<?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">Caskbook - "Today's Payments"</h3></CENTER> <CENTER><h3 class="box-title">Today's Payment</h3></CENTER>
</div> </div>
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-md-8 col-md-offset-2"> <div class="col-md-10 col-md-offset-1">
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:11px;" > <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>Account Code</th>--> <!-- <th>Account Code</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>
<th>Description</th> <th>Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php if(!empty($tdy)){ <?php if(!empty($tdy)){
foreach($tdy as $t) foreach($tdy 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->account_code?></span></td>--> <!--<td align="left"><span><?php echo $t->account_code?></span></td>-->
<td align="left"><span><?php echo $t->name ?></span></td> <td align="left"><span><?php echo $t->name ?></span></td>
<!--<td align="left"><span><?php echo $t->towhom?></span></td>--> <!--<td align="left"><span><?php echo $t->towhom?></span></td>-->
<td align="left"><span><?php echo $t->type?></span></td> <td align="left"><span><?php echo $t->type?></span></td>
<td align="right"><span><?php echo number_format( $t->total,2,'.','');?></span></td> <td align="left"><span><?php echo number_format($t->total,2,'.','');?></span></td>
<td align="left"><span><?php echo $t->description?></span></td> <td align="left"><span><?php echo $t->description?></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

@ -1,121 +1,121 @@
<?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/buttons/1.3.1/css/buttons.dataTables.min.css">
<style> <style>
.dataTables_filter { .dataTables_filter {
width: 50%; width: 50%;
float: right; float: right;
text-align: right; text-align: right;
} }
.dataTables_paginate { .dataTables_paginate {
width: 50%; width: 50%;
float: right; float: right;
text-align: right; text-align: right;
} }
div.dt-buttons { div.dt-buttons {
position: relative; position: relative;
float: right; float: right;
} }
</style> </style>
<div class="content-wrapper"> <div class="content-wrapper">
<div class="col-md-10 col-md-offset-1"> <div class="col-md-10 col-md-offset-1">
<div id="panel-quick-actions" class="panel panel-default quick-actions"> <div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading"> <div class="panel-heading">
<center><b>Yearly Payments</b></center> <center><b>Yearly Payments</b></center>
</div> </div>
<div class="btn-group btn-group-justified no-margin"> <div class="btn-group btn-group-justified no-margin">
<table class="table table-bordered table-hover" id="req" style="font-size:13px;"> <table class="table table-bordered table-hover" id="req"style="font-size:13px;">
<thead> <thead>
<tr> <tr>
<!--<th>Date</th>--> <!--<th>Date</th>-->
<th>Month</th> <th>Month</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>
<!--<th>Account Code</th>--> <!--<th>Account Code</th>-->
<!--<th>Description</th>--> <!--<th>Description</th>-->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php if(!empty($yearlyreport)){ <?php if(!empty($yearlyreport)){
foreach($yearlyreport as $yr) foreach($yearlyreport as $yr)
{ {
?> ?>
<tr> <tr>
<!--<td><span><?php echo $yr->date?></span></td>--> <!--<td><span><?php echo $yr->date?></span></td>-->
<td align="left"><a href="<?= base_url() ?>report/yearmonthwise?sid=<?php echo $yr->month;?>"><span><?php echo $yr->month?></span></a></td> <td align="left"><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="right"><span><?php echo $yr->towhom?></span></td>-->
<td align="left"><span><?php echo $yr->type?></span></td> <td align="left"><span><?php echo $yr->type?></span></td>
<td align="right"><span><?php echo number_format( $yr->total,2,'.','');?></span></td> <td align="right"><span><?php echo 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->account_code?></span></td>
<td align="right"><span><?php echo $yr->description?></span></td>--> <td align="right"><span><?php echo $yr->description?></span></td>-->
</tr> </tr>
<?php <?php
} }
} }
?> ?>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.3.1/js/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.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.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script> <script>
// Bootstrap datepicker // Bootstrap datepicker
// Set up your table // Set up your table
$(document).ready(function() { $(document).ready(function() {
table = $('#req').DataTable( { table = $('#req').DataTable( {
"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', extend: 'collection',
text: 'Export Cashbook Reports', text: 'Export Cashbook Reports',
buttons: [ buttons: [
'excel' 'excel'
] ]
} }
] ]
} ); } );
} ); } );
</script> </script>

View File

@ -1,126 +1,125 @@
<?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/buttons/1.3.1/css/buttons.dataTables.min.css">
<style> <style>
.dataTables_filter { .dataTables_filter {
width: 50%; width: 50%;
float: right; float: right;
text-align: right; text-align: right;
} }
.dataTables_paginate { .dataTables_paginate {
width: 50%; width: 50%;
float: right; float: right;
text-align: right; text-align: right;
} }
div.dt-buttons { div.dt-buttons {
position: relative; position: relative;
float: right; float: right;
} }
</style> </style>
<div class="content-wrapper"> <div class="content-wrapper">
<div class="col-md-8 col-md-offset-2"> <div class="col-md-10 col-md-offset-1">
<div id="panel-quick-actions" class="panel panel-default quick-actions"> <div id="panel-quick-actions" class="panel panel-default quick-actions">
<div class="panel-heading"> <div class="panel-heading">
<center><b>Yearly Payments</b></center> <center><b>Monthly Payments</b></center>
</div> </div>
<div class="btn-group btn-group-justified no-margin"> <div class="btn-group btn-group-justified no-margin">
<div> <div>
<table class="table table-bordered table-hover" id="req" style="font-size:13px;"> <table class="table table-bordered table-hover" id="req" style="font-size:13px;">
<thead> <thead>
<tr> <tr>
<th>Date</th> <!--<th>Date</th>-->
<th>Account Name</th> <th>Account Name</th>
<!--<th>month</th>--> <!--<th>month</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>
<!--<th>Description</th>--> <!--<th>Description</th>-->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php if(!empty($yearmonthwise)){ <?php if(!empty($yearmonthwise)){
foreach($yearmonthwise as $ym) foreach($yearmonthwise as $ym)
{ {
?> ?>
<tr> <tr>
<td><span><?php echo $ym->date?></span></td> <!--<td><span><?php echo $ym->date?></span></td>-->
<!--<td align="right"><span><a href="<?= base_url() ?>report/yearmonthwise"><?php echo $ym->month?></a></span></td>--> <!--<td align="right"><span><a href="<?= base_url() ?>report/yearmonthwise"><?php echo $ym->month?></a></span></td>-->
<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $ym->account_code;?>&d=<?php echo $ym->month?>"><span><?php echo $ym->name?></span></a></td> <td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $ym->account_code;?>&d=<?php echo $ym->month?>"><span><?php echo $ym->name?></span></a></td>
<!--<td align="right"><span><?php echo $ym->towhom?></span></td>--> <!--<td align="right"><span><?php echo $ym->towhom?></span></td>-->
<td align="left"><span><?php echo $ym->type?></span></td> <td align="left"><span><?php echo $ym->type?></span></td>
<td align="right"><span><?php echo number_format($ym->total,2,'.','');?></span></td>
<td align="right"><span><?php echo number_format($ym->total,2,'.','');?></span></td> <!--<td align="right"><span><?php echo $ym->description?></span></td>-->
<!--<td align="right"><span><?php echo $ym->description?></span></td>-->
</tr>
</tr> <?php
<?php }
}
}
} ?>
?> </tbody>
</tbody> </table>
</table> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</div>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/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.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.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script>
<script>
// Bootstrap datepicker
// Bootstrap datepicker // Set up your table
// Set up your table $(document).ready(function() {
$(document).ready(function() { table = $('#req').DataTable( {
table = $('#req').DataTable( { "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',
extend: 'collection', text: 'Export Cashbook Reports',
text: 'Export Cashbook Reports', buttons: [
buttons: [ 'excel'
'excel' ]
] }
} ]
] } );
} ); } );
} );
</script>
</script>

View File

@ -1,462 +1,499 @@
<?php <?php
$today_in=''; $today_in='';
$today_ex=''; $today_ex='';
$month_in=''; $month_in='';
$month_ex=''; $month_ex='';
$year_in=''; $year_in='';
$year_ex=''; $year_ex='';
if(!empty($cashbook))
if(!empty($todayincome)) {
{
foreach ($todayincome as $ti) }
{ if(!empty($monthlyreport))
$today_in=$ti->todaydata; {
}}
}
if(!empty($todayexpense))
{ if(!empty($todayincome))
foreach ($todayexpense as $te) {
{ foreach ($todayincome as $ti)
$today_ex=$te->todaydata; {
}} $today_in=$ti->todaydata;
}}
if(!empty($monthlywiseincome))
{ if(!empty($todayexpense))
foreach ($monthlywiseincome as $mi) {
{ foreach ($todayexpense as $te)
$month_in = $mi->monthlydata; {
}} $today_ex=$te->todaydata;
}}
if(!empty($monthlywiseexpense))
{ if(!empty($monthlywiseincome))
foreach ($monthlywiseexpense as $me) {
{ foreach ($monthlywiseincome as $mi)
$month_ex = $me->monthlydata; {
}} $month_in = $mi->monthlydata;
if(!empty($yearexpense)) }}
{
foreach ($yearexpense as $ye) if(!empty($monthlywiseexpense))
{ {
$year_ex=$ye->yearlydata; foreach ($monthlywiseexpense as $me)
}} {
$month_ex = $me->monthlydata;
if(!empty($yearincome)) }}
{ if(!empty($yearexpense))
foreach ($yearincome as $yi) {
{ foreach ($yearexpense as $ye)
$year_in = $yi->yearlydata; {
}} $year_ex=$ye->yearlydata;
}}
$inrsymbol='';
if(!empty($Indiancurrency)) if(!empty($yearincome))
{ {
foreach ($Indiancurrency as $inr) foreach ($yearincome as $yi)
{ {
$inrsymbol = $inr->FontCode2000; $year_in = $yi->yearlydata;
}} }}
$inrsymbol='';
?> if(!empty($Indiancurrency))
<head> {
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css"> foreach ($Indiancurrency as $inr)
{
<link href="<?php echo base_url();?>assets/plugins/morris/morris.css" rel="stylesheet" type="text/css" /> $inrsymbol = $inr->FontCode2000;
}}
</head>
<script>
/*! ?>
DataTables Bootstrap 3 integration <head>
©2011-2014 SpryMedia Ltd - datatables.net/license <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
*/
(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(); <link href="<?php echo base_url();?>assets/plugins/morris/morris.css" rel="stylesheet" type="text/css" />
b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw(!1)};k=0;for(h=e.length;k<h;k++)if(a=e[k],b.isArray(a))p(c,a);else{f=d="";switch(a){case "ellipsis":d="&hellip;";f="disabled";break;case "first":d=j.sFirst;f=a+(0<i?"":" disabled");break;case "previous":d=j.sPrevious;f=a+(0<i?"":" disabled");break;case "next":d=j.sNext;f=a+(i<m-1?"":" disabled");break;case "last":d=j.sLast;f=a+(i<m-1?"":" disabled");break;default:d=a+1,f=i===a?"active":""}d&&(o=b("<li>",{"class":u.sPageButton+" "+
f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("<a>",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('<ul class="pagination"/>').children("ul"),s);h&&b(e).find("[data-dt-idx="+h+"]").focus()};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"}, </head>
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>
/*!
</script> DataTables Bootstrap 3 integration
<style> ©2011-2014 SpryMedia Ltd - datatables.net/license
*/
.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);
}
.dataTables_paginate { </script>
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%;
table{ float: right;
margin: 0 auto; text-align: right;
width: 100%; }
clear: both; div.dt-buttons {
border-collapse: collapse; position: relative;
table-layout: fixed; float: right;
word-wrap:break-word;
}
} table{
margin: 0 auto;
th, td { white-space: nowrap; } width: 100%;
div.dataTables_wrapper { clear: both;
margin: 0 auto; border-collapse: collapse;
table-layout: fixed;
} word-wrap:break-word;
div.container { }
width: 100%;
} th, td { white-space: nowrap; }
div.dataTables_wrapper {
.dataTables_paginate { margin: 0 auto;
margin-top: -25px;
position: absolute; }
text-align: right;
left: -20%; div.container {
} width: 100%;
}
#container {
min-width: 310px; .dataTables_paginate {
max-width: 800px; margin-top: -25px;
height: 400px; position: absolute;
margin: 0 auto text-align: right;
} left: -20%;
}
</style> #container {
<div> min-width: 310px;
max-width: 800px;
height: 400px;
margin: 0 auto
<!-- Main content --> }
<section class="content">
<!-- Info boxes -->
<center> </style>
<div class="col-md-12"> <div>
<section class="content-header">
<!-- fix for small devices only -->
<div class="clearfix visible-sm-block"></div>
<div class="col-md-4"> <!-- Main content -->
<div class="info-box"> <section>
<span class="info-box-icon bg-red" style="height: 90px;padding:25px;"><i class="fa fa-hourglass-end"></i></span> <!-- Info boxes -->
<div class="info-box-content"> <center>
<span class="info-box-number"><a href="<?php echo base_url().'report/Viewtoday' ?>" data-toggle="tooltip" title="Click here to View Today's Payment Details"><?php echo "Today's Payments" ?></a></span> <div class="col-md-12">
<span class="info-box-text text-center"><?php echo "Receipt: ".$inrsymbol.number_format($today_in,2,'.',''); ?> </span> <!-- fix for small devices only -->
<span class="info-box-text text-center"><?php echo "Payments : ".$inrsymbol.number_format($today_ex,2,'.',''); ?> </span> <div class="clearfix visible-sm-block"></div>
<div class="col-md-4">
</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 Payments"><?php echo "Today's Payments" ?></a></span>
<!-- fix for small devices only -->
<div class="clearfix visible-sm-block"></div> <span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol.number_format($today_in,2,'.',''); ?> </span>
<div class="col-md-4"> <span class="info-box-text text-center"><strong>Payments :</strong><?php echo $inrsymbol.number_format($today_ex,2,'.',''); ?> </span>
<div class="info-box">
<span class="info-box-icon bg-aqua" style="height: 90px;padding:25px;"><i<i class="fa fa-spinner"></span> </div>
<div class="info-box-content"> </div>
<span class="info-box-number"><a href="<?php echo base_url().'report/monthexpenses' ?>" data-toggle="tooltip" title="Click here to View Monthly Payments details"><?php echo "Monthly Payments" ?></a></span> </div>
<span class="info-box-text text-center"><?php echo "Receipt :".$inrsymbol.number_format($month_in,2,'.',''); ?></span>
<span class="info-box-text text-center"><?php echo "Payments :".$inrsymbol.number_format($month_ex,2,'.',''); ?></span> <!-- fix for small devices only -->
</div> <div class="clearfix visible-sm-block"></div>
</div> <div class="col-md-4">
</div> <div class="info-box">
<span class="info-box-icon bg-aqua" style="height: 90px;padding:25px;"><i<i class="fa fa-spinner"></span>
<!-- fix for small devices only --> <div class="info-box-content">
<div class="clearfix visible-sm-block"></div> <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 "Monthly Payments" ?></a></span>
<div class="col-md-4"> <span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol.number_format($month_in,2,'.',''); ?></span>
<div class="info-box"> <span class="info-box-text text-center"><strong>Payments :</strong><?php echo $inrsymbol.number_format($month_ex,2,'.',''); ?></span>
<span class="info-box-icon bg-green" style="height: 90px;padding:25;"><i class="fa fa-industry" style="padding: 5px;"></i></span> </div>
<div class="info-box-content"> </div>
<span class="info-box-number"><a href="<?php echo base_url().'report/yearexpenses' ?>" data-toggle="tooltip" title="Click here to View Yearly Payment details"><?php echo "Year Payments" ?></a></span> </div>
<span class="info-box-text text-center"><?php echo "Receipt :".$inrsymbol.number_format($year_in,2,'.',''); ?></span>
<span class="info-box-text text-center"><?php echo "Payments :".$inrsymbol.number_format($year_ex,2,'.',''); ?></span> <!-- fix for small devices only -->
</div> <div class="clearfix visible-sm-block"></div>
</div> <div class="col-md-4">
</div> <div class="info-box">
</div> <span class="info-box-icon bg-green" style="height: 90px;padding:25;"><i class="fa fa-industry" style="padding: 5px;"></i></span>
</center> <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 "Year Payments" ?></a></span>
</div> <span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol. number_format($year_in,2,'.',''); ?></span>
<span class="info-box-text text-center"><strong>Payments :</strong><?php echo $inrsymbol.number_format($year_ex,2,'.',''); ?></span>
<!--<div class="row"> </div>
<div class="col-md-12"> </div>
<div id="container"></div> </div>
</div>
</div> </center>
</div>-->
</div>
<!--<div class="row">
<div class="col-md-12">
<!-- Left col --> <div id="container"></div>
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS --> </div>
<div class="box box-info"> </div>-->
<!--<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 -->
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box-body"> <div class="box box-info">
<div> <!--<div class="box-header with-border">-->
<table class="table table-bordered table-hover" id="req" style="font-size:13px;"> <!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<thead> <!--</div>-->
<tr> <!-- /.box-header -->
<th>Date</th>
<!--<th>Account Code</th>-->
<th>Account Name</th> <CENTER><h3 class="box-title"><strong>Day Wise Payments</strong></h3></CENTER>
<th>Paid To</th> <div class="box-body">
<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> <!--<th>Account Code</th>-->
</thead> <th>Account Name</th>
<tbody> <th>Paid To</th>
<?php if(!empty($cashbook)){ <th>Paid Type</th>
foreach($cashbook as $cash) <th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
{
?> <th>Description</th>
<tr>
<td><span><?php echo $cash->date?></span></td> </tr>
<td align="left"><span><?php echo $cash->name?></span></td> </thead>
<td align="left"><span><?php echo $cash->towhom?></span></td> <tbody>
<td align="left"><span><?php echo $cash->type?></span></td> <?php if(!empty($cashbook)){
<td align="right"><span><?php echo number_format($cash->total,2,'.','');?></span></td> $tvt=0.00;
<td align="left"><span><?php echo $cash->description?></span></td> foreach($cashbook as $cash)
{
?>
<tr>
</tr>
<?php <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->towhom?></span></td>
} <td align="left"><span><?php echo $cash->type?></span></td>
?> <td align="right"><span><?php
</tbody> $tvt= $tvt + number_format($cash->total,2,'.','');
</table> echo number_format($cash->total,2,'.','');?></span></td>
</div> <td align="left"><span><?php echo $cash->description?></span></td>
</div>
</div>
<!-- /.box -->
</div> </tr>
<!-- /.col --> <?php
}
}
?>
</tbody>
<tfoot width="100%">
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script> <tr>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script> <td style="text-align:center;"><strong>Total</strong></td>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script> <td>&nbsp;</td>
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script> <td>&nbsp;</td>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <td>&nbsp;</td>
<script src="https://code.highcharts.com/highcharts.js"></script> <td style="text-align:right"><strong>
<script src="https://code.highcharts.com/modules/series-label.js"></script> <?php
<script src="https://code.highcharts.com/modules/exporting.js"></script> {
echo number_format($tvt,2,'.','');
<script>
$(document).ready(function() { }
table = $('#req').DataTable( { ?>
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + </strong>
"<'row'<'col-md-6'><'col-md-6'>>" + </td>
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [ <td>&nbsp;</td>
{
extend: 'collection',
text: 'Export Cashbook Reports',
buttons: [
'excel' </tr>
]
} </tfoot>
] </table>
} );
} ); </div>
</script> </div>
<script src="<?php echo base_url();?>assets/plugins/chartjs/Chart.min.js"></script> </div>
<script src="<?php echo base_url(); ?>assets/plugins/knob/jquery.knob.js"></script> <!-- /.box -->
</div>
<script> <!-- /.col -->
/* ChartJS
* -------
* Here we will create a few charts using ChartJS
*/
//----------------------- <script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
//- MONTHLY SALES CHART - <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>
// Get context with jQuery - using jQuery's .get() method. <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
/* ChartJS <script src="https://code.highcharts.com/modules/exporting.js"></script>
* -------
* Here we will create a few charts using ChartJS <script>
*/ $(document).ready(function() {
table = $('#req').DataTable( {
//----------------------- "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
//- MONTHLY SALES CHART - "<'row'<'col-md-6'><'col-md-6'>>" +
//----------------------- "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
// Get context with jQuery - using jQuery's .get() method. {
var salesChartCanvas = $("#salesChart").get(0).getContext("2d"); extend: 'collection',
// This will get the first returned node in the jQuery collection. text: 'Export Cashbook Reports',
buttons: [
var salesChart = new Chart(salesChartCanvas); 'excel'
]
}
var service = <?php echo JSON_encode($gettoptotal1)?>; ]
} );
//var service = <?php echo JSON_encode($getTotalServicePoCount)?>; } );
// alert(service+'hai'); </script>
//print_r($gettoptotal1); <script src="<?php echo base_url();?>assets/plugins/chartjs/Chart.min.js"></script>
var Import = <?php echo JSON_encode($getTotalimportPoCount)?>; <script src="<?php echo base_url(); ?>assets/plugins/knob/jquery.knob.js"></script>
var capital = <?php echo JSON_encode($getTotalcapitalPoCount)?>;
var revenue = <?php echo JSON_encode($getTotalrevenuePoCount)?>; <script>
//alert(service.PONO); /* ChartJS
var serviceValues = []; * -------
// var arr = new Array(); * Here we will create a few charts using ChartJS
$.each (service,function(idx,obj){ */
serviceValues.push(obj[0].tot);
}); //-----------------------
var ImportValues = []; //- MONTHLY SALES CHART -
// var arr = new Array(); //-----------------------
$.each (Import,function(idx,obj){
ImportValues.push(obj[0].totalImport); // Get context with jQuery - using jQuery's .get() method.
});
var capitalValues = [];
// var arr = new Array(); /* ChartJS
$.each (capital,function(idx,obj){ * -------
capitalValues.push(obj[0].totalcapital); * Here we will create a few charts using ChartJS
}); */
var revenueValues = [];
// var arr = new Array(); //-----------------------
$.each (revenue,function(idx,obj){ //- MONTHLY SALES CHART -
revenueValues.push(obj[0].totalrevenue); //-----------------------
});
// Get context with jQuery - using jQuery's .get() method.
var salesChartCanvas = $("#salesChart").get(0).getContext("2d");
//alert(arr.total2); // This will get the first returned node in the jQuery collection.
var salesChartData = {
labels: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], var salesChart = new Chart(salesChartCanvas);
datasets: [
var service = <?php echo JSON_encode($gettoptotal1)?>;
{
label: "Electronics", //var service = <?php echo JSON_encode($getTotalServicePoCount)?>;
fillColor: "rgba(0, 192, 239, 0.2)", // alert(service+'hai');
strokeColor: "rgba(0, 192, 239,0.6)", //print_r($gettoptotal1);
pointColor: "#00c0ef ", var Import = <?php echo JSON_encode($getTotalimportPoCount)?>;
pointStrokeColor: "rgba(60,141,188,1)", var capital = <?php echo JSON_encode($getTotalcapitalPoCount)?>;
pointHighlightFill: "#fff", var revenue = <?php echo JSON_encode($getTotalrevenuePoCount)?>;
pointHighlightStroke: "rgba(60,141,188,1)",
data:serviceValues //alert(service.PONO);
var serviceValues = [];
}, // var arr = new Array();
$.each (service,function(idx,obj){
{ serviceValues.push(obj[0].tot);
label: "Digital Goods", });
fillColor: "rgba(221, 75, 57,0.2)", var ImportValues = [];
strokeColor: "rgba(221, 75, 57,0.8)", // var arr = new Array();
pointColor: "#dd4b39 ", $.each (Import,function(idx,obj){
pointStrokeColor: "rgba(60,141,188,1)", ImportValues.push(obj[0].totalImport);
pointHighlightFill: "#fff", });
pointHighlightStroke: "rgba(60,141,188,1)", var capitalValues = [];
data:revenueValues // var arr = new Array();
}, $.each (capital,function(idx,obj){
{ capitalValues.push(obj[0].totalcapital);
label: "Food", });
fillColor: "rgba(0, 166, 90, 0.2)", var revenueValues = [];
strokeColor: "rgba(0, 166, 90,0.8)", // var arr = new Array();
pointColor: "#00a65a ", $.each (revenue,function(idx,obj){
pointStrokeColor: "rgba(60,141,188,1)", revenueValues.push(obj[0].totalrevenue);
pointHighlightFill: "#fff", });
pointHighlightStroke: "rgba(60,141,188,1",
data:ImportValues
}, //alert(arr.total2);
{ var salesChartData = {
label: "Food", labels: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
fillColor: "rgba(243, 156, 18, 0.2)",
strokeColor: "rgba(243, 156, 18,0.8)", datasets: [
pointColor: "#f39c12 ",
pointStrokeColor: "rgba(60,141,188,1)", {
pointHighlightFill: "#fff", label: "Electronics",
pointHighlightStroke: "rgba(60,141,188,1", fillColor: "rgba(0, 192, 239, 0.2)",
data:capitalValues 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
var salesChartOptions = { },
//Boolean - If we should show the scale at all
showScale: true, {
//Boolean - Whether grid lines are shown across the chart label: "Digital Goods",
scaleShowGridLines: false, fillColor: "rgba(221, 75, 57,0.2)",
//String - Colour of the grid lines strokeColor: "rgba(221, 75, 57,0.8)",
scaleGridLineColor: "rgba(0,0,0,.05)", pointColor: "#dd4b39 ",
//Number - Width of the grid lines pointStrokeColor: "rgba(60,141,188,1)",
scaleGridLineWidth: 1, pointHighlightFill: "#fff",
//Boolean - Whether to show horizontal lines (except X axis) pointHighlightStroke: "rgba(60,141,188,1)",
scaleShowHorizontalLines: true, data:revenueValues
//Boolean - Whether to show vertical lines (except Y axis) },
scaleShowVerticalLines: true, {
//Boolean - Whether the line is curved between points label: "Food",
bezierCurve: true, fillColor: "rgba(0, 166, 90, 0.2)",
//Number - Tension of the bezier curve between points strokeColor: "rgba(0, 166, 90,0.8)",
bezierCurveTension: 0.3, pointColor: "#00a65a ",
//Boolean - Whether to show a dot for each point pointStrokeColor: "rgba(60,141,188,1)",
pointDot: true, pointHighlightFill: "#fff",
//Number - Radius of each point dot in pixels pointHighlightStroke: "rgba(60,141,188,1",
pointDotRadius: 4, data:ImportValues
//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 label: "Food",
pointHitDetectionRadius: 20, fillColor: "rgba(243, 156, 18, 0.2)",
//Boolean - Whether to show a stroke for datasets strokeColor: "rgba(243, 156, 18,0.8)",
datasetStroke: true, pointColor: "#f39c12 ",
//Number - Pixel width of dataset stroke pointStrokeColor: "rgba(60,141,188,1)",
datasetStrokeWidth: 5, pointHighlightFill: "#fff",
//Boolean - Whether to fill the dataset with a color pointHighlightStroke: "rgba(60,141,188,1",
datasetFill: true, data:capitalValues
//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
}; var salesChartOptions = {
//Boolean - If we should show the scale at all
// alert(salesChartData); showScale: true,
//Boolean - Whether grid lines are shown across the chart
//Create the line chart scaleShowGridLines: false,
salesChart.Line(salesChartData, salesChartOptions); //String - Colour of the grid lines
scaleGridLineColor: "rgba(0,0,0,.05)",
//--------------------------- //Number - Width of the grid lines
//- END MONTHLY SALES CHART - scaleGridLineWidth: 1,
//- PIE CHART - //Boolean - Whether to show horizontal lines (except X axis)
//------------- scaleShowHorizontalLines: true,
// Get context with jQuery - using jQuery's .get() method. //Boolean - Whether to show vertical lines (except Y axis)
scaleShowVerticalLines: true,
//Boolean - Whether the line is curved between points
</script> 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>