Merge branch 'CI4-Application' of bitbucket.org:venbainformationtechnology/ria into CI4-Application

This commit is contained in:
bitbucket 2024-08-19 15:13:52 +05:30
commit 0fac14441e
334 changed files with 6892 additions and 5231 deletions

74
.env
View File

@ -1,74 +0,0 @@
#--------------------------------------------------------------------
# Example Environment Configuration file
#
# This file can be used as a starting point for your own
# custom .env files, and contains most of the possible settings
# available in a default install.
#
# By default, all of the settings are commented out. If you want
# to override the setting, you must un-comment it by removing the '#'
# at the beginning of the line.
#--------------------------------------------------------------------
#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------
CI_ENVIRONMENT = development
#--------------------------------------------------------------------
# APP
#--------------------------------------------------------------------
app.baseURL = 'http://localhost/ria/'
# If you have trouble with `.`, you could also use `_`.
# app_baseURL = ''
# app.forceGlobalSecureRequests = false
# app.CSPEnabled = false
#--------------------------------------------------------------------
# DATABASE
#--------------------------------------------------------------------
# database.default.hostname = 'vprodb1.mysql.database.azure.com'
# database.default.database = 'ria_prod'
# database.default.username = 'dbroot'
# database.default.password = 'root@DB23'
database.default.hostname = '119.18.54.85'
database.default.database = 'venbaehn_ria'
database.default.username = 'venbaehn_ria'
database.default.password = 'Q{c2b{7mIC^$'
database.default.DBDriver = MySQLi
database.default.DBPrefix =
database.default.port = 3306
# If you use MySQLi as tests, first update the values of Config\Database::$tests.
# database.tests.hostname = localhost
# database.tests.database = ci4_test
# database.tests.username = root
# database.tests.password = root
# database.tests.DBDriver = MySQLi
# database.tests.DBPrefix =
# database.tests.charset = utf8mb4
# database.tests.DBCollat = utf8mb4_general_ci
# database.tests.port = 3306
#--------------------------------------------------------------------
# ENCRYPTION
#--------------------------------------------------------------------
# encryption.key =
#--------------------------------------------------------------------
# SESSION
#--------------------------------------------------------------------
# session.driver = 'CodeIgniter\Session\Handlers\FileHandler'
# session.savePath = null
#--------------------------------------------------------------------
# LOGGER
#--------------------------------------------------------------------
# logger.threshold = 4

9
.gitignore vendored
View File

@ -98,6 +98,15 @@ public/uploads/Igrfiles/*
public/uploads/images/*
!public/uploads/images/index.html
public/uploads/POfiles/*
!public/uploads/POfiles/.gitkeep
public/assets/images/emp_files/*
!public/assets/images/emp_files/.gitkeep
public/assets/images/invoice_files/*
!public/assets/images/invoice_files/.gitkeep
php_errors.log
/app/Views/*.tmp

View File

@ -263,6 +263,11 @@ $routes->post('inwardgateregister/edituploadfile', 'Inwardgateregister::edituplo
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'AddOgr', 'Inwardgateregister::addoutwardgateregister');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'ViewOgr', 'Inwardgateregister::ViewOgr');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'EditOGR', 'Inwardgateregister::EditOGR');
$routes->get('drivernameautocomplete' , 'Inwardgateregister::drivernameautocomplete');
$routes->get('drivermobileautocomplete', 'Inwardgateregister::drivermobileautocomplete');
// Application MRIR Routes
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'EditMRIR', 'MRIRcontroller::editmaterialinspectionreport');
@ -352,3 +357,12 @@ $routes->get('qualityreportlistinward', 'Quality::reportListInward');
$routes->get('shortagematerialListing', 'Rawmaterialdetails::shortagematerialListing');
$routes->get('inprocess', 'Inprocess::index');
// Sales Controller
$routes->get('sales_dashboard', 'Sales::sales_dashboard');
$routes->get('invoicedetails/ViewInvoice', 'Sales::ViewInvoice');
$routes->get('getInvoiceAttachments', 'Sales::getInvoiceAttachments');
$routes->get('deleteAttachment', 'Sales::deleteAttachment');
$routes->post('saveAttachment', 'Sales::saveAttachment');
$routes->get('sales_invoice', 'Sales::sales_invoice');

View File

@ -311,7 +311,6 @@ class Inwardgateregister extends BaseController
function SaveIGR()
{
//print_r($this->request->getPost());die;
#Step 1 IGR Details
$PONO = $this->request->getPost('PONO');
$IsThisOpenOrderPO = $this->request->getPost('hiddenIsOpenOrder');
@ -321,6 +320,7 @@ class Inwardgateregister extends BaseController
$Mat_Rcvd_Dt = (string)$this->request->getPost('MaterialRcvdDate');
$MaterialRcvdDt = get_date_time_format($Mat_Rcvd_Dt);
$VehicleNo = $this->request->getPost('VehicleNo');
$VehicleType = $this->request->getPost('VehicleType');
$DriverName = $this->request->getPost('DriverName');
$DriverMobileNumber = $this->request->getPost('DriverMobileNumber');
$CreatedBy = $this->session->get('userId');
@ -355,16 +355,14 @@ class Inwardgateregister extends BaseController
}
}
}
#Step 3 Master Details Gathering to Save In DB
$igr = array('PONO' => $PONO, 'VehicleNo' => $VehicleNo, 'DeliveryChellanOrInvoiceNo' => $DeliveryChellanOrInvoiceNo, 'DeliveryChellanDate' => $DeliveryChellanDate, 'MaterialRcvdDate' => $MaterialRcvdDt, 'DriverName' => $DriverName, 'DriverMobileNumber' => $DriverMobileNumber,'IGRStatus' => $IGRStatus, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt, 'PaymentStatus' => $paymentstatus);
$igr = array('PONO' => $PONO, 'VehicleNo' => $VehicleNo, 'VehicleType'=>$VehicleType,'DeliveryChellanOrInvoiceNo' => $DeliveryChellanOrInvoiceNo, 'DeliveryChellanDate' => $DeliveryChellanDate, 'MaterialRcvdDate' => $MaterialRcvdDt, 'DriverName' => $DriverName, 'DriverMobileNumber' => $DriverMobileNumber,'IGRStatus' => $IGRStatus, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt, 'PaymentStatus' => $paymentstatus);
$igr['MasterFile'] = $requestMasterFileName;
// print_r( $igr );die;
#Step 4 Calling DB to Save IGR Master
$IGRNO = $this->inwardgateregister_model->addigrM($igr);
// Get the uploaded files
// $IGRNO = "IGRNO02750";
// $IGRNO = "IGRNO02734";
// echo "master - no problem";
// $IGRNO = "IGRNO02767";
// print_r($this->request->getPost());die;
if($IGRNO){
$files = $this->request->getFiles();
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
@ -461,20 +459,25 @@ class Inwardgateregister extends BaseController
$GrossWeightDate = !empty($grossWeightDate) && is_string($grossWeightDate) ? date('Y-m-d H:i:s', strtotime($grossWeightDate)) : null;
$TareWeightDate = !empty($tareWeightDate) && is_string($tareWeightDate) ? date('Y-m-d H:i:s', strtotime($tareWeightDate)) : null;
log_message('error', "TareWeightDate" . $TareWeightDate);
if (strlen($QuantityAsPerInvoice) > 0 && $QuantityAsPerInvoice != '0') {
$Remarks = $this->request->getPost('txtRemarks' . $i);
$ItemStatus = '';
if ($PendingQty == 0.00) {
$ItemStatus = $IGRStatus;
} else {
if (strlen($QuantityAsPerInvoice) > 0 && $QuantityAsPerInvoice != '0') {
if ($PendingQty == 0.00) {
$ItemStatus = $IGRStatus;
} else {
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
}
}
else if ((int)$IsThisOpenOrderPO == 1) {
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
}
$CreatedBy = $this->session->get('userId');
$igrDetails = array('IGRNO' => $IGRNO, 'MaterialCode' => $MaterialCode, 'QuantityAsPerInvoice' => $QuantityAsPerInvoice, 'Remarks' => $Remarks, 'IGRItemStatus' => $IGRItemStatus,'GrossWeight' => (float)$GrossWeight ,'GrossWeightDate'=> $GrossWeightDate,'TareWeight' => (float)$TareWeight ,'TareWeightDate' => $TareWeightDate ,'NetWeight' => (float)$NetWeight, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt);
$igrDetails['WeightFile'] = $requestWeightFileName;
log_message('error', 'SaveIGR igrDetails result : ' . json_encode($igrDetails));
$igrlineno = "";
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
$igrlineno = !empty($igrD) ? $igrD : '';
@ -527,7 +530,7 @@ class Inwardgateregister extends BaseController
log_message('error', "History updated successfully. History id: " . $history_id);
}
$get_pre_qty = $this->inwardgateregister_model->get_CurrentQty($MaterialCode);
$av_qty = 0;
$av_qty = 0; //$av_qty means Avaliable Quantity
if (!empty($get_pre_qty)) {
foreach ($get_pre_qty as $gt) {
$av_qty = $gt->Current_stock;
@ -543,49 +546,11 @@ class Inwardgateregister extends BaseController
$ReceivedQuantity = $key->ReceivedQuantity;
}
}
$totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice;
$totalReceivedqty = (int)$IsThisOpenOrderPO == 1 ? 0 : $ReceivedQuantity + $QuantityAsPerInvoice ;
// $totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice;
$POLineItem = array('ReceivedQuantity' => $totalReceivedqty, 'Status' => $ItemStatus, 'UpdateBY' => $CreatedBy, 'UpdatedOn' => $createddt);
$this->inwardgateregister_model->UpdatePOLineItem($POLineItem, $PONO, $MaterialCode);
}
else if ((int)$IsThisOpenOrderPO == 1) {
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
# Is this open order po means i have to save IGR DETAILS
$Remarks = $this->request->getPost('txtRemarks' . $i);
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
$CreatedBy = $this->session->get('userId');
$igrDetails = array('IGRNO' => $IGRNO, 'MaterialCode' => $MaterialCode, 'QuantityAsPerInvoice' => $QuantityAsPerInvoice, 'Remarks' => $Remarks, 'IGRItemStatus' => $IGRItemStatus,'GrossWeight' => (float)$GrossWeight ,'GrossWeightDate'=> $GrossWeightDate,'TareWeight' => (float)$TareWeight ,'TareWeightDate' => $TareWeightDate ,'NetWeight' => (float)$NetWeight, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt);
$igrDetails['WeightFile'] = $requestWeightFileName;
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
$igrD ='';
$igrlineno = !empty($igrD) ? $igrD : '';
log_message('error', 'SaveIGR igrDetails result : ' . json_encode($igrDetails)." IgrLineNo : ".$igrlineno);
$itemvalue = '';
$SupplierId = '';
$polineitemvalue = $this->inwardgateregister_model->getitemvalue($PONO, $MaterialCode);
foreach ($polineitemvalue as $it) {
$itemvalue = $it->Rate;
$SupplierId = $it->SupplierID;
}
# Is this open order po means i have to save add material history
$historydetails = array('MaterialCode' => $MaterialCode, 'Transaction_type' => "Add", 'Ref_Type' => "IGR", 'Ref_No' => $igrlineno, 'Quantity' => $QuantityAsPerInvoice, 'CreatedBy' => $CreatedBy, 'CreatedOn' => $createddt, 'SupplierID' => $SupplierId, 'ItemValue' => $itemvalue);
$this->inwardgateregister_model->addmaterialhistory($historydetails);
# Is this open order po means i have to save the get received qty in PO lineitem table
$get_pre_qty = $this->inwardgateregister_model->get_CurrentQty($MaterialCode);
$Recqty = $this->inwardgateregister_model->getPOLineItemReceivedQty($PONO, $MaterialCode);
$ReceivedQuantity = 0.00;
if (count($Recqty) > 0) {
foreach ($Recqty as $key) {
$ReceivedQuantity = $key->ReceivedQuantity;
}
}
$totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice;
$POLineItem = array('ReceivedQuantity' => $totalReceivedqty, 'Status' => $ItemStatus, 'UpdateBY' => $CreatedBy, 'UpdatedOn' => $createddt);
$this->inwardgateregister_model->UpdatePOLineItem($POLineItem, $PONO, $MaterialCode);
}
}
$this->inwardgateregister_model->UpdatePOMaster($PONO, $CreatedBy,$IGRStatus);
#Step 9 Updating Pending Quantity IN PO Master amd Line Item Details.
@ -619,8 +584,38 @@ class Inwardgateregister extends BaseController
</script>";
}
function drivernameautocomplete(){
$dr = $this->request->getGet('query');
$query = $this->inwardgateregister_model->checkdrivername($dr);
echo json_encode($query);
}
public function drivermobileautocomplete() {
$dr = $this->request->getGet('query');
$drName = $this->request->getGet('driverName');
$query = $this->inwardgateregister_model->checkdriverMobile($dr, $drName);
echo json_encode($query);
}
public function drivermobileautocomplete2() {
$driverName = $this->request->getGet('drivername');
$term = $this->request->getGet('term');
// Debugging
if (!$driverName || !$term) {
return $this->response->setJSON(['error' => 'Missing parameters']);
}
$query = $this->inwardgateregister_model->checkdriverMobile($driverName, $term);
// Check the output
if (is_array($query)) {
return $this->response->setJSON($query);
} else {
return $this->response->setJSON(['error' => 'Invalid response from model']);
}
}
function viewIGRDetails()
{
@ -671,6 +666,7 @@ function viewIGRDetails()
$VehicleNo = $this->request->getPost('vehicle_no');
$VehicleType = $this->request->getPost('vehicle_type');
$DriverName = $this->request->getPost('driver');
$DriverMobileNumber = $this->request->getPost('driver_mobile');
@ -685,7 +681,7 @@ function viewIGRDetails()
$path = ROOTPATH.'public/uploads/Igrfiles/';
if(!is_dir($path)) { mkdir($path, 0777, true); }
$igrarr = array('DeliveryChellanDate' => $DeliveryChellanDate, 'MaterialRcvdDate' => $MaterialRcvdDt,'VehicleNo'=>$VehicleNo,'DriverMobileNumber'=>$DriverMobileNumber,'DriverName'=>$DriverName, 'IGRStatus' => $IGRStatus,'UpdateBY' => $updateby);
$igrarr = array('DeliveryChellanDate' => $DeliveryChellanDate, 'MaterialRcvdDate' => $MaterialRcvdDt,'VehicleNo'=>$VehicleNo,'VehicleType'=>$VehicleType,'DriverMobileNumber'=>$DriverMobileNumber,'DriverName'=>$DriverName, 'IGRStatus' => $IGRStatus,'UpdateBY' => $updateby);
$MasterFile = $this->request->getfile('MasterFile');

127
app/Controllers/Sales.php Normal file
View File

@ -0,0 +1,127 @@
<?php
namespace App\Controllers;
use App\Controllers\BaseController;
use App\Models\Ipinvoice_model;
require_once 'vendor/autoload.php';
class Sales extends BaseController
{
protected $ipinvoice_model;
protected $session;
public function __construct()
{
parent::__construct();
$this->ipinvoice_model = new Ipinvoice_model();
$this->session = session();
$this->isLoggedIn();
}
public function sales_dashboard()
{
$this->global['pageTitle'] = 'Sales Dashboard';
$data = [];
$data['today_sales'] = $this->ipinvoice_model->todaySales();
$data['this_month_sales'] = $this->ipinvoice_model->thisMonthSales();
$data['this_year_sales'] = $this->ipinvoice_model->thisYearSales();
$data['this_year_sales_trend'] = $this->ipinvoice_model->thisYearSalesTrend();
$data['get_today_invoices'] = $this->ipinvoice_model->getTodayInvoices();
echo "<pre>";
print_r($data);die;
$this->loadViews("sales_dashboard", $this->global, $data, NULL);
}
// Sales Invoice List
function sales_invoice(){
$this->global['pageTitle'] = 'Sales Invoice';
$data['sales_invoice'] = $this->ipinvoice_model->saleInvoiceListing();
// echo "<pre>";
// print_r($data);die;
$this->loadViews("sales_invoice", $this->global, $data, NULL);
}
// View Invoice
function ViewInvoice($InvoiceNO = '')
{
if ($InvoiceNO == '') {
$InvoiceID = $_GET['InvoiceID'];
} else {
$InvoiceID = $InvoiceNO;
}
$data['invoiceDetails'] = $this->ipinvoice_model->getInvoice($InvoiceID);
$data['invoiceAttachment'] = $this->ipinvoice_model->getinvoiceAttachment($InvoiceID);
// echo "<pre>";
// print_r($data);die;
$this->global['pageTitle'] = 'View Invoice';
$this->loadViews("editInvoice", $this->global, $data, NULL);
}
// Invoice Attachments
function getInvoiceAttachments(){
$data['invoiceAttachment'] = $this->ipinvoice_model->getinvoiceAttachment($this->request->getGet('invoice_id'));
return json_encode($data);
}
// Delete Attachment
function deleteAttachment()
{
$invoice_attachment_id = $this->request->getGet('invoice_attachment_id'); // Get the attachment ID from the request
// Ensure ID is not empty
if ($invoice_attachment_id) {
// Load the model
// Call the model method to delete the attachment
$result = $this->ipinvoice_model->deleteAttachment($invoice_attachment_id);
if ($result) {
echo json_encode(['status' => 'success', 'message' => 'Attachment deleted successfully.']);
} else {
echo json_encode(['status' => 'error', 'message' => 'Failed to delete attachment.']);
}
} else {
echo json_encode(['status' => 'error', 'message' => 'Invalid attachment ID.']);
}
}
// Save Attachment
function saveAttachment() {
$invoiceId = $this->request->getPost('invoice_id');
$fileNames = $this->request->getPost('file_name[]');
$files = $this->request->getFiles();
if ($files && isset($files['emp_file']) && is_array($files['emp_file'])) {
foreach ($files['emp_file'] as $key => $file) {
if ($file->isValid() && !$file->hasMoved()) {
// Generate a unique name for the file
$newFileName = $file->getRandomName();
// Move the file to the target directory
$file->move('./public/uploads/images/invoice_files/', $newFileName);
// Insert the file info into the database
$data = [
'invoice_id' => $invoiceId,
'file_name' => $newFileName,
'attachment_name' => $fileNames[$key]
];
$this->ipattachment_model->addNewAttachment($data);
}
}
} else {
return $this->response->setJSON(['success' => false, 'message' => 'No files uploaded or incorrect input name.']);
}
return $this->response->setJSON(['success' => true]);
}
}

View File

@ -10,6 +10,8 @@ use App\Models\Costcenter_model;
use App\Models\Dashboard_model;
use App\Models\Employeedetails_model;
use App\Models\User_model;
use App\Models\Ipinvoice_model;
use App\Models\Ipattachment_model;
use App\Models\Zohobooks_api_model;
require_once 'vendor/autoload.php';
@ -27,6 +29,8 @@ class User extends BaseController
protected $dahsboard_Model;
protected $employeedetails_model;
protected $user_model;
protected $ipinvoice_model;
protected $ipattachment_model;
protected $session;
/**
@ -40,6 +44,8 @@ class User extends BaseController
$this->costcenter_model = new Costcenter_model();
$this->employeedetails_model = new employeedetails_model();
$this->user_model = new User_model();
$this->ipinvoice_model = new Ipinvoice_model();
$this->ipattachment_model = new Ipattachment_model();
$this->session = session();
helper('form'); //$this->load->library('form_validation');
$this->isLoggedIn();
@ -1274,355 +1280,361 @@ class User extends BaseController
// print_r($_GET);
// echo isset($_GET['from']) ? $_GET['from'] : 'n';
// echo isset($_GET['to']) ? $_GET['to'] : 'n';
// die();
try{
// if (isset($_POST['sync']) || $_GET['from'] != null && $_GET['to'] != null)
// {
// $ch=curl_init();
//$this->load->helper('zohobooks_fetch_api_helper');
helper('zohobook');
$Zohobook_model = model('Zohobook_api_model');
if(isset($_GET['from']) && $_GET['from'] != null && isset($_GET['to']) && $_GET['to'] != null)
{
$date_today = $_GET['to'];
$date_yesterday = $_GET['from'];
// die();
try{
// if (isset($_POST['sync']) || $_GET['from'] != null && $_GET['to'] != null)
// {
// $ch=curl_init();
//$this->load->helper('zohobooks_fetch_api_helper');
helper('zohobook');
$Zohobook_model = model('Zohobook_api_model');
if(isset($_GET['from']) && $_GET['from'] != null && isset($_GET['to']) && $_GET['to'] != null)
{
$date_today = $_GET['to'];
$date_yesterday = $_GET['from'];
}
else
{
$date_today = date('Y-m-d');
$date_yesterday = date('Y-m-d',strtotime('-3 day',strtotime($date_today)));
}
// echo $date_today.'--'.$date_yesterday;die;
$chk_acc_token_val = $Zohobook_model->get_data('zohobook_accesstoken','id' , 1);
// print_r($chk_acc_token_val);//die();
$date = new \DateTime($chk_acc_token_val[0]['created_at']);
//print_r($date);
$date->add(new \DateInterval('PT1H'));
//print_r($date);
//echo '****************';
//print_r(date('Y-m-d h:i:s'));
$token = 0;
if ($date->format('Y-m-d H:i:s') > date('Y-m-d H:i:s')) { $token = $chk_acc_token_val[0]['token']; }
else { $token = generateNewToken(); $tokendata['token'] = $token; $Zohobook_model->customUpdate($tokendata , 1,'zohobook_accesstoken'); }
// $token = generateNewToken(); $tokendata['token'] = $token;
//$Zohobook_model->update($tokendata , 1,'zohobook_accesstoken');
$result = getheringInvoiceDetails($date_today , $date_yesterday , $token);
$headers_new = $result['headers_new'];
$res = json_decode($result['data'],true);
$inv_array = $res['invoices'];
// print_r($inv_array);
// echo "rrrr";
// die();
foreach($inv_array as $inv){
$invoice_id = $inv['invoice_id'];
//filter only einvoice status pushed invoices only
//&& isset($inv['einvoice_details']) && isset($inv['einvoice_details']['status']) && ($inv['einvoice_details']['status'] == 'pushed')
if($invoice_id !== "" ){
$organization_id = '776847408';
$result2=getheringInvoiceSubDetails($invoice_id,$organization_id,$headers_new);
$resall = json_decode($result2,true);
$res2[] = $resall['invoice'];
}
else
{
$date_today = date('Y-m-d');
$date_yesterday = date('Y-m-d',strtotime('-3 day',strtotime($date_today)));
}
// echo $date_today.'--'.$date_yesterday;die;
$chk_acc_token_val = $Zohobook_model->get_data('zohobook_accesstoken','id' , 1);
// print_r($chk_acc_token_val);//die();
$date = new \DateTime($chk_acc_token_val[0]['created_at']);
//print_r($date);
$date->add(new \DateInterval('PT1H'));
//print_r($date);
//echo '****************';
//print_r(date('Y-m-d h:i:s'));
$token = 0;
if ($date->format('Y-m-d H:i:s') > date('Y-m-d H:i:s')) { $token = $chk_acc_token_val[0]['token']; }
else { $token = generateNewToken(); $tokendata['token'] = $token; $Zohobook_model->customUpdate($tokendata , 1,'zohobook_accesstoken'); }
// $token = generateNewToken(); $tokendata['token'] = $token;
//$Zohobook_model->update($tokendata , 1,'zohobook_accesstoken');
$result = getheringInvoiceDetails($date_today , $date_yesterday , $token);
$headers_new = $result['headers_new'];
$res = json_decode($result['data'],true);
$inv_array = $res['invoices'];
// print_r($inv_array);
// echo "rrrr";
// die();
foreach($inv_array as $inv){
$invoice_id = $inv['invoice_id'];
//filter only einvoice status pushed invoices only
//&& isset($inv['einvoice_details']) && isset($inv['einvoice_details']['status']) && ($inv['einvoice_details']['status'] == 'pushed')
if($invoice_id !== "" ){
$organization_id = '776847408';
$result2=getheringInvoiceSubDetails($invoice_id,$organization_id,$headers_new);
$resall = json_decode($result2,true);
$res2[] = $resall['invoice'];
}
}
$insert_count = 0;
$update_count = 0;
foreach($res2 as $rs)
{
$gst_no = $rs['gst_no'];
$invoice_number = $rs['invoice_number'];
$invoice_date = $rs['date'];
$status = $rs['status'];
$due_date = $rs['due_date'];
$invoice_time=$rs['created_time'];
$time_array = explode("T", $invoice_time);
$time_array = explode("+",$time_array[1]);
$invoice_time = $time_array[0];
$sql_invoice_chk = $Zohobook_model->ip_invoices($invoice_number , $invoice_date);
if($sql_invoice_chk <= 0)
{
$gst_sql = $Zohobook_model->ip_clients($gst_no);
if($gst_sql)
{
$client_id = $gst_sql[0]['client_id'];
log_message('error', 'Data fetch success DB : ip_clients , client_id : '.$client_id);
}
else
{
log_message('error', 'No data => Data fetch failed DB : ip_clients '.$gst_no);
$gst_no_data['client_tax_code'] = $gst_no;
$gst_inserted_id = $Zohobook_model->customInsert($gst_no_data,'ip_clients');
$client_id = $gst_inserted_id;
log_message('error', 'New Data Created : DB : ip_clients , client_id : '.$client_id);
}
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < 16; $i++) { $randomString .= $characters[rand(0, $charactersLength - 1)]; }
$url_key = $randomString;
$ip_invoices['user_id'] = 1;
$ip_invoices['client_id'] = $client_id;
$ip_invoices['invoice_group_id'] = 6;
$ip_invoices['invoice_status_id'] = ($status == 'draft' ? 1 : (($status == 'sent' || $status == 'overdue') ? 2 : 5));
$ip_invoices['invoice_date_created'] = $invoice_date;
$ip_invoices['invoice_time_created'] = $invoice_time;
$ip_invoices['invoice_date_due'] = $due_date;
$ip_invoices['invoice_number'] = $invoice_number;
$ip_invoices['invoice_url_key'] = $url_key;
$ip_invoices['receivedstatus'] = 'ST066';
$ip_invoices['credit_status'] = 0;
$invoice_insert_id = $Zohobook_model->customInsert($ip_invoices,'ip_invoices');
if($invoice_insert_id)
{
log_message('error', 'Data insert success DB : ip_invoices client id :'. $client_id);
$insert_count = $insert_count + 1;
//start invoice level custom fields
//custom fields insert
$batch_no = isset($rs['custom_fields'][5]['value']) ? $rs['custom_fields'][5]['value'] : "";
// $batch_no = "";
$vehicle_number = isset($rs['custom_field_hash']['cf_vehicle_number']) ? $rs['custom_field_hash']['cf_vehicle_number']: '';
$transport_mode =isset($rs['custom_field_hash']['cf_transport_mode']) ? $rs['custom_field_hash']['cf_transport_mode'] : '';
$purchase_order_date = isset($rs['custom_field_hash']['cf_purchase_order_date'])?$rs['custom_field_hash']['cf_purchase_order_date']:'';
$driver = isset($rs['custom_field_hash']['cf_driver']) ? $rs['custom_field_hash']['cf_driver'] : '';
$place_of_supply = isset($rs['custom_field_hash']['cf_place_of_supply']) ? $rs['custom_field_hash']['cf_place_of_supply']:'';
// batch_no
$ip_invoice_custom_b['invoice_id'] = $invoice_insert_id;
$ip_invoice_custom_b['invoice_custom_fieldid'] = 62;
$ip_invoice_custom_b['invoice_custom_fieldvalue'] = $batch_no;
$result_invoice_custom_insert = $Zohobook_model->customInsert($ip_invoice_custom_b,'ip_invoice_custom');
if($result_invoice_custom_insert)
log_message('error', 'Data insert success DB : ip_invoice_custom ');
else
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
// vehicle_number
$ip_invoice_custom_v['invoice_id'] = $invoice_insert_id;
$ip_invoice_custom_v['invoice_custom_fieldid'] = 8;
$ip_invoice_custom_v['invoice_custom_fieldvalue'] = $vehicle_number;
$res_vehicle = $Zohobook_model->customInsert($ip_invoice_custom_v,'ip_invoice_custom');
if($res_vehicle)
log_message('error', 'Data insert success DB : ip_invoice_custom ');
else
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
// transport_mode
$ip_invoice_custom_t['invoice_id'] = $invoice_insert_id;
$ip_invoice_custom_t['invoice_custom_fieldid'] = 7;
$ip_invoice_custom_t['invoice_custom_fieldvalue'] = $transport_mode;
$res_transport_mode = $Zohobook_model->customInsert($ip_invoice_custom_t,'ip_invoice_custom');
if($res_transport_mode)
log_message('error', 'Data insert success DB : ip_invoice_custom ');
else
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
// purchase_order_date
$ip_invoice_custom_p['invoice_id'] = $invoice_insert_id;
$ip_invoice_custom_p['invoice_custom_fieldid'] = 15;
$ip_invoice_custom_p['invoice_custom_fieldvalue'] = $purchase_order_date;
$res_purchase_order_date =$Zohobook_model->customInsert($ip_invoice_custom_p,'ip_invoice_custom');
if($res_purchase_order_date)
log_message('error', 'Data insert success DB : ip_invoice_custom ');
else
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
// driver
$ip_invoice_custom_d['invoice_id'] = $invoice_insert_id;
$ip_invoice_custom_d['invoice_custom_fieldid'] = 58;
$ip_invoice_custom_d['invoice_custom_fieldvalue'] = $driver;
$res_driver = $Zohobook_model->customInsert($ip_invoice_custom_d,'ip_invoice_custom');
if($res_driver)
log_message('error', 'Data insert success DB : ip_invoice_custom ');
else
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
// place_of_supply
$ip_invoice_custom_d['invoice_id'] = $invoice_insert_id;
$ip_invoice_custom_d['invoice_custom_fieldid'] = 10;
$ip_invoice_custom_d['invoice_custom_fieldvalue'] = $place_of_supply;
$res_place = $Zohobook_model->customInsert($ip_invoice_custom_d,'ip_invoice_custom');
if($res_place)
log_message('error', 'Data insert success DB : ip_invoice_custom ');
else
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
//end invoice level custom fields
//if line items available
if(isset($rs['line_items']) && count($rs['line_items']) > 0)
{
log_message('error', 'Processing line items'.count($rs['line_items']));
for($i = 0; $i< count($rs['line_items']);$i++)
{ //start insert line items
$sku = $rs['line_items'][$i]['sku'];
$item_price = $rs['line_items'][$i]['rate'];
$item_order = $rs['line_items'][$i]['item_order'];
$item_product_unit = $rs['line_items'][$i]['unit'];
$item_name = $rs['line_items'][$i]['name'];
$item_description = $rs['line_items'][$i]['description'];
$item_quantity = $rs['line_items'][$i]['quantity'];
$cgst = $rs['line_items'][$i]['line_item_taxes'][1]['tax_name'];
$sgst = $rs['line_items'][$i]['line_item_taxes'][0]['tax_name'];
$cgst = $cgst[4];
$sgst = $sgst[4];
$cgst = $cgst.'.000';
$getcgsttax = $Zohobook_model->ip_tax_rates($cgst);
if($getcgsttax)
{
$cgsttaxid = $getcgsttax[0]['tax_rate_id'];
log_message('error', 'Data fetch success DB : ip_tax_rates cgst'. $cgst);
}
else
{
log_message('error', 'No data => Data fetch failed DB : ip_tax_rates '. $cgst);
$cgst_data['tax_rate_percent'] = $cgst;
$getcgsttax = $Zohobook_model->customInsert($cgst_data,'ip_tax_rates');
$cgsttaxid = $getcgsttax;
log_message('error', 'New Data Created : DB : ip_tax_rates , tax_rate_id : '.$cgsttaxid);
}
$sgst = $sgst.'.000';
$getsgsttax = $Zohobook_model->ip_tax_rates($sgst);
if($getsgsttax)
{
$sgsttaxid = $getsgsttax[0]['tax_rate_id'];
log_message('error', 'Data fetch success DB : ip_tax_rates sgst'. $sgst);
}
else
{
log_message('error', 'No data => Data fetch failed DB : ip_tax_rates '. $sgst);
$sgst_data['tax_rate_percent'] = $sgst;
$getsgsttax = $Zohobook_model->customInsert($sgst_data,'ip_tax_rates');
$sgsttaxid = $getsgsttax;
log_message('error', 'New Data Created : DB : ip_tax_rates , tax_rate_id : '.$sgsttaxid);
}
$item_subtotal = $rs['line_items'][$i]['item_total'];
$item_sgst_amt = $rs['line_items'][$i]['line_item_taxes'][0]['tax_amount'];
$item_cgst_amt = $rs['line_items'][$i]['line_item_taxes'][1]['tax_amount'];
$item_tax_total = ($item_sgst_amt + $item_cgst_amt);
$item_total = ($item_subtotal + $item_tax_total);
$item_discount = 0.00;
$item_igst_amt = 0.00;
// if($batch_no==""){ $batch_no = "";}
$sku_sql = $Zohobook_model->ip_products($sku);
if(!empty($sku_sql))
{
$product_id = $sku_sql[0]['product_id'];
log_message('error', 'Data fetch success DB : ip_products , product_id : '.$product_id);
}
else
{
log_message('error', 'No data => Data fetch failed DB : ip_products '. $sku);
$sku_data['product_name'] = $item_name;
$sku_data['product_description'] = $item_description;
$sku_data['sku'] = $sku;
$sku_inserted_id = $Zohobook_model->customInsert($sku_data,'ip_products');
$product_id = $sku_inserted_id;
log_message('error', '$sku_sql => Data fetch failed DB : ip_products '. $sku_sql);
}
$insert_count = 0;
$update_count = 0;
foreach($res2 as $rs)
{
$gst_no = $rs['gst_no'];
$invoice_number = $rs['invoice_number'];
$invoice_date = $rs['date'];
$status = $rs['status'];
$due_date = $rs['due_date'];
$invoice_url = $rs['invoice_url'];
$einvoice_number = $rs['einvoice_details']['inv_ref_num'];
log_message('error', 'sku'.$sku);
log_message('error', 'New Data Created : DB : product_id , product_id : '.$product_id);
}
//#1
$ip_invoice_items['invoice_id'] = $invoice_insert_id;
$ip_invoice_items['item_product_id'] = $product_id;
$ip_invoice_items['item_date_added'] = $invoice_date;
$ip_invoice_items['item_name'] = $item_name;
$ip_invoice_items['item_description'] = $item_description;
$ip_invoice_items['item_quantity'] = $item_quantity;
$ip_invoice_items['item_price'] = $item_price;
$ip_invoice_items['item_order'] = $item_order;
$ip_invoice_items['item_product_unit'] = $item_product_unit;
$ip_invoice_items['Sgst_item_tax_rate_id'] = $sgsttaxid;
$ip_invoice_items['Cgst_item_tax_rate_id'] = $cgsttaxid;
$item_insert_id = $Zohobook_model->customInsert($ip_invoice_items,'ip_invoice_items');
if($item_insert_id)
log_message('error', 'Data insert success DB : ip_invoice_items => Sgst_item_tax_rate_id :'. $sgsttaxid);
else
log_message('error', 'Data insert failed DB : ip_invoice_items => Sgst_item_tax_rate_id :'. $sgsttaxid);
//tax amount -- ip_invoice_item_amounts - table
$ip_invoice_item_amounts['item_id'] = $item_insert_id;
$ip_invoice_item_amounts['item_subtotal'] = $item_subtotal;
$ip_invoice_item_amounts['item_tax_total'] = $item_tax_total;
$ip_invoice_item_amounts['item_total'] = $item_total;
$ip_invoice_item_amounts['item_sgst_amt'] = $item_sgst_amt;
$ip_invoice_item_amounts['item_cgst_amt'] = $item_cgst_amt;
$ip_invoice_item_amounts['item_discount'] = $item_discount;
$ip_invoice_item_amounts['item_igst_amt'] = $item_igst_amt;
$result_tax_amount_insert = $Zohobook_model->customInsert($ip_invoice_item_amounts,'ip_invoice_item_amounts');
if($result_tax_amount_insert)
log_message('error', 'Data insert success DB : ip_invoice_item_amounts ');
else
log_message('error', 'Data insert failed DB : ip_invoice_item_amounts ');
} //end line items insert
}
else
{
log_message('error', 'Line Items not found in API result');
}
}
else
{
log_message('error', 'Data insert failed DB : ip_invoice_items client id :'. $client_id);
}
}
else // update invoice status, especially for cancelled invoices
$invoice_time=$rs['created_time'];
$time_array = explode("T", $invoice_time);
$time_array = explode("+",$time_array[1]);
$invoice_time = $time_array[0];
$sql_invoice_chk = $Zohobook_model->ip_invoices($invoice_number , $invoice_date);
if($sql_invoice_chk <= 0)
{
$gst_sql = $Zohobook_model->ip_clients($gst_no);
if($gst_sql)
{
if($status == "void" || $status == "sent" || $status == "overdue")
$client_id = $gst_sql[0]['client_id'];
log_message('error', 'Data fetch success DB : ip_clients , client_id : '.$client_id);
}
else
{
log_message('error', 'No data => Data fetch failed DB : ip_clients '.$gst_no);
$gst_no_data['client_tax_code'] = $gst_no;
$gst_inserted_id = $Zohobook_model->customInsert($gst_no_data,'ip_clients');
$client_id = $gst_inserted_id;
log_message('error', 'New Data Created : DB : ip_clients , client_id : '.$client_id);
}
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < 16; $i++) { $randomString .= $characters[rand(0, $charactersLength - 1)]; }
$url_key = $randomString;
$ip_invoices['user_id'] = 1;
$ip_invoices['client_id'] = $client_id;
$ip_invoices['invoice_group_id'] = 6;
$ip_invoices['invoice_status_id'] = ($status == 'draft' ? 1 : (($status == 'sent' || $status == 'overdue') ? 2 : 5));
$ip_invoices['invoice_date_created'] = $invoice_date;
$ip_invoices['invoice_time_created'] = $invoice_time;
$ip_invoices['invoice_date_due'] = $due_date;
$ip_invoices['invoice_number'] = $invoice_number;
$ip_invoices['invoice_url_key'] = $url_key;
$ip_invoices['receivedstatus'] = 'ST066';
$ip_invoices['credit_status'] = 0;
$ip_invoices['status'] = $status;
$ip_invoices['e_invoice_number'] = $einvoice_number;
$ip_invoices['invoice_url'] = $invoice_url;
$invoice_insert_id = $Zohobook_model->customInsert($ip_invoices,'ip_invoices');
if($invoice_insert_id)
{
log_message('error', 'Data insert success DB : ip_invoices client id :'. $client_id);
$insert_count = $insert_count + 1;
//start invoice level custom fields
//custom fields insert
$batch_no = isset($rs['custom_fields'][5]['value']) ? $rs['custom_fields'][5]['value'] : "";
// $batch_no = "";
$vehicle_number = isset($rs['custom_field_hash']['cf_vehicle_number']) ? $rs['custom_field_hash']['cf_vehicle_number']: '';
$transport_mode =isset($rs['custom_field_hash']['cf_transport_mode']) ? $rs['custom_field_hash']['cf_transport_mode'] : '';
$purchase_order_date = isset($rs['custom_field_hash']['cf_purchase_order_date'])?$rs['custom_field_hash']['cf_purchase_order_date']:'';
$driver = isset($rs['custom_field_hash']['cf_driver']) ? $rs['custom_field_hash']['cf_driver'] : '';
$place_of_supply = isset($rs['custom_field_hash']['cf_place_of_supply']) ? $rs['custom_field_hash']['cf_place_of_supply']:'';
// batch_no
$ip_invoice_custom_b['invoice_id'] = $invoice_insert_id;
$ip_invoice_custom_b['invoice_custom_fieldid'] = 62;
$ip_invoice_custom_b['invoice_custom_fieldvalue'] = $batch_no;
$result_invoice_custom_insert = $Zohobook_model->customInsert($ip_invoice_custom_b,'ip_invoice_custom');
if($result_invoice_custom_insert)
log_message('error', 'Data insert success DB : ip_invoice_custom ');
else
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
// vehicle_number
$ip_invoice_custom_v['invoice_id'] = $invoice_insert_id;
$ip_invoice_custom_v['invoice_custom_fieldid'] = 8;
$ip_invoice_custom_v['invoice_custom_fieldvalue'] = $vehicle_number;
$res_vehicle = $Zohobook_model->customInsert($ip_invoice_custom_v,'ip_invoice_custom');
if($res_vehicle)
log_message('error', 'Data insert success DB : ip_invoice_custom ');
else
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
// transport_mode
$ip_invoice_custom_t['invoice_id'] = $invoice_insert_id;
$ip_invoice_custom_t['invoice_custom_fieldid'] = 7;
$ip_invoice_custom_t['invoice_custom_fieldvalue'] = $transport_mode;
$res_transport_mode = $Zohobook_model->customInsert($ip_invoice_custom_t,'ip_invoice_custom');
if($res_transport_mode)
log_message('error', 'Data insert success DB : ip_invoice_custom ');
else
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
// purchase_order_date
$ip_invoice_custom_p['invoice_id'] = $invoice_insert_id;
$ip_invoice_custom_p['invoice_custom_fieldid'] = 15;
$ip_invoice_custom_p['invoice_custom_fieldvalue'] = $purchase_order_date;
$res_purchase_order_date =$Zohobook_model->customInsert($ip_invoice_custom_p,'ip_invoice_custom');
if($res_purchase_order_date)
log_message('error', 'Data insert success DB : ip_invoice_custom ');
else
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
// driver
$ip_invoice_custom_d['invoice_id'] = $invoice_insert_id;
$ip_invoice_custom_d['invoice_custom_fieldid'] = 58;
$ip_invoice_custom_d['invoice_custom_fieldvalue'] = $driver;
$res_driver = $Zohobook_model->customInsert($ip_invoice_custom_d,'ip_invoice_custom');
if($res_driver)
log_message('error', 'Data insert success DB : ip_invoice_custom ');
else
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
// place_of_supply
$ip_invoice_custom_d['invoice_id'] = $invoice_insert_id;
$ip_invoice_custom_d['invoice_custom_fieldid'] = 10;
$ip_invoice_custom_d['invoice_custom_fieldvalue'] = $place_of_supply;
$res_place = $Zohobook_model->customInsert($ip_invoice_custom_d,'ip_invoice_custom');
if($res_place)
log_message('error', 'Data insert success DB : ip_invoice_custom ');
else
log_message('error', 'Data insert failed DB : ip_invoice_custom ');
//end invoice level custom fields
//if line items available
if(isset($rs['line_items']) && count($rs['line_items']) > 0)
{
$sql_invoice_update = array();
$sql_invoice_update['invoice_status_id'] = (($status == "sent" || $status == "overdue") ? 2 : 5);
// echo 'script' . $invoice_number. $status;
// print_r( $sql_invoice_update);
// echo '<br>';
$sql_invoice_update = $Zohobook_model->sql_invoice_update($sql_invoice_update,$invoice_number,$invoice_date,'ip_invoices');
if($sql_invoice_update)
{
log_message('error', 'Data update success DB : ip_invoices ');
}
else
{
log_message('error', 'Data update failed DB : ip_invoices ');
}
$update_count = $update_count + 1;
log_message('error', 'Processing line items'.count($rs['line_items']));
for($i = 0; $i< count($rs['line_items']);$i++)
{ //start insert line items
$sku = $rs['line_items'][$i]['sku'];
$item_price = $rs['line_items'][$i]['rate'];
$item_order = $rs['line_items'][$i]['item_order'];
$item_product_unit = $rs['line_items'][$i]['unit'];
$item_name = $rs['line_items'][$i]['name'];
$item_description = $rs['line_items'][$i]['description'];
$item_quantity = $rs['line_items'][$i]['quantity'];
$cgst = $rs['line_items'][$i]['line_item_taxes'][1]['tax_name'];
$sgst = $rs['line_items'][$i]['line_item_taxes'][0]['tax_name'];
$cgst = $cgst[4];
$sgst = $sgst[4];
$cgst = $cgst.'.000';
$getcgsttax = $Zohobook_model->ip_tax_rates($cgst);
if($getcgsttax)
{
$cgsttaxid = $getcgsttax[0]['tax_rate_id'];
log_message('error', 'Data fetch success DB : ip_tax_rates cgst'. $cgst);
}
else
{
log_message('error', 'No data => Data fetch failed DB : ip_tax_rates '. $cgst);
$cgst_data['tax_rate_percent'] = $cgst;
$getcgsttax = $Zohobook_model->customInsert($cgst_data,'ip_tax_rates');
$cgsttaxid = $getcgsttax;
log_message('error', 'New Data Created : DB : ip_tax_rates , tax_rate_id : '.$cgsttaxid);
}
$sgst = $sgst.'.000';
$getsgsttax = $Zohobook_model->ip_tax_rates($sgst);
if($getsgsttax)
{
$sgsttaxid = $getsgsttax[0]['tax_rate_id'];
log_message('error', 'Data fetch success DB : ip_tax_rates sgst'. $sgst);
}
else
{
log_message('error', 'No data => Data fetch failed DB : ip_tax_rates '. $sgst);
$sgst_data['tax_rate_percent'] = $sgst;
$getsgsttax = $Zohobook_model->customInsert($sgst_data,'ip_tax_rates');
$sgsttaxid = $getsgsttax;
log_message('error', 'New Data Created : DB : ip_tax_rates , tax_rate_id : '.$sgsttaxid);
}
$item_subtotal = $rs['line_items'][$i]['item_total'];
$item_sgst_amt = $rs['line_items'][$i]['line_item_taxes'][0]['tax_amount'];
$item_cgst_amt = $rs['line_items'][$i]['line_item_taxes'][1]['tax_amount'];
$item_tax_total = ($item_sgst_amt + $item_cgst_amt);
$item_total = ($item_subtotal + $item_tax_total);
$item_discount = 0.00;
$item_igst_amt = 0.00;
// if($batch_no==""){ $batch_no = "";}
$sku_sql = $Zohobook_model->ip_products($sku);
if(!empty($sku_sql))
{
$product_id = $sku_sql[0]['product_id'];
log_message('error', 'Data fetch success DB : ip_products , product_id : '.$product_id);
}
else
{
log_message('error', 'No data => Data fetch failed DB : ip_products '. $sku);
$sku_data['product_name'] = $item_name;
$sku_data['product_description'] = $item_description;
$sku_data['sku'] = $sku;
$sku_inserted_id = $Zohobook_model->customInsert($sku_data,'ip_products');
$product_id = $sku_inserted_id;
log_message('error', '$sku_sql => Data fetch failed DB : ip_products '. $sku_sql);
log_message('error', 'sku'.$sku);
log_message('error', 'New Data Created : DB : product_id , product_id : '.$product_id);
}
//#1
$ip_invoice_items['invoice_id'] = $invoice_insert_id;
$ip_invoice_items['item_product_id'] = $product_id;
$ip_invoice_items['item_date_added'] = $invoice_date;
$ip_invoice_items['item_name'] = $item_name;
$ip_invoice_items['item_description'] = $item_description;
$ip_invoice_items['item_quantity'] = $item_quantity;
$ip_invoice_items['item_price'] = $item_price;
$ip_invoice_items['item_order'] = $item_order;
$ip_invoice_items['item_product_unit'] = $item_product_unit;
$ip_invoice_items['Sgst_item_tax_rate_id'] = $sgsttaxid;
$ip_invoice_items['Cgst_item_tax_rate_id'] = $cgsttaxid;
$item_insert_id = $Zohobook_model->customInsert($ip_invoice_items,'ip_invoice_items');
if($item_insert_id)
log_message('error', 'Data insert success DB : ip_invoice_items => Sgst_item_tax_rate_id :'. $sgsttaxid);
else
log_message('error', 'Data insert failed DB : ip_invoice_items => Sgst_item_tax_rate_id :'. $sgsttaxid);
//tax amount -- ip_invoice_item_amounts - table
$ip_invoice_item_amounts['item_id'] = $item_insert_id;
$ip_invoice_item_amounts['item_subtotal'] = $item_subtotal;
$ip_invoice_item_amounts['item_tax_total'] = $item_tax_total;
$ip_invoice_item_amounts['item_total'] = $item_total;
$ip_invoice_item_amounts['item_sgst_amt'] = $item_sgst_amt;
$ip_invoice_item_amounts['item_cgst_amt'] = $item_cgst_amt;
$ip_invoice_item_amounts['item_discount'] = $item_discount;
$ip_invoice_item_amounts['item_igst_amt'] = $item_igst_amt;
$result_tax_amount_insert = $Zohobook_model->customInsert($ip_invoice_item_amounts,'ip_invoice_item_amounts');
if($result_tax_amount_insert)
log_message('error', 'Data insert success DB : ip_invoice_item_amounts ');
else
log_message('error', 'Data insert failed DB : ip_invoice_item_amounts ');
} //end line items insert
}
else
{
log_message('error', 'Line Items not found in API result');
}
}
// echo 'new invoice inserted count- ' . $insert_count . '/' . 'status updated count - ' . $update_count;
else
{
log_message('error', 'Data insert failed DB : ip_invoice_items client id :'. $client_id);
}
}
else // update invoice status, especially for cancelled invoices
{
// if($status == "void" || $status == "sent" || $status == "overdue")
// {
$sql_invoice_update = array();
$sql_invoice_update['invoice_status_id'] = (($status == "sent" || $status == "overdue") ? 2 : 5);
// echo 'script' . $invoice_number. $status;
// print_r( $sql_invoice_update);
// echo '<br>';
$sql_invoice_update = $Zohobook_model->sql_invoice_update($sql_invoice_update,$invoice_number,$invoice_date,'ip_invoices');
if($sql_invoice_update)
{
log_message('error', 'Data update success DB : ip_invoices ');
}
else
{
log_message('error', 'Data update failed DB : ip_invoices ');
}
$update_count = $update_count + 1;
// }
}
// echo 'new invoice inserted count- ' . $insert_count . '/' . 'status updated count - ' . $update_count;
}$response = [
'status' => true,
'message' => "Successfully data inserted. Total inserted: " . $insert_count . ", Total Updated: " . $update_count
];
return json_encode($response);
// curl_close($ch);
// }
}
catch (\Exception $e) {
$data['err'] = $e->getMessage();
// $db = \Config\Database::connect();
// $data['last_query'] = $db->getLastQuery();;
$Zohobook_model->customInsert($data,'zohobook_api_err');
log_message('error', "Data insertion failed : " . $e->getMessage());
return json_encode("Data insertion failed : " . $e->getMessage());
}
}
// END zoho API
}
}$response = [
'status' => true,
'message' => "Successfully data inserted. Total inserted: " . $insert_count . ", Total Updated: " . $update_count
];
return json_encode($response);
// curl_close($ch);
// }
}
catch (\Exception $e) {
$data['err'] = $e->getMessage();
// $db = \Config\Database::connect();
// $data['last_query'] = $db->getLastQuery();;
$Zohobook_model->customInsert($data,'zohobook_api_err');
log_message('error', "Data insertion failed : " . $e->getMessage());
return json_encode("Data insertion failed : " . $e->getMessage());
}
}
// END zoho API
}

View File

@ -77,7 +77,6 @@ if (! function_exists('getheringInvoiceDetails')) {
// Store headers and data
$data['headers_new'] = $headers;
$data['data'] = curl_exec($ch);
// Return data
return $data;
}

View File

@ -51,7 +51,7 @@ class Department_model extends Model
function departmentListing()
{
$builder = $this->db->table('t_departmentdetails as BaseT')
->select('BaseT.DepartmentName, BaseT.DEPCode, BaseT.HeadDept, BaseT.IsActive')
->select('BaseT.CreatedDt,BaseT.DepartmentName, BaseT.DEPCode, BaseT.HeadDept, BaseT.IsActive')
->orderBy("BaseT.DEPCode", "asc");
$query =$builder->get();
$result = $query->getResult();

View File

@ -153,7 +153,7 @@ class Inwardgateregister_model extends Model
->join('t_purchaseorder_lineitem POL', 'POL.PONO = POM.PONO')
->join('t_supplierdetailsn sup', 'POM.SupplierID = sup.SupplierID')
->join('t_ogr_master OGM ', 'POM.PONO = OGM.PONO_INV', 'left')
->where('POM.POType !=', SERVICE)
// ->where('POM.POType !=', SERVICE) // due to client requirements - he wants to remove the conidition.
->where('POM.Status', PO_RELEASED)
->orWhere('POM.Status',REQITEM_Emergency_PO_CREATED)
->orWhere('POM.Status',IGR_CREATED)
@ -164,10 +164,48 @@ class Inwardgateregister_model extends Model
$query = $builder->get();
$result = $query->getResult();
// echo $this->db->getLastQuery()->getQuery(); die;
return $result;
}
function checkdrivername($dr)
{
$temp[] = '';
$builder = $this->db->table('t_igr_master')
->distinct()
->select('DriverName')
->like('DriverName', $dr);
$query = $builder->get();
$temparr[] = '';
foreach ($query->getResult() as $arr) {
$temparr[] = $arr->DriverName;
}
$temp['suggestions'] = $temparr;
return $temp;
}
public function checkdriverMobile($mobile,$driverName) {
$builder = $this->db->table('t_igr_master')
->distinct()
->select('DriverMobileNumber')
->like('DriverMobileNumber', $mobile);
if($driverName){
$builder->where('DriverName', $driverName);
}
$query = $builder->get();
$temparr[] = '';
foreach ($query->getResult() as $arr) {
$temparr[] = $arr->DriverMobileNumber;
}
// echo $this->db->getLastQuery()->getQuery();die;
$temp['suggestions'] = $temparr;
return $temp;
}
function viewpurchaseorder($PO)
{
@ -328,11 +366,10 @@ class Inwardgateregister_model extends Model
->join('t_purchaseorder_master PO', 'igr.PONO = PO.PONO')
->join('t_supplierdetailsn` sup', 'PO.SupplierID = sup.SupplierID')
->where('igr.IGRStatus !=', MRIR_CREATED)
->where('PO.IsQualityChkReqired', 1)
->orderBy('igr.CreatedDate', 'desc');
$query = $builder->get();
$result = $query->getResult();
// echo $this->db->getLastQuery()->getQuery();die;
return $result;
}
@ -346,7 +383,7 @@ class Inwardgateregister_model extends Model
$builder = $this->db->table('t_igr_master igr')
->distinct()
->select('igr.IGRNO,igr.*,igrd.*,MM.MaterialName,MM.UOM,sup.Address,sup.SupplierName,POM.ServiceDescription,POL.Quantity,POM.POType')
->select('igr.IGRNO,igr.*,igrd.*,MM.MaterialName,MM.UOM,sup.Address,sup.SupplierName,POM.ServiceDescription,POL.Quantity,POM.POType,POM.IsOpenOrder')
->join('t_igr_details igrd', 'igrd.IGRNO = igr.IGRNO')
->join('t_purchaseorder_master POM', 'igr.PONO = POM.PONO')
->join('t_purchaseorder_lineitem POL', 'igr.PONO = POL.PONO and POL.MaterialCode=igrd.MaterialCode ')

View File

@ -0,0 +1,78 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class Ipattachment_model extends Model
{
/**
* This function is used to add new user to system
* @return number $insert_id : This is last inserted id
*/
function addNewAttachment($attachments)
{
$this->db->transStart();
$builder = $this->db->table('ip_invoice_attachment');
$builder->insert($attachments);
$insert_id = $this->db->affectedRows();
$this->db->transComplete();
return $insert_id;
}
// Ipinvoice_model
public function deleteAttachment($invoice_attachment_id) {
// Get the attachment details to get the file path
$builder = $this->db->table('ip_invoice_attachment');
$builder->where('invoice_attachment_id', $invoice_attachment_id);
$query = $builder->get();
$attachment = $query->getRowArray(); // Get single row as an associative array
if ($attachment) {
// Construct the file path
$fileName = $attachment['attachment_name']; // Make sure this is the correct field name
$filePath = './public/uploads/images/invoice_files/' . $fileName;
// Debug: Log the file path
log_message('error', 'Attempting to delete file: ' . $filePath);
// Check if the path is actually a file
if (file_exists($filePath) && !is_dir($filePath)) {
unlink($filePath); // Delete the file
} else {
log_message('error', 'File does not exist or is a directory: ' . $filePath);
}
// Delete the record from the database
$builder->where('invoice_attachment_id', $invoice_attachment_id);
$builder->delete();
return $this->db->affectedRows() > 0;
}
return false;
}
}

View File

@ -0,0 +1,441 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class Ipinvoice_model extends Model
{
/**
* This function is used to get the user listing count
* @param string $searchText : This is optional search text
* @param number $page : This is pagination offset
* @param number $segment : This is pagination limit
* @return array $result : This is result
*/
function saleInvoiceListing()
{
$builder = $this->db->table('ip_invoices')
->select('ip_invoices.invoice_id, ip_invoices.user_id, ip_invoices.client_id,
ip_invoices.invoice_group_id, ip_invoices.invoice_status_id, ip_invoices.invoice_date_due, ip_invoices.invoice_date_created,
ip_invoices.invoice_number, ip_invoices.invoice_terms, ip_invoices.status, ip_invoices.e_invoice_number, ip_invoices.invoice_url, ip_clients.client_name,
ip_payment_methods.payment_method_name, ip_users.user_name,
ip_products.product_name, ip_invoice_items.item_price, ip_products.cgst, ip_products.sgst,
ip_invoice_items.item_quantity, ip_invoice_items.item_price, ip_invoice_items.item_name, ip_invoice_items.item_quantity,
ip_invoice_amounts.invoice_total, ip_invoice_amounts.invoice_item_subtotal, ip_invoice_amounts.invoice_item_tax_total')
->join('ip_payment_methods', 'ip_invoices.payment_method = ip_payment_methods.payment_method_id', 'left')
->join('ip_clients', 'ip_invoices.client_id = ip_clients.client_id', 'left')
->join('ip_users', 'ip_invoices.user_id = ip_users.user_id', 'left')
->join('ip_invoice_items', 'ip_invoices.invoice_id = ip_invoice_items.invoice_id', 'left')
->join('ip_products', 'ip_invoice_items.item_product_id = ip_products.product_id', 'left')
->join('ip_invoice_amounts', 'ip_invoices.invoice_id = ip_invoice_amounts.invoice_id', 'left')
->orderBy('ip_invoices.invoice_number', 'DESC');
$query = $builder->get();
$result = $query->getResult();
// $results = $query->getResultArray();
return $result;
// $invoices = [];
// foreach ($results as $row) {
// $invoice_id = $row['invoice_id'];
// // If the invoice_id doesn't exist in the $invoices array, initialize it
// if (!isset($invoices[$invoice_id])) {
// $invoices[$invoice_id] = [
// 'invoice_id' => $row['invoice_id'],
// 'user_id' => $row['user_id'],
// 'client_id' => $row['client_id'],
// 'invoice_group_id' => $row['invoice_group_id'],
// 'invoice_status_id' => $row['invoice_status_id'],
// 'invoice_date_due' => $row['invoice_date_due'],
// 'invoice_date_created' => $row['invoice_date_created'],
// 'invoice_number' => $row['invoice_number'],
// 'invoice_terms' => $row['invoice_terms'],
// 'status' => $row['status'],
// 'e_invoice_number' => $row['e_invoice_number'],
// 'invoice_url' => $row['invoice_url'],
// 'client_name' => $row['client_name'],
// 'payment_method_name' => $row['payment_method_name'],
// 'user_name' => $row['user_name'],
// 'invoice_total' => $row['invoice_total'],
// 'invoice_item_subtotal' => $row['invoice_item_subtotal'],
// 'invoice_item_tax_total' => $row['invoice_item_tax_total'],
// 'products' => [] // Initialize the products array
// ];
// }
// // Add the product to the products array for the current invoice
// $invoices[$invoice_id]['products'][] = [
// 'product_name' => $row['product_name'],
// 'item_quantity' => $row['item_quantity'],
// 'item_price' => $row['item_price'],
// ];
// }
// // Return the grouped invoices
// return $invoices;
}
/**
* This function is used to add new user to system
* @return number $insert_id : This is last inserted id
*/
function addNewUser($userInfo)
{
$this->db->transStart();
$builder = $this->db->table('tbl_users');
$builder->insert($userInfo);
$insert_id = $this->db->affectedRows();
$this->db->transComplete();
return $insert_id;
}
/**
* This function used to get user information by id
* @param number $userId : This is user id
* @return array $result : This is user information
*/
function getInvoice($invoiceId)
{
$builder = $this->db->table('ip_invoices')
// ->select('')
->where('invoice_id', $invoiceId);
$query = $builder->get();
return $query->getResult();
}
/**
* This function used to get user information by id
* @param number $userId : This is user id
* @return array $result : This is user information
*/
function getinvoiceAttachment($invoiceId)
{
$builder = $this->db->table('ip_invoice_attachment')
// ->select('')
->where('invoice_id', $invoiceId);
$query = $builder->get();
return $query->getResult();
}
// Ipinvoice_model
public function deleteAttachment($invoice_attachment_id) {
// Get the attachment details to get the file path
$builder = $this->db->table('ip_invoice_attachment');
$builder->where('invoice_attachment_id', $invoice_attachment_id);
$query = $builder->get();
$attachment = $query->getRowArray(); // Get single row as an associative array
if ($attachment) {
// Construct the file path
$fileName = $attachment['attachment_name']; // Make sure this is the correct field name
$filePath = './public/uploads/images/invoice_files/' . $fileName;
// Debug: Log the file path
log_message('error', 'Attempting to delete file: ' . $filePath);
// Check if the path is actually a file
if (file_exists($filePath) && !is_dir($filePath)) {
unlink($filePath); // Delete the file
} else {
log_message('error', 'File does not exist or is a directory: ' . $filePath);
}
// Delete the record from the database
$builder->where('invoice_attachment_id', $invoice_attachment_id);
$builder->delete();
return $this->db->affectedRows() > 0;
}
return false;
}
/**
* This function is used to update the user information
* @param array $userInfo : This is users updated information
* @param number $userId : This is user id
*/
function editUser($userInfo, $userId)
{
$this->db->table('tbl_users')
->where('EmpID', $userId)
->update($userInfo);
return TRUE;
}
/**
* This function is used to delete the user information
* @param number $userId : This is user id
* @return boolean $result : TRUE / FALSE
*/
function deleteUser($userId, $userInfo)
{
$this->db->table('tbl_users')
->where('userId', $userId)
->update($userInfo);
return $this->db->affectedRows();
}
/**
* This function is used to get the All employees
* @return array $result : This is result of the query
*/
function getAllEmployees()
{
/*->select('EmpID,FirstName,LastName');
$builder = $this->db->table('t_employee_details');
$query = $builder->get();
return $query->getResult(); */
$builder = $this->db->table('t_employee_details EMP')
->select('EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,EMP.EmailId,EMP.ContactNumber,DEPT.DEPCode,DEPT.DepartmentName')
->join('t_departmentdetails DEPT', 'EMP.Departmentcode = DEPT.DEPCode')
->where('EMP.IsActive ', 1);
$query = $builder->get();
return $query->getResult();
}
/**
* This function is used to get the Today Sales
* @return array $result : This is result of the query
*/
function todaySales()
{
$builder = $this->db->table('ip_invoices a')
->select('COUNT(DISTINCT(a.invoice_number)) as Invoices, IFNULL(SUM(b.item_quantity), 0) as Qty, IFNULL(SUM(c.item_subtotal), 0) as Sales')
->join('ip_invoice_items b', 'a.invoice_id = b.invoice_id', 'left')
->join('ip_invoice_item_amounts c', 'b.item_id = c.item_id', 'left')
->where('a.invoice_date_created', date('Y-m-d'))
->where('a.invoice_status_id', 2);
$query = $builder->get();
return $query->getRow(); // Assuming you want a single row of aggregated results
}
/**
* This function is used to get the This Month Sales
* @return array $result : This is result of the query
*/
function thisMonthSales()
{
// Calculate the start date for the current fiscal month
$fiscalMonthStart = date('Y') . '-04-01'; // Assuming the fiscal year starts in April
$currentYear = date('Y');
$currentMonth = date('m');
// If the current month is before April, subtract one year for the fiscal year start
if ($currentMonth < 4) {
$fiscalMonthStart = ($currentYear - 1) . '-' . $currentMonth . '-01';
} else {
$fiscalMonthStart = $currentYear . '-' . $currentMonth . '-01';
}
// Build the query
$builder = $this->db->table('ip_invoices a')
->select('COUNT(DISTINCT(a.invoice_number)) as Invoices,
IFNULL(SUM(b.item_quantity), 0) as Qty,
IFNULL(SUM(c.item_subtotal), 0) as Sales')
->join('ip_invoice_items b', 'a.invoice_id = b.invoice_id', 'left')
->join('ip_invoice_item_amounts c', 'b.item_id = c.item_id', 'left')
->where('a.invoice_date_created >=', $fiscalMonthStart)
->where('a.invoice_status_id', 2);
// Execute the query
$query = $builder->get();
// Log the SQL query for debugging
log_message('debug', $builder->getCompiledSelect());
// Return the aggregated results
return $query->getRow();
}
/**
* This function is used to get the This Year Sales
* @return array $result : This is result of the query
*/
function thisYearSales()
{
// Calculate the start date for the current fiscal year
$fiscalYearStart = date('Y') . '-04-01';
$currentYear = date('Y');
$currentMonth = date('m');
// If the current month is before April, subtract one year for the fiscal year start
if ($currentMonth < 4) {
$fiscalYearStart = ($currentYear - 1) . '-04-01';
} else {
$fiscalYearStart = $currentYear . '-04-01';
}
// Build the query
$builder = $this->db->table('ip_invoices a')
->select('COUNT(DISTINCT(a.invoice_number)) as Invoices,
IFNULL(SUM(b.item_quantity), 0) as Qty,
IFNULL(SUM(c.item_subtotal), 0) as Sales')
->join('ip_invoice_items b', 'a.invoice_id = b.invoice_id', 'left')
->join('ip_invoice_item_amounts c', 'b.item_id = c.item_id', 'left')
->where('a.invoice_date_created >=', $fiscalYearStart)
->where('a.invoice_status_id', 2);
// Execute the query
$query = $builder->get();
// Log the SQL query for debugging
log_message('debug', $builder->getCompiledSelect());
// Return the aggregated results
return $query->getRow();
}
/**
* This function is used to get the This Year Sales Trend
* @return array $result : This is result of the query
*/
function thisYearSalesTrend()
{
$currentYear = date('Y');
$currentMonth = date('m');
// Calculate the start date for the current and last fiscal years
if ($currentMonth < 4) {
$fiscalYearStartCurrent = ($currentYear - 1) . '-04-01';
$fiscalYearStartLast = ($currentYear - 2) . '-04-01';
$fiscalYearEndLast = ($currentYear - 1) . '-03-31';
} else {
$fiscalYearStartCurrent = $currentYear . '-04-01';
$fiscalYearStartLast = ($currentYear - 1) . '-04-01';
$fiscalYearEndLast = $currentYear . '-03-31';
}
// Build query for the current fiscal year
$builderCurrent = $this->db->table('ip_invoices a')
->select("DATE_FORMAT(a.invoice_date_created, '%b') as Month,
IFNULL(SUM(c.item_total), 0) as Sales")
->join('ip_invoice_items b', 'a.invoice_id = b.invoice_id', 'left')
->join('ip_invoice_item_amounts c', 'b.item_id = c.item_id', 'left')
->where('a.invoice_date_created >=', $fiscalYearStartCurrent)
->where('a.invoice_status_id', 2)
->groupBy("DATE_FORMAT(a.invoice_date_created, '%b')")
->orderBy('MONTH(a.invoice_date_created)');
// Build query for the last fiscal year
$builderLast = $this->db->table('ip_invoices a')
->select("DATE_FORMAT(a.invoice_date_created, '%b') as Month,
IFNULL(SUM(c.item_total), 0) as Sales")
->join('ip_invoice_items b', 'a.invoice_id = b.invoice_id', 'left')
->join('ip_invoice_item_amounts c', 'b.item_id = c.item_id', 'left')
->where('a.invoice_date_created >=', $fiscalYearStartLast)
->where('a.invoice_date_created <', $fiscalYearStartCurrent)
->where('a.invoice_status_id', 2)
->groupBy("DATE_FORMAT(a.invoice_date_created, '%b')")
->orderBy('MONTH(a.invoice_date_created)');
// Execute the queries
$currentYearData = $builderCurrent->get()->getResultArray();
$lastYearData = $builderLast->get()->getResultArray();
// Combine the data
$salesComparison = [];
foreach ($lastYearData as $lastYearRow) {
$month = $lastYearRow['Month'];
$salesComparison[$month]['Last Year'] = $lastYearRow['Sales'];
}
foreach ($currentYearData as $currentYearRow) {
$month = $currentYearRow['Month'];
$salesComparison[$month]['Current Year'] = $currentYearRow['Sales'];
}
// Log the SQL queries for debugging
log_message('debug', $builderCurrent->getCompiledSelect());
log_message('debug', $builderLast->getCompiledSelect());
// Return the comparison results
return $salesComparison;
}
/**
* This function is used to get the Today invoices
* @return array $result : This is result of the query
*/
function getTodayInvoices()
{
// Define the custom field ID for the vehicle number
$vehicleCustomFieldId = 8; // Adjust this ID if necessary
// Build the query to get today's invoices with detailed information
$builder = $this->db->table('ip_invoices ii')
->select("
ii.invoice_number AS 'Invoice No.',
DATE_FORMAT(ii.invoice_date_created, '%d-%m-%Y') AS 'Invoice Date',
TIME_FORMAT(ii.invoice_time_created, '%l:%i %p') AS 'Invoice Time',
icf.invoice_custom_fieldvalue AS 'Vehicle No.',
IF(iit.item_description = '', iit.item_name, iit.item_description) AS 'Product',
ic.client_name AS 'Client',
SUM(iit.item_quantity) AS 'Quantity',
SUM(iit.item_price) AS 'Rate',
SUM(iia.item_subtotal) AS 'Value',
SUM(iia.item_cgst_amt) AS 'CGST',
SUM(iia.item_sgst_amt) AS 'SGST',
SUM(iia.item_igst_amt) AS 'IGST',
SUM(IFNULL(tcs.tax_rate_percent * iia.item_total / 100, 0)) AS 'TCS',
SUM(IFNULL(tcs.tax_rate_percent * iia.item_total / 100, 0)) + SUM(iia.item_total) AS 'Total'
")
->join('ip_invoice_custom icf', 'icf.invoice_id = ii.invoice_id', 'left')
->join('ip_invoice_tax_rates tc', 'tc.invoice_id = ii.invoice_id', 'left')
->join('ip_invoice_items iit', 'iit.invoice_id = ii.invoice_id', 'left')
->join('ip_invoice_item_amounts iia', 'iia.item_id = iit.item_id', 'left')
->join('ip_clients ic', 'ic.client_id = ii.client_id', 'left')
->join('ip_tax_rates sgst', 'sgst.tax_rate_id = iit.sgst_item_tax_rate_id', 'left')
->join('ip_tax_rates cgst', 'cgst.tax_rate_id = iit.cgst_item_tax_rate_id', 'left')
->join('ip_tax_rates igst', 'igst.tax_rate_id = iit.igst_item_tax_rate_id', 'left')
->join('ip_tax_rates tcs', 'tcs.tax_rate_id = tc.tax_rate_id', 'left')
->where('icf.invoice_custom_fieldid', $vehicleCustomFieldId)
->where('ii.invoice_status_id', 2)
->where('ii.invoice_date_created', date('Y-m-d'))
->groupBy('ii.invoice_number, iit.item_description')
->orderBy('ii.invoice_number');
// Execute the query
$query = $builder->get();
// Log the SQL query for debugging
log_message('debug', $builder->getCompiledSelect());
// Return the detailed invoice data
return $query->getResultArray();
}
}

View File

@ -1578,7 +1578,7 @@ QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty,Per,
$builder = $this->db->table('t_purchaseorder_master mast')->distinct()
->select('mast.PONO,mast.TotalOrderValue,st.StatusCode,st.StatusName,emp.FirstName,mast.CreatedDate,ccm.CostCenterName,ccm.CostCenterCode,mast.POType as RType,mast.Remarks,DepartmentName,mast.ApprovedBy,(select EmpID from tbl_users where userId=mast.ApprovedBy )as EID,rmast.ReqType,mast.Status,mast.CapitalRange,
->select('mast.PODate,mast.PONO,mast.TotalOrderValue,st.StatusCode,st.StatusName,emp.FirstName,mast.CreatedDate,ccm.CostCenterName,ccm.CostCenterCode,mast.POType as RType,mast.Remarks,DepartmentName,mast.ApprovedBy,(select EmpID from tbl_users where userId=mast.ApprovedBy )as EID,rmast.ReqType,mast.Status,mast.CapitalRange,
(select FirstName from t_employee_details where EmpID=EID)as Approver,sup.SupplierName,sup.MSME')
// ->orderBy('mast.Status',"PO_CREATED");

View File

@ -18,7 +18,7 @@ class User_model extends Model
function userListing()
{
$builder = $this->db->table('t_employee_details EMP')
->select('EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,EMP.EmailId,EMP.ContactNumber,
->select('user.createdDtm,EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,user.email as EmailId,EMP.ContactNumber,
DEPT.DEPCode,DEPT.DepartmentName,role.role,user.userId')
->join('t_departmentdetails DEPT', 'EMP.Departmentcode = DEPT.DEPCode')
->join('tbl_users user', 'user.EmpID = EMP.EmpID')

View File

@ -5,6 +5,40 @@
margin: 0px !important;
}
</style>
<style>
.Date-filter-form {
display: flex;
align-items: center;
gap: 10px; /* Adjust the gap as needed */
}
.Date-filter-form input, .Date-filter-form button {
padding: 5px;
font-size: 14px;
}
.Date-filter-form button {
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
}
.Date-filter-form button:hover {
background-color: #0056b3;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: #007bff;
font-size: 18px;
}
.icon-button:hover {
color: #0056b3;
}
th, td {
white-space: nowrap;
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
@ -20,13 +54,25 @@
</div>
<!-- /.box-header -->
<div class="box-body">
<form class="Date-filter-form" id="DateRangeFilter" >
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<table id="example1" class="table table-hover editableTable" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<!-- <th>#</th> -->
<th>PONO#</th>
<th>PO Type</th>
<th>PO Date</th>
<th>PONO</th>
<th>PO Type</th>
<th>Supplier Name</th>
<th>Total Order Value</th>
<th>PO Status</th>
@ -44,12 +90,12 @@
?>
<tr id="<?php echo $index; ?>">
<!-- <td align="left"><?php echo $index; ?></td> -->
<td><?php echo $record->PONO ?></td>
<td><?php echo $record->ReqType ?></td>
<td align="right"><?php $Pdt = new DateTime($record->PODate);
$PODate = $Pdt->format('d-m-Y');
echo $PODate
?></td>
<td><?php echo $record->PONO ?></td>
<td><?php echo $record->ReqType ?></td>
<td><?php echo $record->SupplierName ?></td>
<td align="right"><?php echo $record->TotalOrderValue ?></td>
@ -121,7 +167,7 @@
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<script>
<!-- <script>
$(function() {
$.fn.dataTable.moment('DD-MM-YYYY');
$('#example1').DataTable({
@ -138,5 +184,85 @@
"autoWidth": false
});
});
</script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
</script> -->
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
$(document).ready(function() {
$.fn.dataTable.ext.type.order['date-eu-pre'] = function (date) {
var dateSplit = date.split('-');
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
};
// Initialize the DataTable
var table = $('#example1').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 0,
"type": "date-eu"
}],
"aaSorting": [
[0, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
});
// Initialize the datepickers
$("#fromDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var minDate = $(this).datepicker("getDate");
$("#toDate").datepicker("option", "minDate", minDate);
}
});
$("#toDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var maxDate = $(this).datepicker("getDate");
$("#fromDate").datepicker("option", "maxDate", maxDate);
}
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").datepicker("setDate", null);
$("#toDate").datepicker("setDate", null);
$("#toDate").datepicker("option", "minDate", null);
$("#fromDate").datepicker("option", "maxDate", null);
table.draw();
});
// Date range filter
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[0]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
if (!fromDate || !toDate) {
return true; // No filter if dates are not selected
}
return date >= fromDate && date <= toDate;
}
);
// Handle form submission
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw();
});
});
</script>

View File

@ -1986,7 +1986,7 @@ if (!empty($getlogpodtl)) {
<th>SNo</th>
<th>Requisition No</th>
<th>Item Code</th>
<th>Item Description</th>
<th>Item Name</th>
<th>Quantity</th>
<th>UOM</th>
<th>Rate <?php echo "($INRSYM)" ?></th>
@ -2022,7 +2022,7 @@ if (!empty($getlogpodtl)) {
<td align="left"><?php echo $index; ?></td>
<td><?php echo $record->ReqNo ?></td>
<td><?php echo $record->MaterialCode ?></td>
<td><?php echo $record->ServiceMaterialDescription ?></td>
<td><?php echo $record->MaterialName ?></td>
<td align="right"><?php echo $record->Quantity ?></td>
<td><?php echo $record->UOM ?></td>
@ -2477,10 +2477,6 @@ if (!empty($getlogpodtl)) {
<td align="left"><%=BasicAmount%></td>
<td align="left"><%=Taxvalue%></td>
<td align="left"><%=TotalValue%></td>
<td align="left"><%=ActualQuantity%></td>
<td align="left"><%=ReceivedQuantity%></td>
<td align="left"><%=PendingQuantity%></td>
<td>
<a data-target='#EDITSERVICE' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EDITSERVICE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=ReqNo%> Requisition details"></i>&nbsp;&nbsp;&nbsp;</a> <a href='#' onclick="DeleteRow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del"><span class="glyphicon glyphicon-trash"></span></a>
@ -2580,16 +2576,13 @@ if (!empty($getlogpodtl)) {
index: temp,
ReqNo: Reqnumber,
MaterialCode: materialCode,
MaterialName: ServiceDescription,
MaterialName: materialName,
Quantity: quantity,
UOM: uom,
Rate: itemRate,
BasicAmount: basicval,
Taxvalue: TotalTaxValue,
TotalValue: TotalOrderValue,
ActualQuantity: quantity,
ReceivedQuantity: 0,
PendingQuantity: quantity
TotalValue: TotalOrderValue
}));
@ -2684,7 +2677,7 @@ if (!empty($getlogpodtl)) {
var cellval = tr.cells;
cellval[2].innerHTML = editMaterialCode;
cellval[3].innerHTML = ServiceDescription;
cellval[3].innerHTML = editDescription;
cellval[4].innerHTML = editQuantity;
cellval[5].innerHTML = editUOM;
cellval[6].innerHTML = parseFloat(itemRate).toFixed(2);

View File

@ -32,6 +32,29 @@
white-space: nowrap;
}
</style>
<style>
.dataTables_wrapper .top {
display: flex;
justify-content: space-between;
align-items: center;
}
.dataTables_wrapper .dataTables_length {
float: left;
}
.dataTables_wrapper .dt-buttons,
.dataTables_wrapper .dataTables_filter {
float: right;
margin-left: 10px;
}
.dataTables_wrapper .dt-buttons {
margin-top: 10px;
margin-bottom: 10px;
}
.dataTables_wrapper .dataTables_filter {
margin-top: 10px;
margin-bottom: 10px;
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
@ -85,7 +108,6 @@
<table id="dataTableHistoriek" class="table table-bordered table-hover editableTable" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th style="display:none;"></th>
<th>PO Date</th>
<th>PONO#</th>
<th>PO Type</th>
@ -105,7 +127,6 @@
$index = $index + 1;
?>
<tr id="<?php echo $index; ?>">
<td style="display:none;"><?php echo $record->PODate ?></th>
<td align="right"><?php $Pdt = new DateTime($record->PODate);
$PODate = $Pdt->format('d-m-Y');
echo $PODate
@ -184,25 +205,58 @@
</div>
<!-- /.content-wrapper -->
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.4/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.13.6/sorting/datetime-moment.js"></script>
<script>
$(document).ready(function() {
$.fn.dataTable.ext.type.order['date-eu-pre'] = function (date) {
var dateSplit = date.split('-');
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
};
// Initialize the DataTable
var table = $('#dataTableHistoriek').DataTable({
"paging": true,
"lengthChange": true,
"scrollCollapse": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 1,
"targets": 0,
"type": "date-eu"
}],
"aaSorting": [
[1, "desc"]
[0, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
"buttons": [
{
extend: 'excelHtml5',
text: 'Export to Excel',
title: 'Purchase Order',
exportOptions: {
columns: ':visible:not(:last-child)' // Exclude first and last columns
}
},
{
extend: 'pdfHtml5',
text: 'Export to PDF',
title: 'Purchase Order',
exportOptions: {
columns: ':visible:not(:last-child)' // Exclude first and last columns
}
}]
});
@ -239,7 +293,7 @@ $(document).ready(function() {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[1]; // Assuming the date is in the first column
var dateStr = data[0]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");

View File

@ -184,10 +184,9 @@
<table id="cc" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" >
<thead style="background-color: #ddd;">
<tr>
<th style="text-align:center">PO No</th>
<th style="text-align:center">PO Date</th>
<th style="text-align:center">Supplier Name</th>
<th style="text-align:center">PO Date</th>
<th style="text-align:center">PO No</th>
<th style="text-align:center">Supplier Name</th>
<th style="text-align:center">Material Name</th>
<th style="text-align:center">Category</th>
<th style="text-align:center">Ordered Quantity</th>
@ -214,12 +213,13 @@
<!-- <td><span>
<a href="<?= base_url() ?>report/link_purchase?sid=<?php //echo $rel->sid;?>&ab=<?php //echo $ab;?>&mid=<?php //echo $rel->mid;?>"><?php //echo $rel->supplier_name;?></a>
</span></td>-->
<td><span>
<?php echo $rel->pdate;?>
</span></td>
<td><span>
<?php echo $rel->po;?>
</span></td>
<td><span>
<?php echo $rel->pdate;?>
</span></td>
<td><span>
<?php echo $rel->supplier;?>
@ -371,7 +371,9 @@ $(document).ready(function() {
"language": {
"emptyTable": "<center> Data Not Found ! </center>"
},
"aaSorting": [[ 1, "desc" ]],
"aaSorting": [[ 0, "desc" ]],
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
"autoWidth": false,
orderCellsTop: true,
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +

View File

@ -401,7 +401,7 @@ function validatePF() {
if (PF != '') {
if (regpf.test(PF) == false) {
alert('Please Enter Valid PF Number');
alert('Please Enter Valid UAN');
return (false);
} else {
return true;
@ -765,23 +765,23 @@ legend {
</select>
</div>
<div class="col-md-3"><span>Additional Qualification</span>
<div class="col-md-3" style="display:none"><span>Additional Qualification</span>
<input type="text" id="addqualification" name="addqualification"
maxlength="100" class="form-control">
</div>
<div class="col-md-3"><span>Referred By</span>
<div class="col-md-3" style="display:none"><span>Referred By</span>
<input type="text" id="referredby"
onkeypress="return onlyAlphabets(event);" name="referredby"
maxlength="100" class="form-control">
</div>
<div class="col-md-3"><span>Referrer Contact Number</span>
<div class="col-md-3" style="display:none"><span>Referrer Contact Number</span>
<input type="text" id="referrercontno" name="referrercontno"
onchange=" return getValidReferNumber();" maxlength="10"
onkeypress="return isNumberKey(event)" class="form-control">
</div>
</div>
<div class="col-md-12 pad">
<!-- </div>
<div class="col-md-12 pad"> -->
<div class="col-md-3"><span>Work Location</span><span class="badge">*</span>
@ -1001,7 +1001,7 @@ legend {
<div class="col-md-3">
<div class="form-group"><span>PF Number</span>
<div class="form-group"><span>UAN</span>
<input type="text" id="pfno" name="pfno" maxlength="22"
onchange="validatePF();" class="form-control"
style="text-transform:uppercase"

View File

@ -6447,7 +6447,7 @@ if (!empty($INRSYMBOL)) {
index: temp,
ReqNo: Reqnumber,
MaterialCode: materialCode,
MaterialName: ItemServiceDescription,
MaterialName: materialName,
Quantity: quantity,
UOM: uom,
Rate: itemRate,
@ -6801,7 +6801,7 @@ $('#content').loader('hide');
var tr = document.getElementById(userid);
var cellval = tr.cells;
cellval[3].innerHTML = editMaterialCode;
cellval[3].innerHTML = ItemServiceDescription;
cellval[3].innerHTML = editDescription;
cellval[4].innerHTML = editQuantity;
cellval[5].innerHTML = editUOM;
cellval[6].innerHTML = itemRate;

View File

@ -1,79 +1,137 @@
<style>
.Date-filter-form {
display: flex;
align-items: center;
gap: 10px;
/* Adjust the gap as needed */
}
.Date-filter-form input,
.Date-filter-form button {
padding: 5px;
font-size: 14px;
}
.Date-filter-form button {
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
}
.Date-filter-form button:hover {
background-color: #0056b3;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: #007bff;
font-size: 18px;
}
.icon-button:hover {
color: #0056b3;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="box">
<div class="box-header">
<CENTER><h3 class="box-title"> Asset Details</h3></CENTER>
<div class="box">
<div class="box-header">
<CENTER>
<h3 class="box-title"> Asset Details</h3>
</CENTER>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-md-6">
<form class="Date-filter-form" id="DateRangeFilter">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
</div>
<div class="col-xs-12 col-md-6 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>addasset">Add New Asset</a>
<a class="btn btn-success" href="<?php echo base_url(); ?>exportasset">Export Asset Details <i class="fa fa-download" aira-hidden="true"></i></a>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>addasset">Add New Asset</a>
<a class="btn btn-success" href="<?php echo base_url(); ?>exportasset">Export Asset Details <i class="fa fa-download"aira-hidden="true"></i></a>
<div class="row">
<div class="col-xs-12">
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>Created Date</th>
<th>Asset Code</th>
<th>Asset Name</th>
<th>Asset Description</th>
<th>Department Name</th>
<th>Location</th>
<th>Asset User</th>
<th>Supplier Name</th>
<th>Received Date</th>
<th>Asset Value</th>
<th>Asset Status</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
?>
<tr>
<?php if (date('d-m-Y', strtotime($record->CreatedDt)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->CreatedDt));
} ?>
<td align="right"><?php echo $cdate; ?></td>
<td><u><a href="<?php echo base_url() . 'assetdetails/editOldasset/?AssetID=' . $record->AssetCode ?>" data-toggle="tooltip" title="<?php echo $record->AssetCode; ?> - Click here to view Asset details"><?php echo substr($record->AssetCode, 5) ?>
<td><?php echo $record->AssetName ?></td>
<td><?php echo $record->Description ?></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo $record->Location ?></td>
<td><?php echo $record->UserName ?></td>
<td><?php echo $record->SupplierName ?></td>
<td><?php
$dtpurchase = new DateTime($record->DateOfPurchase);
$DOPurchase = $dtpurchase->format('d-m-Y');
echo $DOPurchase ?></td>
<td><?php echo number_format($record->AssetValue, 2); ?></td>
<td><?php echo $record->AssetStatus ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:12px;" >
<thead style="background-color: #ddd;">
<tr>
<th>Asset Code</th>
<th>Asset Name</th>
<th>Asset Description</th>
<th>Department Name</th>
<th>Location</th>
<th>Asset User</th>
<th>Supplier Name</th>
<th>Received Date</th>
<th>Asset Value</th>
<th>Asset Status</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($userRecords))
{
foreach($userRecords as $record)
{
?>
<tr>
<td><u><a href="<?php echo base_url().'assetdetails/editOldasset/?AssetID='.$record->AssetCode ?>" data-toggle="tooltip" title="<?php echo $record->AssetCode; ?> - Click here to view Asset details"><?php echo substr($record->AssetCode, 5) ?>
<td><?php echo $record->AssetName ?></td>
<td><?php echo $record->Description ?></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo $record->Location ?></td>
<td><?php echo $record->UserName ?></td>
<td><?php echo $record->SupplierName ?></td>
<td><?php
$dtpurchase = new DateTime($record->DateOfPurchase);
$DOPurchase = $dtpurchase ->format('d-m-Y');
echo $DOPurchase ?></td>
<td><?php echo number_format($record->AssetValue, 2); ?></td>
<td><?php echo $record->AssetStatus ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script type="text/javascript">
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<!-- <script type="text/javascript">
$(function () {
$.fn.dataTable.moment( 'DD-MM-YYYY' );
@ -90,6 +148,85 @@
});
});
</script>
</script> -->
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> -->
<script>
$(document).ready(function() {
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
var dateSplit = date.split('-');
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
};
// Initialize the DataTable
var table = $('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 0,
"type": "date-eu"
}],
"aaSorting": [
[0, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
});
// Initialize the datepickers
$("#fromDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var minDate = $(this).datepicker("getDate");
$("#toDate").datepicker("option", "minDate", minDate);
}
});
$("#toDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var maxDate = $(this).datepicker("getDate");
$("#fromDate").datepicker("option", "maxDate", maxDate);
}
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").datepicker("setDate", null);
$("#toDate").datepicker("setDate", null);
$("#toDate").datepicker("option", "minDate", null);
$("#fromDate").datepicker("option", "maxDate", null);
table.draw();
});
// Date range filter
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[0]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
if (!fromDate || !toDate) {
return true; // No filter if dates are not selected
}
return date >= fromDate && date <= toDate;
}
);
// Handle form submission
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw();
});
});
</script>

View File

@ -1,100 +1,154 @@
<div class="content-wrapper">
<section class="content">
<div class="box">
<div class="box-header">
<CENTER><h3 class="box-title"> Configuration Details</h3></CENTER>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>addconfig">Add New Configuration</a>
</div>
</div>
</div>
<div class="col-md-12">
<?php
<style>
.Date-filter-form {
display: flex;
align-items: center;
gap: 10px;
/* Adjust the gap as needed */
}
.Date-filter-form input,
.Date-filter-form button {
padding: 5px;
font-size: 14px;
}
.Date-filter-form button {
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
}
.Date-filter-form button:hover {
background-color: #0056b3;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: #007bff;
font-size: 18px;
}
.icon-button:hover {
color: #0056b3;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="box">
<div class="box-header">
<CENTER>
<h3 class="box-title"> Configuration Details</h3>
</CENTER>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-md-6">
<form class="Date-filter-form" id="DateRangeFilter">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
</div>
<div class="col-xs-12 col-md-6 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>addconfig">Add New Configuration</a>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-info alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<div class="alert alert-info alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
?> </div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table id="configtable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>Configuration ID</th>
<th>Configuration Name</th>
<th>Description</th>
<th>Create Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table id="configtable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>Create Date</th>
<th>Configuration ID</th>
<th>Configuration Name</th>
<th>Description</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
?>
<tr>
<td><?php echo $record->Config_ID ?></td>
<td><?php echo $record->ConfigName ?></td>
<td><?php echo $record->Comments ?> </td>
<!-- <td><?php echo $record->CreatedDate ?></td> -->
<!-- <td align="right"><?php $dt = new DateTime($record->CreatedDate);
$CreatedDate = $dt->format('d-m-Y');
echo $CreatedDate ?> </td> -->
<?php if (date('d-m-Y', strtotime($record->CreatedDate)) == "30-11--0001") {
<tr>
<?php if (date('d-m-Y', strtotime($record->CreatedDate)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->CreatedDate));
} ?>
<td align="right"><?php echo $cdate; ?> </td>
<td align="right"><?php echo $cdate; ?> </td>
<td><?php echo $record->Config_ID ?></td>
<td><?php echo $record->ConfigName ?></td>
<td><?php echo $record->Comments ?> </td>
<!-- <td><?php echo $record->CreatedDate ?></td> -->
<td><a href="<?php echo base_url() . 'configurationctrl/editconfig?ConfigID=' . $record->Config_ID; ?>"><i class="fa fa-pencil"></i>&nbsp;&nbsp;&nbsp;</a>
<!-- <a><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a> -->
</td>
<!-- <td align="right"><?php $dt = new DateTime($record->CreatedDate);
$CreatedDate = $dt->format('d-m-Y');
echo $CreatedDate ?> </td> -->
</tr>
<?php
<td><a href="<?php echo base_url() . 'configurationctrl/editconfig?ConfigID=' . $record->Config_ID; ?>"><i class="fa fa-pencil"></i>&nbsp;&nbsp;&nbsp;</a>
<!-- <a><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a> -->
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</tbody>
</table>
</div>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
</div>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script type="text/javascript">
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<!-- <script type="text/javascript">
$(function() {
$.fn.dataTable.moment('DD-MM-YYYY');
$('#configtable').DataTable({
@ -110,4 +164,84 @@
});
});
</script>
</script> -->
<script>
$(document).ready(function() {
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
var dateSplit = date.split('-');
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
};
// Initialize the DataTable
var table = $('#configtable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 0,
"type": "date-eu"
}],
"aaSorting": [
[0, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
});
// Initialize the datepickers
$("#fromDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var minDate = $(this).datepicker("getDate");
$("#toDate").datepicker("option", "minDate", minDate);
}
});
$("#toDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var maxDate = $(this).datepicker("getDate");
$("#fromDate").datepicker("option", "maxDate", maxDate);
}
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").datepicker("setDate", null);
$("#toDate").datepicker("setDate", null);
$("#toDate").datepicker("option", "minDate", null);
$("#fromDate").datepicker("option", "maxDate", null);
table.draw();
});
// Date range filter
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[0]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
if (!fromDate || !toDate) {
return true; // No filter if dates are not selected
}
return date >= fromDate && date <= toDate;
}
);
// Handle form submission
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw();
});
});
</script>

View File

@ -1,4 +1,35 @@
<div class="content-wrapper">
<style>
.Date-filter-form {
display: flex;
align-items: center;
gap: 10px; /* Adjust the gap as needed */
}
.Date-filter-form input, .Date-filter-form button {
padding: 5px;
font-size: 14px;
}
.Date-filter-form button {
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
}
.Date-filter-form button:hover {
background-color: #0056b3;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: #007bff;
font-size: 18px;
}
.icon-button:hover {
color: #0056b3;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="box">
<div class="box-header">
@ -8,19 +39,31 @@
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 text-right">
<div class="form-group">
<a data-toggle="modal" href="#ccwizard" data-id="0" data-name="" class="btn btn-success">Add New Cost List</a>
<div class="col-xs-12 col-md-6">
<form class="Date-filter-form" id="DateRangeFilter" >
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
</div>
<div class="col-xs-12 col-md-6 text-right">
<div class="form-group">
<a data-toggle="modal" href="#ccwizard" data-id="0" data-name="" class="btn btn-success">Add New Cost List</a>
<a class="btn btn-success" href="<?php echo base_url(); ?>exportcost">Export Cost Details <i class="fa fa-download" aira-hidden="true"></i></a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th style="display:none;"></th>
<th>Create Date</th>
<th>Create Time</th>
<th>Cost Center Code</th>
@ -33,16 +76,13 @@
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
foreach ($userRecords as $record) {
$createdat = new DateTime($record->CreatedDate);
$date = $createdat->format('d-m-Y');
$time = $createdat->format('h:i A');
?>
<tr>
<td style="display:none;"><?php echo $record->CreatedDate ?></td>
<td align="right"><?php echo $date; ?></td>
<td align="right"><?php echo $date; ?></td>
<td align="right"><?php echo $time; ?></td>
<td><?php echo $record->code ?></td>
<td><?php echo $record->CostCenterName ?></td>
@ -123,22 +163,22 @@
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script type="text/javascript">
$(function() {
$.fn.dataTable.moment('DD-MM-YYYY HH:mm A');
$('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
// "columnDefs" : [{"targets":3, "type":"date-eu"}],
"aaSorting": [
[3, "desc"]
],
"info": true,
"autoWidth": true
// $(function() {
// $.fn.dataTable.moment('DD-MM-YYYY HH:mm A');
// $('#datatable').DataTable({
// "paging": true,
// "lengthChange": true,
// "searching": true,
// "ordering": true,
// // "columnDefs" : [{"targets":3, "type":"date-eu"}],
// "aaSorting": [
// [3, "desc"]
// ],
// "info": true,
// "autoWidth": true
});
});
// });
// });
</script>
<script>
@ -188,5 +228,84 @@
});
});
</script>
<script>
$(document).ready(function() {
$.fn.dataTable.ext.type.order['date-eu-pre'] = function (date) {
var dateSplit = date.split('-');
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
};
// Initialize the DataTable
var table = $('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 0,
"type": "date-eu"
}],
"aaSorting": [
[0, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
});
// Initialize the datepickers
$("#fromDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var minDate = $(this).datepicker("getDate");
$("#toDate").datepicker("option", "minDate", minDate);
}
});
$("#toDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var maxDate = $(this).datepicker("getDate");
$("#fromDate").datepicker("option", "maxDate", maxDate);
}
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").datepicker("setDate", null);
$("#toDate").datepicker("setDate", null);
$("#toDate").datepicker("option", "minDate", null);
$("#fromDate").datepicker("option", "maxDate", null);
table.draw();
});
// Date range filter
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[0]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
if (!fromDate || !toDate) {
return true; // No filter if dates are not selected
}
return date >= fromDate && date <= toDate;
}
);
// Handle form submission
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw();
});
});
</script>
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> -->

View File

@ -1,104 +1,164 @@
<script>
// (function(l,q){var e=function(b,c){b.extend(!0,c.defaults,{dom:"<'row'<'col-sm-9'l><'col-sm-3'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-8'i><'col-sm-4'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});c.ext.renderer.pageButton.bootstrap=function(g,e,r,s,i,m){var t=new c.Api(g),u=g.oClasses,j=g.oLanguage.oPaginate,d,f,n=0,p=function(c,e){var k,h,o,a,l=function(a){a.preventDefault();
// b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw(!1)};k=0;for(h=e.length;k<h;k++)if(a=e[k],b.isArray(a))p(c,a);else{f=d="";switch(a){case "ellipsis":d="&hellip;";f="disabled";break;case "first":d=j.sFirst;f=a+(0<i?"":" disabled");break;case "previous":d=j.sPrevious;f=a+(0<i?"":" disabled");break;case "next":d=j.sNext;f=a+(i<m-1?"":" disabled");break;case "last":d=j.sLast;f=a+(i<m-1?"":" disabled");break;default:d=a+1,f=i===a?"active":""}d&&(o=b("<li>",{"class":u.sPageButton+" "+
// f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("<a>",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('<ul class="pagination"/>').children("ul"),s);h&&b(e).find("[data-dt-idx="+h+"]").focus()};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},
// collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,c.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"===typeof define&&define.amd?define(["jquery","datatables"],e):"object"===typeof exports?e(require("jquery"),require("datatables")):jQuery&&e(jQuery,jQuery.fn.dataTable)})(window,document);
// (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-8'i><'col-sm-4'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});c.ext.renderer.pageButton.bootstrap=function(g,e,r,s,i,m){var t=new c.Api(g),u=g.oClasses,j=g.oLanguage.oPaginate,d,f,n=0,p=function(c,e){var k,h,o,a,l=function(a){a.preventDefault();
// b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw(!1)};k=0;for(h=e.length;k<h;k++)if(a=e[k],b.isArray(a))p(c,a);else{f=d="";switch(a){case "ellipsis":d="&hellip;";f="disabled";break;case "first":d=j.sFirst;f=a+(0<i?"":" disabled");break;case "previous":d=j.sPrevious;f=a+(0<i?"":" disabled");break;case "next":d=j.sNext;f=a+(i<m-1?"":" disabled");break;case "last":d=j.sLast;f=a+(i<m-1?"":" disabled");break;default:d=a+1,f=i===a?"active":""}d&&(o=b("<li>",{"class":u.sPageButton+" "+
// f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("<a>",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('<ul class="pagination"/>').children("ul"),s);h&&b(e).find("[data-dt-idx="+h+"]").focus()};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},
// collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,c.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"===typeof define&&define.amd?define(["jquery","datatables"],e):"object"===typeof exports?e(require("jquery"),require("datatables")):jQuery&&e(jQuery,jQuery.fn.dataTable)})(window,document);
</script>
<style>
.Date-filter-form {
display: flex;
align-items: center;
gap: 10px;
/* Adjust the gap as needed */
}
.Date-filter-form input,
.Date-filter-form button {
padding: 5px;
font-size: 14px;
}
.Date-filter-form button {
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
}
.Date-filter-form button:hover {
background-color: #0056b3;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: #007bff;
font-size: 18px;
}
.icon-button:hover {
color: #0056b3;
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<!-- <section class="content-header"> -->
<section class="content">
<!-- Content Header (Page header) -->
<!-- <section class="content-header"> -->
<section class="content">
<div class="row">
<div class="col-md-12">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-info alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<div class="col-md-12">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-info alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
?> </div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
?> </div>
</div>
<div class="box">
<div class="box-header">
<center> <h3 class="box-title">Department Details</h3></center>
</div>
</div>
<div class="box">
<div class="box-header">
<center>
<h3 class="box-title">Department Details</h3>
</center>
</div>
<div class="container-fluid">
</div>
<div class="container-fluid">
<!-- </section> -->
<!-- <section class="content"> -->
<div class="row">
<div class="col-xs-12 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>adddepartment">Add New department</a>
<a class="btn btn-success" href="<?php echo base_url(); ?>exportdepartment">Export department details <i class="fa fa-download"aira-hidden="true"></i></a>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<form class="Date-filter-form" id="DateRangeFilter">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
</div>
<div class="col-xs-12 col-md-6 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>adddepartment">Add New department</a>
<a class="btn btn-success" href="<?php echo base_url(); ?>exportdepartment">Export department details <i class="fa fa-download" aira-hidden="true"></i></a>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:12px;" >
<thead style="background-color: #ddd;">
<div class="col-xs-12">
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>Create Date</th>
<th>Department Code</th>
<th>Department Name</th>
<th>Head Department</th>
<th>IsActive</th>
<!-- <th>Action</th> -->
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
?>
<tr>
<th>Department Code</th>
<th>Department Name</th>
<th>Head Department</th>
<th>IsActive</th>
<!-- <th>Action</th> -->
<!-- <td title=" - Click here to view department details"> </td> -->
<?php if (date('d-m-Y', strtotime($record->CreatedDt)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->CreatedDt));
} ?>
<td align="right"><?php echo $cdate; ?> </td>
<td><u><a href="<?php echo base_url() . 'editOlddepartment/?SID=' . $record->DEPCode ?>" data-toggle="tooltip" title="<?php echo $record->DEPCode ?> - Click here to view Department details"><?php echo $record->DEPCode; ?></a></u></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo $record->HeadDept ?></td>
<td><?php if ($record->IsActive == 1) {
echo "Active";
} else {
echo "In Active";
} ?></td>
<!-- <td><a data-toggle="tooltip" "><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the department details"></i>&nbsp;&nbsp;&nbsp;</a></td> -->
</tr>
</thead>
<tbody>
<?php
if(!empty($userRecords))
{
foreach($userRecords as $record)
{
?>
<tr>
<!-- <td title=" - Click here to view department details"> </td> -->
<td><u><a href="<?php echo base_url().'editOlddepartment/?SID='.$record->DEPCode?>" data-toggle="tooltip" title="<?php echo $record->DEPCode ?> - Click here to view Department details"><?php echo $record->DEPCode; ?></a></u></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo $record->HeadDept ?></td>
<td><?php if($record->IsActive == 1){echo "Active";}
else { echo "In Active";} ?></td>
<!-- <td><a data-toggle="tooltip" "><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the department details"></i>&nbsp;&nbsp;&nbsp;</a></td> -->
</tr>
<?php
}
}
?>
</tbody>
</table>
</div><!-- colsxs12 div closed-->
<?php
}
}
?>
</tbody>
</table>
</div><!-- colsxs12 div closed-->
</div><!-- row div closed -->
</div><!-- containerfluid div closed -->
</div><!-- box div closed -->
</section>
</div><!-- containerfluid div closed -->
</div><!-- box div closed -->
</section>
</div><!-- content wrapper div closed -->
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
<!-- <script type="text/javascript">
$(function () {
@ -113,4 +173,84 @@
});
});
</script>
</script> -->
<script>
$(document).ready(function() {
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
var dateSplit = date.split('-');
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
};
// Initialize the DataTable
var table = $('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 0,
"type": "date-eu"
}],
"aaSorting": [
[0, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
});
// Initialize the datepickers
$("#fromDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var minDate = $(this).datepicker("getDate");
$("#toDate").datepicker("option", "minDate", minDate);
}
});
$("#toDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var maxDate = $(this).datepicker("getDate");
$("#fromDate").datepicker("option", "maxDate", maxDate);
}
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").datepicker("setDate", null);
$("#toDate").datepicker("setDate", null);
$("#toDate").datepicker("option", "minDate", null);
$("#fromDate").datepicker("option", "maxDate", null);
table.draw();
});
// Date range filter
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[0]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
if (!fromDate || !toDate) {
return true; // No filter if dates are not selected
}
return date >= fromDate && date <= toDate;
}
);
// Handle form submission
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw();
});
});
</script>

View File

@ -500,7 +500,7 @@ function validatePF() {
if (PF != '') {
if (regpf.test(PF) == false) {
alert('Please Enter Valid PF Number');
alert('Please Enter Valid UAN');
return (false);
} else {
return true;
@ -1039,31 +1039,26 @@ legend {
</select>
</div>
<div class="col-md-3"><span>Additional Qualification</span>
<div class="col-md-3" style="display:none"><span>Additional Qualification</span>
<input type="text" id="addqualification" name="addqualification"
value="<?php echo $Additional_Qualification ; ?>"
maxlength="100" placeholder="Additional Qualification"
class="form-control">
</div>
<div class="col-md-3"><span>Referred By</span>
<div class="col-md-3" style="display:none"><span>Referred By</span>
<input type="text" id="referredby" name="referredby"
value="<?php echo $Reference_Name ; ?>"
placeholder="Referred By" maxlength="100"
class="form-control">
</div>
<div class="col-md-3"><span>Referrer Contact Number</span>
<div class="col-md-3" style="display:none"><span>Referrer Contact Number</span>
<input type="text" id="referrercontno" name="referrercontno"
value="<?php echo $Reference_ContactNumber ; ?>"
onchange="getValidReferNumber();" maxlength="10"
placeholder="Referrer Contact Number" class="form-control"
onkeypress="return isNumberKey(event)">
</div>
</div>
</div>
<div class="col-md-12 pad">
<div class="col-md-3"><span>Work Location</span><span
<div class="col-md-3"><span>Work Location</span><span
class="badge">*</span>
<select type="text" id="work_location" name="work_location"
required class="form-control select2">
@ -1084,7 +1079,7 @@ legend {
</select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
@ -1100,6 +1095,12 @@ legend {
</label>
</div>
</div>
</div>
</div>
<div class="col-md-12 pad">
</div>
<legend>Bank Details</legend>
@ -1301,7 +1302,7 @@ legend {
<div class="col-md-3">
<div class="form-group"><span>PF Number</span>
<div class="form-group"><span>UAN</span>
<input type="text" id="pfno" name="pfno" maxlength="22"
value="<?php echo $pfno; ?>"
onchange="validatePF();" class="form-control"

View File

@ -1293,7 +1293,7 @@ foreach ($PaymentTerms as $TER) {
<th>SNo</th>
<th>Requisition No</th>
<th>Item Code</th>
<th>Item Description</th>
<th>Item Name</th>
<th>Quantity</th>
<th>UOM</th>
<th>Rate<?php echo $INRSYM ?></th>
@ -1331,7 +1331,7 @@ foreach ($PaymentTerms as $TER) {
<td align="left"><?php echo $index; ?></td>
<td><?php echo $record->ReqNo ?></td>
<td><?php echo $record->MaterialCode ?></td>
<td><?php echo $record->ServiceMaterialDescription ?></td>
<td><?php echo $record->MaterialName ?></td>
<td align="right"><?php echo $record->Quantity ?></td>
<td><?php echo $record->UOM ?></td>
<td align="right"><?php echo $record->Rate ?></td>
@ -1755,7 +1755,7 @@ foreach ($PaymentTerms as $TER) {
var cellval = tr.cells;
cellval[2].innerHTML = editMaterialCode;
cellval[3].innerHTML = materialspecialinstruction;
cellval[3].innerHTML = editDescription;
cellval[4].innerHTML = editQuantity;
cellval[5].innerHTML = editUOM;
cellval[6].innerHTML = parseFloat(itemRate).toFixed(2);

View File

@ -1,112 +1,174 @@
<style>
#datatable_filter{
float: inline-end;
}
#datatable_wrapper .row .col-sm-4{
flex-basis: 50%;
float: inline-end;
}
#datatable_paginate .pagination {
flex-basis: 50%;
float: inline-end;
margin:0 0 15px;
}
#datatable_wrapper .row:nth-child(3), #datatable_wrapper .row:nth-child(1){
padding: 0 15px;
}
#datatable_info{
margin-top: 5px;
}
.dataTables_wrapper{
padding-bottom: 0;
}
#datatable_filter {
float: inline-end;
}
#datatable_wrapper .row .col-sm-4 {
flex-basis: 50%;
float: inline-end;
}
#datatable_paginate .pagination {
flex-basis: 50%;
float: inline-end;
margin: 0 0 15px;
}
#datatable_wrapper .row:nth-child(3),
#datatable_wrapper .row:nth-child(1) {
padding: 0 15px;
}
#datatable_info {
margin-top: 5px;
}
.dataTables_wrapper {
padding-bottom: 0;
}
.Date-filter-form {
display: flex;
align-items: center;
gap: 10px;
/* Adjust the gap as needed */
}
.Date-filter-form input,
.Date-filter-form button {
padding: 5px;
font-size: 14px;
}
.Date-filter-form button {
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
}
.Date-filter-form button:hover {
background-color: #0056b3;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: #007bff;
font-size: 18px;
}
.icon-button:hover {
color: #0056b3;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-12">
<?php
helper('form');
$error = session()->getFlashdata('error');
if($error){
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
$type = "error";
echo show_alert($type, $error);
}
$success = session()->getFlashdata('success');
if($success){
if ($success) {
$type = "success";
echo show_alert($type, $success);
}
?>
?>
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
?> </div>
</div>
</div>
</div>
<div class="box">
<div class="box-header">
<CENTER><h3 class="box-title"> Employee Details</h3></CENTER>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>addemployee">Add New Employee</a>
<a class="btn btn-success" href="<?php echo base_url(); ?>exportemployee">Export Employee Details <i class="fa fa-download"aira-hidden="true"></i></a>
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
?> </div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
<thead style="background-color: #ddd;">
<tr>
<th>Emp ID</th>
<th>Employee Name</th>
<th>Contact Number</th>
<th>Designation</th>
<th>Department</th>
<th>Active</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($userRecords))
{
foreach($userRecords as $record)
{
?>
<tr>
<td><u><a class="a_tag_link" href="<?php echo base_url().'employeedetails/ViewEmployee/?EmpID='.$record->EmpID; ?>" data-toggle="tooltip" title="<?php echo $record->EmpID; ?> - Click here to view Employee details"><?php echo $record->EmpID ?> </a></u></td>
<td><?php echo $record->FirstName; ?></td>
<td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->Designation ?></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo ($record->IsActive == 1)? ' Active ' : ' In Active ' ; ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
<div class="box">
<div class="box-header">
<CENTER>
<h3 class="box-title"> Employee Details</h3>
</CENTER>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-md-6">
<form class="Date-filter-form" id="DateRangeFilter">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
</div>
<div class="col-xs-12 col-md-6 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>addemployee">Add New Employee</a>
<a class="btn btn-success" href="<?php echo base_url(); ?>exportemployee">Export Employee Details <i class="fa fa-download" aira-hidden="true"></i></a>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>Created Date</th>
<th>Emp ID</th>
<th>Employee Name</th>
<th>Contact Number</th>
<th>Designation</th>
<th>Department</th>
<th>Active</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
?>
<tr>
<?php if (date('d-m-Y', strtotime($record->Created_date)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->Created_date));
} ?>
<td align="right"><?php echo $cdate; ?></td>
<td><u><a class="a_tag_link" href="<?php echo base_url() . 'employeedetails/ViewEmployee/?EmpID=' . $record->EmpID; ?>" data-toggle="tooltip" title="<?php echo $record->EmpID; ?> - Click here to view Employee details"><?php echo $record->EmpID ?> </a></u></td>
<td><?php echo $record->FirstName; ?></td>
<td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->Designation ?></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo ($record->IsActive == 1) ? ' Active ' : ' In Active '; ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
<!-- <script type="text/javascript">
$(function () {
@ -123,4 +185,84 @@
});
});
</script>
</script> -->
<script>
$(document).ready(function() {
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
var dateSplit = date.split('-');
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
};
// Initialize the DataTable
var table = $('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 0,
"type": "date-eu"
}],
"aaSorting": [
[0, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
});
// Initialize the datepickers
$("#fromDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var minDate = $(this).datepicker("getDate");
$("#toDate").datepicker("option", "minDate", minDate);
}
});
$("#toDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var maxDate = $(this).datepicker("getDate");
$("#fromDate").datepicker("option", "maxDate", maxDate);
}
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").datepicker("setDate", null);
$("#toDate").datepicker("setDate", null);
$("#toDate").datepicker("option", "minDate", null);
$("#fromDate").datepicker("option", "maxDate", null);
table.draw();
});
// Date range filter
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[0]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
if (!fromDate || !toDate) {
return true; // No filter if dates are not selected
}
return date >= fromDate && date <= toDate;
}
);
// Handle form submission
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw();
});
});
</script>

View File

@ -341,13 +341,18 @@
</a>
</li><!--Dashboard active treeview -->
<li class="treeview">
<a id="salesDashboardLin" href="https://vu.venbait.in/d/d9eb820b-60aa-4fe6-9de0-531924185b77/sales-at-a-glance?orgId=2&from=1715215911333&to=1715237511333" target="_blank">
<!-- <a id="salesDashboardLin" href="https://vu.venbait.in/d/d9eb820b-60aa-4fe6-9de0-531924185b77/sales-at-a-glance?orgId=2&from=1715215911333&to=1715237511333" target="_blank"> -->
<a id="salesDashboardLin" href="<?php echo base_url(); ?>sales_dashboard">
<i class="fa fa-dashboard"></i><span>Sales Dashboard</span>
</a>
</li><!--Dashboard active treeview -->
<!-- Dashboard Ends -->
<?php } ?>
<li class="treeview">
<a id="salesDashboardLin" href="<?php echo base_url(); ?>sales_invoice">
<i class="fa fa-file-text-o"></i><span>Sales</span>
</a>
</li><!--Dashboard active treeview -->
<?php if($DEPCode == ADMIN) { ?>

View File

@ -4,11 +4,26 @@
<!-- ============================================================== -->
<!-- End Page content -->
<!-- ============================================================== -->
<!-- Footer Start -->
<footer class="footer">
<div class="container-fluid">
<div class="row">
<div class="col-md-5">
<b><a href="<?php echo base_url(); ?>">RESICO </a></b> Version 2.0 | <?php echo generateCopyrightNotice(); ?>.
</div>
<div class="col-md-7">
<div class="text-md-right footer-links d-none d-sm-block">
</div>
</div>
</div>
</div>
</footer>
<!-- end Footer -->
</div>
<!-- END wrapper -->
<!-- Right bar overlay-->
<div class="rightbar-overlay"></div>

View File

@ -2,13 +2,13 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>RI</title>
<title><?php echo $pageTitle; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" />
<meta content="Coderthemes" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="<?php echo base_url(); ?>public/new_assets/images/favicon.ico">
<link rel="shortcut icon" href="<?php echo base_url(); ?>public/new_assets/images/RI_favicon.png">
<!-- third party css -->
<link href="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
@ -43,294 +43,29 @@
<ul class="list-unstyled topnav-menu float-right mb-0">
<li class="d-none d-lg-block">
<form class="app-search">
<div class="app-search-box dropdown">
<div class="input-group">
<input type="search" class="form-control" placeholder="Search..." id="top-search">
<div class="input-group-append">
<button class="btn" type="submit">
<i class="fe-search"></i>
</button>
</div>
</div>
<div class="dropdown-menu dropdown-lg" id="search-dropdown">
<!-- item-->
<div class="dropdown-header noti-title">
<h5 class="text-overflow mb-2">Found <span class="text-danger">09</span> results</h5>
</div>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="fe-home mr-1"></i>
<span>Analytics Report</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="fe-aperture mr-1"></i>
<span>How can I help you?</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="fe-settings mr-1"></i>
<span>User profile settings</span>
</a>
<!-- item-->
<div class="dropdown-header noti-title">
<h6 class="text-overflow mb-2 text-uppercase">Users</h6>
</div>
<div class="notification-list">
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="media">
<img class="d-flex mr-2 rounded-circle" src="<?php echo base_url(); ?>public/new_assets/images/users/avatar-2.jpg" alt="Generic placeholder image" height="32">
<div class="media-body">
<h5 class="m-0 font-14">Erwin E. Brown</h5>
<span class="font-12 mb-0">UI Designer</span>
</div>
</div>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="media">
<img class="d-flex mr-2 rounded-circle" src="<?php echo base_url(); ?>public/new_assets/images/users/avatar-5.jpg" alt="Generic placeholder image" height="32">
<div class="media-body">
<h5 class="m-0 font-14">Jacob Deo</h5>
<span class="font-12 mb-0">Developer</span>
</div>
</div>
</a>
</div>
</div>
</div>
</form>
</li>
<li class="dropdown d-inline-block d-lg-none">
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<i class="fe-search noti-icon"></i>
</a>
<div class="dropdown-menu dropdown-lg dropdown-menu-right p-0">
<form class="p-3">
<input type="text" class="form-control" placeholder="Search ..." aria-label="Recipient's username">
</form>
</div>
</li>
<li class="dropdown d-none d-lg-inline-block">
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="fullscreen" href="#">
<i class="fe-maximize noti-icon"></i>
</a>
</li>
<li class="dropdown d-none d-lg-inline-block topbar-dropdown">
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<i class="fe-grid noti-icon"></i>
</a>
<div class="dropdown-menu dropdown-lg dropdown-menu-right p-0">
<div class="p-2">
<div class="row no-gutters">
<div class="col">
<a class="dropdown-icon-item" href="#">
<img src="<?php echo base_url(); ?>public/new_assets/images/brands/github.png" alt="Github">
<span>GitHub</span>
</a>
</div>
<div class="col">
<a class="dropdown-icon-item" href="#">
<img src="<?php echo base_url(); ?>public/new_assets/images/brands/dribbble.png" alt="dribbble">
<span>Dribbble</span>
</a>
</div>
<div class="col">
<a class="dropdown-icon-item" href="#">
<img src="<?php echo base_url(); ?>public/new_assets/images/brands/slack.png" alt="slack">
<span>Slack</span>
</a>
</div>
</div>
<div class="row no-gutters">
<div class="col">
<a class="dropdown-icon-item" href="#">
<img src="<?php echo base_url(); ?>public/new_assets/images/brands/g-suite.png" alt="G Suite">
<span>G Suite</span>
</a>
</div>
<div class="col">
<a class="dropdown-icon-item" href="#">
<img src="<?php echo base_url(); ?>public/new_assets/images/brands/bitbucket.png" alt="bitbucket">
<span>Bitbucket</span>
</a>
</div>
<div class="col">
<a class="dropdown-icon-item" href="#">
<img src="<?php echo base_url(); ?>public/new_assets/images/brands/dropbox.png" alt="dropbox">
<span>Dropbox</span>
</a>
</div>
</div>
</div>
</div>
</li>
<li class="dropdown d-none d-lg-inline-block topbar-dropdown">
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<img src="<?php echo base_url(); ?>public/new_assets/images/flags/us.jpg" alt="user-image" height="14">
</a>
<div class="dropdown-menu dropdown-menu-right">
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<img src="<?php echo base_url(); ?>public/new_assets/images/flags/germany.jpg" alt="user-image" class="mr-1" height="12"> <span class="align-middle">German</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<img src="<?php echo base_url(); ?>public/new_assets/images/flags/italy.jpg" alt="user-image" class="mr-1" height="12"> <span class="align-middle">Italian</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<img src="<?php echo base_url(); ?>public/new_assets/images/flags/spain.jpg" alt="user-image" class="mr-1" height="12"> <span class="align-middle">Spanish</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<img src="<?php echo base_url(); ?>public/new_assets/images/flags/russia.jpg" alt="user-image" class="mr-1" height="12"> <span class="align-middle">Russian</span>
</a>
</div>
</li>
<li class="dropdown notification-list topbar-dropdown">
<a class="nav-link dropdown-toggle waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<i class="fe-bell noti-icon"></i>
<span class="badge badge-danger rounded-circle noti-icon-badge">5</span>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-lg">
<!-- item-->
<div class="dropdown-item noti-title">
<h5 class="m-0">
<span class="float-right">
<a href="" class="text-dark">
<small>Clear All</small>
</a>
</span>Notification
</h5>
</div>
<div class="noti-scroll" data-simplebar>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item active">
<div class="notify-icon bg-soft-primary text-primary">
<i class="mdi mdi-comment-account-outline"></i>
</div>
<p class="notify-details">Doug Dukes commented on Admin Dashboard
<small class="text-muted">1 min ago</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon">
<img src="<?php echo base_url(); ?>public/new_assets/images/users/avatar-2.jpg" class="img-fluid rounded-circle" alt="" /> </div>
<p class="notify-details">Mario Drummond</p>
<p class="text-muted mb-0 user-msg">
<small>Hi, How are you? What about our next meeting</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon">
<img src="<?php echo base_url(); ?>public/new_assets/images/users/avatar-4.jpg" class="img-fluid rounded-circle" alt="" /> </div>
<p class="notify-details">Karen Robinson</p>
<p class="text-muted mb-0 user-msg">
<small>Wow ! this admin looks good and awesome design</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon bg-soft-warning text-warning">
<i class="mdi mdi-account-plus"></i>
</div>
<p class="notify-details">New user registered.
<small class="text-muted">5 hours ago</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon bg-info">
<i class="mdi mdi-comment-account-outline"></i>
</div>
<p class="notify-details">Caleb Flakelar commented on Admin
<small class="text-muted">4 days ago</small>
</p>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon bg-secondary">
<i class="mdi mdi-heart"></i>
</div>
<p class="notify-details">Carlos Crouch liked
<b>Admin</b>
<small class="text-muted">13 days ago</small>
</p>
</a>
</div>
<!-- All-->
<a href="javascript:void(0);" class="dropdown-item text-center text-primary notify-item notify-all">
View all
<i class="fe-arrow-right"></i>
</a>
</div>
</li>
<li class="dropdown notification-list topbar-dropdown">
<a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<img src="<?php echo base_url(); ?>public/new_assets/images/users/avatar-1.jpg" alt="user-image" class="rounded-circle">
<img src="<?php echo base_url(); ?>public/new_assets/images/avatar.png" alt="user-image" class="rounded-circle">
<span class="pro-user-name ml-1">
Nik Patel <i class="mdi mdi-chevron-down"></i>
<?php echo $name; ?> <i class="mdi mdi-chevron-down"></i>
</span>
</a>
<div class="dropdown-menu dropdown-menu-right profile-dropdown ">
<!-- item-->
<div class="dropdown-header noti-title">
<h6 class="text-overflow m-0">Welcome !</h6>
<h6 class="text-overflow m-0"><?php echo "Welcome ".$role_text." !"; ?><?php //echo $role; ?></h6>
</div>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<a href="<?php echo base_url(); ?>loadChangePass" class="dropdown-item notify-item">
<i class="ri-account-circle-line"></i>
<span>My Account</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="ri-settings-3-line"></i>
<span>Settings</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="ri-wallet-line"></i>
<span>My Wallet <span class="badge badge-success float-right">3</span> </span>
<span>Change Password</span>
</a>
<!-- item-->
@ -342,7 +77,7 @@
<div class="dropdown-divider"></div>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<a href="<?php echo base_url(); ?>logout" class="dropdown-item notify-item">
<i class="ri-logout-box-line"></i>
<span>Logout</span>
</a>
@ -350,11 +85,6 @@
</div>
</li>
<li class="dropdown notification-list">
<a href="javascript:void(0);" class="nav-link right-bar-toggle waves-effect waves-light">
<i class="fe-settings noti-icon"></i>
</a>
</li>
</ul>
@ -373,10 +103,10 @@
<a href="index.html" class="logo logo-light text-center">
<span class="logo-sm">
<img src="<?php echo base_url(); ?>public/new_assets/images/logo-sm.png" alt="" height="24">
<img src="<?php echo base_url(); ?>public/new_assets/images/RI.png" alt="" height="24">
</span>
<span class="logo-lg">
<img src="<?php echo base_url(); ?>public/new_assets/images/logo-light.png" alt="" height="20">
<img src="<?php echo base_url(); ?>public/new_assets/images/RESICO (2).png" alt="" height="20">
</span>
</a>
</div>
@ -399,151 +129,6 @@
</a>
<!-- End mobile menu toggle-->
</li>
<li class="dropdown d-none d-xl-block">
<a class="nav-link dropdown-toggle waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
Create New
<i class="mdi mdi-chevron-down"></i>
</a>
<div class="dropdown-menu">
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<i class="fe-briefcase mr-1"></i>
<span>New Projects</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<i class="fe-user mr-1"></i>
<span>Create Users</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<i class="fe-bar-chart-line- mr-1"></i>
<span>Revenue Report</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<i class="fe-settings mr-1"></i>
<span>Settings</span>
</a>
<div class="dropdown-divider"></div>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">
<i class="fe-headphones mr-1"></i>
<span>Help & Support</span>
</a>
</div>
</li>
<li class="dropdown dropdown-mega d-none d-xl-block">
<a class="nav-link dropdown-toggle waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
Mega Menu
<i class="mdi mdi-chevron-down"></i>
</a>
<div class="dropdown-menu dropdown-megamenu">
<div class="row">
<div class="col-sm-8">
<div class="row">
<div class="col-md-4">
<h5 class="text-dark mt-0">UI Components</h5>
<ul class="list-unstyled megamenu-list">
<li>
<a href="javascript:void(0);">Widgets</a>
</li>
<li>
<a href="javascript:void(0);">Nestable List</a>
</li>
<li>
<a href="javascript:void(0);">Range Sliders</a>
</li>
<li>
<a href="javascript:void(0);">Masonry Items</a>
</li>
<li>
<a href="javascript:void(0);">Sweet Alerts</a>
</li>
<li>
<a href="javascript:void(0);">Treeview Page</a>
</li>
<li>
<a href="javascript:void(0);">Tour Page</a>
</li>
</ul>
</div>
<div class="col-md-4">
<h5 class="text-dark mt-0">Applications</h5>
<ul class="list-unstyled megamenu-list">
<li>
<a href="javascript:void(0);">eCommerce Pages</a>
</li>
<li>
<a href="javascript:void(0);">CRM Pages</a>
</li>
<li>
<a href="javascript:void(0);">Email</a>
</li>
<li>
<a href="javascript:void(0);">Calendar</a>
</li>
<li>
<a href="javascript:void(0);">Team Contacts</a>
</li>
<li>
<a href="javascript:void(0);">Task Board</a>
</li>
<li>
<a href="javascript:void(0);">Email Templates</a>
</li>
</ul>
</div>
<div class="col-md-4">
<h5 class="text-dark mt-0">Extra Pages</h5>
<ul class="list-unstyled megamenu-list">
<li>
<a href="javascript:void(0);">Left Sidebar with User</a>
</li>
<li>
<a href="javascript:void(0);">Menu Collapsed</a>
</li>
<li>
<a href="javascript:void(0);">Small Left Sidebar</a>
</li>
<li>
<a href="javascript:void(0);">New Header Style</a>
</li>
<li>
<a href="javascript:void(0);">Search Result</a>
</li>
<li>
<a href="javascript:void(0);">Gallery Pages</a>
</li>
<li>
<a href="javascript:void(0);">Maintenance & Coming Soon</a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="text-center mt-3">
<h3 class="text-dark">Special Discount Sale!</h3>
<h4>Save up to 70% off.</h4>
<button class="btn btn-primary btn-rounded mt-3">Download Now</button>
</div>
</div>
</div>
</div>
</li>
</ul>
<div class="clearfix"></div>
</div>
@ -559,306 +144,127 @@
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-dashboard" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-dashboard-line mr-1"></i> Dashboards <div class="arrow-down"></div>
<i class="ri-dashboard-line mr-1"></i> DASHBOARDS <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-dashboard">
<a href="index.html" class="dropdown-item">Sales</a>
<a href="dashboard-crm.html" class="dropdown-item">CRM</a>
<a href="dashboard-analytics.html" class="dropdown-item">Analytics</a>
<a href="<?php echo base_url(); ?>dashboard" class="dropdown-item">Home</a>
<a href="https://vu.venbait.in/d/d9eb820b-60aa-4fe6-9de0-531924185b77/sales-at-a-glance?orgId=2&from=1715215911333&to=1715237511333" class="dropdown-item">Sales</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-hr" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-file-paper-2-line mr-1"></i> SALES <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-hr">
<a href="<?php echo base_url(); ?>sales_invoice" class="dropdown-item"><i class="ri-file-list-3-line align-middle mr-1"></i> Sales Invoice</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-purchase" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-shopping-cart-2-line mr-1"></i> PURCHASE <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-purchase">
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-requisition"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-pushpin-2-line align-middle mr-1"></i> Requisition <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-requisition">
<a href="<?php echo base_url(); ?>Requisition" class="dropdown-item">Raise Requisition </a>
<a href="<?php echo base_url(); ?>CreatePO" class="dropdown-item">Purchase Order From Requisition</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-po"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-align-justify align-middle mr-1"></i> Purchase order <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-po">
<a href="<?php echo base_url(); ?>purchaseorderListing" class="dropdown-item">Purchase Order List</a>
<a href="<?php echo base_url(); ?>PORelease" class="dropdown-item">Approve Purchase Order</a>
<a href="<?php echo base_url(); ?>EmergencyPO" class="dropdown-item">Emergency Purchase Order </a>
<a href="<?php echo base_url(); ?>Report_pending_purchase" class="dropdown-item">Pending Purchase Order </a>
<a href="<?php echo base_url(); ?>amendmentpurchaseorder" class="dropdown-item">Amendment Purchase Order</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-inward"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-task-line align-middle mr-1"></i> Inward <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-inward">
<a href="<?php echo base_url(); ?>AddIGR" class="dropdown-item">Inward Gate Register Entry</a>
<a href="<?php echo base_url(); ?>ViewIGR" class="dropdown-item">View Inward Gate Register</a>
</div>
</div>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-hr" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-contacts-book-line mr-1"></i> HR <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-hr">
<a href="<?php echo base_url(); ?>employeeListing" class="dropdown-item"><i class="ri-shield-user-line align-middle mr-1"></i> Employee Details</a>
<a href="<?php echo base_url(); ?>attendance" class="dropdown-item"><i class=" ri-time-line align-middle mr-1"></i> Attendance</a>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-payslip"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-secure-payment-line align-middle mr-1"></i> PaySlip <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-payslip">
<a href="<?php echo base_url(); ?>monthlypay" class="dropdown-item">Monthly Pay Information </a>
<a href="<?php echo base_url(); ?>ViewPay" class="dropdown-item">PaySlip Generator</a>
<a href="<?php echo base_url(); ?>PaysilpListing" class="dropdown-item">Edit Payslip</a>
<a href="<?php echo base_url(); ?>emppayListings" class="dropdown-item">Employee Salary Details</a>
<a href="<?php echo base_url(); ?>publicholidays" class="dropdown-item">Public Holidays</a>
<a href="<?php echo base_url(); ?>leavereports" class="dropdown-item">Leave Reports</a>
</div>
</div>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-apps" role="button"
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-others" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-apps-2-line mr-1"></i> Apps <div class="arrow-down"></div>
<i class="ri-database-2-line align-middle mr-1"></i> OTHERS <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-apps">
<a href="apps-calendar.html" class="dropdown-item"><i class="ri-calendar-2-line align-middle mr-1"></i> Calendar</a>
<a href="apps-chat.html" class="dropdown-item"><i class="ri-message-2-line align-middle mr-1"></i> Chat</a>
<div class="dropdown-menu" aria-labelledby="topnav-others">
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-ecommerce"
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-master"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-shopping-cart-2-line align-middle mr-1"></i> Ecommerce <div class="arrow-down"></div>
<i class="ri-list-settings-line align-middle mr-1"></i> Master Details <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-ecommerce">
<a href="ecommerce-products.html" class="dropdown-item">Products List</a>
<a href="ecommerce-products-grid.html" class="dropdown-item">Products Grid</a>
<a href="ecommerce-product-detail.html" class="dropdown-item">Product Detail</a>
<a href="ecommerce-product-create.html" class="dropdown-item">Create Product</a>
<a href="ecommerce-customers.html" class="dropdown-item">Customers</a>
<a href="ecommerce-orders.html" class="dropdown-item">Orders</a>
<a href="ecommerce-orders-detail.html" class="dropdown-item">Order Detail</a>
<a href="ecommerce-sellers.html" class="dropdown-item">Sellers</a>
<a href="ecommerce-cart.html" class="dropdown-item">Shopping Cart</a>
<a href="ecommerce-checkout.html" class="dropdown-item">Checkout</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-email"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-mail-line align-middle mr-1"></i> Email <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-email">
<a href="email-inbox.html" class="dropdown-item">Inbox</a>
<a href="email-read.html" class="dropdown-item">Read Email</a>
<a href="email-templates.html" class="dropdown-item">Email Templates</a>
</div>
</div>
<a href="apps-companies.html" class="dropdown-item"><i class="ri-building-4-line align-middle mr-1"></i> Companies</a>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-task"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-task-line align-middle mr-1"></i> Tasks <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-task">
<a href="task-list.html" class="dropdown-item">List</a>
<a href="task-details.html" class="dropdown-item">Details</a>
<a href="task-kanban-board.html" class="dropdown-item">Kanban Board</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-contact"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-profile-line align-middle mr-1"></i> Contacts <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-contact">
<a href="contacts-list.html" class="dropdown-item">Members List</a>
<a href="contacts-profile.html" class="dropdown-item">Profile</a>
</div>
</div>
<a href="apps-file-manager.html" class="dropdown-item"><i class="ri-folders-line align-middle mr-1"></i> File Manager</a>
<a href="apps-tickets.html" class="dropdown-item"><i class="ri-customer-service-2-line align-middle mr-1"></i> Tickets</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-ui" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-pencil-ruler-2-line mr-1"></i> UI Elements <div class="arrow-down"></div>
</a>
<div class="dropdown-menu mega-dropdown-menu dropdown-mega-menu-xl" aria-labelledby="topnav-ui">
<div class="row">
<div class="col-lg-4">
<div>
<a href="ui-avatars.html" class="dropdown-item">Avatars</a>
<a href="ui-buttons.html" class="dropdown-item">Buttons</a>
<a href="ui-cards.html" class="dropdown-item">Cards</a>
<a href="ui-carousel.html" class="dropdown-item">Carousel</a>
<a href="ui-dropdowns.html" class="dropdown-item">Dropdowns</a>
<a href="ui-video.html" class="dropdown-item">Embed Video</a>
<a href="ui-general.html" class="dropdown-item">General UI</a>
</div>
</div>
<div class="col-lg-4">
<div>
<a href="ui-grid.html" class="dropdown-item">Grid</a>
<a href="ui-images.html" class="dropdown-item">Images</a>
<a href="ui-list-group.html" class="dropdown-item">List Group</a>
<a href="ui-modals.html" class="dropdown-item">Modals</a>
<a href="ui-notifications.html" class="dropdown-item">Notifications</a>
<a href="ui-portlets.html" class="dropdown-item">Portlets</a>
</div>
</div>
<div class="col-lg-4">
<div>
<a href="ui-progress.html" class="dropdown-item">Progress</a>
<a href="ui-ribbons.html" class="dropdown-item">Ribbons</a>
<a href="ui-spinners.html" class="dropdown-item">Spinners</a>
<a href="ui-tabs-accordions.html" class="dropdown-item">Tabs & Accordions</a>
<a href="ui-tooltips-popovers.html" class="dropdown-item">Tooltips & Popovers</a>
<a href="ui-typography.html" class="dropdown-item">Typography</a>
</div>
</div>
</div>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-components" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-stack-line mr-1"></i> Components <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-components">
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-extendedui"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-stack-line align-middle mr-1"></i> Extended UI <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-extendedui">
<a href="extended-nestable.html" class="dropdown-item">Nestable List</a>
<a href="extended-range-slider.html" class="dropdown-item">Range Slider</a>
<a href="extended-sweet-alert.html" class="dropdown-item">Sweet Alert</a>
<a href="extended-tour.html" class="dropdown-item">Tour Page</a>
<a href="extended-treeview.html" class="dropdown-item">Tree View</a>
<a href="extended-scrollspy.html" class="dropdown-item">Scrollspy</a>
</div>
</div>
<a href="widgets.html" class="dropdown-item"><i class="ri-honour-line align-middle mr-1"></i> Widgets</a>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-form"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-eraser-line align-middle mr-1"></i> Forms <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-form">
<a href="forms-elements.html" class="dropdown-item">General Elements</a>
<a href="forms-advanced.html" class="dropdown-item">Advanced</a>
<a href="forms-validation.html" class="dropdown-item">Validation</a>
<a href="forms-pickers.html" class="dropdown-item">Pickers</a>
<a href="forms-wizard.html" class="dropdown-item">Wizard</a>
<a href="forms-masks.html" class="dropdown-item">Masks</a>
<a href="forms-summernote.html" class="dropdown-item">Summernote</a>
<a href="forms-quilljs.html" class="dropdown-item">Quilljs Editor</a>
<a href="forms-file-uploads.html" class="dropdown-item">File Uploads</a>
<a href="forms-x-editable.html" class="dropdown-item">X Editable</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-charts"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-bar-chart-line align-middle mr-1"></i> Charts <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-charts">
<a href="charts-flot.html" class="dropdown-item">Flot Charts</a>
<a href="charts-apex.html" class="dropdown-item">Apex Charts</a>
<a href="charts-morris.html" class="dropdown-item">Morris Charts</a>
<a href="charts-chartjs.html" class="dropdown-item">Chartjs Charts</a>
<a href="charts-peity.html" class="dropdown-item">Peity Charts</a>
<a href="charts-chartist.html" class="dropdown-item">Chartist Charts</a>
<a href="charts-c3.html" class="dropdown-item">C3 Charts</a>
<a href="charts-sparklines.html" class="dropdown-item">Sparklines Charts</a>
<a href="charts-knob.html" class="dropdown-item">Jquery Knob Charts</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-table"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-table-line align-middle mr-1"></i> Tables <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-table">
<a href="tables-basic.html" class="dropdown-item">Basic Tables</a>
<a href="tables-datatables.html" class="dropdown-item">Data Tables</a>
<a href="tables-editable.html" class="dropdown-item">Editable Tables</a>
<a href="tables-responsive.html" class="dropdown-item">Responsive Tables</a>
<a href="tables-footables.html" class="dropdown-item">FooTable</a>
<a href="tables-tablesaw.html" class="dropdown-item">Tablesaw Tables</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-icons"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-markup-line align-middle mr-1"></i> Icons <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-icons">
<a href="icons-feather.html" class="dropdown-item">Feather</a>
<a href="icons-remix.html" class="dropdown-item">Remix</a>
<a href="icons-boxicons.html" class="dropdown-item">Boxicons</a>
<a href="icons-mdi.html" class="dropdown-item">Material Design</a>
<a href="icons-font-awesome.html" class="dropdown-item">Font Awesome 5</a>
<a href="icons-weather.html" class="dropdown-item">Weather</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-map"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-map-pin-line align-middle mr-1"></i> Maps <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-map">
<a href="maps-google.html" class="dropdown-item">Google Maps</a>
<a href="maps-vector.html" class="dropdown-item">Vector Maps</a>
<a href="maps-mapael.html" class="dropdown-item">Mapael Maps</a>
<div class="dropdown-menu" aria-labelledby="topnav-master">
<a href="<?php echo base_url(); ?>supplierlisting" class="dropdown-item">Supplier Details</a>
<a href="<?php echo base_url(); ?>costListing" class="dropdown-item">Cost Details</a>
<a href="<?php echo base_url(); ?>assetListing" class="dropdown-item">Asset Details</a>
<a href="<?php echo base_url(); ?>companyview" class="dropdown-item">Company Master</a>
<a href="<?php echo base_url(); ?>configlisting" class="dropdown-item">Config Details</a>
<a href="<?php echo base_url(); ?>departmentListing" class="dropdown-item">Department Details</a>
<a href="<?php echo base_url(); ?>rawmaterialListing" class="dropdown-item">Material Details</a>
<a href="<?php echo base_url(); ?>userListing" class="dropdown-item">Users</a>
</div>
</div>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-pages" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-pages-line mr-1"></i> Pages <div class="arrow-down"></div>
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>reports" role="button"
aria-expanded="false">
<i class="ri-keyboard-line mr-1"></i> REPORT LISTS
</a>
<div class="dropdown-menu" aria-labelledby="topnav-pages">
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-auth"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Auth Style 1 <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-auth">
<a href="auth-login.html" class="dropdown-item">Log In</a>
<a href="auth-register.html" class="dropdown-item">Register</a>
<a href="auth-signin-signup.html" class="dropdown-item">Signin - Signup</a>
<a href="auth-recoverpw.html" class="dropdown-item">Recover Password</a>
<a href="auth-lock-screen.html" class="dropdown-item">Lock Screen</a>
<a href="auth-logout.html" class="dropdown-item">Logout</a>
<a href="auth-confirm-mail.html" class="dropdown-item">Confirm Mail</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-auth2"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Auth Style 2 <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-auth2">
<a href="auth-login-2.html" class="dropdown-item">Log In 2</a>
<a href="auth-register-2.html" class="dropdown-item">Register 2</a>
<a href="auth-signin-signup-2.html" class="dropdown-item">Signin - Signup 2</a>
<a href="auth-recoverpw-2.html" class="dropdown-item">Recover Password 2</a>
<a href="auth-lock-screen-2.html" class="dropdown-item">Lock Screen 2</a>
<a href="auth-logout-2.html" class="dropdown-item">Logout 2</a>
<a href="auth-confirm-mail-2.html" class="dropdown-item">Confirm Mail 2</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-error"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Errors <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-error">
<a href="pages-404.html" class="dropdown-item">Error 404</a>
<a href="pages-404-alt.html" class="dropdown-item">Error 404-alt</a>
<a href="pages-500.html" class="dropdown-item">Error 500</a>
</div>
</div>
<div class="dropdown">
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-utility"
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Utility <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-utility">
<a href="pages-starter.html" class="dropdown-item">Starter</a>
<a href="pages-timeline.html" class="dropdown-item">Timeline</a>
<a href="pages-sitemap.html" class="dropdown-item">Sitemap</a>
<a href="pages-invoice.html" class="dropdown-item">Invoice</a>
<a href="pages-faqs.html" class="dropdown-item">FAQs</a>
<a href="pages-search-results.html" class="dropdown-item">Search Results</a>
<a href="pages-pricing.html" class="dropdown-item">Pricing</a>
<a href="pages-maintenance.html" class="dropdown-item">Maintenance</a>
<a href="pages-coming-soon.html" class="dropdown-item">Coming Soon</a>
<a href="pages-gallery.html" class="dropdown-item">Gallery</a>
</div>
</div>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-layout" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-layout-line mr-1"></i> Layouts <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-layout">
<a href="layouts-vertical.html" class="dropdown-item">Vertical</a>
<a href="layouts-detached.html" class="dropdown-item">Detached</a>
<a href="layouts-two-column.html" class="dropdown-item">Two Column Menu</a>
<a href="layouts-preloader.html" class="dropdown-item">Preloader</a>
</div>
</li>
</ul> <!-- end navbar-->
</div> <!-- end .collapsed-->
</nav>

View File

@ -10,10 +10,49 @@
text-align: left;
}
</style>
<style>
.autocomplete-suggestion {
cursor: pointer;
background-color: skyblue;
/* background-color: darkgrey; */
outline: 1px solid slategrey;
}
</style>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/Autocomplete/jquery.autocomplete.js"></script>
<script>
$(document).ready(function() {
$("#PONO").select2();
$("#VehicleType").select2();
$('#DriverName').autocomplete({
onSearchStart: function(query) {
//alert(query);
$('#DriverName').autocomplete("option", "minLength", 0);
},
serviceUrl: "<?php echo base_url(); ?>drivernameautocomplete",
onSelect: function(suggestion) {
var data = suggestion.DriverName;
}
});
$('#DriverMobileNumber').autocomplete({
serviceUrl: "<?php echo base_url(); ?>drivermobileautocomplete",
params: {
driverName: function() {
return $('#DriverName').val(); // Pass the value of the DriverName input field
}
},
onSearchStart: function(query) {
$('#DriverMobileNumber').autocomplete("option", "minLength", 0);
},
onSelect: function(suggestion) {
var data = suggestion.DriverMobileNumber;
}
});
$("#InvoiceDate").datepicker({
@ -87,7 +126,6 @@
</section>
<section class="content" style="margin: 15px;"><br />
<div style="border:2px solid #333;">
<form action="<?php echo base_url() ?>SaveIGR" method="post" enctype="multipart/form-data">
<div class="row"><br /><br />
<div id="content"> </div>
@ -147,7 +185,7 @@
</div>
</div>
<div class="col-md-12" style="margin: 10px 0;">
<div class="col-md-4">
<div class="col-md-3">
<label>Vechicle Number</label>
<?php
$data = array('name' => 'VehicleNo', 'value' => set_value('VehicleNo'), 'id' => 'VehicleNo', 'class' => 'form-control', 'maxlength' => '20', 'autocomplete'=>'off');
@ -155,14 +193,21 @@
?>
<!-- <span pattern="" required="true"></span> -->
</div>
<div class="col-md-4">
<div class="col-md-3">
<label>Vechicle Type</label>
<?php
$opt = array(""=>'Vechicle Type',"Rented"=>'Rented',"Owned"=>'Owned');
echo form_dropdown('VehicleType', $opt,set_value('VehicleType'),'id="VehicleType"' ,'class="form-control select2');
?>
</div>
<div class="col-md-3">
<label>Driver Name</label>
<?php
$data = array('name' => 'DriverName', 'value' => set_value('DriverName'), 'id' => 'DriverName', 'class' => 'form-control', 'maxlength' => '50', 'autocomplete'=>'off');
echo form_input($data);
?>
</div>
<div class="col-md-4">
<div class="col-md-3">
<label>Driver Mobile Number</label>
<?php
$data = array('name' => 'DriverMobileNumber', 'value' => set_value('DriverMobileNumber'), 'id' => 'DriverMobileNumber', 'class' => 'form-control', 'maxlength' => '50', 'autocomplete'=>'off');
@ -242,8 +287,8 @@
<div id="filesContainer"></div>
</div><br>
<div class="col-md-4 col-md-offset-8">
<button class="btn btn-success" id='IGRDraftLink' type="submit" name='IGRDraftLink' onclick="filecheck(0);">Save as Draft IGR</button>
<button class="btn btn-success" id='IGRLink' type="submit" name='IGRLink' onclick="filecheck(1);">Generate IGR</button>
<button class="btn btn-success" id='IGRDraftLink' type="submit" name='IGRDraftLink' onclick="filecheck(0);">Save as Draft IGR</button>
</div>
</div>
</div>
@ -462,6 +507,7 @@
$('#txtRowCount').val('');
var id = $('#PONO').val();
var status = '';
var isOpenOrder = 0;
if (id != '-1') {
$('#content').loader('show');
var y = <?php echo json_encode($PO_NO, JSON_PRETTY_PRINT) ?>;
@ -473,7 +519,7 @@
$("#po").val(obj.PONO);
$("#Sup").val(obj.SupplierName);
$("#hiddenIsOpenOrder").val(obj.IsOpenOrder);
var isOpenOrder = parseInt(obj.IsOpenOrder, 2);
isOpenOrder = parseInt(obj.IsOpenOrder ? obj.IsOpenOrder : "0", 2);
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "" : "Open";
$('.help-block').text(formatted_IsOpenOrder);
var button_text_for_IGRDraftLink = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "Save as Draft IGR" : "Save as Open IGR";
@ -510,7 +556,7 @@
'<td name="UOM">' + item.UOM + '</td>' +
'<td name="Quantity1' + i + '" id="Quantity_1' + i + '">' + item.Quantity + '</td>' +
'<td name="ReceivedQuantity' + i + '" id="ReceivedQuantity' + i + '">' + item.ReceivedQuantity + '</td>' +
'<td name="PendingQuantity' + i + '" id="PendingQuantity' + i + '">' + item.PendingQty + '</td>' +
'<td name="PendingQuantity' + i + '" id="PendingQuantity' + i + '">' + ((isOpenOrder === 0 || isNaN(isOpenOrder)) ? item.PendingQty : 0 ) + '</td>' +
'<td data-name="sel" ><input type="text" onchange="validateReceivedQuantity(' + i + ')"id="QuantityAsPerInvoice' + i + '" name="QuantityAsPerInvoice' + i + '" value="" onkeypress="return isNumberKey(event);" autocomplete="off"></td>' +
'<td><input type="text" id="Remark' + i + '" name="Remark' + i + '" class="form" onchange="SetRemarks(' + i + ')" autocomplete="off"> </td>' +
'<td><a target="_blank" data-toggle="modal" data-target="#WeightCalculator" title="Weight Calculator" data-index="' + i + '" data-material="' + item.MaterialName + '"><i class="fa fa-solid fa-truck" style="text-align: center;"></i></a> </td>' +
@ -554,7 +600,7 @@
type: 'hidden',
id: 'txtPendingQty' + i,
name: 'txtPendingQty' + i,
value: item.PendingQty
value: ((isOpenOrder === 0 || isNaN(isOpenOrder)) ? item.PendingQty : 0 )
}).appendTo('form');
$('<input>').attr({
@ -673,8 +719,11 @@
// InvoiceQty
return true;
}}else{
console.log(InvoiceQty + RecQty);
$('#PendingQuantity' + Rowid).text(0.00);
$('#txtPendingQty' + Rowid).val(0.00);
$("#txtQuantityAsPerInvoice" + Rowid).val(0.00);
$("#ReceivedQuantity" + Rowid).val(InvoiceQty + RecQty);
$("#txtQuantityAsPerInvoice" + Rowid).val((InvoiceQty + RecQty));
// InvoiceQty
return true;
}

View File

@ -764,7 +764,8 @@
<td class="text-right" style="border:0em;"><?php echo number_alignment(abs(array_sum($igst))); ?></td>
</tr>
<?php if(isset($reveuetax)){ ?>
<?php $AfterPackagingValue = []; $AfterFreightValue= []; $AfterDiscount =[];
if(isset($reveuetax)){ ?>
<?php foreach ($reveuetax as $key => $value) {
$AfterPackagingValue[] = isset($value->AfterPackagingValue) ? $value->AfterPackagingValue : 0.00;

View File

@ -1,353 +1,404 @@
<?php
<?php
//echo "OUTIF";
if(empty($Status))
{
if (empty($Status)) {
//echo "INIF";
//print_r($Status);
//print_r($Status);
}
?>
<style>
.table-bordered>thead>tr>th, .table-bordered>tbody>tr>th, .table-bordered>tfoot>tr>th, .table-bordered>thead>tr>td, .table-bordered>tbody>tr>td, .table-bordered>tfoot>tr>td {border: 1px solid #333;}
.modal-content {
width:1000px ! important;
.table-bordered>thead>tr>th,
.table-bordered>tbody>tr>th,
.table-bordered>tfoot>tr>th,
.table-bordered>thead>tr>td,
.table-bordered>tbody>tr>td,
.table-bordered>tfoot>tr>td {
border: 1px solid #333;
}
.modal
{
padding-right:25% ! important;
.modal-content {
width: 1000px ! important;
}
#Requisition_filter{
.modal {
padding-right: 25% ! important;
}
#Requisition_filter {
float: inline-end;
}
#Requisition_wrapper .row .col-sm-4{
}
#Requisition_wrapper .row .col-sm-4 {
flex-basis: 50%;
float: inline-end;
}
#Requisition_paginate .pagination {
#Requisition_paginate .pagination {
flex-basis: 50%;
float: inline-end;
margin:0 0 15px;
margin: 0 0 15px;
}
#Requisition_wrapper .row:nth-child(3), #Requisition_wrapper .row:nth-child(1){
#Requisition_wrapper .row:nth-child(3),
#Requisition_wrapper .row:nth-child(1) {
padding: 0 15px;
}
#Requisition_info{
#Requisition_info {
margin-top: 5px;
}
.dataTables_wrapper{
.dataTables_wrapper {
padding-bottom: 0;
}
</style>
<style>
.Date-filter-form {
display: flex;
align-items: center;
gap: 10px;
/* Adjust the gap as needed */
}
.Date-filter-form input,
.Date-filter-form button {
padding: 5px;
font-size: 14px;
}
.Date-filter-form button {
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
}
.Date-filter-form button:hover {
background-color: #0056b3;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: #007bff;
font-size: 18px;
}
.icon-button:hover {
color: #0056b3;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="box">
<div class="box-header">
<CENTER><h3 class="box-title">Purchase Order Approve List </h3></CENTER>
</div>
<div class="container-fluid">
<table id="Requisition" class="table table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>Purchase Order Number</th>
<th>Purchase Order Type</th>
<th>Cost Center Name</th>
<th>Supplier Name</th>
<th>Created By</th>
<th>Department</th>
<th>Created Date</th>
<th>Total Order Value</th>
<th>Approved By</th>
<th>Status</th>
<th>Action</th>
<th>Remarks</th>
</tr>
</thead>
<tbody id="ApprovalList">
<?php
if(!empty($AppList))
{
$index = 0;
foreach($AppList as $record)
{
$index = $index +1;
//echo $index;
?>
<tr id="<?php echo $index ?>" >
<td><a target="_blank" href="<?php echo base_url() ?>purchaseorder/CreatePOPrint?PONO=<?php echo $record->PONO ?>&ReqType=<?php echo $record->RType ?>" data-id="<%=index%>" data-userid="<?php echo $record->PONO ?>" ><u><?php echo $record->PONO ?> </td>
<td><?php echo $record->RType ?> </td>
<td><?php echo $record->CostCenterName ?> </td>
<!-- <td><?php // echo $record->CostCenterCode?></td> -->
<td><?php echo $record->SupplierName ?></td>
<td><?php echo $record->FirstName ?></td>
<td><?php echo $record->DepartmentName?></td>
<td align="right"><?php $Cdt = new DateTime($record->CreatedDate);
$CreatedDate = $Cdt->format('d-m-Y');
echo $CreatedDate;
?></td>
<td align="right"><?php echo $record->TotalOrderValue ?></td>
<td><?php echo $record->Approver?></td>
<td><?php
$statusMappings = [
'PO APPROVED' => 'AWAITING APPROVE',
'AWAITING RELEASE' => 'AWAITING APPROVE',
'RELEASER ONHOLD' => 'APPROVER ONHOLD',
'PO RELEASED' => 'PO APPROVED',
];
if (isset($record->StatusName) && !empty($record->StatusName)) {
if (isset($statusMappings[$record->StatusName])) {
echo $statusMappings[$record->StatusName];
} else {
echo $record->StatusName;
}
<section class="content">
<div class="box">
<div class="box-header">
<CENTER>
<h3 class="box-title">Purchase Order Approve List </h3>
</CENTER>
</div>
<div class="container-fluid">
<form class="Date-filter-form" id="DateRangeFilter">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<table id="Requisition" class="table table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>PO Date</th>
<th>Purchase Order Number</th>
<th>Purchase Order Type</th>
<th>Cost Center Name</th>
<th>Supplier Name</th>
<th>Created By</th>
<th>Department</th>
<!-- <th>Created Date</th> -->
<th>Total Order Value</th>
<th>Approved By</th>
<th>Status</th>
<th>Action</th>
<th>Remarks</th>
</tr>
</thead>
<tbody id="ApprovalList">
<?php
if (!empty($AppList)) {
$index = 0;
foreach ($AppList as $record) {
$index = $index + 1;
//echo $index;
?>
<tr id="<?php echo $index ?>">
<td align="right" style="width:75px"><?php $podt = new DateTime($record->PODate);
$PODate = $podt->format('d-m-Y');
echo $PODate;
?></td>
<td><a target="_blank" href="<?php echo base_url() ?>purchaseorder/CreatePOPrint?PONO=<?php echo $record->PONO ?>&ReqType=<?php echo $record->RType ?>" data-id="<%=index%>" data-userid="<?php echo $record->PONO ?>"><u><?php echo $record->PONO ?> </td>
<td><?php echo $record->RType ?> </td>
<td><?php echo $record->CostCenterName ?> </td>
<!-- <td><?php // echo $record->CostCenterCode
?></td> -->
<td><?php echo $record->SupplierName ?></td>
<td><?php echo $record->FirstName ?></td>
<td><?php echo $record->DepartmentName ?></td>
<!-- <td align="right"><?php // $Cdt = new DateTime($record->CreatedDate);
// $CreatedDate = $Cdt->format('d-m-Y');
// echo $CreatedDate;
?></td> -->
<td align="right"><?php echo $record->TotalOrderValue ?></td>
<td><?php echo $record->Approver ?></td>
<td><?php
$statusMappings = [
'PO APPROVED' => 'AWAITING APPROVE',
'AWAITING RELEASE' => 'AWAITING APPROVE',
'RELEASER ONHOLD' => 'APPROVER ONHOLD',
'PO RELEASED' => 'PO APPROVED',
];
if (isset($record->StatusName) && !empty($record->StatusName)) {
if (isset($statusMappings[$record->StatusName])) {
echo $statusMappings[$record->StatusName];
} else {
echo "Status not provided";
echo $record->StatusName;
}
?></td>
<?php
// if($record->StatusName == 'RELEASER ONHOLD' or $record->StatusName == 'AWAITING RELEASE' or $record->StatusName == 'AMENDMENT PO'){
if($record->StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED ){
?>
<td>
<select name="selectId" id="selectId" onchange="showvalue('<?php echo $record->PONO ?>','<?php echo $index ; ?>',this.options[this.selectedIndex].value,'<?php echo $record->Remarks ?>');">
<option value="-1" >Select Action</option>
<!-- <option value="1">Release</option> -->
<option value="1">Approve And Release</option>
<option value="2">OnHold</option>
</select>
</td>
<?php }else{
echo "<td><center>-</center></td>";
}?>
<td contenteditable="true" id="remarks<?php echo $index ; ?>"><?php
if($record->Remarks == ''){
} else {
echo "Status not provided";
}
?></td>
<?php
// if($record->StatusName == 'RELEASER ONHOLD' or $record->StatusName == 'AWAITING RELEASE' or $record->StatusName == 'AMENDMENT PO'){
if ($record->StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED) {
?>
<td>
<select name="selectId" id="selectId" onchange="showvalue('<?php echo $record->PONO ?>','<?php echo $index; ?>',this.options[this.selectedIndex].value,'<?php echo $record->Remarks ?>');">
<option value="-1">Select Action</option>
<!-- <option value="1">Release</option> -->
<option value="1">Approve And Release</option>
<option value="2">OnHold</option>
</select>
</td>
<?php } else {
echo "<td><center>-</center></td>";
} ?>
<td contenteditable="true" id="remarks<?php echo $index; ?>"><?php
if ($record->Remarks == '') {
} else {
echo $record->Remarks;
} ?></td>
</tr>
<?php
}
}
else{ echo $record->Remarks; }?></td>
</tr>
<?php
}
}
?>
?>
</tbody>
</table>
<br>
</div>
</div>
</section>
</tbody>
</table>
<br>
</div>
</div>
</section>
</div>
<script>
function showvalue(PONO,value,Status,Remark)
{
var Remarks='';
var curtremarks=document.getElementById('remarks'+value+'').innerHTML;
<script>
function showvalue(PONO, value, Status, Remark) {
var Remarks = '';
var curtremarks = document.getElementById('remarks' + value + '').innerHTML;
//var curtremarks = curtremarks.trim();
var PO=PONO;
var Status=Status;
var StatusCode='';
var srtMsg='';
if((curtremarks == '<br>' || curtremarks == '') && Remark == ''){
Remarks='';
var PO = PONO;
var Status = Status;
var StatusCode = '';
var srtMsg = '';
if ((curtremarks == '<br>' || curtremarks == '') && Remark == '') {
Remarks = '';
//alert("To Store both empty:-" + Remarks)
}
else if((curtremarks != '' && Remark == ''))
{
Remarks=curtremarks;
//alert("To Store current empty:-" + Remarks)
}
else if((Remark != '') && (curtremarks == '' || curtremarks == '<br>'))
{
Remarks=Remark;
//alert("To Store current empty:-" + Remarks)
}
else{
Remarks=Remark+"||"+curtremarks;
//alert("To Store both:-" + Remarks)
} else if ((curtremarks != '' && Remark == '')) {
Remarks = curtremarks;
//alert("To Store current empty:-" + Remarks)
} else if ((Remark != '') && (curtremarks == '' || curtremarks == '<br>')) {
Remarks = Remark;
//alert("To Store current empty:-" + Remarks)
} else {
Remarks = Remark + "||" + curtremarks;
//alert("To Store both:-" + Remarks)
}
//alert(PO+"-"+Status+"-"+StatusCode);
if(Status != '-1'){
if(Status == '1'){
// var strMsg='Do you want to Release this Purchase Order?'
var strMsg='Do you want to Approve and Release this Purchase Order?'
var StatusCode='ST026';
//alert(StatusCode);
}
else if(Status == '2')
{
var strMsg='Do you want to put Hold this Purchase Order?';
var StatusCode='ST052';
//alert(StatusCode);
}
/* MSG*/
var answer = confirm(strMsg);
if (answer)
{
$('#content').loader('show');
$.ajax({
data:{PONO:PO,SCode:StatusCode,NewRemarks:Remarks},
type:"POST",
url:"<?php echo base_url() ?>purchaseorder/ReleasePO",
success:function(data) {
if(data)
{
$('#content').loader('hide');
alert(data);
location.reload();
if (Status != '-1') {
if (Status == '1') {
// var strMsg='Do you want to Release this Purchase Order?'
var strMsg = 'Do you want to Approve and Release this Purchase Order?'
var StatusCode = 'ST026';
//alert(StatusCode);
} else if (Status == '2') {
var strMsg = 'Do you want to put Hold this Purchase Order?';
var StatusCode = 'ST052';
//alert(StatusCode);
}
else
{
alert("Error");
}
/* MSG*/
var answer = confirm(strMsg);
if (answer) {
$('#content').loader('show');
$.ajax({
data: {
PONO: PO,
SCode: StatusCode,
NewRemarks: Remarks
},
type: "POST",
url: "<?php echo base_url() ?>purchaseorder/ReleasePO",
success: function(data) {
if (data) {
$('#content').loader('hide');
alert(data);
location.reload();
} else {
alert("Error");
}
}
});
} else {
return;
}
/* MSG*/
} else {
alert('please Select Status!');
}
});
}
else
{
return;
}
/* MSG*/
}
else
{
alert('please Select Status!');
}
} //End of showvalue function for approve/hold po status
</script>
<script>
</script>
<script>
var startDate = '';
var endDate = '';
function Reset()
{
$('#RequisitionStatus').val("-1");
$('#SearchDate').val('');
}
<!-- JQuery For POP UP and Getting all relevant Data -->
$("#myModal").on("shown.bs.modal", function(e) {
var ReqId = $(e.relatedTarget).data('userid');
$("#RequistionNo").val('');
$("#drpSupplier").val('');
$("#POType").val('');
$("#Tax Range").val(''); //not conform
$("#SupAddress").val('');
$("#DeliveryAddr").val('');
$("#PODate").val('');
$("#Deliverydt").val('');
$("#tbleAppend").empty();
$("#txtTotBasicAmount").val('');
$("#txtTotalDiscount").val('');
$("#txtTotalVat").val('');
$("#txtTotCST").val('');
$("#txtTotalPackaing").val('');
$("#txtTotExciseDuty").val('');
$("#txtTotalGST").val('');
$("#txtTotalInsurance").val('');
$("#txtTotalFreight").val('');
$("#txtTotalOtherTaxes").val('');
$("#txtTotalOrderValueSummary").val('');
$("#txtSpcialInstruction").val('');
$('#AlertImg').attr("style","display:none;");
$('#content').loader('show');
$.ajax({
data:{id:ReqId},
type:"POST",
var endDate = '';
function Reset() {
$('#RequisitionStatus').val("-1");
$('#SearchDate').val('');
}
// <!--JQuery For POP UP and Getting all relevant Data-- >
$("#myModal").on("shown.bs.modal", function(e) {
var ReqId = $(e.relatedTarget).data('userid');
$("#RequistionNo").val('');
$("#drpSupplier").val('');
$("#POType").val('');
$("#Tax Range").val(''); //not conform
$("#SupAddress").val('');
$("#DeliveryAddr").val('');
$("#PODate").val('');
$("#Deliverydt").val('');
$("#tbleAppend").empty();
$("#txtTotBasicAmount").val('');
$("#txtTotalDiscount").val('');
$("#txtTotalVat").val('');
$("#txtTotCST").val('');
$("#txtTotalPackaing").val('');
$("#txtTotExciseDuty").val('');
$("#txtTotalGST").val('');
$("#txtTotalInsurance").val('');
$("#txtTotalFreight").val('');
$("#txtTotalOtherTaxes").val('');
$("#txtTotalOrderValueSummary").val('');
$("#txtSpcialInstruction").val('');
$('#AlertImg').attr("style", "display:none;");
$('#content').loader('show');
$.ajax({
data: {
id: ReqId
},
type: "POST",
dataType: 'json',
url:"<?php echo base_url() ?>requisitionform/ViewRequest",
success:function(json) {
// success:function(data) {
url: "<?php echo base_url() ?>requisitionform/ViewRequest",
success: function(json) {
// success:function(data) {
$('#content').loader('hide');
//alert(data);
$("#ReqType").val(json.Requist[0]['ReqType']);
$("#ReqType").val(json.Requist[0]['ReqType']);
$("#ReqBy").val(json.Requist[0]['Requestedby']);
$("#ReqDate").val(json.Requist[0]['CreatedDate']);
$("#Desigination").val(json.Requist[0]['Designation']);
$("#ReqDate").val(json.Requist[0]['CreatedDate']);
$("#Desigination").val(json.Requist[0]['Designation']);
$("#CostCenter").val(json.Requist[0]['CostCenterCode']);
$("#AvlBudgetAmount").val(json.AvilBudAmount);
$("#tbleAppend").append(json.Items);
}
});
});
$("#AvlBudgetAmount").val(json.AvilBudAmount);
function printpdf(PONO,value,Status) {
var PONO =PONO;
var Status = Status;
var value = value;
alert(PONO+Status+value);
if(PONO != '' && Status != '' && value != ''){
alert('inside if '+PONO+Status+value);
$.ajax({
data:{PONO1:PONO,Status1:Status},
type:"POST",
url:"<?php echo base_url() ?>purchaseorder/Poprintpdf",
/*success:function(data) {
$("#tbleAppend").append(json.Items);
}
});
});
function printpdf(PONO, value, Status) {
var PONO = PONO;
var Status = Status;
var value = value;
alert(PONO + Status + value);
if (PONO != '' && Status != '' && value != '') {
alert('inside if ' + PONO + Status + value);
$.ajax({
data: {
PONO1: PONO,
Status1: Status
},
type: "POST",
url: "<?php echo base_url() ?>purchaseorder/Poprintpdf",
/*success:function(data) {
if(data)
{
alert(data);
@ -359,88 +410,193 @@ function printpdf(PONO,value,Status) {
}*/
});
}
else{
alert('inside else '+PONO+Status+value);
}
}
$(function() {
var d = new Date();
});
var month = d.getMonth();
var day = d.getDate();
var year = d.getFullYear() ;
var SIAStartYear = year - 2015;
var mindt = year-70;
var maxdt = year-15;
$( ".datePicker" ).datepicker(
{
minDate : new Date(year-SIAStartYear,1,1),
maxDate :'now',
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,
} else {
alert('inside else ' + PONO + Status + value);
}
}
);
//$('#SearchDate').daterangepicker( );
//Initialize Select2 Elements
$(".select2").select2();
//$('#SearchDate').val('');
$('#SearchDate').daterangepicker(
{
locale: {
format: 'DD-MM-YYYY'
},
showDropdowns: true
},
function(start, end, label) {
startDate = start.format('DD-MM-YYYY');
endDate = end.format('DD-MM-YYYY');
$('#FromDate').val(startDate);
$('#ToDate').val(endDate);
//alert("A new date range was chosen: " + start.format('DD-MM-YYYY') + ' to ' + end.format('DD-MM-YYYY'));
});
});
$(function () {
$('#Items').DataTable({
"paging": false,
"lengthChange": true,
"searching": false,
"ordering": false,
"info": false,
"autoWidth": false
});
$(function() {
var d = new Date();
var month = d.getMonth();
var day = d.getDate();
var year = d.getFullYear();
var SIAStartYear = year - 2015;
var mindt = year - 70;
var maxdt = year - 15;
$(".datePicker").datepicker({
minDate: new Date(year - SIAStartYear, 1, 1),
maxDate: 'now',
dateFormat: 'mm/dd/yy',
changeMonth: true,
changeYear: true,
});
//$('#SearchDate').daterangepicker( );
//Initialize Select2 Elements
$(".select2").select2();
//$('#SearchDate').val('');
$('#SearchDate').daterangepicker({
locale: {
format: 'DD-MM-YYYY'
},
showDropdowns: true
},
function(start, end, label) {
startDate = start.format('DD-MM-YYYY');
endDate = end.format('DD-MM-YYYY');
$('#FromDate').val(startDate);
$('#ToDate').val(endDate);
//alert("A new date range was chosen: " + start.format('DD-MM-YYYY') + ' to ' + end.format('DD-MM-YYYY'));
});
$.fn.dataTable.moment( 'DD-MM-YYYY' );
$('#Requisition').DataTable({
columnDefs: [{ width: 200}],
fixedColumns: true,
paging: true,
lengthChange: true,
searching: true,
ordering: true,
aaSorting: [[ 6, "desc" ]],
info: true,
autoWidth: true,
pageLength: 10,
lengthMenu: [10, 25, 50, 100]
});
});
</script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
$(function() {
$('#Items').DataTable({
"paging": false,
"lengthChange": true,
"searching": false,
"ordering": false,
"info": false,
"autoWidth": false
});
$.fn.dataTable.moment('DD-MM-YYYY');
// $('#Requisition').DataTable({
// columnDefs: [{ width: 200}],
// fixedColumns: true,
// paging: true,
// lengthChange: true,
// searching: true,
// ordering: true,
// aaSorting: [[ 0, "desc" ]],
// info: true,
// autoWidth: true,
// pageLength: 10,
// lengthMenu: [10, 25, 50, 100]
// });
});
</script>
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.4/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.13.6/sorting/datetime-moment.js"></script>
<script>
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
var dateSplit = date.split('/');
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
};
$(document).ready(function() {
// Initialize the DataTable
var table = $('#Requisition').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 0,
"type": "date-eu"
}],
"aaSorting": [
[0, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
"buttons": [
{
extend: 'excelHtml5',
text: 'Export to Excel',
title: 'Approve Purchase Order List',
exportOptions: {
columns: ':visible:not(:last-child)' // Exclude first and last columns
}
},
{
extend: 'pdfHtml5',
text: 'Export to PDF',
title: 'Approve Purchase Order List',
exportOptions: {
columns: ':visible:not(:last-child)' // Exclude first and last columns
}
}]
});
// Initialize the datepickers
$("#fromDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var minDate = $(this).datepicker("getDate");
$("#toDate").datepicker("option", "minDate", minDate);
}
});
$("#toDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var maxDate = $(this).datepicker("getDate");
$("#fromDate").datepicker("option", "maxDate", maxDate);
}
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").datepicker("setDate", null);
$("#toDate").datepicker("setDate", null);
$("#toDate").datepicker("option", "minDate", null);
$("#fromDate").datepicker("option", "maxDate", null);
table.draw();
});
// Date range filter
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[0]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
if (!fromDate || !toDate) {
return true; // No filter if dates are not selected
}
return date >= fromDate && date <= toDate;
}
);
// Handle form submission
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw();
});
});
</script>

View File

@ -1,96 +1,148 @@
<div class="content-wrapper">
<div class="row">
<div class="col-md-12">
<?php
helper('form');
$error = session()->getFlashdata('error');
if($error){
$type = "error";
echo show_alert($type, $error);
}
$success = session()->getFlashdata('success');
if($success){
$type = "success";
echo show_alert($type, $success);
}
?>
<style>
.Date-filter-form {
display: flex;
align-items: center;
gap: 10px;
/* Adjust the gap as needed */
}
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
?> </div>
</div>
</div>
.Date-filter-form input,
.Date-filter-form button {
padding: 5px;
font-size: 14px;
}
.Date-filter-form button {
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
}
.Date-filter-form button:hover {
background-color: #0056b3;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: #007bff;
font-size: 18px;
}
.icon-button:hover {
color: #0056b3;
}
</style>
<div class="content-wrapper">
<div class="row">
<div class="col-md-12">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
$type = "error";
echo show_alert($type, $error);
}
$success = session()->getFlashdata('success');
if ($success) {
$type = "success";
echo show_alert($type, $success);
}
?>
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
?> </div>
</div>
</div>
<section class="content">
<div class="box">
<div class="box-header">
<CENTER><h3 class="box-title"> Material Master Details</h3></CENTER>
</div>
<div class="container-fluid">
</div>
<section class="content">
<div class="box">
<div class="box-header">
<CENTER>
<h3 class="box-title"> Material Master Details</h3>
</CENTER>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>addRawmaterial">Add New Material</a>
<a class="btn btn-success" href="<?php echo base_url(); ?>exportmaterial">Export Material Master <i class="fa fa-download"aira-hidden="true"></i></a>
</div>
<div class="col-xs-12 col-md-6">
<form class="Date-filter-form" id="DateRangeFilter">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
</div>
<div class="col-xs-12 col-md-6 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>addRawmaterial">Add New Material</a>
<a class="btn btn-success" href="<?php echo base_url(); ?>exportmaterial">Export Material Master <i class="fa fa-download" aira-hidden="true"></i></a>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
<thead style="background-color: #ddd;">
<div class="col-xs-12">
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>Created Date</th>
<th>Material Code</th>
<th>Material Description</th>
<th>Type of Material</th>
<th>UOM</th>
<th>Opening Stock</th>
<th>Material Category</th>
<th>HSN Code</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
$date = date("Y-m-d");
?>
<tr>
<th style="display: none;"></th>
<th>Created On</th>
<th>Material Code</th>
<th>Material Description</th>
<th>Type of Material</th>
<th>UOM</th>
<th>Opening Stock</th>
<th>Material Category</th>
<th>HSN Code</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($userRecords))
{
foreach($userRecords as $record)
{
$date=date("Y-m-d");
?>
<tr>
<td style="display: none;"><?php echo $record->CreatedDate; ?></td>
<td style="width:8%;"><?php echo format_date($record->CreatedDate,0,'d/m/Y') ?></td>
<td style="width:9%;"><u><a class="a_tag_link" href="<?php echo base_url().'viewRawmaterial?RID='.$record->MaterialCode.'&MType='.$record->MaterialType.'&UOM='.$record->UOM.'&date1='.$date ?>" data-toggle="tooltip" title="<?php echo $record->MaterialCode; ?> - Click here to view Material details"><?php echo $record->MaterialCode ?> </a></u></td>
<?php if (date('d-m-Y', strtotime($record->CreatedDate)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->CreatedDate));
} ?>
<td style="width:8%;" align="right"><?php echo $cdate; ?></td>
<td style="width:9%;"><u><a class="a_tag_link" href="<?php echo base_url() . 'viewRawmaterial?RID=' . $record->MaterialCode . '&MType=' . $record->MaterialType . '&UOM=' . $record->UOM . '&date1=' . $date ?>" data-toggle="tooltip" title="<?php echo $record->MaterialCode; ?> - Click here to view Material details"><?php echo $record->MaterialCode ?> </a></u></td>
<td style="width:12%;"><?php echo $record->MaterialName ?></td>
<td style="width:10%;"><?php echo $record->MaterialType ?></td>
<td style="width:7%;"><?php echo $record->UOM ?></td>
<?php if($record->stock != null || ''){?>
<td style="width:7%;"><?php echo $record->stock?></td>
<?php } else{?>
<td style="width:7%;">0</td>
<?php }?>
<?php if ($record->stock != null || '') { ?>
<td style="width:7%;"><?php echo $record->stock ?></td>
<?php } else { ?>
<td style="width:7%;">0</td>
<?php } ?>
<td style="width:11%;"><?php echo $record->Category ?></td>
<td style="width:8%;"><?php echo $record->HSNCODE ?></td>
<td style="width:8%;"><?php echo $record->HSNCODE ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
<!-- <script type="text/javascript">
$(function () {
@ -106,4 +158,84 @@
});
});
</script>
</script> -->
<script>
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
var dateSplit = date.split('-');
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
};
$(document).ready(function() {
// Initialize the DataTable
var table = $('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 0,
"type": "date-eu"
}],
"aaSorting": [
[0, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
});
// Initialize the datepickers
$("#fromDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var minDate = $(this).datepicker("getDate");
$("#toDate").datepicker("option", "minDate", minDate);
}
});
$("#toDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var maxDate = $(this).datepicker("getDate");
$("#fromDate").datepicker("option", "maxDate", maxDate);
}
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").datepicker("setDate", null);
$("#toDate").datepicker("setDate", null);
$("#toDate").datepicker("option", "minDate", null);
$("#fromDate").datepicker("option", "maxDate", null);
table.draw();
});
// Date range filter
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[0]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
if (!fromDate || !toDate) {
return true; // No filter if dates are not selected
}
return date >= fromDate && date <= toDate;
}
);
// Handle form submission
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw();
});
});
</script>

View File

@ -0,0 +1,23 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1><center>Sales Dashboard</center></h1>
</section>
<section class="content">
<div class="row">
<div class="col-xs-12 text-right">
<div class="form-group"></div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header"></div><!-- /.box-header -->
<div class="box-body"></div><!-- /.box-body -->
</div><!-- /.box -->
</div>
</div>
</section>
</div>

424
app/Views/sales_invoice.php Normal file
View File

@ -0,0 +1,424 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
.invoice-link {
text-decoration: underline;
color: #007bff; /* Adjust color as needed */
}
.custom-button {
display: inline-block;
padding: 6px 8px;
margin-bottom: 0;
font-size: 14px;
font-weight: normal;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
background-color: #007bff;
border: 1px solid transparent;
border-radius: 4px;
color: #fff;
text-decoration: none;
width: 72px;
margin-left: -12px;
margin-top: -3px;
height: 32px;
font-size: 12px;
}
.custom-button:hover {
color: #fff;
text-decoration: none;
/* color: #007bff !important; */
/* background-color: white; */
/* border: 1px solid; */
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center>Sales Invoice</center>
</h1>
</section>
<section class="content">
<div class="row">
<div class="col-xs-12 text-right">
<div class="form-group">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
</div><!-- /.box-header -->
<div class="box-body">
<table id="datatable_sales_invoice_list" class="table table-striped dt-responsive nowrap w-100" style="background-color:#fff;font-size:12px;text-align: right;" >
<thead style="background-color: #ddd;">
<tr >
<th width="10%">Invoice Date</th>
<th width="10%">Invoice No</th>
<th width="10%">Client Name</th>
<th width="10%">Product</th>
<th width="10%">Rate</th>
<th width="10%">Quantity</th>
<th width="10%">Sub Total</th>
<th width="10%">GST</th>
<th width="10%">Total</th>
<th width="10%">Status</th>
<th width="10%" >E-Invoice Number</th>
<th width="5%">Action</th>
</tr>
</thead>
<tbody>
<input type="text" id="invoice_id_set" name="invoice_id_set" hidden>
<?php if(!empty($sales_invoice)){ foreach($sales_invoice as $invoice){
$subtotal = $invoice->item_price * $invoice->item_quantity;
// Calculate CGST and SGST
$cgst_amount = ($subtotal * $invoice->cgst) / 100;
$sgst_amount = ($subtotal * $invoice->sgst) / 100;
$total = $subtotal + $cgst_amount + $sgst_amount;?>
<!-- Main invoice row -->
<tr class="parent-row">
<td style="text-align: center;"><?php echo date('d-m-Y', strtotime($invoice->invoice_date_created)); ?></td>
<td style="text-align: left;">
<?php if(!empty($invoice->invoice_url)){ ?>
<a href="<?php echo $invoice->invoice_url; ?>" target="_blank" class="invoice-link">
<?php } ?>
<?php echo $invoice->invoice_number; ?>
<?php if(!empty($invoice->invoice_url)){ ?>
</a>
<?php } ?>
</td>
<td style="text-align: left;"><?php echo $invoice->client_name ?></td>
<td style="text-align: left;"><?php echo $invoice->item_name ?></td>
<td style="text-align: center;"><?php echo $invoice->item_price ?></td>
<td style="text-align: center;"><?php echo number_format($invoice->item_quantity, 2 ,'.', ',' ) ?></td>
<td style="text-align: center;"><?php echo number_format($subtotal, 2, '.', ',') ?></td>
<td style="text-align: center;"><?php echo number_format($cgst_amount+$sgst_amount, 2, '.', ',') ?></td>
<td style="text-align: center;"><?php echo number_format($total, 2, '.', ',') ?></td>
<td style="text-align: center;"><?php echo $invoice->status ?></td>
<td style="text-align: center;"><?php echo $invoice->e_invoice_number; ?></td>
<td style="text-align: center;">
<a class="edit-button" style="cursor: pointer; display: inline-block;" title="Files Upload" onclick="openInvoiceModal('<?php echo $invoice->invoice_number; ?>', '<?php echo $invoice->client_name; ?>', '<?php echo $invoice->invoice_date_created; ?>', '<?php echo $invoice->invoice_id; ?>')">
<i class="fas fa-file-upload text-muted" style="font-size: 18px; vertical-align: middle;"></i>
</a>
</td>
</tr>
<?php } } ?>
</tbody>
</table>
</div><!-- /.box-body -->
<!-- <div class="box-footer clearfix">
</div> -->
</div><!-- /.box -->
</div>
</div>
</section>
</div>
<!-- Modal Structure -->
<div class="modal fade" id="invoiceModal" tabindex="-1" role="dialog" aria-labelledby="invoiceModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h3><span id="invoice_number_display_model"></span> - <span id="date_display_model"></span><br></h3>
<span id="client_name_display_model"></span>
<div class="col-md-12">
<div class="col-md-10"></div>
<div class="col-md-2">
<!-- <button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()" id="day" >
Add New File
</button> -->
</div>
</div>
</div>
<div class="modal-body" style="margin-top: 23px;">
<div id="filesContainer">
<!-- Rows will be dynamically appended here -->
</div>
<?php if(isset($invoice_data)){ foreach ($invoice_data as $key => $value) { ?>
<div class="col-md-12 pad ">
<div class="col-md-6">
<span>File Name</span>
<input type="text" maxlength="255" class="form-control file_name"
value="<?php echo $value['file_name']; ?>" readonly>
<div class="error-message"></div>
</div>
<div class="col-md-1" style="margin-top: 25px;">
<a class="custom-button" href="<?php echo base_url() . 'public/uploads/images/emp_files/' . $value['emp_file']; ?>"
download>
Download
</a>
</div>
<div class="col-md-5" style="margin-top: 23px;">
<button type="button" class="btn btn-danger btn-sm"
id="<?= $value['id']; ?>"
onclick="removeContact(this)" style="margin-left: 22px;">Delete </button>
</div>
</div>
<?php } } ?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" onclick="saveAttachment()" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
$(document).ready(function() {
var table = $('#datatable_sales_invoice_list').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 0,
"type": "date-eu"
}],
"aaSorting": [
[0, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
"rowCallback": function(row, data, index) {
// Ignore child rows
if ($(row).hasClass('child-row')) {
return;
}
}
});
});
</script>
<script>
function saveAttachment() {
var file_name_classes = $('.file_name');
var hasEmptyInput = false;
file_name_classes.each(function() {
if ($(this).val().trim() === '') {
hasEmptyInput = true;
$(this).focus(); // Focus on the empty input field
$(this).addClass('error'); // Add an error class to the empty input
$('.error-message').text('Please fill out this field.').show(); // Show the error message
return false; // Break the loop
}
});
if (!hasEmptyInput) {
$('.error-message').hide();
console.log('All inputs are filled.');
var formData = new FormData();
var invoiceId = $('#invoice_id_set').val();
formData.append('invoice_id', invoiceId);
// Append files
$('input[name="emp_file[]"]').each(function(index, input) {
var files = $(input)[0].files;
if (files.length > 0) {
formData.append('emp_file[]', files[0]);
}
});
// Append other fields
$('input[name="file_name[]"]').each(function(index, input) {
formData.append('file_name[]', $(input).val());
});
// AJAX request using FormData
$.ajax({
url: '<?php echo base_url() ?>saveAttachment',
type: 'POST',
data: formData,
processData: false, // Prevent jQuery from converting the data
contentType: false, // Prevent jQuery from overriding the content type
success: function(response) {
console.log(response);
if (response.success) {
$('#invoiceModal').modal('hide');
// Handle success
} else {
alert(response.message);
}
},
error: function() {
alert('An error occurred while saving the attachment.');
}
});
}
}
function openInvoiceModal(invoiceNumber, clientName, invoiceDate, invoiceId) {
function formatDate(date) {
let d = new Date(date); // Ensure the date is a Date object
let day = String(d.getDate()).padStart(2, '0');
let month = String(d.getMonth() + 1).padStart(2, '0'); // Months are 0-based
let year = d.getFullYear();
return `${day}/${month}/${year}`;
}
let formattedDate = formatDate(invoiceDate);
$('#invoice_number_display_model').html(invoiceNumber);
$('#client_name_display_model').html(clientName);
$('#date_display_model').html(formattedDate);
// document.getElementById('modalInvoiceNumber').innerText = invoiceNumber;
// $('#day').show();
// $('#invoiceModal').modal('show');
// url:"<?php echo base_url() ?>servicepurchaseorder/getPODetails",
$('#invoice_id_set').val(invoiceId);
// console.log(invoiceId);
$.ajax({
url: '<?php echo base_url() ?>getInvoiceAttachments',
type: 'GET',
data: { invoice_id: invoiceId },
success: function(response) {
console.log(response);
console.log(JSON.parse(response).invoiceAttachment);
var list = JSON.parse(response).invoiceAttachment;
var attachmentsHtml = '';
list.forEach(element => {
console.log(element);
var fileName = element.file_name;
var attachmentName = element.attachment_name;
attachmentsHtml += `
<div class="col-md-12 pad">
<div class="col-md-4">
<span>File Name</span>
<input type="text" maxlength="255" class="form-control file_name"
value="${attachmentName}" readonly>
<div class="error-message"></div>
</div>
<div class="col-md-1" style="margin-top: 25px;">
<a class="custom-button" href="<?php echo base_url() . 'public/uploads/images/invoice_files/' ?>${fileName}" download>
Download
</a>
</div>
<div class="col-md-5" style="margin-top: 23px;">
<button type="button" class="btn btn-danger btn-sm"
id="${element.invoice_attachment_id}"
onclick="removeContact(this)" style="margin-left: 22px;">Delete</button>
</div>
</div>`;
});
attachmentsHtml += `<div class="col-md-12 pad">
<div class="col-md-4">
<span for="file_name">File name</span>
<input type="text" id="file_name" name="file_name[]" maxlength="255" class="form-control file_name" value="">
<div class="error-message"></div>
</div>
<div class="col-md-4">
<span for="emp_file">File</span>
<input type="file" name="emp_file[]" class="form-control">
</div>
<div class="col-md-4" style="margin-top: 23px;">
<button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()">Add</button>
</div>
</div>`;
$('#filesContainer').html(attachmentsHtml);
$('#invoiceModal').modal('show');
},
error: function() {
// Handle any errors during the AJAX request
$('#filesContainer').html('<p>There was an error loading the attachments.</p>');
$('#invoiceModal').modal('show');
}
});
console.log("day trigger works");
}
function appendFilesFileds(data) {
var newRowHtml = `
<div class="col-md-12 pad">
<div class="col-md-4">
<span for="file_name">File name</span>
<input type="text" id="file_name" name="file_name[]" maxlength="255" class="form-control file_name" value="${data != null && data != '' ? data.file_name : ''}">
<div class="error-message"></div>
</div>
<div class="col-md-4">
<span for="emp_file">File</span>
<input type="file" name="emp_file[]" class="form-control">
</div>
<div class="col-md-4" style="margin-top: 23px;">
<button type="button" class="btn btn-danger btn-sm" onclick="removeContact(this)">Remove</button>
<button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()">Add</button>
</div>
</div>`;
// Append the new row to the container
$('#filesContainer').append(newRowHtml);
// Hide all "Add" buttons except the last one
$('.a1').hide();
$('#filesContainer .pad:last .a1').show();
}
function removeContact(button) {
$(button).closest('.pad').remove();
$('#filesContainer .a1').hide();
$('#filesContainer .pad:last .a1').show();
var len = $('#filesContainer .pad:last .a1')
var length = len.length;
if (length == 0) {
// $('#day').show()
} else {
$('#day').hide()
}
console.log("-------------------");
console.log(button);
console.log($(button).val());
console.log($(button).attr('id'));
$.ajax({
url: '<?php echo base_url() ?>deleteAttachment',
type: 'GET',
data: { invoice_attachment_id: $(button).attr('id') },
success: function(response) {
console.log(response);
},
error: function() {
}
});
}
</script>

File diff suppressed because it is too large Load Diff

View File

@ -1,130 +1,265 @@
<div class="content-wrapper">
<section class="content">
<div class="row">
<div class="col-md-12">
<?php
helper('form');
$error = session()->getFlashdata('error');
if($error){
$type = "error";
echo show_alert($type, $error);
}
$success = session()->getFlashdata('success');
if($success){
$type = "success";
echo show_alert($type, $success);
}
?>
<style>
.Date-filter-form {
display: flex;
align-items: center;
gap: 10px;
/* Adjust the gap as needed */
}
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
?> </div>
</div>
</div>
</div>
<div class="box">
<div class="box-header">
<center><b><h3 class="box-title">Supplier Listing</h3></b></center>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>addsupplier">Add New Supplier</a>
<a class="btn btn-success" href="<?php echo base_url(); ?>exportsupplier">Export Supplier Details <i class="fa fa-download"aira-hidden="true"></i></a>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:11px !important;" >
<thead style="background-color: #ddd;">
<tr>
<th>Supplier ID</th>
<th>Supplier Name</th>
<th>Address</th>
<th>Contact Number</th>
<th>Email Address</th>
<th>PAN</th>
<th>GST Number</th>
<th>Payment Terms</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
if(!empty($userRecords))
{
foreach($userRecords as $record)
{
?>
<tr>
<td><u><a class="a-tag-link" href="<?= base_url() ?>viewsupplier?SID=<?= $record->SupplierID ?>&Payment=<?= $record->PaymentTerms ?>" data-toggle="tooltip" title="<?= $record->SupplierID ?> - Click here to view Supplier details"><?= $record->SupplierID ?></a></u></td>
<td><?php echo $record->SupplierName ?></td>
<td><?php echo $record->Address ?></td>
<td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->EmailAddress ?></td>
<td><?php echo $record->PAN ?></td>
<td><?php echo $record->GSTNO ?></td>
<td><?php echo $record->PaymentTerms ?></td>
<td><?php if($record->IsActive == 0){ echo "Deactived"; }else{ ?>
<a onclick="deletesupplier('<?php echo $record->SupplierID;?>')"><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a>
<?php } ?>
</td>
</tr>
<?php
}
.Date-filter-form input,
.Date-filter-form button {
padding: 5px;
font-size: 14px;
}
.Date-filter-form button {
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
}
.Date-filter-form button:hover {
background-color: #0056b3;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: #007bff;
font-size: 18px;
}
.icon-button:hover {
color: #0056b3;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="row">
<div class="col-md-12">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
$type = "error";
echo show_alert($type, $error);
}
$success = session()->getFlashdata('success');
if ($success) {
$type = "success";
echo show_alert($type, $success);
}
?>
</tbody>
</table>
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
?> </div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
$(function () {
$('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": true
});
});
function deletesupplier(sid)
{alert(sid);
var answer = confirm(" Do you want to delete the Supplier from the List?")
if (answer)
{
$.ajax({
data:{id:userid},
type:"POST",
url:"<?php echo base_url() ?>deletesupplier",
success:function(data) {
if(data)
{
$('#content').loader('hide');
alert(data);
location.reload();
}
}
});
}
}
</script>
</div>
<div class="box">
<div class="box-header">
<center><b>
<h3 class="box-title">Supplier Listing</h3>
</b></center>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-md-6">
<form class="Date-filter-form" id="DateRangeFilter">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
</div>
<div class="col-xs-12 col-md-6 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>addsupplier">Add New Supplier</a>
<a class="btn btn-success" href="<?php echo base_url(); ?>exportsupplier">Export Supplier Details <i class="fa fa-download" aira-hidden="true"></i></a>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:11px !important;">
<thead style="background-color: #ddd;">
<tr>
<th style="width:75px">Created Date</th>
<th>Supplier ID</th>
<th>Supplier Name</th>
<th>Address</th>
<th>Contact Number</th>
<th>Email Address</th>
<th>PAN</th>
<th>GST Number</th>
<th>Payment Terms</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
?>
<tr>
<?php if (date('d-m-Y', strtotime($record->CreatedOn)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->CreatedOn));
} ?>
<td style="width:75px" align="right"><?php echo $cdate; ?></td>
<td><u><a class="a-tag-link" href="<?= base_url() ?>viewsupplier?SID=<?= $record->SupplierID ?>&Payment=<?= $record->PaymentTerms ?>" data-toggle="tooltip" title="<?= $record->SupplierID ?> - Click here to view Supplier details"><?= $record->SupplierID ?></a></u></td>
<td><?php echo $record->SupplierName ?></td>
<td><?php echo $record->Address ?></td>
<td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->EmailAddress ?></td>
<td><?php echo $record->PAN ?></td>
<td><?php echo $record->GSTNO ?></td>
<td><?php echo $record->PaymentTerms ?></td>
<td><?php if ($record->IsActive == 0) {
echo "Deactived";
} else { ?>
<a onclick="deletesupplier('<?php echo $record->SupplierID; ?>')"><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a>
<?php } ?>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
// $(function () {
// $('#datatable').DataTable({
// "paging": true,
// "lengthChange": true,
// "searching": true,
// "ordering": true,
// "info": true,
// "autoWidth": true
// });
// });
function deletesupplier(sid) {
alert(sid);
var answer = confirm(" Do you want to delete the Supplier from the List?")
if (answer) {
$.ajax({
data: {
id: userid
},
type: "POST",
url: "<?php echo base_url() ?>deletesupplier",
success: function(data) {
if (data) {
$('#content').loader('hide');
alert(data);
location.reload();
}
}
});
}
}
</script>
<script>
$(document).ready(function() {
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
var dateSplit = date.split('-');
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
};
// Initialize the DataTable
var table = $('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 0,
"type": "date-eu"
}],
"aaSorting": [
[0, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
});
// Initialize the datepickers
$("#fromDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var minDate = $(this).datepicker("getDate");
$("#toDate").datepicker("option", "minDate", minDate);
}
});
$("#toDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var maxDate = $(this).datepicker("getDate");
$("#fromDate").datepicker("option", "maxDate", maxDate);
}
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").datepicker("setDate", null);
$("#toDate").datepicker("setDate", null);
$("#toDate").datepicker("option", "minDate", null);
$("#fromDate").datepicker("option", "maxDate", null);
table.draw();
});
// Date range filter
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[0]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
if (!fromDate || !toDate) {
return true; // No filter if dates are not selected
}
return date >= fromDate && date <= toDate;
}
);
// Handle form submission
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw();
});
});
</script>

View File

@ -1,138 +1,269 @@
<style>
.Date-filter-form {
display: flex;
align-items: center;
gap: 10px;
/* Adjust the gap as needed */
}
.Date-filter-form input,
.Date-filter-form button {
padding: 5px;
font-size: 14px;
}
.Date-filter-form button {
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
}
.Date-filter-form button:hover {
background-color: #0056b3;
}
.icon-button {
background: none;
border: none;
cursor: pointer;
color: #007bff;
font-size: 18px;
}
.icon-button:hover {
color: #0056b3;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="row">
<div class="col-md-12">
<?php
helper('form');
$error = session()->getFlashdata('error');
if($error){
<div class="row">
<div class="col-md-12">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
$type = "error";
echo show_alert($type, $error);
}
$success = session()->getFlashdata('success');
if($success){
if ($success) {
$type = "success";
echo show_alert($type, $success);
}
?>
?>
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
?> </div>
</div>
</div>
</div>
<div class="box">
<div class="box-header">
<center><b><h3 class="box-title">User Listing</h3></b></center>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>addNew">Add New User</a>
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
?> </div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table class="table table-hover table-bordered" id="datatable" style="background-color:#fff;font-size:12px;" >
<thead style="background-color: #ddd;">
<tr>
<th>User Id</th>
<th>User Name</th>
<th>Email</th>
<th>Contact Number</th>
<th>Designation</th>
<th>Department</th>
<th>Role Name</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($userRecords))
{
foreach($userRecords as $record)
{
?>
<tr>
<td><?php echo $record->userId ?></td>
<td><?php echo $record->FirstName ?></td>
<td><?php echo $record->EmailId ?></td>
<td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->Designation ?></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo $record->role ?></td>
<td>
<a href="<?php echo base_url().'user/editOld?UID='.$record->userId.'&EMPID='.$record->EmpID;?>"><i class="fa fa-pencil"></i>&nbsp;&nbsp;&nbsp;</a>
<a onclick="deleteUser(<?php echo $record->userId;?>)"><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<div class="box">
<div class="box-header">
<center><b>
<h3 class="box-title">User Listing</h3>
</b></center>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-md-6">
<form class="Date-filter-form" id="DateRangeFilter">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
</div>
<div class="col-xs-12 col-md-6 text-right">
<div class="form-group">
<a class="btn btn-success" href="<?php echo base_url(); ?>addNew">Add New User</a>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table class="table table-hover table-bordered" id="datatable" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>Created Date</th>
<!-- <th>User Id</th> -->
<th>User Name</th>
<th>Email</th>
<th>Contact Number</th>
<th>Designation</th>
<th>Department</th>
<th>Role Name</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
?>
<tr>
<?php if (date('d-m-Y', strtotime($record->createdDtm)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->createdDtm));
} ?>
<td align="right"><?php echo $cdate; ?> </td>
<!-- <td><?php echo $record->userId ?></td> -->
<td><?php echo $record->FirstName ?></td>
<td><?php echo $record->EmailId ?></td>
<td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->Designation ?></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo $record->role ?></td>
<td>
<a href="<?php echo base_url() . 'user/editOld?UID=' . $record->userId . '&EMPID=' . $record->EmpID; ?>"><i class="fa fa-pencil"></i>&nbsp;&nbsp;&nbsp;</a>
<a onclick="deleteUser(<?php echo $record->userId; ?>)"><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
$(function () {
$('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": true
});
});
function deleteUser(userid)
{
var answer = confirm(" Do you want to delete the user from the List?")
if (answer)
{
$.ajax({
data:{id:userid},
type:"POST",
url:"<?php echo base_url() ?>user/deleteUser",
success:function(data) {
if(data)
{
$('#content').loader('hide');
alert(data);
location.reload();
}
else
{
alert("Error");
}
}});
}
}
</script>
// $(function () {
// $('#datatable').DataTable({
// "paging": true,
// "lengthChange": true,
// "searching": true,
// "ordering": true,
// "info": true,
// "autoWidth": true
// });
// });
function deleteUser(userid) {
var answer = confirm(" Do you want to delete the user from the List?")
if (answer) {
$.ajax({
data: {
id: userid
},
type: "POST",
url: "<?php echo base_url() ?>user/deleteUser",
success: function(data) {
if (data) {
$('#content').loader('hide');
alert(data);
location.reload();
} else {
alert("Error");
}
}
});
}
}
</script>
<script>
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
var dateSplit = date.split('-');
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
};
$(document).ready(function() {
// Initialize the DataTable
var table = $('#datatable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 0,
"type": "date-eu"
}],
"aaSorting": [
[0, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
});
// Initialize the datepickers
$("#fromDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var minDate = $(this).datepicker("getDate");
$("#toDate").datepicker("option", "minDate", minDate);
}
});
$("#toDate").datepicker({
dateFormat: 'dd-mm-yy',
onSelect: function(selectedDate) {
var maxDate = $(this).datepicker("getDate");
$("#fromDate").datepicker("option", "maxDate", maxDate);
}
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").datepicker("setDate", null);
$("#toDate").datepicker("setDate", null);
$("#toDate").datepicker("option", "minDate", null);
$("#fromDate").datepicker("option", "maxDate", null);
table.draw();
});
// Date range filter
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[0]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
if (!fromDate || !toDate) {
return true; // No filter if dates are not selected
}
return date >= fromDate && date <= toDate;
}
);
// Handle form submission
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw();
});
});
</script>

View File

@ -48,6 +48,29 @@
white-space: nowrap;
}
</style>
<style>
.dataTables_wrapper .top {
display: flex;
justify-content: space-between;
align-items: center;
}
.dataTables_wrapper .dataTables_length {
float: left;
}
.dataTables_wrapper .dt-buttons,
.dataTables_wrapper .dataTables_filter {
float: right;
margin-left: 10px;
}
.dataTables_wrapper .dt-buttons {
margin-top: 10px;
margin-bottom: 10px;
}
.dataTables_wrapper .dataTables_filter {
margin-top: 10px;
margin-bottom: 10px;
}
</style>
<script>
$(function() {
var d = new Date();
@ -64,9 +87,47 @@
maxDate :'now',
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
});
$('#Driver_Name').autocomplete({
onSearchStart: function(query) {
//alert(query);
$('#Driver_Name').autocomplete("option", "minLength", 0);
},
serviceUrl: "<?php echo base_url(); ?>drivernameautocomplete",
onSelect: function(suggestion) {
var data = suggestion.DriverName;
}
});
$('#DriverMobileNumber').autocomplete({
serviceUrl: "<?php echo base_url(); ?>drivermobileautocomplete",
params: {
driverName: function() {
return $('#Driver_Name').val(); // Pass the value of the DriverName input field
}
},
onSearchStart: function(query) {
$('#DriverMobileNumber').autocomplete("option", "minLength", 0);
},
onSelect: function(suggestion) {
var data = suggestion.DriverMobileNumber;
}
});
});
</script>
<style>
.autocomplete-suggestion {
cursor: pointer;
background-color: skyblue;
/* background-color: darkgrey; */
outline: 1px solid slategrey;
}
</style>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/Autocomplete/jquery.autocomplete.js"></script>
<div class="content-wrapper">
<section class="content"><br/>
<div class="box">
@ -91,7 +152,6 @@
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th style="display:none;"></th>
<th>Create Date</th>
<th>Create time</th>
<th>IGR No</th>
@ -116,7 +176,6 @@
$time = $createddate->format('h:i A');
?>
<tr id="<?php echo $index ?>" >
<th style="display:none;"><?php echo $record->CreatedDate ?></th>
<td align="right"><?php echo $date; ?></td>
<td align="right"><?php echo $time; ?></td>
<td><a data-toggle="modal" data-target="#Igrshow" data-id="<?php echo $index;?>" data-inx="<?php echo $index;?>" data-userid="<?php echo $record->IGRNO ?>" data-igrstatus="<?php echo $record->IGRStatus ?>"> <u><?php echo $record->IGRNO ?></u></a></td>
@ -184,6 +243,7 @@
echo form_input($data);
?>
<span class="help-block"></span>
<input type="hidden" name="hiddenIsOpenOrder" id="hiddenIsOpenOrder" />
</div>
<div class="col-md-6">
<label>Supplier Name </label>
@ -197,8 +257,8 @@
</div>
<div class="col-md-12" style="margin: 10px 0;">
<div class="col-md-4">
<label>Invoice Number </label>
<?php $data = array('name' => 'InvoiceNO','value' => set_value('InvoiceNO'),'id'=>'Invoice_No', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
<label>Invoice Number <span class="requiredsymbol" style="color:red; font-size: 15px;">*</span></label>
<?php $data = array('name' => 'InvoiceNO','value' => set_value('InvoiceNO'),'id'=>'Invoice_No', 'class' => 'form-control', 'required=>"true"' );
echo form_input($data);
?>
</div>
@ -218,19 +278,26 @@
</div>
</div>
<div class="col-md-12" style="margin: 10px 0;">
<div class="col-md-4">
<div class="col-md-3">
<label>Vehicle Number </label>
<?php $data = array('name' => 'VehicleNo','value' => set_value('VehicleNo'),'id'=>'Vehicle_No', 'class' => 'form-control');
echo form_input($data);
?>
</div>
<div class="col-md-4">
<div class="col-md-3">
<label>Vehicle Type</label>
<?php
$opt = array(""=>'Vehicle Type',"Rented"=>'Rented',"Owned"=>'Owned');
echo form_dropdown('VehicleType', $opt,set_value('VehicleType'),'id="Vehicle_Type"' ,'class="form-control select2');
?>
</div>
<div class="col-md-3">
<label>Driver Name </label>
<?php $data = array('name' => 'DriverName','value' => set_value('DriverName'),'id'=>'Driver_Name', 'class' => 'form-control');
echo form_input($data);
?>
</div>
<div class="col-md-4">
<div class="col-md-3">
<label>Driver Mobile Number </label>
<?php $data = array('name' => 'DriverMobileNumber','value' => set_value('DriverMobileNumber'),'id'=>'DriverMobileNumber', 'class' => 'form-control');
echo form_input($data);
@ -292,8 +359,8 @@
<div class="modal-footer">
<div class="buttonContainer">
<a class="btn btn-cancel" data-dismiss="modal" value="Close">Close</a>
<a class="btn btn-primary" id="draftIGR" value="draftIGR">Save as Draft IGR</a>
<a class="btn btn-primary" id="generateIGR" value="generateIGR">Generate IGR</a>
<a class="btn btn-primary" id="draftIGR" value="draftIGR">Save as Draft IGR</a>
</div>
</div>
</div>
@ -522,6 +589,7 @@
var invoiceDateInput = modal.find('#Invoice_Date');
var MaterialRcvdDateInput = modal.find('#MaterialRcvdDate');
var VehicleNoInput = modal.find('#Vehicle_No');
var VehicleTypeInput = modal.find('#Vehicle_Type');
var DriverInput = modal.find('#Driver_Name');
var DriverMobileNumberInput = modal.find('#DriverMobileNumber');
var MasterFileInput = modal.find('#MasterFile');
@ -579,6 +647,7 @@ console.log(parsedData);
$('#printLink').attr('href', '#');
$('.help-block').text('');
$("#Vehicle_No").val('');
$("#Vehicle_Type").val('');
$("#Driver_Name").val('');
$("#DriverMobileNumber").val('');
$("#IGRStatus").val('');
@ -608,11 +677,16 @@ console.log(parsedData);
var baseUrl = '<?php echo base_url(); ?>purchaseorder/CreatePOPrint';
var newUrl = baseUrl + '?PONO=' + item.PONO + '&ReqType=' + item.POType;
$('#printLink').attr('href', newUrl);
var isOpenOrder = parseInt(item.IsOpenOrder, 2);
var isOpenOrder = parseInt(item.IsOpenOrder ? item.IsOpenOrder : "0", 2);
console.log(item.IsOpenOrder);
console.log(isOpenOrder);
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "" : "Open";
$('.help-block').text(formatted_IsOpenOrder);
var button_text_for_IGRDraft= (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "Save as Draft IGR" : "Save as Open IGR";
$('#draftIGR').text(button_text_for_IGRDraft);
$("#hiddenIsOpenOrder").val(isOpenOrder);
$("#Vehicle_No").val(item.VehicleNo);
$("#Vehicle_Type").val(item.VehicleType);
$("#Driver_Name").val(item.DriverName);
$("#DriverMobileNumber").val(item.DriverMobileNumber);
$("#IGRStatus").val(item.IGRStatus);
@ -655,8 +729,8 @@ console.log(parsedData);
'<td style="width: 200px; word-wrap: break-word; word-break: break-all; white-space: normal;">' + item.MaterialName + '</td>' +
'<td style="width: 50px;" name="UOM">' + item.UOM + '</td>' +
'<td style="width: 100px;" align="right" id="Quantity' + i + '" name="Quantity">' + parseInt(item.Quantity) + '</td>' +
'<td style="width: 100px;" align="right" data-name="sel" ><input type="text" onchange="validateReceivedQuantity(' + i + ')"id="QuantityAsPerInvoice' + i + '" name="QuantityAsPerInvoice' + i + '" value="' + parseInt(item.QuantityAsPerInvoice) + '" onkeypress="return isNumberKey(event);" style="width: 75px;"></td>' +
'<td style="width: 100px;" name="PendingQuantity' + i + '" id="PendingQuantity' + i + '">' + parseInt(item.Quantity - item.QuantityAsPerInvoice) + '</td>' +
'<td style="width: 100px;" align="right" data-name="sel" ><input type="text" onchange="validateReceivedQuantity(' + i + ','+isOpenOrder+')"id="QuantityAsPerInvoice' + i + '" name="QuantityAsPerInvoice' + i + '" value="' + parseInt(item.QuantityAsPerInvoice) + '" onkeypress="return isNumberKey(event);" style="width: 75px;"></td>' +
'<td style="width: 100px;" name="PendingQuantity' + i + '" id="PendingQuantity' + i + '">' + ((isOpenOrder) ? 0 : parseInt(item.Quantity - item.QuantityAsPerInvoice)) + '</td>' +
'<td style="width: 150px;"><input type="text" id="Remark' + i + '" name="Remark' + i + '" class="form" onchange="SetRemarks(' + i + ')" style="width: 75px;"> </td>' +
'<td style="width: 50px;"><a target="_blank" data-toggle="modal" data-target="#WeightCalculator" title="Weight Calculator" data-index="'+i+'" data-material="'+item.MaterialName+'" data-igrstatus = "'+igrstatus+'"><i class="fa fa-solid fa-truck" style="text-align: center;"></i></a> </td>' +
'<input type="hidden" id="IGRNO' + i + '" name="IGRNO' + i + '" value="' + item.IGRNO + '">' +
@ -768,10 +842,12 @@ console.log(parsedData);
formData.append('mrc', $("#MaterialRcvdDate").val());
formData.append('invdate', $("#Invoice_Date").val());
formData.append('vehicle_no', $('#Vehicle_No').val());
formData.append('vehicle_type', $('#Vehicle_Type').val());
formData.append('driver', $('#Driver_Name').val());
formData.append('driver_mobile', $('#DriverMobileNumber').val());
formData.append('status', status);
formData.append('tableData', JSON.stringify(tableData));
formData.append('isOpenOrder', $("#hiddenIsOpenOrder").val());
formData.append('MasterFile', $('#MasterFile')[0].files[0]);
formData.append('file_name[]', $('#file_name').val());
var empFiles = $('#emp_file')[0] ? $('#emp_file')[0].files : null;
@ -825,10 +901,12 @@ console.log(parsedData);
formData.append('mrc', $("#MaterialRcvdDate").val());
formData.append('invdate', $("#Invoice_Date").val());
formData.append('vehicle_no', $('#Vehicle_No').val());
formData.append('vehicle_type', $('#Vehicle_Type').val());
formData.append('driver', $('#Driver_Name').val());
formData.append('driver_mobile', $('#DriverMobileNumber').val());
formData.append('status', status);
formData.append('tableData', JSON.stringify(tableData));
formData.append('isOpenOrder',$("#hiddenIsOpenOrder").val());
formData.append('MasterFile', $('#MasterFile')[0].files[0]);
formData.append('file_name[]', $('#file_name').val());
var empFiles = $('#emp_file')[0] ? $('#emp_file')[0].files : null;
@ -1376,32 +1454,39 @@ function deleteBill(Billno,i){
}
}
function validateReceivedQuantity(Rowid) {
function validateReceivedQuantity(Rowid,isOpenOrder) {
var InvoiceQty = parseFloat($('#QuantityAsPerInvoice' + Rowid).val() || '0.00'); // working fine
var OrderedQty = parseFloat($("#Quantity" + Rowid).text());
if (parseInt(OrderedQty) !== 0) {
if ((InvoiceQty) > OrderedQty) {
alert("Pending Quantity is exceeding the Ordered Quantity. Please contact the Purchase Team for further process.");
$("#QuantityAsPerInvoice" + Rowid).focus().val('');
return false;
} else if ((InvoiceQty) - OrderedQty > 0.00) {
alert("Order is completed.");
$("#QuantityAsPerInvoice" + Rowid).focus().val('');
return false;
} else {
var PendingQty = OrderedQty - (InvoiceQty);
$('#PendingQuantity' + Rowid).text(PendingQty.toFixed(0));
$('#txtPendingQty' + Rowid).val(PendingQty.toFixed(0));
$('#txtQuantityAsPerInvoice' + Rowid).val(InvoiceQty.toFixed(2));
return true;
}
} else {
var PendingQty = OrderedQty - (InvoiceQty);
if(isOpenOrder == 1){
var PendingQty = 0;
$('#PendingQuantity' + Rowid).text(PendingQty.toFixed(0));
$('#txtPendingQty' + Rowid).val(PendingQty.toFixed(0));
$('#txtQuantityAsPerInvoice' + Rowid).val(InvoiceQty.toFixed(2));
return true;
}else{
if (parseInt(OrderedQty) !== 0) {
if ((InvoiceQty) > OrderedQty) {
alert("Pending Quantity is exceeding the Ordered Quantity. Please contact the Purchase Team for further process.");
$("#QuantityAsPerInvoice" + Rowid).focus().val('');
return false;
} else if ((InvoiceQty) - OrderedQty > 0.00) {
alert("Order is completed.");
$("#QuantityAsPerInvoice" + Rowid).focus().val('');
return false;
} else {
var PendingQty = OrderedQty - (InvoiceQty);
$('#PendingQuantity' + Rowid).text(PendingQty.toFixed(0));
$('#txtPendingQty' + Rowid).val(PendingQty.toFixed(0));
$('#txtQuantityAsPerInvoice' + Rowid).val(InvoiceQty.toFixed(2));
return true;
}
} else {
var PendingQty = OrderedQty - (InvoiceQty);
$('#PendingQuantity' + Rowid).text(PendingQty.toFixed(0));
$('#txtPendingQty' + Rowid).val(PendingQty.toFixed(0));
$('#txtQuantityAsPerInvoice' + Rowid).val(InvoiceQty.toFixed(2));
return true;
}
}
}
</script>
@ -1524,8 +1609,20 @@ function deleteBill(Billno,i){
</script>
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.4/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.13.6/sorting/datetime-moment.js"></script>
<script>
$(document).ready(function() {
$.fn.dataTable.ext.type.order['date-eu-pre'] = function (date) {
var dateSplit = date.split('-');
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
};
// Initialize the DataTable
var table = $('#Inwardgateregistertable').DataTable({
"paging": true,
@ -1533,16 +1630,36 @@ $(document).ready(function() {
"searching": true,
"ordering": true,
"columnDefs": [{
"targets": 1,
"targets": 0,
"type": "date-eu"
}],
"aaSorting": [
[1, "desc"]
[0, "desc"]
],
"info": true,
"autoWidth": true,
"pageLength": 10,
"lengthMenu": [10, 25, 50, 100],
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
"buttons": [
{
extend: 'excelHtml5',
text: 'Export to Excel',
title: 'Inward Gate Register',
exportOptions: {
columns: ':visible:not(:last-child)' // Exclude first and last columns
}
},
{
extend: 'pdfHtml5',
text: 'Export to PDF',
title: 'Inward Gate Register',
exportOptions: {
columns: ':visible:not(:last-child)' // Exclude first and last columns
}
}]
});
@ -1579,7 +1696,7 @@ $(document).ready(function() {
var fromDate = $("#fromDate").datepicker("getDate");
var toDate = $("#toDate").datepicker("getDate");
var dateStr = data[1]; // Assuming the date is in the first column
var dateStr = data[0]; // Assuming the date is in the first column
// Convert dateStr to Date object
var dateParts = dateStr.split("-");

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

0
public/uploads/DB/venbaehn_ria_demo_2024_06-21.sql Normal file → Executable file
View File

View File

0
public/uploads/POfiles/BB-light_fullform.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

0
public/uploads/POfiles/SECLIENT.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 107 KiB

View File

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 107 KiB

0
public/uploads/POfiles/SupplierBills.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

0
public/uploads/POfiles/WorkPlace2.jpeg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

0
public/uploads/POfiles/WorkPlace2_1.jpeg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

0
public/uploads/POfiles/WorkPlace2_2.jpeg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

0
public/uploads/POfiles/WorkPlace3.jpeg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

0
public/uploads/POfiles/ria_test.sql Normal file → Executable file
View File

0
public/uploads/images/index.html Normal file → Executable file
View File

View File

@ -112,9 +112,8 @@ if (PHP_VERSION_ID < 80000) {
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/friendsofphp/php-cs-fixer/php-cs-fixer');
exit(0);
return include("phpvfscomposer://" . __DIR__ . '/..'.'/friendsofphp/php-cs-fixer/php-cs-fixer');
}
}
include __DIR__ . '/..'.'/friendsofphp/php-cs-fixer/php-cs-fixer';
return include __DIR__ . '/..'.'/friendsofphp/php-cs-fixer/php-cs-fixer';

View File

@ -4,6 +4,12 @@ All notable changes to this library will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.8.1](https://github.com/CodeIgniter/coding-standard/compare/v1.8.0...v1.8.1) - 2024-08-05
- Add `keep_annotations` option for `php_unit_attributes`
- Add `php_unit_assert_new_names` fixer
- Bump dependencies
## [v1.8.0](https://github.com/CodeIgniter/coding-standard/compare/v1.7.16...v1.8.0) - 2024-06-16
- Enable rules for PHP 8.1 (#20)

View File

@ -21,13 +21,13 @@
"require": {
"php": "^8.1",
"ext-tokenizer": "*",
"friendsofphp/php-cs-fixer": "^3.50",
"nexusphp/cs-config": "^3.19.0"
"friendsofphp/php-cs-fixer": "^3.61.1",
"nexusphp/cs-config": "^3.24"
},
"require-dev": {
"nexusphp/tachycardia": "^2.1",
"phpstan/phpstan": "^1.0",
"phpunit/phpunit": "^10.5"
"nexusphp/tachycardia": "^2.3",
"phpstan/phpstan": "^1.11",
"phpunit/phpunit": "^10.5 || ^11.2"
},
"minimum-stability": "dev",
"prefer-stable": true,

View File

@ -373,8 +373,11 @@ final class CodeIgniter4 extends AbstractRuleset
'sort_algorithm' => 'alpha',
'case_sensitive' => false,
],
'php_unit_attributes' => true,
'php_unit_construct' => [
'php_unit_assert_new_names' => true,
'php_unit_attributes' => [
'keep_annotations' => false,
],
'php_unit_construct' => [
'assertions' => [
'assertSame',
'assertEquals',

View File

@ -45,35 +45,34 @@ class ClassLoader
/** @var \Closure(string):void */
private static $includeFile;
/** @var ?string */
/** @var string|null */
private $vendorDir;
// PSR-4
/**
* @var array[]
* @psalm-var array<string, array<string, int>>
* @var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, array<int, string>>
* @var array<string, list<string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, string>
* @var list<string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* @var array[]
* @psalm-var array<string, array<string, string[]>>
* List of PSR-0 prefixes
*
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/
private $prefixesPsr0 = array();
/**
* @var array[]
* @psalm-var array<string, string>
* @var list<string>
*/
private $fallbackDirsPsr0 = array();
@ -81,8 +80,7 @@ class ClassLoader
private $useIncludePath = false;
/**
* @var string[]
* @psalm-var array<string, string>
* @var array<string, string>
*/
private $classMap = array();
@ -90,21 +88,20 @@ class ClassLoader
private $classMapAuthoritative = false;
/**
* @var bool[]
* @psalm-var array<string, bool>
* @var array<string, bool>
*/
private $missingClasses = array();
/** @var ?string */
/** @var string|null */
private $apcuPrefix;
/**
* @var self[]
* @var array<string, self>
*/
private static $registeredLoaders = array();
/**
* @param ?string $vendorDir
* @param string|null $vendorDir
*/
public function __construct($vendorDir = null)
{
@ -113,7 +110,7 @@ class ClassLoader
}
/**
* @return string[]
* @return array<string, list<string>>
*/
public function getPrefixes()
{
@ -125,8 +122,7 @@ class ClassLoader
}
/**
* @return array[]
* @psalm-return array<string, array<int, string>>
* @return array<string, list<string>>
*/
public function getPrefixesPsr4()
{
@ -134,8 +130,7 @@ class ClassLoader
}
/**
* @return array[]
* @psalm-return array<string, string>
* @return list<string>
*/
public function getFallbackDirs()
{
@ -143,8 +138,7 @@ class ClassLoader
}
/**
* @return array[]
* @psalm-return array<string, string>
* @return list<string>
*/
public function getFallbackDirsPsr4()
{
@ -152,8 +146,7 @@ class ClassLoader
}
/**
* @return string[] Array of classname => path
* @psalm-return array<string, string>
* @return array<string, string> Array of classname => path
*/
public function getClassMap()
{
@ -161,8 +154,7 @@ class ClassLoader
}
/**
* @param string[] $classMap Class to filename map
* @psalm-param array<string, string> $classMap
* @param array<string, string> $classMap Class to filename map
*
* @return void
*/
@ -179,24 +171,25 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
(array) $paths,
$paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
(array) $paths
$paths
);
}
@ -205,19 +198,19 @@ class ClassLoader
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
$this->prefixesPsr0[$first][$prefix] = $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths,
$paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
(array) $paths
$paths
);
}
}
@ -226,9 +219,9 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
@ -236,17 +229,18 @@ class ClassLoader
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
(array) $paths,
$paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
(array) $paths
$paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@ -256,18 +250,18 @@ class ClassLoader
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
$this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths,
$paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
(array) $paths
$paths
);
}
}
@ -276,8 +270,8 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 base directories
*
* @return void
*/
@ -294,8 +288,8 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
@ -429,7 +423,8 @@ class ClassLoader
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
(self::$includeFile)($file);
$includeFile = self::$includeFile;
$includeFile($file);
return true;
}
@ -480,9 +475,9 @@ class ClassLoader
}
/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
* Returns the currently registered loaders keyed by their corresponding vendor directories.
*
* @return self[]
* @return array<string, self>
*/
public static function getRegisteredLoaders()
{
@ -560,7 +555,10 @@ class ClassLoader
return false;
}
private static function initializeIncludeClosure(): void
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
@ -574,8 +572,8 @@ class ClassLoader
* @param string $file
* @return void
*/
self::$includeFile = static function($file) {
self::$includeFile = \Closure::bind(static function($file) {
include $file;
};
}, null, null);
}
}

View File

@ -98,7 +98,7 @@ class InstalledVersions
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
@ -119,7 +119,7 @@ class InstalledVersions
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
@ -328,7 +328,9 @@ class InstalledVersions
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
@ -340,12 +342,17 @@ class InstalledVersions
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php';
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
$installed[] = self::$installed;
if (self::$installed !== array()) {
$installed[] = self::$installed;
}
return $installed;
}

View File

@ -417,6 +417,11 @@ return array(
'Composer\\Pcre\\MatchResult' => $vendorDir . '/composer/pcre/src/MatchResult.php',
'Composer\\Pcre\\MatchStrictGroupsResult' => $vendorDir . '/composer/pcre/src/MatchStrictGroupsResult.php',
'Composer\\Pcre\\MatchWithOffsetsResult' => $vendorDir . '/composer/pcre/src/MatchWithOffsetsResult.php',
'Composer\\Pcre\\PHPStan\\InvalidRegexPatternRule' => $vendorDir . '/composer/pcre/src/PHPStan/InvalidRegexPatternRule.php',
'Composer\\Pcre\\PHPStan\\PregMatchFlags' => $vendorDir . '/composer/pcre/src/PHPStan/PregMatchFlags.php',
'Composer\\Pcre\\PHPStan\\PregMatchParameterOutTypeExtension' => $vendorDir . '/composer/pcre/src/PHPStan/PregMatchParameterOutTypeExtension.php',
'Composer\\Pcre\\PHPStan\\PregMatchTypeSpecifyingExtension' => $vendorDir . '/composer/pcre/src/PHPStan/PregMatchTypeSpecifyingExtension.php',
'Composer\\Pcre\\PHPStan\\UnsafeStrictGroupsCallRule' => $vendorDir . '/composer/pcre/src/PHPStan/UnsafeStrictGroupsCallRule.php',
'Composer\\Pcre\\PcreException' => $vendorDir . '/composer/pcre/src/PcreException.php',
'Composer\\Pcre\\Preg' => $vendorDir . '/composer/pcre/src/Preg.php',
'Composer\\Pcre\\Regex' => $vendorDir . '/composer/pcre/src/Regex.php',
@ -2620,6 +2625,7 @@ return array(
'PhpCsFixer\\Fixer\\PhpTag\\FullOpeningTagFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/FullOpeningTagFixer.php',
'PhpCsFixer\\Fixer\\PhpTag\\LinebreakAfterOpeningTagFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/LinebreakAfterOpeningTagFixer.php',
'PhpCsFixer\\Fixer\\PhpTag\\NoClosingTagFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/NoClosingTagFixer.php',
'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitAssertNewNamesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitAssertNewNamesFixer.php',
'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitAttributesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitAttributesFixer.php',
'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitConstructFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php',
'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDataProviderNameFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderNameFixer.php',
@ -2784,6 +2790,7 @@ return array(
'PhpCsFixer\\RuleSet\\Sets\\PHPUnit60MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit60MigrationRiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PHPUnit75MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit75MigrationRiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PHPUnit84MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit84MigrationRiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PHPUnit91MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit91MigrationRiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PSR12RiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12RiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PSR12Set' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12Set.php',
'PhpCsFixer\\RuleSet\\Sets\\PSR1Set' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR1Set.php',
@ -4648,6 +4655,7 @@ return array(
'Symfony\\Component\\Process\\Exception\\LogicException' => $vendorDir . '/symfony/process/Exception/LogicException.php',
'Symfony\\Component\\Process\\Exception\\ProcessFailedException' => $vendorDir . '/symfony/process/Exception/ProcessFailedException.php',
'Symfony\\Component\\Process\\Exception\\ProcessSignaledException' => $vendorDir . '/symfony/process/Exception/ProcessSignaledException.php',
'Symfony\\Component\\Process\\Exception\\ProcessStartFailedException' => $vendorDir . '/symfony/process/Exception/ProcessStartFailedException.php',
'Symfony\\Component\\Process\\Exception\\ProcessTimedOutException' => $vendorDir . '/symfony/process/Exception/ProcessTimedOutException.php',
'Symfony\\Component\\Process\\Exception\\RunProcessFailedException' => $vendorDir . '/symfony/process/Exception/RunProcessFailedException.php',
'Symfony\\Component\\Process\\Exception\\RuntimeException' => $vendorDir . '/symfony/process/Exception/RuntimeException.php',
@ -4688,9 +4696,7 @@ return array(
'Symfony\\Contracts\\Service\\Attribute\\Required' => $vendorDir . '/symfony/service-contracts/Attribute/Required.php',
'Symfony\\Contracts\\Service\\Attribute\\SubscribedService' => $vendorDir . '/symfony/service-contracts/Attribute/SubscribedService.php',
'Symfony\\Contracts\\Service\\ResetInterface' => $vendorDir . '/symfony/service-contracts/ResetInterface.php',
'Symfony\\Contracts\\Service\\ServiceCollectionInterface' => $vendorDir . '/symfony/service-contracts/ServiceCollectionInterface.php',
'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => $vendorDir . '/symfony/service-contracts/ServiceLocatorTrait.php',
'Symfony\\Contracts\\Service\\ServiceMethodsSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceMethodsSubscriberTrait.php',
'Symfony\\Contracts\\Service\\ServiceProviderInterface' => $vendorDir . '/symfony/service-contracts/ServiceProviderInterface.php',
'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberInterface.php',
'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberTrait.php',

View File

@ -7,8 +7,8 @@ $baseDir = dirname($vendorDir);
return array(
'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',

View File

@ -34,15 +34,15 @@ class ComposerAutoloaderInitc8496d4dbcc79fa0e3d8c5678a3ba3c2
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInitc8496d4dbcc79fa0e3d8c5678a3ba3c2::$files;
$requireFile = static function ($fileIdentifier, $file) {
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
};
}, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
($requireFile)($fileIdentifier, $file);
$requireFile($fileIdentifier, $file);
}
return $loader;

View File

@ -8,8 +8,8 @@ class ComposerStaticInitc8496d4dbcc79fa0e3d8c5678a3ba3c2
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
@ -755,6 +755,11 @@ class ComposerStaticInitc8496d4dbcc79fa0e3d8c5678a3ba3c2
'Composer\\Pcre\\MatchResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchResult.php',
'Composer\\Pcre\\MatchStrictGroupsResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchStrictGroupsResult.php',
'Composer\\Pcre\\MatchWithOffsetsResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchWithOffsetsResult.php',
'Composer\\Pcre\\PHPStan\\InvalidRegexPatternRule' => __DIR__ . '/..' . '/composer/pcre/src/PHPStan/InvalidRegexPatternRule.php',
'Composer\\Pcre\\PHPStan\\PregMatchFlags' => __DIR__ . '/..' . '/composer/pcre/src/PHPStan/PregMatchFlags.php',
'Composer\\Pcre\\PHPStan\\PregMatchParameterOutTypeExtension' => __DIR__ . '/..' . '/composer/pcre/src/PHPStan/PregMatchParameterOutTypeExtension.php',
'Composer\\Pcre\\PHPStan\\PregMatchTypeSpecifyingExtension' => __DIR__ . '/..' . '/composer/pcre/src/PHPStan/PregMatchTypeSpecifyingExtension.php',
'Composer\\Pcre\\PHPStan\\UnsafeStrictGroupsCallRule' => __DIR__ . '/..' . '/composer/pcre/src/PHPStan/UnsafeStrictGroupsCallRule.php',
'Composer\\Pcre\\PcreException' => __DIR__ . '/..' . '/composer/pcre/src/PcreException.php',
'Composer\\Pcre\\Preg' => __DIR__ . '/..' . '/composer/pcre/src/Preg.php',
'Composer\\Pcre\\Regex' => __DIR__ . '/..' . '/composer/pcre/src/Regex.php',
@ -2958,6 +2963,7 @@ class ComposerStaticInitc8496d4dbcc79fa0e3d8c5678a3ba3c2
'PhpCsFixer\\Fixer\\PhpTag\\FullOpeningTagFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/FullOpeningTagFixer.php',
'PhpCsFixer\\Fixer\\PhpTag\\LinebreakAfterOpeningTagFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/LinebreakAfterOpeningTagFixer.php',
'PhpCsFixer\\Fixer\\PhpTag\\NoClosingTagFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/NoClosingTagFixer.php',
'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitAssertNewNamesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitAssertNewNamesFixer.php',
'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitAttributesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitAttributesFixer.php',
'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitConstructFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php',
'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDataProviderNameFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderNameFixer.php',
@ -3122,6 +3128,7 @@ class ComposerStaticInitc8496d4dbcc79fa0e3d8c5678a3ba3c2
'PhpCsFixer\\RuleSet\\Sets\\PHPUnit60MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit60MigrationRiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PHPUnit75MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit75MigrationRiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PHPUnit84MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit84MigrationRiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PHPUnit91MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit91MigrationRiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PSR12RiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12RiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PSR12Set' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12Set.php',
'PhpCsFixer\\RuleSet\\Sets\\PSR1Set' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR1Set.php',
@ -4986,6 +4993,7 @@ class ComposerStaticInitc8496d4dbcc79fa0e3d8c5678a3ba3c2
'Symfony\\Component\\Process\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/process/Exception/LogicException.php',
'Symfony\\Component\\Process\\Exception\\ProcessFailedException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessFailedException.php',
'Symfony\\Component\\Process\\Exception\\ProcessSignaledException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessSignaledException.php',
'Symfony\\Component\\Process\\Exception\\ProcessStartFailedException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessStartFailedException.php',
'Symfony\\Component\\Process\\Exception\\ProcessTimedOutException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessTimedOutException.php',
'Symfony\\Component\\Process\\Exception\\RunProcessFailedException' => __DIR__ . '/..' . '/symfony/process/Exception/RunProcessFailedException.php',
'Symfony\\Component\\Process\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/process/Exception/RuntimeException.php',
@ -5026,9 +5034,7 @@ class ComposerStaticInitc8496d4dbcc79fa0e3d8c5678a3ba3c2
'Symfony\\Contracts\\Service\\Attribute\\Required' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/Required.php',
'Symfony\\Contracts\\Service\\Attribute\\SubscribedService' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/SubscribedService.php',
'Symfony\\Contracts\\Service\\ResetInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ResetInterface.php',
'Symfony\\Contracts\\Service\\ServiceCollectionInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceCollectionInterface.php',
'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceLocatorTrait.php',
'Symfony\\Contracts\\Service\\ServiceMethodsSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceMethodsSubscriberTrait.php',
'Symfony\\Contracts\\Service\\ServiceProviderInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceProviderInterface.php',
'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberInterface.php',
'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberTrait.php',

View File

@ -69,31 +69,31 @@
},
{
"name": "codeigniter/coding-standard",
"version": "v1.8.0",
"version_normalized": "1.8.0.0",
"version": "v1.8.1",
"version_normalized": "1.8.1.0",
"source": {
"type": "git",
"url": "https://github.com/CodeIgniter/coding-standard.git",
"reference": "a523fd030be6360123a88655f39f0eb1650ee4bf"
"reference": "2c16682b4a3754bc6694fef1056f686f32298ee3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/CodeIgniter/coding-standard/zipball/a523fd030be6360123a88655f39f0eb1650ee4bf",
"reference": "a523fd030be6360123a88655f39f0eb1650ee4bf",
"url": "https://api.github.com/repos/CodeIgniter/coding-standard/zipball/2c16682b4a3754bc6694fef1056f686f32298ee3",
"reference": "2c16682b4a3754bc6694fef1056f686f32298ee3",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"friendsofphp/php-cs-fixer": "^3.50",
"nexusphp/cs-config": "^3.19.0",
"friendsofphp/php-cs-fixer": "^3.61.1",
"nexusphp/cs-config": "^3.24",
"php": "^8.1"
},
"require-dev": {
"nexusphp/tachycardia": "^2.1",
"phpstan/phpstan": "^1.0",
"phpunit/phpunit": "^10.5"
"nexusphp/tachycardia": "^2.3",
"phpstan/phpstan": "^1.11",
"phpunit/phpunit": "^10.5 || ^11.2"
},
"time": "2024-06-16T15:51:42+00:00",
"time": "2024-08-05T11:17:44+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -126,32 +126,40 @@
},
{
"name": "composer/pcre",
"version": "3.1.4",
"version_normalized": "3.1.4.0",
"version": "3.2.0",
"version_normalized": "3.2.0.0",
"source": {
"type": "git",
"url": "https://github.com/composer/pcre.git",
"reference": "04229f163664973f68f38f6f73d917799168ef24"
"reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24",
"reference": "04229f163664973f68f38f6f73d917799168ef24",
"url": "https://api.github.com/repos/composer/pcre/zipball/ea4ab6f9580a4fd221e0418f2c357cdd39102a90",
"reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^1.3",
"phpstan/phpstan-strict-rules": "^1.1",
"symfony/phpunit-bridge": "^5"
"conflict": {
"phpstan/phpstan": "<1.11.8"
},
"time": "2024-05-27T13:40:54+00:00",
"require-dev": {
"phpstan/phpstan": "^1.11.8",
"phpstan/phpstan-strict-rules": "^1.1",
"phpunit/phpunit": "^8 || ^9"
},
"time": "2024-07-25T09:36:02+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
},
"phpstan": {
"includes": [
"extension.neon"
]
}
},
"installation-source": "dist",
@ -180,7 +188,7 @@
],
"support": {
"issues": "https://github.com/composer/pcre/issues",
"source": "https://github.com/composer/pcre/tree/3.1.4"
"source": "https://github.com/composer/pcre/tree/3.2.0"
},
"funding": [
{
@ -533,17 +541,17 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v3.59.3",
"version_normalized": "3.59.3.0",
"version": "v3.62.0",
"version_normalized": "3.62.0.0",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "30ba9ecc2b0e5205e578fe29973c15653d9bfd29"
"reference": "627692f794d35c43483f34b01d94740df2a73507"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/30ba9ecc2b0e5205e578fe29973c15653d9bfd29",
"reference": "30ba9ecc2b0e5205e578fe29973c15653d9bfd29",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/627692f794d35c43483f34b01d94740df2a73507",
"reference": "627692f794d35c43483f34b01d94740df2a73507",
"shasum": ""
},
"require": {
@ -590,7 +598,7 @@
"ext-dom": "For handling output formats in XML",
"ext-mbstring": "For handling non-UTF8 characters."
},
"time": "2024-06-16T14:17:03+00:00",
"time": "2024-08-07T17:03:09+00:00",
"bin": [
"php-cs-fixer"
],
@ -627,7 +635,7 @@
],
"support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.59.3"
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.62.0"
},
"funding": [
{
@ -1268,22 +1276,22 @@
},
{
"name": "nexusphp/cs-config",
"version": "v3.23.1",
"version_normalized": "3.23.1.0",
"version": "v3.24.0",
"version_normalized": "3.24.0.0",
"source": {
"type": "git",
"url": "https://github.com/NexusPHP/cs-config.git",
"reference": "323c8ca9c86a85d8cf9990e95079a7734bfbf4e6"
"reference": "fd0fdb458cbf42ba636a2ed218530b335421f33f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/NexusPHP/cs-config/zipball/323c8ca9c86a85d8cf9990e95079a7734bfbf4e6",
"reference": "323c8ca9c86a85d8cf9990e95079a7734bfbf4e6",
"url": "https://api.github.com/repos/NexusPHP/cs-config/zipball/fd0fdb458cbf42ba636a2ed218530b335421f33f",
"reference": "fd0fdb458cbf42ba636a2ed218530b335421f33f",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"friendsofphp/php-cs-fixer": "^3.57.1",
"friendsofphp/php-cs-fixer": "^3.60",
"php": "^8.1"
},
"conflict": {
@ -1297,13 +1305,8 @@
"phpstan/phpstan-strict-rules": "^1.5",
"phpunit/phpunit": "^10.5 || ^11.0"
},
"time": "2024-06-16T15:46:10+00:00",
"time": "2024-07-28T15:59:18+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-develop": "3.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
@ -1568,17 +1571,17 @@
},
{
"name": "phpoffice/phpspreadsheet",
"version": "2.2.0",
"version_normalized": "2.2.0.0",
"version": "2.2.2",
"version_normalized": "2.2.2.0",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
"reference": "b0993b7e4d9c860133365d115b176bc6e0f57022"
"reference": "ffbcee68069b073bff07a71eb321dcd9f2763513"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/b0993b7e4d9c860133365d115b176bc6e0f57022",
"reference": "b0993b7e4d9c860133365d115b176bc6e0f57022",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/ffbcee68069b073bff07a71eb321dcd9f2763513",
"reference": "ffbcee68069b073bff07a71eb321dcd9f2763513",
"shasum": ""
},
"require": {
@ -1623,7 +1626,7 @@
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer"
},
"time": "2024-07-24T13:21:18+00:00",
"time": "2024-08-08T02:31:26+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -1669,7 +1672,7 @@
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/2.2.0"
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/2.2.2"
},
"install-path": "../phpoffice/phpspreadsheet"
},
@ -2011,17 +2014,17 @@
},
{
"name": "phpunit/phpunit",
"version": "10.5.28",
"version_normalized": "10.5.28.0",
"version": "10.5.29",
"version_normalized": "10.5.29.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "ff7fb85cdf88131b83e721fb2a327b664dbed275"
"reference": "8e9e80872b4e8064401788ee8a32d40b4455318f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ff7fb85cdf88131b83e721fb2a327b664dbed275",
"reference": "ff7fb85cdf88131b83e721fb2a327b664dbed275",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e9e80872b4e8064401788ee8a32d40b4455318f",
"reference": "8e9e80872b4e8064401788ee8a32d40b4455318f",
"shasum": ""
},
"require": {
@ -2055,7 +2058,7 @@
"suggest": {
"ext-soap": "To be able to generate mocks based on WSDL files"
},
"time": "2024-07-18T14:54:16+00:00",
"time": "2024-07-30T11:08:00+00:00",
"bin": [
"phpunit"
],
@ -2095,7 +2098,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.28"
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.29"
},
"funding": [
{
@ -2951,34 +2954,34 @@
},
{
"name": "react/socket",
"version": "v1.15.0",
"version_normalized": "1.15.0.0",
"version": "v1.16.0",
"version_normalized": "1.16.0.0",
"source": {
"type": "git",
"url": "https://github.com/reactphp/socket.git",
"reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038"
"reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/reactphp/socket/zipball/216d3aec0b87f04a40ca04f481e6af01bdd1d038",
"reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038",
"url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1",
"reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1",
"shasum": ""
},
"require": {
"evenement/evenement": "^3.0 || ^2.0 || ^1.0",
"php": ">=5.3.0",
"react/dns": "^1.11",
"react/dns": "^1.13",
"react/event-loop": "^1.2",
"react/promise": "^3 || ^2.6 || ^1.2.1",
"react/stream": "^1.2"
"react/promise": "^3.2 || ^2.6 || ^1.2.1",
"react/stream": "^1.4"
},
"require-dev": {
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36",
"react/async": "^4 || ^3 || ^2",
"react/async": "^4.3 || ^3.3 || ^2",
"react/promise-stream": "^1.4",
"react/promise-timer": "^1.10"
"react/promise-timer": "^1.11"
},
"time": "2023-12-15T11:02:10+00:00",
"time": "2024-07-26T10:38:09+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -3022,7 +3025,7 @@
],
"support": {
"issues": "https://github.com/reactphp/socket/issues",
"source": "https://github.com/reactphp/socket/tree/v1.15.0"
"source": "https://github.com/reactphp/socket/tree/v1.16.0"
},
"funding": [
{
@ -3292,17 +3295,17 @@
},
{
"name": "sebastian/comparator",
"version": "5.0.1",
"version_normalized": "5.0.1.0",
"version": "5.0.2",
"version_normalized": "5.0.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "2db5010a484d53ebf536087a70b4a5423c102372"
"reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372",
"reference": "2db5010a484d53ebf536087a70b4a5423c102372",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53",
"reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53",
"shasum": ""
},
"require": {
@ -3313,9 +3316,9 @@
"sebastian/exporter": "^5.0"
},
"require-dev": {
"phpunit/phpunit": "^10.3"
"phpunit/phpunit": "^10.4"
},
"time": "2023-08-14T13:18:12+00:00",
"time": "2024-08-12T06:03:08+00:00",
"type": "library",
"extra": {
"branch-alias": {
@ -3360,7 +3363,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
"security": "https://github.com/sebastianbergmann/comparator/security/policy",
"source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1"
"source": "https://github.com/sebastianbergmann/comparator/tree/5.0.2"
},
"funding": [
{
@ -4151,50 +4154,49 @@
},
{
"name": "symfony/console",
"version": "v6.4.9",
"version_normalized": "6.4.9.0",
"version": "v7.1.3",
"version_normalized": "7.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "6edb5363ec0c78ad4d48c5128ebf4d083d89d3a9"
"reference": "cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/6edb5363ec0c78ad4d48c5128ebf4d083d89d3a9",
"reference": "6edb5363ec0c78ad4d48c5128ebf4d083d89d3a9",
"url": "https://api.github.com/repos/symfony/console/zipball/cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9",
"reference": "cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9",
"shasum": ""
},
"require": {
"php": ">=8.1",
"symfony/deprecation-contracts": "^2.5|^3",
"php": ">=8.2",
"symfony/polyfill-mbstring": "~1.0",
"symfony/service-contracts": "^2.5|^3",
"symfony/string": "^5.4|^6.0|^7.0"
"symfony/string": "^6.4|^7.0"
},
"conflict": {
"symfony/dependency-injection": "<5.4",
"symfony/dotenv": "<5.4",
"symfony/event-dispatcher": "<5.4",
"symfony/lock": "<5.4",
"symfony/process": "<5.4"
"symfony/dependency-injection": "<6.4",
"symfony/dotenv": "<6.4",
"symfony/event-dispatcher": "<6.4",
"symfony/lock": "<6.4",
"symfony/process": "<6.4"
},
"provide": {
"psr/log-implementation": "1.0|2.0|3.0"
},
"require-dev": {
"psr/log": "^1|^2|^3",
"symfony/config": "^5.4|^6.0|^7.0",
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
"symfony/event-dispatcher": "^5.4|^6.0|^7.0",
"symfony/config": "^6.4|^7.0",
"symfony/dependency-injection": "^6.4|^7.0",
"symfony/event-dispatcher": "^6.4|^7.0",
"symfony/http-foundation": "^6.4|^7.0",
"symfony/http-kernel": "^6.4|^7.0",
"symfony/lock": "^5.4|^6.0|^7.0",
"symfony/messenger": "^5.4|^6.0|^7.0",
"symfony/process": "^5.4|^6.0|^7.0",
"symfony/stopwatch": "^5.4|^6.0|^7.0",
"symfony/var-dumper": "^5.4|^6.0|^7.0"
"symfony/lock": "^6.4|^7.0",
"symfony/messenger": "^6.4|^7.0",
"symfony/process": "^6.4|^7.0",
"symfony/stopwatch": "^6.4|^7.0",
"symfony/var-dumper": "^6.4|^7.0"
},
"time": "2024-06-28T09:49:33+00:00",
"time": "2024-07-26T12:41:01+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -4228,7 +4230,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v6.4.9"
"source": "https://github.com/symfony/console/tree/v7.1.3"
},
"funding": [
{
@ -4318,25 +4320,25 @@
},
{
"name": "symfony/event-dispatcher",
"version": "v6.4.8",
"version_normalized": "6.4.8.0",
"version": "v7.1.1",
"version_normalized": "7.1.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "8d7507f02b06e06815e56bb39aa0128e3806208b"
"reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8d7507f02b06e06815e56bb39aa0128e3806208b",
"reference": "8d7507f02b06e06815e56bb39aa0128e3806208b",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7",
"reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7",
"shasum": ""
},
"require": {
"php": ">=8.1",
"php": ">=8.2",
"symfony/event-dispatcher-contracts": "^2.5|^3"
},
"conflict": {
"symfony/dependency-injection": "<5.4",
"symfony/dependency-injection": "<6.4",
"symfony/service-contracts": "<2.5"
},
"provide": {
@ -4345,15 +4347,15 @@
},
"require-dev": {
"psr/log": "^1|^2|^3",
"symfony/config": "^5.4|^6.0|^7.0",
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
"symfony/error-handler": "^5.4|^6.0|^7.0",
"symfony/expression-language": "^5.4|^6.0|^7.0",
"symfony/http-foundation": "^5.4|^6.0|^7.0",
"symfony/config": "^6.4|^7.0",
"symfony/dependency-injection": "^6.4|^7.0",
"symfony/error-handler": "^6.4|^7.0",
"symfony/expression-language": "^6.4|^7.0",
"symfony/http-foundation": "^6.4|^7.0",
"symfony/service-contracts": "^2.5|^3",
"symfony/stopwatch": "^5.4|^6.0|^7.0"
"symfony/stopwatch": "^6.4|^7.0"
},
"time": "2024-05-31T14:49:08+00:00",
"time": "2024-05-31T14:57:53+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -4381,7 +4383,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v6.4.8"
"source": "https://github.com/symfony/event-dispatcher/tree/v7.1.1"
},
"funding": [
{
@ -4480,28 +4482,28 @@
},
{
"name": "symfony/filesystem",
"version": "v6.4.9",
"version_normalized": "6.4.9.0",
"version": "v7.1.2",
"version_normalized": "7.1.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "b51ef8059159330b74a4d52f68e671033c0fe463"
"reference": "92a91985250c251de9b947a14bb2c9390b1a562c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/b51ef8059159330b74a4d52f68e671033c0fe463",
"reference": "b51ef8059159330b74a4d52f68e671033c0fe463",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/92a91985250c251de9b947a14bb2c9390b1a562c",
"reference": "92a91985250c251de9b947a14bb2c9390b1a562c",
"shasum": ""
},
"require": {
"php": ">=8.1",
"php": ">=8.2",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.8"
},
"require-dev": {
"symfony/process": "^5.4|^6.4|^7.0"
"symfony/process": "^6.4|^7.0"
},
"time": "2024-06-28T09:49:33+00:00",
"time": "2024-06-28T10:03:55+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -4529,7 +4531,7 @@
"description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/filesystem/tree/v6.4.9"
"source": "https://github.com/symfony/filesystem/tree/v7.1.2"
},
"funding": [
{
@ -4549,26 +4551,26 @@
},
{
"name": "symfony/finder",
"version": "v6.4.8",
"version_normalized": "6.4.8.0",
"version": "v7.1.3",
"version_normalized": "7.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "3ef977a43883215d560a2cecb82ec8e62131471c"
"reference": "717c6329886f32dc65e27461f80f2a465412fdca"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/3ef977a43883215d560a2cecb82ec8e62131471c",
"reference": "3ef977a43883215d560a2cecb82ec8e62131471c",
"url": "https://api.github.com/repos/symfony/finder/zipball/717c6329886f32dc65e27461f80f2a465412fdca",
"reference": "717c6329886f32dc65e27461f80f2a465412fdca",
"shasum": ""
},
"require": {
"php": ">=8.1"
"php": ">=8.2"
},
"require-dev": {
"symfony/filesystem": "^6.0|^7.0"
"symfony/filesystem": "^6.4|^7.0"
},
"time": "2024-05-31T14:49:08+00:00",
"time": "2024-07-24T07:08:44+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -4596,7 +4598,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/finder/tree/v6.4.8"
"source": "https://github.com/symfony/finder/tree/v7.1.3"
},
"funding": [
{
@ -4616,24 +4618,24 @@
},
{
"name": "symfony/options-resolver",
"version": "v6.4.8",
"version_normalized": "6.4.8.0",
"version": "v7.1.1",
"version_normalized": "7.1.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
"reference": "22ab9e9101ab18de37839074f8a1197f55590c1b"
"reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/22ab9e9101ab18de37839074f8a1197f55590c1b",
"reference": "22ab9e9101ab18de37839074f8a1197f55590c1b",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/47aa818121ed3950acd2b58d1d37d08a94f9bf55",
"reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55",
"shasum": ""
},
"require": {
"php": ">=8.1",
"php": ">=8.2",
"symfony/deprecation-contracts": "^2.5|^3"
},
"time": "2024-05-31T14:49:08+00:00",
"time": "2024-05-31T14:57:53+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -4666,7 +4668,7 @@
"options"
],
"support": {
"source": "https://github.com/symfony/options-resolver/tree/v6.4.8"
"source": "https://github.com/symfony/options-resolver/tree/v7.1.1"
},
"funding": [
{
@ -5178,23 +5180,23 @@
},
{
"name": "symfony/process",
"version": "v6.4.8",
"version_normalized": "6.4.8.0",
"version": "v7.1.3",
"version_normalized": "7.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "8d92dd79149f29e89ee0f480254db595f6a6a2c5"
"reference": "7f2f542c668ad6c313dc4a5e9c3321f733197eca"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/8d92dd79149f29e89ee0f480254db595f6a6a2c5",
"reference": "8d92dd79149f29e89ee0f480254db595f6a6a2c5",
"url": "https://api.github.com/repos/symfony/process/zipball/7f2f542c668ad6c313dc4a5e9c3321f733197eca",
"reference": "7f2f542c668ad6c313dc4a5e9c3321f733197eca",
"shasum": ""
},
"require": {
"php": ">=8.1"
"php": ">=8.2"
},
"time": "2024-05-31T14:49:08+00:00",
"time": "2024-07-26T12:44:47+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -5222,7 +5224,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/process/tree/v6.4.8"
"source": "https://github.com/symfony/process/tree/v7.1.3"
},
"funding": [
{
@ -5328,24 +5330,24 @@
},
{
"name": "symfony/stopwatch",
"version": "v6.4.8",
"version_normalized": "6.4.8.0",
"version": "v7.1.1",
"version_normalized": "7.1.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
"reference": "63e069eb616049632cde9674c46957819454b8aa"
"reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/63e069eb616049632cde9674c46957819454b8aa",
"reference": "63e069eb616049632cde9674c46957819454b8aa",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d",
"reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d",
"shasum": ""
},
"require": {
"php": ">=8.1",
"php": ">=8.2",
"symfony/service-contracts": "^2.5|^3"
},
"time": "2024-05-31T14:49:08+00:00",
"time": "2024-05-31T14:57:53+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -5373,7 +5375,7 @@
"description": "Provides a way to profile code",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/stopwatch/tree/v6.4.8"
"source": "https://github.com/symfony/stopwatch/tree/v7.1.1"
},
"funding": [
{
@ -5393,21 +5395,21 @@
},
{
"name": "symfony/string",
"version": "v6.4.9",
"version_normalized": "6.4.9.0",
"version": "v7.1.3",
"version_normalized": "7.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "76792dbd99690a5ebef8050d9206c60c59e681d7"
"reference": "ea272a882be7f20cad58d5d78c215001617b7f07"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/76792dbd99690a5ebef8050d9206c60c59e681d7",
"reference": "76792dbd99690a5ebef8050d9206c60c59e681d7",
"url": "https://api.github.com/repos/symfony/string/zipball/ea272a882be7f20cad58d5d78c215001617b7f07",
"reference": "ea272a882be7f20cad58d5d78c215001617b7f07",
"shasum": ""
},
"require": {
"php": ">=8.1",
"php": ">=8.2",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-grapheme": "~1.0",
"symfony/polyfill-intl-normalizer": "~1.0",
@ -5417,13 +5419,14 @@
"symfony/translation-contracts": "<2.5"
},
"require-dev": {
"symfony/error-handler": "^5.4|^6.0|^7.0",
"symfony/http-client": "^5.4|^6.0|^7.0",
"symfony/intl": "^6.2|^7.0",
"symfony/emoji": "^7.1",
"symfony/error-handler": "^6.4|^7.0",
"symfony/http-client": "^6.4|^7.0",
"symfony/intl": "^6.4|^7.0",
"symfony/translation-contracts": "^2.5|^3.0",
"symfony/var-exporter": "^5.4|^6.0|^7.0"
"symfony/var-exporter": "^6.4|^7.0"
},
"time": "2024-06-28T09:25:38+00:00",
"time": "2024-07-22T10:25:37+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -5462,7 +5465,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v6.4.9"
"source": "https://github.com/symfony/string/tree/v7.1.3"
},
"funding": [
{

View File

@ -3,7 +3,7 @@
'name' => 'codeigniter4/framework',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'bbb89d27e6e055d07faa359bddec81032352d85e',
'reference' => 'c3e7e73142fef1433a98d1a53c3a9650bd01e896',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@ -20,9 +20,9 @@
'dev_requirement' => true,
),
'codeigniter/coding-standard' => array(
'pretty_version' => 'v1.8.0',
'version' => '1.8.0.0',
'reference' => 'a523fd030be6360123a88655f39f0eb1650ee4bf',
'pretty_version' => 'v1.8.1',
'version' => '1.8.1.0',
'reference' => '2c16682b4a3754bc6694fef1056f686f32298ee3',
'type' => 'library',
'install_path' => __DIR__ . '/../codeigniter/coding-standard',
'aliases' => array(),
@ -31,16 +31,16 @@
'codeigniter4/framework' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'bbb89d27e6e055d07faa359bddec81032352d85e',
'reference' => 'c3e7e73142fef1433a98d1a53c3a9650bd01e896',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'composer/pcre' => array(
'pretty_version' => '3.1.4',
'version' => '3.1.4.0',
'reference' => '04229f163664973f68f38f6f73d917799168ef24',
'pretty_version' => '3.2.0',
'version' => '3.2.0.0',
'reference' => 'ea4ab6f9580a4fd221e0418f2c357cdd39102a90',
'type' => 'library',
'install_path' => __DIR__ . '/./pcre',
'aliases' => array(),
@ -92,9 +92,9 @@
'dev_requirement' => true,
),
'friendsofphp/php-cs-fixer' => array(
'pretty_version' => 'v3.59.3',
'version' => '3.59.3.0',
'reference' => '30ba9ecc2b0e5205e578fe29973c15653d9bfd29',
'pretty_version' => 'v3.62.0',
'version' => '3.62.0.0',
'reference' => '627692f794d35c43483f34b01d94740df2a73507',
'type' => 'application',
'install_path' => __DIR__ . '/../friendsofphp/php-cs-fixer',
'aliases' => array(),
@ -191,9 +191,9 @@
'dev_requirement' => false,
),
'nexusphp/cs-config' => array(
'pretty_version' => 'v3.23.1',
'version' => '3.23.1.0',
'reference' => '323c8ca9c86a85d8cf9990e95079a7734bfbf4e6',
'pretty_version' => 'v3.24.0',
'version' => '3.24.0.0',
'reference' => 'fd0fdb458cbf42ba636a2ed218530b335421f33f',
'type' => 'library',
'install_path' => __DIR__ . '/../nexusphp/cs-config',
'aliases' => array(),
@ -236,9 +236,9 @@
'dev_requirement' => true,
),
'phpoffice/phpspreadsheet' => array(
'pretty_version' => '2.2.0',
'version' => '2.2.0.0',
'reference' => 'b0993b7e4d9c860133365d115b176bc6e0f57022',
'pretty_version' => '2.2.2',
'version' => '2.2.2.0',
'reference' => 'ffbcee68069b073bff07a71eb321dcd9f2763513',
'type' => 'library',
'install_path' => __DIR__ . '/../phpoffice/phpspreadsheet',
'aliases' => array(),
@ -290,9 +290,9 @@
'dev_requirement' => true,
),
'phpunit/phpunit' => array(
'pretty_version' => '10.5.28',
'version' => '10.5.28.0',
'reference' => 'ff7fb85cdf88131b83e721fb2a327b664dbed275',
'pretty_version' => '10.5.29',
'version' => '10.5.29.0',
'reference' => '8e9e80872b4e8064401788ee8a32d40b4455318f',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/phpunit',
'aliases' => array(),
@ -428,9 +428,9 @@
'dev_requirement' => true,
),
'react/socket' => array(
'pretty_version' => 'v1.15.0',
'version' => '1.15.0.0',
'reference' => '216d3aec0b87f04a40ca04f481e6af01bdd1d038',
'pretty_version' => 'v1.16.0',
'version' => '1.16.0.0',
'reference' => '23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1',
'type' => 'library',
'install_path' => __DIR__ . '/../react/socket',
'aliases' => array(),
@ -473,9 +473,9 @@
'dev_requirement' => true,
),
'sebastian/comparator' => array(
'pretty_version' => '5.0.1',
'version' => '5.0.1.0',
'reference' => '2db5010a484d53ebf536087a70b4a5423c102372',
'pretty_version' => '5.0.2',
'version' => '5.0.2.0',
'reference' => '2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/comparator',
'aliases' => array(),
@ -590,9 +590,9 @@
'dev_requirement' => false,
),
'symfony/console' => array(
'pretty_version' => 'v6.4.9',
'version' => '6.4.9.0',
'reference' => '6edb5363ec0c78ad4d48c5128ebf4d083d89d3a9',
'pretty_version' => 'v7.1.3',
'version' => '7.1.3.0',
'reference' => 'cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/console',
'aliases' => array(),
@ -608,9 +608,9 @@
'dev_requirement' => true,
),
'symfony/event-dispatcher' => array(
'pretty_version' => 'v6.4.8',
'version' => '6.4.8.0',
'reference' => '8d7507f02b06e06815e56bb39aa0128e3806208b',
'pretty_version' => 'v7.1.1',
'version' => '7.1.1.0',
'reference' => '9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/event-dispatcher',
'aliases' => array(),
@ -632,27 +632,27 @@
),
),
'symfony/filesystem' => array(
'pretty_version' => 'v6.4.9',
'version' => '6.4.9.0',
'reference' => 'b51ef8059159330b74a4d52f68e671033c0fe463',
'pretty_version' => 'v7.1.2',
'version' => '7.1.2.0',
'reference' => '92a91985250c251de9b947a14bb2c9390b1a562c',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/filesystem',
'aliases' => array(),
'dev_requirement' => true,
),
'symfony/finder' => array(
'pretty_version' => 'v6.4.8',
'version' => '6.4.8.0',
'reference' => '3ef977a43883215d560a2cecb82ec8e62131471c',
'pretty_version' => 'v7.1.3',
'version' => '7.1.3.0',
'reference' => '717c6329886f32dc65e27461f80f2a465412fdca',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/finder',
'aliases' => array(),
'dev_requirement' => true,
),
'symfony/options-resolver' => array(
'pretty_version' => 'v6.4.8',
'version' => '6.4.8.0',
'reference' => '22ab9e9101ab18de37839074f8a1197f55590c1b',
'pretty_version' => 'v7.1.1',
'version' => '7.1.1.0',
'reference' => '47aa818121ed3950acd2b58d1d37d08a94f9bf55',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/options-resolver',
'aliases' => array(),
@ -713,9 +713,9 @@
'dev_requirement' => true,
),
'symfony/process' => array(
'pretty_version' => 'v6.4.8',
'version' => '6.4.8.0',
'reference' => '8d92dd79149f29e89ee0f480254db595f6a6a2c5',
'pretty_version' => 'v7.1.3',
'version' => '7.1.3.0',
'reference' => '7f2f542c668ad6c313dc4a5e9c3321f733197eca',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/process',
'aliases' => array(),
@ -731,18 +731,18 @@
'dev_requirement' => true,
),
'symfony/stopwatch' => array(
'pretty_version' => 'v6.4.8',
'version' => '6.4.8.0',
'reference' => '63e069eb616049632cde9674c46957819454b8aa',
'pretty_version' => 'v7.1.1',
'version' => '7.1.1.0',
'reference' => '5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/stopwatch',
'aliases' => array(),
'dev_requirement' => true,
),
'symfony/string' => array(
'pretty_version' => 'v6.4.9',
'version' => '6.4.9.0',
'reference' => '76792dbd99690a5ebef8050d9206c60c59e681d7',
'pretty_version' => 'v7.1.3',
'version' => '7.1.3.0',
'reference' => 'ea272a882be7f20cad58d5d78c215001617b7f07',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/string',
'aliases' => array(),

View File

@ -12,7 +12,8 @@ to understand the implications.
It thus makes it easier to work with static analysis tools like PHPStan or Psalm as it
simplifies and reduces the possible return values from all the `preg_*` functions which
are quite packed with edge cases.
are quite packed with edge cases. As of v2.2.0 / v3.2.0 the library also comes with a
[PHPStan extension](#phpstan-extension) for parsing regular expressions and giving you even better output types.
This library is a thin wrapper around `preg_*` functions with [some limitations](#restrictions--limitations).
If you are looking for a richer API to handle regular expressions have a look at
@ -175,6 +176,13 @@ preg_match('/(a)(b)*(c)(d)*/', 'ac', $matches, $flags);
| group 2 (any unmatched group preceding one that matched) is set to `''`. You cannot tell if it matched an empty string or did not match at all | group 2 is `null` when unmatched and a string if it matched, easy to check for |
| group 4 (any optional group without a matching one following) is missing altogether. So you have to check with `isset()`, but really you want `isset($m[4]) && $m[4] !== ''` for safety unless you are very careful to check that a non-optional group follows it | group 4 is always set, and null in this case as there was no match, easy to check for with `$m[4] !== null` |
PHPStan Extension
-----------------
To use the PHPStan extension if you do not use `phpstan/extension-installer` you can include `vendor/composer/pcre/extension.neon` in your PHPStan config.
The extension provides much better type information for $matches as well as regex validation where possible.
License
-------

View File

@ -20,10 +20,13 @@
"php": "^7.4 || ^8.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^5",
"phpstan/phpstan": "^1.3",
"phpunit/phpunit": "^8 || ^9",
"phpstan/phpstan": "^1.11.8",
"phpstan/phpstan-strict-rules": "^1.1"
},
"conflict": {
"phpstan/phpstan": "<1.11.8"
},
"autoload": {
"psr-4": {
"Composer\\Pcre\\": "src"
@ -37,10 +40,15 @@
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
},
"phpstan": {
"includes": [
"extension.neon"
]
}
},
"scripts": {
"test": "vendor/bin/simple-phpunit",
"phpstan": "phpstan analyse"
"test": "@php vendor/bin/phpunit",
"phpstan": "@php phpstan analyse"
}
}

View File

@ -43,6 +43,7 @@ class Regex
*/
public static function matchStrictGroups(string $pattern, string $subject, int $flags = 0, int $offset = 0): MatchStrictGroupsResult
{
// @phpstan-ignore composerPcre.maybeUnsafeStrictGroups
$count = Preg::matchStrictGroups($pattern, $subject, $matches, $flags, $offset);
return new MatchStrictGroupsResult($count, $matches);
@ -87,6 +88,7 @@ class Regex
self::checkOffsetCapture($flags, 'matchAllWithOffsets');
self::checkSetOrder($flags);
// @phpstan-ignore composerPcre.maybeUnsafeStrictGroups
$count = Preg::matchAllStrictGroups($pattern, $subject, $matches, $flags, $offset);
return new MatchAllStrictGroupsResult($count, $matches);

View File

@ -8,6 +8,10 @@ if (!(PHP_VERSION_ID >= 80100)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
}
if (PHP_INT_SIZE !== 8) {
$issues[] = 'Your Composer dependencies require a 64-bit build of PHP.';
}
if ($issues) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');

View File

@ -3,6 +3,56 @@ CHANGELOG for PHP CS Fixer
This file contains changelogs for stable releases only.
Changelog for v3.62.0
---------------------
* feat: set new_with_parentheses for anonymous_class to false in PER-CS2.0 (#8140)
* chore: NewWithParenthesesFixer - create TODO to change the default configuration to match PER-CS2 (#8148)
Changelog for v3.61.1
---------------------
* fix: `NoSuperfluousPhpdocTagsFixer` - fix "Undefined array key 0" error (#8150)
Changelog for v3.61.0
---------------------
* feat: no_superfluous_phpdoc_tags - also cover ?type (#8125)
* feat: support PHPUnit v9.1 naming for some asserts (#7997)
* fix: Do not mangle non-whitespace token in `PhpdocIndentFixer` (#8147)
* DX: add more typehints for `class-string` (#8139)
* DX: refactor `ProjectCodeTest::provideDataProviderMethodCases` (#8138)
Changelog for v3.60.0
---------------------
* feat: Add sprintf in the list of compiler optimized functions (#8092)
* feat: `PhpUnitAttributesFixer` - add option to keep annotations (#8090)
* chore: cleanup tests that had `@requires PHP 7.4` ages ago (#8122)
* chore: cleanup `TokensAnalyzerTest` (#8123)
* chore: fix example issue reported by reportPossiblyNonexistentGeneralArrayOffset from PHPStan (#8089)
* chore: NoSuperfluousPhpdocTagsFixer - no need to call heavy toComparableNames method to add null type (#8132)
* chore: PHPStan 11 array rules (#8011)
* chore: PhpUnitSizeClassFixerTest - solve PHP 8.4 issues (#8105)
* chore: reduce PHPStan errors in PhpUnitAttributesFixer (#8091)
* chore: reuse test methods (#8119)
* CI: check autoload (#8121)
* CI: Update PHPStan to 1.11.8 (#8133)
* deps: upgrade dev-tools (#8102)
* DX: check for duplicated test data (#8131)
* DX: check for duplicated test methods (#8124)
* DX: check for duplicated test methods (as AutoReview test) (#8134)
* DX: do not exclude duplicates that are clearly mistakes (#8135)
* DX: Dump `offsetAccess.notFound` errors to baseline (#8107)
* fix: Better way of walking types in `TypeExpression` (#8076)
* fix: CI for PHP 8.4 (#8114)
* fix: update `TokensTest` to shrink PHPStan's baseline (#8112)
* fix: `no_useless_concat_operator` - do not break variable (2) (#7927)
* fix: `NullableTypeDeclarationFixer` - don't convert standalone `null` into nullable union type (#8098)
* fix: `NullableTypeDeclarationFixer` - don't convert standalone `NULL` into nullable union type (#8111)
* fix: `NullableTypeDeclarationFixer` - insert correct token (#8118)
* fix: `PhpUnitAttributesFixer` - handle multiple annotations of the same name (#8075)
Changelog for v3.59.3
---------------------

View File

@ -74,7 +74,10 @@
"autoload-dev": {
"psr-4": {
"PhpCsFixer\\Tests\\": "tests/"
}
},
"exclude-from-classmap": [
"tests/Fixtures/"
]
},
"bin": [
"php-cs-fixer"
@ -124,6 +127,7 @@
"self-check": [
"./dev-tools/check_file_permissions.sh",
"./dev-tools/check_trailing_spaces.sh",
"@composer dump-autoload --dry-run --optimize --strict-psr",
"@normalize",
"@unused-deps",
"@require-checker",

View File

@ -76,7 +76,7 @@ final class Cache implements CacheInterface
]);
if (JSON_ERROR_NONE !== json_last_error() || false === $json) {
throw new \UnexpectedValueException(sprintf(
throw new \UnexpectedValueException(\sprintf(
'Cannot encode cache signature to JSON, error: "%s". If you have non-UTF8 chars in your signature, like in license for `header_comment`, consider enabling `ext-mbstring` or install `symfony/polyfill-mbstring`.',
json_last_error_msg()
));
@ -93,7 +93,7 @@ final class Cache implements CacheInterface
$data = json_decode($json, true);
if (null === $data && JSON_ERROR_NONE !== json_last_error()) {
throw new \InvalidArgumentException(sprintf(
throw new \InvalidArgumentException(\sprintf(
'Value needs to be a valid JSON string, got "%s", error: "%s".',
$json,
json_last_error_msg()
@ -112,7 +112,7 @@ final class Cache implements CacheInterface
$missingKeys = array_diff_key(array_flip($requiredKeys), $data);
if (\count($missingKeys) > 0) {
throw new \InvalidArgumentException(sprintf(
throw new \InvalidArgumentException(\sprintf(
'JSON data is missing keys %s',
Utils::naturalLanguageJoin(array_keys($missingKeys))
));

View File

@ -140,7 +140,7 @@ final class FileHandler implements FileHandlerInterface
if ($this->fileInfo->isDir()) {
throw new IOException(
sprintf('Cannot write cache file "%s" as the location exists as directory.', $this->fileInfo->getRealPath()),
\sprintf('Cannot write cache file "%s" as the location exists as directory.', $this->fileInfo->getRealPath()),
0,
null,
$this->fileInfo->getPathname()
@ -149,7 +149,7 @@ final class FileHandler implements FileHandlerInterface
if ($this->fileInfo->isFile() && !$this->fileInfo->isWritable()) {
throw new IOException(
sprintf('Cannot write to file "%s" as it is not writable.', $this->fileInfo->getRealPath()),
\sprintf('Cannot write to file "%s" as it is not writable.', $this->fileInfo->getRealPath()),
0,
null,
$this->fileInfo->getPathname()
@ -171,7 +171,7 @@ final class FileHandler implements FileHandlerInterface
if (!@is_dir($dir)) {
throw new IOException(
sprintf('Directory of cache file "%s" does not exists and couldn\'t be created.', $file),
\sprintf('Directory of cache file "%s" does not exists and couldn\'t be created.', $file),
0,
null,
$file

View File

@ -30,7 +30,7 @@ class InvalidFixerConfigurationException extends InvalidConfigurationException
public function __construct(string $fixerName, string $message, ?\Throwable $previous = null)
{
parent::__construct(
sprintf('[%s] %s', $fixerName, $message),
\sprintf('[%s] %s', $fixerName, $message),
FixCommandExitStatusCalculator::EXIT_STATUS_FLAG_HAS_INVALID_FIXER_CONFIG,
$previous
);

View File

@ -44,7 +44,7 @@ use Symfony\Component\Console\Output\OutputInterface;
final class Application extends BaseApplication
{
public const NAME = 'PHP CS Fixer';
public const VERSION = '3.59.3';
public const VERSION = '3.62.0';
public const VERSION_CODENAME = '7th Gear';
private ToolInfo $toolInfo;
@ -89,7 +89,7 @@ final class Application extends BaseApplication
if (\count($warnings) > 0) {
foreach ($warnings as $warning) {
$stdErr->writeln(sprintf($stdErr->isDecorated() ? '<bg=yellow;fg=black;>%s</>' : '%s', $warning));
$stdErr->writeln(\sprintf($stdErr->isDecorated() ? '<bg=yellow;fg=black;>%s</>' : '%s', $warning));
}
$stdErr->writeln('');
}
@ -107,7 +107,7 @@ final class Application extends BaseApplication
$stdErr->writeln('');
$stdErr->writeln($stdErr->isDecorated() ? '<bg=yellow;fg=black;>Detected deprecations in use:</>' : 'Detected deprecations in use:');
foreach ($triggeredDeprecations as $deprecation) {
$stdErr->writeln(sprintf('- %s', $deprecation));
$stdErr->writeln(\sprintf('- %s', $deprecation));
}
}
}
@ -120,7 +120,7 @@ final class Application extends BaseApplication
*/
public static function getAbout(bool $decorated = false): string
{
$longVersion = sprintf('%s <info>%s</info>', self::NAME, self::VERSION);
$longVersion = \sprintf('%s <info>%s</info>', self::NAME, self::VERSION);
$commit = '@git-commit@';
$versionCommit = '';
@ -131,8 +131,8 @@ final class Application extends BaseApplication
$about = implode('', [
$longVersion,
$versionCommit ? sprintf(' <info>(%s)</info>', $versionCommit) : '', // @phpstan-ignore-line to avoid `Ternary operator condition is always true|false.`
self::VERSION_CODENAME ? sprintf(' <info>%s</info>', self::VERSION_CODENAME) : '', // @phpstan-ignore-line to avoid `Ternary operator condition is always true|false.`
$versionCommit ? \sprintf(' <info>(%s)</info>', $versionCommit) : '', // @phpstan-ignore-line to avoid `Ternary operator condition is always true|false.`
self::VERSION_CODENAME ? \sprintf(' <info>%s</info>', self::VERSION_CODENAME) : '', // @phpstan-ignore-line to avoid `Ternary operator condition is always true|false.`
' by <comment>Fabien Potencier</comment>, <comment>Dariusz Ruminski</comment> and <comment>contributors</comment>.',
]);

View File

@ -131,7 +131,7 @@ final class DescribeCommand extends Command
$this->describeList($output, $e->getType());
throw new \InvalidArgumentException(sprintf(
throw new \InvalidArgumentException(\sprintf(
'%s "%s" not found.%s',
ucfirst($e->getType()),
$name,
@ -155,24 +155,24 @@ final class DescribeCommand extends Command
$definition = $fixer->getDefinition();
$output->writeln(sprintf('<fg=blue>Description of the <info>`%s`</info> rule.</>', $name));
$output->writeln(\sprintf('<fg=blue>Description of the <info>`%s`</info> rule.</>', $name));
$output->writeln('');
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
$output->writeln(sprintf('Fixer class: <comment>%s</comment>.', \get_class($fixer)));
$output->writeln(\sprintf('Fixer class: <comment>%s</comment>.', \get_class($fixer)));
$output->writeln('');
}
if ($fixer instanceof DeprecatedFixerInterface) {
$successors = $fixer->getSuccessorsNames();
$message = [] === $successors
? sprintf('it will be removed in version %d.0', Application::getMajorVersion() + 1)
: sprintf('use %s instead', Utils::naturalLanguageJoinWithBackticks($successors));
? \sprintf('it will be removed in version %d.0', Application::getMajorVersion() + 1)
: \sprintf('use %s instead', Utils::naturalLanguageJoinWithBackticks($successors));
$endMessage = '. '.ucfirst($message);
Utils::triggerDeprecation(new \RuntimeException(str_replace('`', '"', "Rule \"{$name}\" is deprecated{$endMessage}.")));
$message = Preg::replace('/(`[^`]+`)/', '<info>$1</info>', $message);
$output->writeln(sprintf('<error>DEPRECATED</error>: %s.', $message));
$output->writeln(\sprintf('<error>DEPRECATED</error>: %s.', $message));
$output->writeln('');
}
@ -216,7 +216,7 @@ final class DescribeCommand extends Command
$configurationDefinition = $fixer->getConfigurationDefinition();
$options = $configurationDefinition->getOptions();
$output->writeln(sprintf('Fixer is configurable using following option%s:', 1 === \count($options) ? '' : 's'));
$output->writeln(\sprintf('Fixer is configurable using following option%s:', 1 === \count($options) ? '' : 's'));
foreach ($options as $option) {
$line = '* <info>'.OutputFormatter::escape($option->getName()).'</info>';
@ -239,7 +239,7 @@ final class DescribeCommand extends Command
$line .= ': '.lcfirst(Preg::replace('/\.$/', '', $description)).'; ';
if ($option->hasDefault()) {
$line .= sprintf(
$line .= \sprintf(
'defaults to <comment>%s</comment>',
Utils::toString($option->getDefault())
);
@ -290,7 +290,7 @@ final class DescribeCommand extends Command
$differ = new FullDiffer();
$diffFormatter = new DiffConsoleFormatter(
$output->isDecorated(),
sprintf(
\sprintf(
'<comment> ---------- begin diff ----------</comment>%s%%s%s<comment> ----------- end diff -----------</comment>',
PHP_EOL,
PHP_EOL
@ -317,12 +317,12 @@ final class DescribeCommand extends Command
if ($fixer instanceof ConfigurableFixerInterface) {
if (null === $configuration) {
$output->writeln(sprintf(' * Example #%d. Fixing with the <comment>default</comment> configuration.', $index + 1));
$output->writeln(\sprintf(' * Example #%d. Fixing with the <comment>default</comment> configuration.', $index + 1));
} else {
$output->writeln(sprintf(' * Example #%d. Fixing with configuration: <comment>%s</comment>.', $index + 1, Utils::toString($codeSample->getConfiguration())));
$output->writeln(\sprintf(' * Example #%d. Fixing with configuration: <comment>%s</comment>.', $index + 1, Utils::toString($codeSample->getConfiguration())));
}
} else {
$output->writeln(sprintf(' * Example #%d.', $index + 1));
$output->writeln(\sprintf(' * Example #%d.', $index + 1));
}
$output->writeln([$diffFormatter->format($diff, ' %s'), '']);
@ -338,9 +338,9 @@ final class DescribeCommand extends Command
foreach ($ruleSetConfigs as $set => $config) {
if (null !== $config) {
$output->writeln(sprintf('* <info>%s</info> with config: <comment>%s</comment>', $set, Utils::toString($config)));
$output->writeln(\sprintf('* <info>%s</info> with config: <comment>%s</comment>', $set, Utils::toString($config)));
} else {
$output->writeln(sprintf('* <info>%s</info> with <comment>default</comment> config', $set));
$output->writeln(\sprintf('* <info>%s</info> with <comment>default</comment> config', $set));
}
}
@ -357,7 +357,7 @@ final class DescribeCommand extends Command
$ruleSetDefinitions = RuleSets::getSetDefinitions();
$fixers = $this->getFixers();
$output->writeln(sprintf('<fg=blue>Description of the <info>`%s`</info> set.</>', $ruleSetDefinitions[$name]->getName()));
$output->writeln(\sprintf('<fg=blue>Description of the <info>`%s`</info> set.</>', $ruleSetDefinitions[$name]->getName()));
$output->writeln('');
$output->writeln($this->replaceRstLinks($ruleSetDefinitions[$name]->getDescription()));
@ -373,7 +373,7 @@ final class DescribeCommand extends Command
foreach ($ruleSetDefinitions[$name]->getRules() as $rule => $config) {
if (str_starts_with($rule, '@')) {
$set = $ruleSetDefinitions[$rule];
$help .= sprintf(
$help .= \sprintf(
" * <info>%s</info>%s\n | %s\n\n",
$rule,
$set->isRisky() ? ' <error>risky</error>' : '',
@ -387,12 +387,12 @@ final class DescribeCommand extends Command
$fixer = $fixers[$rule];
$definition = $fixer->getDefinition();
$help .= sprintf(
$help .= \sprintf(
" * <info>%s</info>%s\n | %s\n%s\n",
$rule,
$fixer->isRisky() ? ' <error>risky</error>' : '',
$definition->getSummary(),
true !== $config ? sprintf(" <comment>| Configuration: %s</comment>\n", Utils::toString($config)) : ''
true !== $config ? \sprintf(" <comment>| Configuration: %s</comment>\n", Utils::toString($config)) : ''
);
}
@ -448,7 +448,7 @@ final class DescribeCommand extends Command
$items = $this->getSetNames();
foreach ($items as $item) {
$output->writeln(sprintf('* <info>%s</info>', $item));
$output->writeln(\sprintf('* <info>%s</info>', $item));
}
}
@ -457,7 +457,7 @@ final class DescribeCommand extends Command
$items = array_keys($this->getFixers());
foreach ($items as $item) {
$output->writeln(sprintf('* <info>%s</info>', $item));
$output->writeln(\sprintf('* <info>%s</info>', $item));
}
}
}

View File

@ -263,10 +263,10 @@ use Symfony\Component\Stopwatch\Stopwatch;
$stdErr->writeln(Application::getAboutWithRuntime(true));
$isParallel = $resolver->getParallelConfig()->getMaxProcesses() > 1;
$stdErr->writeln(sprintf(
$stdErr->writeln(\sprintf(
'Running analysis on %d core%s.',
$resolver->getParallelConfig()->getMaxProcesses(),
$isParallel ? sprintf(
$isParallel ? \sprintf(
's with %d file%s per process',
$resolver->getParallelConfig()->getFilesPerProcess(),
$resolver->getParallelConfig()->getFilesPerProcess() > 1 ? 's' : ''
@ -275,26 +275,26 @@ use Symfony\Component\Stopwatch\Stopwatch;
/** @TODO v4 remove warnings related to parallel runner */
$usageDocs = 'https://cs.symfony.com/doc/usage.html';
$stdErr->writeln(sprintf(
$stdErr->writeln(\sprintf(
$stdErr->isDecorated() ? '<bg=yellow;fg=black;>%s</>' : '%s',
$isParallel
? 'Parallel runner is an experimental feature and may be unstable, use it at your own risk. Feedback highly appreciated!'
: sprintf(
: \sprintf(
'You can enable parallel runner and speed up the analysis! Please see %s for more information.',
$stdErr->isDecorated()
? sprintf('<href=%s;bg=yellow;fg=red;bold>usage docs</>', OutputFormatter::escape($usageDocs))
? \sprintf('<href=%s;bg=yellow;fg=red;bold>usage docs</>', OutputFormatter::escape($usageDocs))
: $usageDocs
)
));
$configFile = $resolver->getConfigFile();
$stdErr->writeln(sprintf('Loaded config <comment>%s</comment>%s.', $resolver->getConfig()->getName(), null === $configFile ? '' : ' from "'.$configFile.'"'));
$stdErr->writeln(\sprintf('Loaded config <comment>%s</comment>%s.', $resolver->getConfig()->getName(), null === $configFile ? '' : ' from "'.$configFile.'"'));
if ($resolver->getUsingCache()) {
$cacheFile = $resolver->getCacheFile();
if (is_file($cacheFile)) {
$stdErr->writeln(sprintf('Using cache file "%s".', $cacheFile));
$stdErr->writeln(\sprintf('Using cache file "%s".', $cacheFile));
}
}
}
@ -303,7 +303,7 @@ use Symfony\Component\Stopwatch\Stopwatch;
if (null !== $stdErr && $resolver->configFinderIsOverridden()) {
$stdErr->writeln(
sprintf($stdErr->isDecorated() ? '<bg=yellow;fg=black;>%s</>' : '%s', 'Paths from configuration file have been overridden by paths provided as command arguments.')
\sprintf($stdErr->isDecorated() ? '<bg=yellow;fg=black;>%s</>' : '%s', 'Paths from configuration file have been overridden by paths provided as command arguments.')
);
}

View File

@ -80,7 +80,7 @@ final class ListSetsCommand extends Command
$formats = $factory->getFormats();
sort($formats);
throw new InvalidConfigurationException(sprintf('The format "%s" is not defined, supported are %s.', $format, Utils::naturalLanguageJoin($formats)));
throw new InvalidConfigurationException(\sprintf('The format "%s" is not defined, supported are %s.', $format, Utils::naturalLanguageJoin($formats)));
}
return $reporter;

View File

@ -102,7 +102,7 @@ final class SelfUpdateCommand extends Command
$latestVersion = $this->versionChecker->getLatestVersion();
$latestVersionOfCurrentMajor = $this->versionChecker->getLatestVersionOfMajor($currentMajor);
} catch (\Exception $exception) {
$output->writeln(sprintf(
$output->writeln(\sprintf(
'<error>Unable to determine newest version: %s</error>',
$exception->getMessage()
));
@ -122,8 +122,8 @@ final class SelfUpdateCommand extends Command
0 !== $this->versionChecker->compareVersions($latestVersionOfCurrentMajor, $latestVersion)
&& true !== $input->getOption('force')
) {
$output->writeln(sprintf('<info>A new major version of PHP CS Fixer is available</info> (<comment>%s</comment>)', $latestVersion));
$output->writeln(sprintf('<info>Before upgrading please read</info> https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/%s/UPGRADE-v%s.md', $latestVersion, $currentMajor + 1));
$output->writeln(\sprintf('<info>A new major version of PHP CS Fixer is available</info> (<comment>%s</comment>)', $latestVersion));
$output->writeln(\sprintf('<info>Before upgrading please read</info> https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/%s/UPGRADE-v%s.md', $latestVersion, $currentMajor + 1));
$output->writeln('<info>If you are ready to upgrade run this command with</info> <comment>-f</comment>');
$output->writeln('<info>Checking for new minor/patch version...</info>');
@ -143,7 +143,7 @@ final class SelfUpdateCommand extends Command
}
if (!is_writable($localFilename)) {
$output->writeln(sprintf('<error>No permission to update</error> "%s" <error>file.</error>', $localFilename));
$output->writeln(\sprintf('<error>No permission to update</error> "%s" <error>file.</error>', $localFilename));
return 1;
}
@ -152,7 +152,7 @@ final class SelfUpdateCommand extends Command
$remoteFilename = $this->toolInfo->getPharDownloadUri($remoteTag);
if (false === @copy($remoteFilename, $tempFilename)) {
$output->writeln(sprintf('<error>Unable to download new version</error> %s <error>from the server.</error>', $remoteTag));
$output->writeln(\sprintf('<error>Unable to download new version</error> %s <error>from the server.</error>', $remoteTag));
return 1;
}
@ -162,7 +162,7 @@ final class SelfUpdateCommand extends Command
$pharInvalidityReason = $this->pharChecker->checkFileValidity($tempFilename);
if (null !== $pharInvalidityReason) {
unlink($tempFilename);
$output->writeln(sprintf('<error>The download of</error> %s <error>is corrupt (%s).</error>', $remoteTag, $pharInvalidityReason));
$output->writeln(\sprintf('<error>The download of</error> %s <error>is corrupt (%s).</error>', $remoteTag, $pharInvalidityReason));
$output->writeln('<error>Please re-run the "self-update" command to try again.</error>');
return 1;
@ -170,7 +170,7 @@ final class SelfUpdateCommand extends Command
rename($tempFilename, $localFilename);
$output->writeln(sprintf('<info>PHP CS Fixer updated</info> (<comment>%s</comment> -> <comment>%s</comment>)', $currentVersion, $remoteTag));
$output->writeln(\sprintf('<info>PHP CS Fixer updated</info> (<comment>%s</comment> -> <comment>%s</comment>)', $currentVersion, $remoteTag));
return 0;
}

View File

@ -348,7 +348,7 @@ final class ConfigurationResolver
);
if (\count($riskyFixers) > 0) {
throw new InvalidConfigurationException(sprintf('The rules contain risky fixers (%s), but they are not allowed to run. Perhaps you forget to use --allow-risky=yes option?', Utils::naturalLanguageJoin($riskyFixers)));
throw new InvalidConfigurationException(\sprintf('The rules contain risky fixers (%s), but they are not allowed to run. Perhaps you forget to use --allow-risky=yes option?', Utils::naturalLanguageJoin($riskyFixers)));
}
}
}
@ -392,7 +392,7 @@ final class ConfigurationResolver
: $cwd.\DIRECTORY_SEPARATOR.$path;
if (!file_exists($absolutePath)) {
throw new InvalidConfigurationException(sprintf(
throw new InvalidConfigurationException(\sprintf(
'The path "%s" is not readable.',
$path
));
@ -422,7 +422,7 @@ final class ConfigurationResolver
? ProgressOutputType::NONE
: ProgressOutputType::BAR;
} elseif (!\in_array($progressType, ProgressOutputType::all(), true)) {
throw new InvalidConfigurationException(sprintf(
throw new InvalidConfigurationException(\sprintf(
'The progress type "%s" is not defined, supported are %s.',
$progressType,
Utils::naturalLanguageJoin(ProgressOutputType::all())
@ -452,7 +452,7 @@ final class ConfigurationResolver
$formats = $reporterFactory->getFormats();
sort($formats);
throw new InvalidConfigurationException(sprintf('The format "%s" is not defined, supported are %s.', $format, Utils::naturalLanguageJoin($formats)));
throw new InvalidConfigurationException(\sprintf('The format "%s" is not defined, supported are %s.', $format, Utils::naturalLanguageJoin($formats)));
}
}
@ -551,7 +551,7 @@ final class ConfigurationResolver
if (null !== $configFile) {
if (false === file_exists($configFile) || false === is_readable($configFile)) {
throw new InvalidConfigurationException(sprintf('Cannot read config file "%s".', $configFile));
throw new InvalidConfigurationException(\sprintf('Cannot read config file "%s".', $configFile));
}
return [$configFile];
@ -660,7 +660,7 @@ final class ConfigurationResolver
$rules = json_decode($rules, true);
if (JSON_ERROR_NONE !== json_last_error()) {
throw new InvalidConfigurationException(sprintf('Invalid JSON rules input: "%s".', json_last_error_msg()));
throw new InvalidConfigurationException(\sprintf('Invalid JSON rules input: "%s".', json_last_error_msg()));
}
return $rules;
@ -701,7 +701,7 @@ final class ConfigurationResolver
foreach ($rules as $key => $value) {
if (\is_int($key)) {
throw new InvalidConfigurationException(sprintf('Missing value for "%s" rule/set.', $value));
throw new InvalidConfigurationException(\sprintf('Missing value for "%s" rule/set.', $value));
}
$ruleSet[$key] = true;
@ -777,7 +777,7 @@ final class ConfigurationResolver
foreach ($unknownFixers as $unknownFixer) {
if (isset($renamedRules[$unknownFixer])) { // Check if present as old renamed rule
$hasOldRule = true;
$message .= sprintf(
$message .= \sprintf(
'"%s" is renamed (did you mean "%s"?%s), ',
$unknownFixer,
$renamedRules[$unknownFixer]['new_name'],
@ -786,7 +786,7 @@ final class ConfigurationResolver
} else { // Go to normal matcher if it is not a renamed rule
$matcher = new WordMatcher($availableFixers);
$alternative = $matcher->match($unknownFixer);
$message .= sprintf(
$message .= \sprintf(
'"%s"%s, ',
$unknownFixer,
null === $alternative ? '' : ' (did you mean "'.$alternative.'"?)'
@ -808,8 +808,8 @@ final class ConfigurationResolver
if (isset($rules[$fixerName]) && $fixer instanceof DeprecatedFixerInterface) {
$successors = $fixer->getSuccessorsNames();
$messageEnd = [] === $successors
? sprintf(' and will be removed in version %d.0.', Application::getMajorVersion() + 1)
: sprintf('. Use %s instead.', str_replace('`', '"', Utils::naturalLanguageJoinWithBackticks($successors)));
? \sprintf(' and will be removed in version %d.0.', Application::getMajorVersion() + 1)
: \sprintf('. Use %s instead.', str_replace('`', '"', Utils::naturalLanguageJoinWithBackticks($successors)));
Utils::triggerDeprecation(new \RuntimeException("Rule \"{$fixerName}\" is deprecated{$messageEnd}"));
}
@ -836,7 +836,7 @@ final class ConfigurationResolver
$modes,
true
)) {
throw new InvalidConfigurationException(sprintf(
throw new InvalidConfigurationException(\sprintf(
'The path-mode "%s" is not defined, supported are %s.',
$this->options['path-mode'],
Utils::naturalLanguageJoin($modes)
@ -926,7 +926,7 @@ final class ConfigurationResolver
private function setOption(string $name, $value): void
{
if (!\array_key_exists($name, $this->options)) {
throw new InvalidConfigurationException(sprintf('Unknown option name: "%s".', $name));
throw new InvalidConfigurationException(\sprintf('Unknown option name: "%s".', $name));
}
$this->options[$name] = $value;
@ -937,7 +937,7 @@ final class ConfigurationResolver
$value = $this->options[$optionName];
if (!\is_string($value)) {
throw new InvalidConfigurationException(sprintf('Expected boolean or string value for option "%s".', $optionName));
throw new InvalidConfigurationException(\sprintf('Expected boolean or string value for option "%s".', $optionName));
}
if ('yes' === $value) {
@ -948,7 +948,7 @@ final class ConfigurationResolver
return false;
}
throw new InvalidConfigurationException(sprintf('Expected "yes" or "no" for option "%s", got "%s".', $optionName, $value));
throw new InvalidConfigurationException(\sprintf('Expected "yes" or "no" for option "%s", got "%s".', $optionName, $value));
}
private static function separatedContextLessInclude(string $path): ConfigInterface
@ -957,7 +957,7 @@ final class ConfigurationResolver
// verify that the config has an instance of Config
if (!$config instanceof ConfigInterface) {
throw new InvalidConfigurationException(sprintf('The config file: "%s" does not return a "PhpCsFixer\ConfigInterface" instance. Got: "%s".', $path, \is_object($config) ? \get_class($config) : \gettype($config)));
throw new InvalidConfigurationException(\sprintf('The config file: "%s" does not return a "PhpCsFixer\ConfigInterface" instance. Got: "%s".', $path, \is_object($config) ? \get_class($config) : \gettype($config)));
}
return $config;

View File

@ -44,7 +44,7 @@ final class ErrorOutput
*/
public function listErrors(string $process, array $errors): void
{
$this->output->writeln(['', sprintf(
$this->output->writeln(['', \sprintf(
'Files that were not fixed due to errors reported during %s:',
$process
)]);
@ -52,13 +52,13 @@ final class ErrorOutput
$showDetails = $this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERY_VERBOSE;
$showTrace = $this->output->getVerbosity() >= OutputInterface::VERBOSITY_DEBUG;
foreach ($errors as $i => $error) {
$this->output->writeln(sprintf('%4d) %s', $i + 1, $error->getFilePath()));
$this->output->writeln(\sprintf('%4d) %s', $i + 1, $error->getFilePath()));
$e = $error->getSource();
if (!$showDetails || null === $e) {
continue;
}
$class = sprintf('[%s]', \get_class($e));
$class = \sprintf('[%s]', \get_class($e));
$message = $e->getMessage();
$code = $e->getCode();
if (0 !== $code) {
@ -80,7 +80,7 @@ final class ErrorOutput
$line .= str_repeat(' ', $length - \strlen($line));
}
$this->output->writeln(sprintf(' <error> %s </error>', $this->prepareOutput($line)));
$this->output->writeln(\sprintf(' <error> %s </error>', $this->prepareOutput($line)));
}
if ($showTrace && !$e instanceof LintingException) { // stack trace of lint exception is of no interest
@ -99,13 +99,13 @@ final class ErrorOutput
if (Error::TYPE_LINT === $error->getType() && 0 < \count($error->getAppliedFixers())) {
$this->output->writeln('');
$this->output->writeln(sprintf(' Applied fixers: <comment>%s</comment>', implode(', ', $error->getAppliedFixers())));
$this->output->writeln(\sprintf(' Applied fixers: <comment>%s</comment>', implode(', ', $error->getAppliedFixers())));
$diff = $error->getDiff();
if (null !== $diff) {
$diffFormatter = new DiffConsoleFormatter(
$this->isDecorated,
sprintf(
\sprintf(
'<comment> ---------- begin diff ----------</comment>%s%%s%s<comment> ----------- end diff -----------</comment>',
PHP_EOL,
PHP_EOL
@ -132,18 +132,18 @@ final class ErrorOutput
private function outputTrace(array $trace): void
{
if (isset($trace['class'], $trace['type'], $trace['function'])) {
$this->output->writeln(sprintf(
$this->output->writeln(\sprintf(
' <comment>%s</comment>%s<comment>%s()</comment>',
$this->prepareOutput($trace['class']),
$this->prepareOutput($trace['type']),
$this->prepareOutput($trace['function'])
));
} elseif (isset($trace['function'])) {
$this->output->writeln(sprintf(' <comment>%s()</comment>', $this->prepareOutput($trace['function'])));
$this->output->writeln(\sprintf(' <comment>%s()</comment>', $this->prepareOutput($trace['function'])));
}
if (isset($trace['file'])) {
$this->output->writeln(sprintf(' in <info>%s</info> at line <info>%d</info>', $this->prepareOutput($trace['file']), $trace['line']));
$this->output->writeln(\sprintf(' in <info>%s</info> at line <info>%d</info>', $this->prepareOutput($trace['file']), $trace['line']));
}
}

View File

@ -82,7 +82,7 @@ final class DotsOutput implements ProgressOutputInterface
public function onFixerFileProcessed(FixerFileProcessedEvent $event): void
{
$status = self::$eventStatusMap[$event->getStatus()];
$this->getOutput()->write($this->getOutput()->isDecorated() ? sprintf($status['format'], $status['symbol']) : $status['symbol']);
$this->getOutput()->write($this->getOutput()->isDecorated() ? \sprintf($status['format'], $status['symbol']) : $status['symbol']);
++$this->processedFiles;
@ -90,7 +90,7 @@ final class DotsOutput implements ProgressOutputInterface
$isLast = $this->processedFiles === $this->context->getFilesCount();
if (0 === $symbolsOnCurrentLine || $isLast) {
$this->getOutput()->write(sprintf(
$this->getOutput()->write(\sprintf(
'%s %'.\strlen((string) $this->context->getFilesCount()).'d / %d (%3d%%)',
$isLast && 0 !== $symbolsOnCurrentLine ? str_repeat(' ', $this->symbolsPerLine - $symbolsOnCurrentLine) : '',
$this->processedFiles,
@ -114,10 +114,10 @@ final class DotsOutput implements ProgressOutputInterface
continue;
}
$symbols[$symbol] = sprintf('%s-%s', $this->getOutput()->isDecorated() ? sprintf($status['format'], $symbol) : $symbol, $status['description']);
$symbols[$symbol] = \sprintf('%s-%s', $this->getOutput()->isDecorated() ? \sprintf($status['format'], $symbol) : $symbol, $status['description']);
}
$this->getOutput()->write(sprintf("\nLegend: %s\n", implode(', ', $symbols)));
$this->getOutput()->write(\sprintf("\nLegend: %s\n", implode(', ', $symbols)));
}
private function getOutput(): OutputInterface

View File

@ -38,7 +38,7 @@ final class ProgressOutputFactory
if (!$this->isBuiltInType($outputType)) {
throw new \InvalidArgumentException(
sprintf(
\sprintf(
'Something went wrong, "%s" output type is not supported',
$outputType
)

View File

@ -59,7 +59,7 @@ final class JunitReporter implements ReporterInterface
if ($reportSummary->getTime() > 0) {
$testsuite->setAttribute(
'time',
sprintf(
\sprintf(
'%.3f',
$reportSummary->getTime() / 1_000
)

View File

@ -36,7 +36,7 @@ final class ReporterFactory
foreach (SymfonyFinder::create()->files()->name('*Reporter.php')->in(__DIR__) as $file) {
$relativeNamespace = $file->getRelativePath();
$builtInReporters[] = sprintf(
$builtInReporters[] = \sprintf(
'%s\%s%s',
__NAMESPACE__,
'' !== $relativeNamespace ? $relativeNamespace.'\\' : '',
@ -60,7 +60,7 @@ final class ReporterFactory
$format = $reporter->getFormat();
if (isset($this->reporters[$format])) {
throw new \UnexpectedValueException(sprintf('Reporter for format "%s" is already registered.', $format));
throw new \UnexpectedValueException(\sprintf('Reporter for format "%s" is already registered.', $format));
}
$this->reporters[$format] = $reporter;
@ -82,7 +82,7 @@ final class ReporterFactory
public function getReporter(string $format): ReporterInterface
{
if (!isset($this->reporters[$format])) {
throw new \UnexpectedValueException(sprintf('Reporter for format "%s" is not registered.', $format));
throw new \UnexpectedValueException(\sprintf('Reporter for format "%s" is not registered.', $format));
}
return $this->reporters[$format];

View File

@ -35,7 +35,7 @@ final class TextReporter implements ReporterInterface
$identifiedFiles = 0;
foreach ($reportSummary->getChanged() as $file => $fixResult) {
++$identifiedFiles;
$output .= sprintf('%4d) %s', $identifiedFiles, $file);
$output .= \sprintf('%4d) %s', $identifiedFiles, $file);
if ($reportSummary->shouldAddAppliedFixers()) {
$output .= $this->getAppliedFixers(
@ -62,7 +62,7 @@ final class TextReporter implements ReporterInterface
*/
private function getAppliedFixers(bool $isDecoratedOutput, array $appliedFixers): string
{
return sprintf(
return \sprintf(
$isDecoratedOutput ? ' (<comment>%s</comment>)' : ' (%s)',
implode(', ', $appliedFixers)
);
@ -74,7 +74,7 @@ final class TextReporter implements ReporterInterface
return '';
}
$diffFormatter = new DiffConsoleFormatter($isDecoratedOutput, sprintf(
$diffFormatter = new DiffConsoleFormatter($isDecoratedOutput, \sprintf(
'<comment> ---------- begin diff ----------</comment>%s%%s%s<comment> ----------- end diff -----------</comment>',
PHP_EOL,
PHP_EOL
@ -89,7 +89,7 @@ final class TextReporter implements ReporterInterface
return '';
}
return PHP_EOL.sprintf(
return PHP_EOL.\sprintf(
'%s %d of %d %s in %.3f seconds, %.2f MB memory used'.PHP_EOL,
$isDryRun ? 'Found' : 'Fixed',
$identifiedFiles,

View File

@ -38,7 +38,7 @@ final class ReporterFactory
foreach (SymfonyFinder::create()->files()->name('*Reporter.php')->in(__DIR__) as $file) {
$relativeNamespace = $file->getRelativePath();
$builtInReporters[] = sprintf(
$builtInReporters[] = \sprintf(
'%s\%s%s',
__NAMESPACE__,
'' !== $relativeNamespace ? $relativeNamespace.'\\' : '',
@ -59,7 +59,7 @@ final class ReporterFactory
$format = $reporter->getFormat();
if (isset($this->reporters[$format])) {
throw new \UnexpectedValueException(sprintf('Reporter for format "%s" is already registered.', $format));
throw new \UnexpectedValueException(\sprintf('Reporter for format "%s" is already registered.', $format));
}
$this->reporters[$format] = $reporter;
@ -81,7 +81,7 @@ final class ReporterFactory
public function getReporter(string $format): ReporterInterface
{
if (!isset($this->reporters[$format])) {
throw new \UnexpectedValueException(sprintf('Reporter for format "%s" is not registered.', $format));
throw new \UnexpectedValueException(\sprintf('Reporter for format "%s" is not registered.', $format));
}
return $this->reporters[$format];

View File

@ -37,7 +37,7 @@ final class TextReporter implements ReporterInterface
$output = '';
foreach ($sets as $i => $set) {
$output .= sprintf('%2d) %s', $i + 1, $set->getName()).PHP_EOL.' '.$set->getDescription().PHP_EOL;
$output .= \sprintf('%2d) %s', $i + 1, $set->getName()).PHP_EOL.' '.$set->getDescription().PHP_EOL;
if ($set->isRisky()) {
$output .= ' Set contains risky rules.'.PHP_EOL;

View File

@ -34,7 +34,7 @@ final class GithubClient implements GithubClientInterface
);
if (false === $result) {
throw new \RuntimeException(sprintf('Failed to load tags at "%s".', $this->url));
throw new \RuntimeException(\sprintf('Failed to load tags at "%s".', $this->url));
}
/**
@ -47,7 +47,7 @@ final class GithubClient implements GithubClientInterface
*/
$result = json_decode($result, true);
if (JSON_ERROR_NONE !== json_last_error()) {
throw new \RuntimeException(sprintf(
throw new \RuntimeException(\sprintf(
'Failed to read response from "%s" as JSON: %s.',
$this->url,
json_last_error_msg()

View File

@ -50,7 +50,7 @@ final class WarningsDetector
if ($this->toolInfo->isInstalledByComposer()) {
$details = $this->toolInfo->getComposerInstallationDetails();
if (ToolInfo::COMPOSER_LEGACY_PACKAGE_NAME === $details['name']) {
$this->warnings[] = sprintf(
$this->warnings[] = \sprintf(
'You are running PHP CS Fixer installed with old vendor `%s`. Please update to `%s`.',
ToolInfo::COMPOSER_LEGACY_PACKAGE_NAME,
ToolInfo::COMPOSER_PACKAGE_NAME

View File

@ -42,7 +42,7 @@ final class DiffConsoleFormatter
? $this->template
: Preg::replace('/<[^<>]+>/', '', $this->template);
return sprintf(
return \sprintf(
$template,
implode(
PHP_EOL,
@ -61,7 +61,7 @@ final class DiffConsoleFormatter
$colour = 'cyan';
}
return sprintf('<fg=%s>%s</fg=%s>', $colour, OutputFormatter::escape($matches[0]), $colour);
return \sprintf('<fg=%s>%s</fg=%s>', $colour, OutputFormatter::escape($matches[0]), $colour);
},
$line,
1,
@ -73,7 +73,7 @@ final class DiffConsoleFormatter
}
}
return sprintf($lineTemplate, $line);
return \sprintf($lineTemplate, $line);
},
Preg::split('#\R#u', $diff)
)

Some files were not shown because too many files have changed in this diff Show More